/* ==========================================================================
   Heimatlichter Woo Inquiry - Frontend Styles (Premium UI/UX)
   ========================================================================== */

/* 1. VERSTECKEN VON PREISEN, SUMMEN & ALTEN ÜBERSCHRIFTEN */
.woocommerce-Price-amount, 
.woocommerce-Price-currencySymbol,
.amount,
.product-price, 
.product-subtotal,
.cart_totals .cart-subtotal,
.cart_totals .order-total,
.woocommerce-checkout-review-order-table tfoot,
.e-checkout__totals,
#order_review .order-total,
#order_review .cart-subtotal,
.woocommerce-additional-fields h3 { 
    display: none !important; 
}

.woocommerce .cart-collaterals .cart_totals, .woocommerce-page .cart-collaterals .cart_totals {
  width:100%;
}

/* 2. LAYOUT-RESETS & THEME-OVERRIDE */
.woocommerce::before,
.woocommerce::after,
.woocommerce-cart .woocommerce::before,
.woocommerce-cart .woocommerce::after,
.woocommerce-checkout form.checkout::before,
.woocommerce-checkout form.checkout::after,
.col2-set::before,
.col2-set::after {
    display: none !important;
}

.woocommerce {
    max-width: 100%;
}

/* 3. WARENKORB (CART) - 66/30 LAYOUT */
.hl-inq-cart-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
    margin-top: 20px;
}

.woocommerce-cart-form {
    flex: 1 1 60%;
    max-width: 65%;
}

/* 4. SIDEBARS: WARENKORB (TRUST-BOX) & KASSE (ARTIKEL) - GLEICHES DESIGN */
.cart-collaterals,
.woocommerce-checkout #order_review {
    flex: 1 1 30%;
    min-width: 320px;
    position: sticky !important; 
    top: 40px;
    background: #fafafa;
    padding: 35px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    border: 1px solid #f5f5f5;
    box-sizing: border-box;
}

/* 5. KASSE (CHECKOUT) - 50/50 LAYOUT */
.woocommerce-checkout form.checkout {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important; 
    align-items: flex-start !important;
}

.woocommerce-checkout #customer_details {
    width: 48% !important;
    flex: 0 0 48% !important; 
    float: none !important;
}

.woocommerce-checkout #order_review {
    width: 48% !important;
    flex: 0 0 48% !important; 
    float: none !important;
}

.woocommerce-checkout #customer_details .col-1, 
.woocommerce-checkout #customer_details .col-2 {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding: 0 !important;
}

.woocommerce-checkout #order_review_heading { 
    display: none !important; 
}

/* Warenkorb & Thank You: Produkt-Karten */
.hl-inq-cart-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hl-inq-cart-item {
    display: flex;
    align-items: center;
    background: #ffffff;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #eaeaea;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    gap: 24px;
}

.hl-inq-cart-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.hl-inq-cart-item__image {
    width: 90px;
    flex-shrink: 0;
}

.hl-inq-cart-item__image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.hl-inq-cart-item__details {
    flex-grow: 1;
}

.hl-inq-cart-item__name a, .hl-inq-cart-item__name {
    font-size: 1.15rem;
    font-weight: 600;
    color: #222;
    text-decoration: none !important;
    line-height: 1.3;
    display: block;
    margin-bottom: 5px;
}

.hl-inq-cart-item__short-desc {
    font-size: 0.85rem;
    color: #777;
    line-height: 1.4;
}

/* Plus/Minus Quantity UI */
.hl-inq-qty-controls {
    display: inline-flex;
    align-items: center;
    background: #fafafa;
    border: 1px solid #e1e1e1;
    border-radius: 10px;
    overflow: hidden;
}

.hl-inq-qty-btn {
    background: transparent;
    border: none;
    width: 36px;
    height: 42px;
    font-size: 18px;
    color: #555;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hl-inq-qty-btn:hover {
    background: #eaeaea;
    color: #000;
}

