/*
Theme Name: baches-mfm-com-v2
Author: SOYOO
Version: 1.0.1
Text Domain: baches-mfm-com-v2
*/

/* WooCommerce Notices Professional Styling */
.woocommerce-notices-wrapper {
    margin-bottom: 20px;
    width: 100%;
}

.woocommerce-message, .woocommerce-error, .woocommerce-info {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 20px 16px 50px !important;
    background: #f8f9fa !important;
    border-radius: 8px !important;
    border-top: none !important;
    border-left: 4px solid var(--forest-green, #145943) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
    color: #333 !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    position: relative !important;
    flex-wrap: wrap !important;
    gap: 15px;
}

/* Fix the icon position */
.woocommerce-message::before, .woocommerce-error::before, .woocommerce-info::before {
    position: absolute !important;
    left: 18px !important;
    top: 48% !important;
    transform: translateY(-50%) !important;
    color: var(--forest-green, #145943) !important;
    font-size: 18px !important;
}

/* Style the button */
.woocommerce-message .button.wc-forward,
.woocommerce-error .button.wc-forward,
.woocommerce-info .button.wc-forward {
    background-color: var(--forest-green, #145943) !important;
    color: #fff !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    text-transform: none !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    transition: background-color 0.2s ease !important;
    margin: 0 !important;
    float: none !important; 
    border: none !important;
}

.woocommerce-message .button.wc-forward:hover {
    opacity: 0.9 !important;
}

/* Mobile Responsiveness */
@media screen and (max-width: 767px) {
    .woocommerce-message, .woocommerce-error, .woocommerce-info {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 16px 16px 16px 45px !important;
    }
    
    .woocommerce-message::before, .woocommerce-error::before, .woocommerce-info::before {
        top: 24px !important;
    }

    .woocommerce-message .button.wc-forward {
        width: 100% !important;
        text-align: center !important;
        margin-top: 10px !important;
    }
}

/* Remove the default browser outline when WooCommerce auto-focuses the notice box */
.woocommerce-message:focus, .woocommerce-message:focus-visible,
.woocommerce-error:focus, .woocommerce-error:focus-visible,
.woocommerce-info:focus, .woocommerce-info:focus-visible {
    outline: none !important;
}

/* ==========================================================================
   Checkout Native Form Styling (Matching Old Webflow Theme)
   ========================================================================== */

/* 1. General Checkout Inputs & Textareas */
.woocommerce-checkout form .form-row input.input-text,
.woocommerce-checkout form .form-row textarea {
    -webkit-appearance: none;
    appearance: none;
    background-color: #fafafa !important;
    border: 1px solid #ddd !important;
    border-radius: 3px !important;
    width: 100%;
    height: 38px !important;
    padding: 8px 12px !important;
    font-size: 16px !important;
    line-height: 20px !important;
    color: #333 !important;
    box-shadow: none !important;
    outline: none !important;
}
.woocommerce-checkout form .form-row textarea {
    height: auto !important; /* Textareas need to be taller than 38px */
    min-height: 100px;
}

/* 2. General Inputs Focus State */
.woocommerce-checkout form .form-row input.input-text:focus,
.woocommerce-checkout form .form-row textarea:focus {
    border-color: #3898ec !important;
    outline-style: none !important;
}

/* 3. Select2 Dropdown Container (Country/Region) */
.woocommerce-checkout .select2-container .select2-selection--single {
    background-color: #fafafa !important;
    border: 1px solid #ddd !important;
    border-radius: 3px !important;
    height: 38px !important;
    outline: none !important;
    box-shadow: none !important;
}

/* 4. Select2 Dropdown Focus State */
.woocommerce-checkout .select2-container--open .select2-selection--single,
.woocommerce-checkout .select2-container--focus .select2-selection--single {
    border-color: #3898ec !important;
}

/* 5. Select2 Text Formatting */
.woocommerce-checkout .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important; /* Vertically center the text (height 38px - 2px borders) */
    padding-left: 12px !important;
    padding-right: 30px !important; /* Space for the arrow */
    font-size: 16px !important;
    color: #333 !important;
}

/* 6. Select2 Arrow Adjustments */
.woocommerce-checkout .select2-container .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
    right: 5px !important;
}

/* ==========================================================================
   Custom Thank You Page (Order Received) Styling
   ========================================================================== */

.custom-thank-you-page {
    background-color: #f5f5f5;
    padding: 40px 20px;
    font-family: inherit;
    color: #333;
}

.thank-you-header {
    text-align: center;
    margin-bottom: 40px;
}

.thank-you-header p {
    text-align: center;
}

.thank-you-header h1 {
    color: #17902d; /* MFM Green */
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.thank-you-header p a {
    text-decoration: underline;
}

.thank-you-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}

@media screen and (max-width: 991px) {
    .thank-you-grid {
        grid-template-columns: 1fr;
    }
}

.thank-you-col-right {
    position: sticky;
    top: 20px;
    align-self: start;
}

.thank-you-card {
    background-color: #ffffff;
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid #eaeaea;
}

.thank-you-card h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 15px;
}

.thank-you-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #666;
}

.thank-you-card p {
    font-size: 13px;
    margin-bottom: 0;
    line-height: 1.5;
}

.card-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media screen and (max-width: 500px) {
    .card-grid-2 {
        grid-template-columns: 1fr;
    }
}

.payment-instructions-card {
    background-color: #ffffff;
}

.payment-instructions-card h2 {
    margin-top: 0;
}

.payment-instructions-card ul, .payment-instructions-card section {
    padding-left: 0;
    list-style: none;
    font-size: 14px;
}
.payment-instructions-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.order-items-list {
    display: flex;
    flex-direction: column;
}

.order-item-row {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eaeaea;
}

.order-item-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.order-item-thumbnail {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    margin-right: 20px;
}

.order-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.order-item-details {
    flex-grow: 1;
}

.order-item-details .product-title {
    color: #17902d; /* MFM Green */
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 5px;
}

.order-item-details .product-qty {
    font-size: 13px;
    color: #666;
}

.order-item-price {
    font-weight: 700;
    color: #17902d; /* MFM Green */
    font-size: 15px;
    white-space: nowrap;
    margin-left: 20px;
}

.summary-card.sticky {
    position: sticky;
    top: 20px;
}

.summary-totals {
    display: flex;
    flex-direction: column;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eaeaea;
    font-size: 14px;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.total-row {
    font-weight: 700;
    font-size: 16px;
    color: #17902d; /* MFM Green */
    border-top: 2px solid #eaeaea;
    margin-top: 10px;
    padding-top: 15px;
}

.summary-row span:last-child {
    font-weight: 600;
}

body.woocommerce-page.woocommerce-order-received .section:not(.footer) {
    background: #f5f5f5 !important;
}

body.woocommerce-page.woocommerce-order-received .wordpress-page-content {
    margin: unset !important;
}

body.woocommerce-page.woocommerce-order-received .wordpress-page-title {
    display: none !important;
}

/* Mobile Responsiveness for Thank You Page */
@media screen and (max-width: 767px) {
    .thank-you-header h1 {
        font-size: 24px;
    }
    .thank-you-card h2 {
        font-size: 16px;
    }
    .thank-you-card h3 {
        font-size: 13px;
    }
    .thank-you-card p {
        font-size: 12px;
    }
    .order-item-details .product-title {
        font-size: 13px;
    }
    .order-item-price {
        font-size: 14px;
    }
    .summary-row {
        font-size: 13px;
    }
    .summary-row.total-row {
        font-size: 15px;
    }
}