.hl-inq-cart-item__quantity .quantity input.qty {
    width: 45px !important;
    height: 42px !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    -moz-appearance: textfield;
}
.hl-inq-cart-item__quantity .quantity input.qty::-webkit-outer-spin-button,
.hl-inq-cart-item__quantity .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.hl-inq-cart-item__remove a.remove {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 36px !important;
    height: 36px !important;
    background: #fdfdfd !important;
    color: #ff4d4d !important;
    border: 1px solid #ffe6e6 !important;
    border-radius: 50% !important;
    font-size: 20px !important;
    line-height: 1 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.hl-inq-cart-item__remove a.remove:hover {
    background: #ff4d4d !important;
    color: #ffffff !important;
    border-color: #ff4d4d !important;
    transform: scale(1.1);
}

/* Trust Box (Sidebar Warenkorb) */
.cart_totals h2 {
    display: none !important; 
}

.hf-trust-checklist {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.hf-trust-checklist li {
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #444;
}

.hf-trust-checklist .dashicons {
    color: #222;
    margin-right: 12px;
    font-size: 20px;
    margin-top: 2px;
}

.hf-trust-note {
    font-size: 0.85rem;
    color: #888;
    margin: 0;
    line-height: 1.4;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* 6. FORMULARE & EINGABEFELDER (APPLE-STYLE) */
.woocommerce form .form-row {
    margin-bottom: 0px !important;
    width: 100%;
    padding: 0 !important;
}

.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.woocommerce form .form-row-first,
.woocommerce form .form-row-last {
    width: calc(50% - 10px) !important;
    float: none !important;
}

.woocommerce form .form-row.hl-inq-col-1-3 { width: calc(33.333% - 10px) !important; float: none !important; }
.woocommerce form .form-row.hl-inq-col-2-3 { width: calc(66.666% - 10px) !important; float: none !important; }

/* Custom Review Fields (Mietzeitraum etc.) */
.hl-inq-custom-review-fields {
    margin: 40px 0; 
    padding-top: 40px; 
    border-top: 2px solid #eaeaea;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.hl-inq-custom-review-fields h3 {
    width: 100%;
    margin-bottom: 10px;
}
.hl-inq-custom-review-fields #hl_inq_date_from_field,
.hl-inq-custom-review-fields #hl_inq_date_to_field {
    width: calc(50% - 10px) !important;
    margin-bottom: 0 !important;
}
.hl-inq-custom-review-fields .clear { display: none; }

.woocommerce-checkout .form-row label { display: none !important; }
.woocommerce-checkout .form-row.terms label, 
.woocommerce-checkout .form-row.create-account label { display: inline-block !important; }

.woocommerce-checkout .form-row.hl-inq-show-label label { 
    display: block !important; 
    font-weight: 600; 
    margin-bottom: 10px; 
    color: #333; 
    font-size: 0.95rem;
}

/* Inputs & Textareas Standard */
.woocommerce form .form-row input.input-text, 
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    padding: 16px 20px !important; 
    border-radius: 12px !important; 
    border: 1px solid #e1e1e1 !important; 
    background: #fafafa !important; 
    width: 100% !important; 
    box-sizing: border-box !important; 
    font-size: 16px !important; 
    color: #222 !important; 
    transition: all 0.3s ease !important;
    box-shadow: none !important; 
    margin: 0 !important;
    line-height: 1.5 !important;
}

/* Inputs in der Sidebar (Invertierung) */
.woocommerce-checkout #order_review input.input-text, 
.woocommerce-checkout #order_review textarea,
.woocommerce-checkout #order_review select,
.woocommerce-checkout #order_review .select2-container .select2-selection--single {
    background: #ffffff !important;
}

/* ----------------------------------------------------
   PLACEHOLDER STYLING
------------------------------------------------------- */
.woocommerce form .form-row input.input-text::placeholder, 
.woocommerce form .form-row textarea::placeholder {
    color: #999 !important;
    opacity: 1 !important; 
}

/* Placeholder-Farbe für das Select2 Dropdown (z.B. Länderauswahl) */
.woocommerce form .form-row .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #999 !important;
}
/* ---------------------------------------------------- */

.woocommerce form .form-row textarea {
    min-height: 120px !important;
    resize: vertical !important;
}

.woocommerce form .form-row input.input-text:focus, 
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    background: #ffffff !important;
    border-color: #333 !important; 
    box-shadow: 0 0 0 4px rgba(0,0,0,0.08) !important; 
    outline: none !important;
}

/* FIX FÜR SELECT2 (WooCommerce Länder-Feld) */
.woocommerce form .form-row .select2-container .select2-selection--single {
    height: auto !important; padding: 16px 20px !important; border-radius: 12px !important; border: 1px solid #e1e1e1 !important; background: #fafafa !important; box-shadow: none !important; display: flex; align-items: center; transition: all 0.3s ease !important;
}
.woocommerce form .form-row .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #222 !important; font-size: 16px !important; line-height: 1.5 !important; padding: 0 !important;
}
.woocommerce form .form-row .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important; right: 15px !important;
}
.woocommerce form .form-row .select2-container--default.select2-container--focus .select2-selection--single,
.woocommerce form .form-row .select2-container--default.select2-container--open .select2-selection--single {
    background: #ffffff !important; border-color: #333 !important; box-shadow: 0 0 0 4px rgba(0,0,0,0.08) !important;
}

/* ----------------------------------------------------
   7. BACK LINK (ZURÜCK ZUM WARENKORB)
------------------------------------------------------- */
.hl-inq-back-link-wrapper {
    margin-bottom: 25px;
}
.hl-inq-back-to-cart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #777 !important;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none !important;
    transition: color 0.2s ease, transform 0.2s ease !important;
}
.hl-inq-back-to-cart span {
    font-size: 2.2rem; 
    line-height: 0; 
    position: relative;
    top: -2px; 
    transition: transform 0.2s ease;
    display: inline-block;
}
.hl-inq-back-to-cart:hover {
    color: #222 !important;
}
.hl-inq-back-to-cart:hover span {
    transform: translateX(-4px); 
}

/* 8. KASSE (REVIEW ORDER & ZAHLUNG) */
.hl-inq-review-order-list h3 {
    font-size: 1.3rem;
    margin-bottom: 24px;
    font-weight: 600;
}

.hl-inq-review-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #ffffff; 
    border: 1px solid #eaeaea;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.hl-inq-review-item__image {
    width: 60px;
    flex-shrink: 0;
    margin-right: 15px;
}

.hl-inq-review-item__image img {
    border-radius: 8px;
    width: 100%;
    height: auto;
}

.hl-inq-review-item__info {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hl-inq-review-item__name {
    font-weight: 600;
    color: #222;
}

.hl-inq-review-item__qty {
    background: #fafafa;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid #eee;
}

/* Payment-Box & Datenschutz (Order Flex) */
#payment {
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

#payment .place-order {
    display: flex;
    flex-direction: column;
}

#payment .place-order button#place_order {
    order: 1;
    margin-bottom: 15px !important;
}

#payment .place-order .woocommerce-terms-and-conditions-wrapper {
    order: 2;
}

.woocommerce-privacy-policy-text p {
    font-size: 0.75rem !important;
    color: #888;
    text-align: center;
    line-height: 1.4;
    margin: 0;
}

/* 9. BUTTONS (PREMIUM LOOK OHNE UNTERSTRICH) */
.woocommerce button.button.alt,
.woocommerce a.button.alt,
.wc-proceed-to-checkout a.checkout-button,
#place_order {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    background: #222 !important;
    color: #fff !important;
    padding: 20px 24px !important;
    border-radius: 12px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    border: none !important;
    text-decoration: none !important; 
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    cursor: pointer;
    margin-top: 20px;
}

.woocommerce button.button.alt:hover,
.woocommerce a.button.alt:hover,
.wc-proceed-to-checkout a.checkout-button:hover,
#place_order:hover {
    transform: translateY(-2px);
    background: #000 !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    text-decoration: none !important;
}

/* 10. WOOCOMMERCE ERROR & VALIDATION FIXES */
.woocommerce-checkout form.checkout > .woocommerce-NoticeGroup,
.woocommerce-checkout form.checkout > .woocommerce-error,
.woocommerce-checkout form.checkout > .woocommerce-message,
.woocommerce-checkout form.checkout > .woocommerce-info {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce-error,
.woocommerce-notices-wrapper,
ul.woocommerce-error,
div.woocommerce-error,
span.woocommerce-error {
    display: none !important;
}

.woocommerce form .form-row.woocommerce-invalid > *:not(label):not(.woocommerce-input-wrapper):not(.clear):not(.description) {
    display: none !important;
}

.woocommerce form .form-row.woocommerce-invalid .woocommerce-input-wrapper > *:not(input):not(select):not(textarea):not(.select2):not(.select2-container) {
    display: none !important;
}

.woocommerce form .form-row.woocommerce-invalid input.input-text, 
.woocommerce form .form-row.woocommerce-invalid textarea,
.woocommerce form .form-row.woocommerce-invalid select,
.woocommerce form .form-row.woocommerce-invalid .select2-container--default .select2-selection--single {
    border-color: #ff4d4d !important;
    box-shadow: 0 0 0 3px rgba(255, 77, 77, 0.15) !important;
}

/* 11. RESPONSIVE DESIGN (MOBILE) */
@media (max-width: 992px) {
    .woocommerce-checkout form.checkout,
    .hl-inq-cart-wrapper { 
        flex-direction: column !important; 
    }
    
    .woocommerce-checkout #customer_details,
    .woocommerce-checkout #order_review,
    .woocommerce-cart-form,
    .cart-collaterals { 
        width: 100% !important; 
        max-width: 100% !important;
        flex: 1 1 100% !important;
    }
    
    .cart-collaterals,
    .woocommerce-checkout #order_review {
        position: static !important;
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .hl-inq-cart-item { 
        display: grid !important; 
        grid-template-columns: 80px 1fr; 
        gap: 15px !important;
        padding: 20px !important;
        align-items: start !important; 
        position: relative !important; 
    }
    .hl-inq-cart-item__image {
        grid-column: 1 / 2;
        width: 100% !important;
        margin: 0 !important;
    }
    .hl-inq-cart-item__details {
        grid-column: 2 / 3;
        width: 100% !important;
        padding: 0 !important;
        padding-right: 35px !important;
        box-sizing: border-box !important;
    }
    .hl-inq-cart-item__quantity { 
        grid-column: 1 / 3; 
        width: 100% !important; 
        margin-top: 5px !important; 
        padding: 0 !important;
        border-top: none !important; 
        display: flex;
        justify-content: flex-start !important; 
    }
    .hl-inq-cart-item__remove {
        position: absolute !important;
        top: 15px !important;
        right: 15px !important;
        margin: 0 !important;
    }
    
    .woocommerce form .form-row-first, 
    .woocommerce form .form-row-last,
    .woocommerce form .form-row.hl-inq-col-1-3,
    .woocommerce form .form-row.hl-inq-col-2-3,
    .hl-inq-custom-review-fields #hl_inq_date_from_field,
    .hl-inq-custom-review-fields #hl_inq_date_to_field { 
        width: 100% !important; 
    }
}

/* 12. CONFIRMATION PAGE (THANK YOU / ORDER RECEIVED) */
.woocommerce-order {
    max-width: 850px;
    margin: 60px auto;
    text-align: center;
}

.hl-inq-success-icon {
    width: 110px; 
    height: 110px; 
    background: #28a745; /* Sattes Erfolgs-Grün */
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 55px; 
    margin: 0 auto 35px;
    box-shadow: 0 15px 35px rgba(40, 167, 69, 0.25);
    animation: hlPopIn 0.5s cubic-bezier(0.26, 1.36, 0.74, 1.29);
}

@keyframes hlPopIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.woocommerce-order-received .entry-title,
.woocommerce-order-received h1 {
    display: none; 
}

.hl-inq-thankyou-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #222;
}

.hl-inq-thankyou-header p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 50px;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Meta Card (Nummer, Datum etc) - Bulletproof Desktop */
.woocommerce-order-overview.order_details {
    background: #fafafa;
    border-radius: 24px;
    padding: 40px;
    border: 1px solid #f0f0f0;
    list-style: none;
    display: flex;
    justify-content: space-evenly;
    flex-wrap: nowrap; /* Erzwingt eine Zeile auf Desktop */
    margin: 0 0 50px 0;
}

.woocommerce-order-overview li {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
    border-right: 1px solid #eee;
    padding: 0 30px;
    flex: 1;
}

.woocommerce-order-overview li:last-child {
    border-right: none;
}

.woocommerce-order-overview li strong {
    display: block;
    font-size: 1.25rem;
    color: #222;
    margin-top: 10px;
    text-transform: none;
    letter-spacing: normal;
}

/* Details Section */
.woocommerce-order-details {
    text-align: left;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 25px;
    padding: 45px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.03);
}

.woocommerce-order-details__title {
    font-size: 1.8rem !important;
    margin-bottom: 40px !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #fafafa;
    padding-bottom: 20px;
}

.hl-inq-thankyou-meta-box {
    background: #fafafa;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 45px;
    border: 1px solid #f0f0f0;
}

.hl-inq-thankyou-meta-box h4 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    color: #222;
    font-weight: 600;
}

.hl-inq-thankyou-meta-box p {
    margin: 0 0 10px 0;
    color: #555;
    font-size: 1.05rem;
}

@media (max-width: 850px) {
    .woocommerce-order-overview.order_details {
        flex-wrap: wrap;
        gap: 30px;
    }
    .woocommerce-order-overview li {
        border-right: none;
        flex: 1 1 40%;
    }
}

@media (max-width: 600px) {
    .woocommerce-order-overview.order_details {
        flex-direction: column;
        padding: 30px;
    }
    .woocommerce-order-overview li {
        padding: 0;
    }
}