/*
Theme Name: GFW Custom Theme
Theme URI: https://goodforwellness.com
Description: Custom Elementor theme for Good For Wellness
Author: Good For Wellness
Author URI: https://goodforwellness.com
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gfw-theme
Domain Path: /languages
Requires at least: 5.0
Requires PHP: 7.4
*/

:root {
  --gfw-primary-orange: #f97316;
  --gfw-forest-green: #1a4a38;
  --gfw-leaf-green: #a4c639;
  --gfw-sage-green: #e9f2eb;
  --gfw-text-dark: #1f1f1f;
  --gfw-text-muted: #6b7280;
  --gfw-bg-light: #faf9f6;
  --gfw-white: #ffffff;
  --gfw-border: #e5e7eb;
}

html, body, .site, #page, .site-content, .site-main, .elementor-page {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100vw !important;
    width: 100% !important;
    overflow-x: hidden !important;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--gfw-text-dark);
}

.elementor-section-wrap, .elementor-location-header, .elementor-location-footer { 
    width: 100% !important;
    margin: 0 !important; 
    padding: 0 !important; 
}

/* Hide Default Titles to prevent duplication */
.woocommerce-cart .page-title,
.woocommerce-cart h1.entry-title:not(.custom-cart-title),
.woocommerce-cart .elementor-widget-theme-post-title,
.woocommerce-cart header.entry-header,
.woocommerce-cart header.page-header,
.woocommerce-checkout .page-title,
.woocommerce-checkout h1.entry-title:not(.custom-cart-title),
.woocommerce-checkout .elementor-widget-theme-post-title,
.woocommerce-checkout header.entry-header,
.woocommerce-checkout header.page-header {
    display: none !important;
}

/* Hide conflicting store notices */
.woocommerce-store-notice, p.demo_store {
    display: none !important;
}

* {
  box-sizing: border-box;
}

/* -----------------------------------------------------
   WOOCOMMERCE CART & CHECKOUT REBUILD
------------------------------------------------------ */

/* --- 1. GLOBAL LAYOUT WRAPPERS (DESKTOP) --- */
@media (min-width: 1024px) {
    .woocommerce-checkout .woocommerce {
        display: block !important; /* Must be block so progress bar, banner, and form stack vertically */
        max-width: 1200px;
        margin: 0 auto;
    }
    /* --- STRICT CHECKOUT DESKTOP GRID --- */
    .woocommerce-checkout .woocommerce form.checkout {
        display: grid !important;
        grid-template-columns: 40% 55% !important; /* 40% Left, 55% Right, 5% Gap */
        gap: 5% !important;
        align-items: flex-start !important;
        width: 100% !important;
    }
    
    /* Left Column: Order Summary (PREVENT SQUISHING) */
    .woocommerce-checkout #order_review_heading,
    .woocommerce-checkout #order_review {
        grid-column: 1 !important;
        grid-row: 1 / span 2 !important;
        width: 100% !important;
        min-width: 350px !important; /* CRITICAL: Stops the column from crushing */
        background: #faf9f6 !important;
        padding: 25px !important;
        border-radius: 12px !important;
        box-sizing: border-box !important;
    }
    
    /* Right Column: Billing Details */
    .woocommerce-checkout #customer_details {
        grid-column: 2 !important;
        grid-row: 1 !important;
        width: 100% !important;
    }
}

/* --- DESKTOP STRICT GRID --- */
@media (min-width: 1025px) {
    .woocommerce-cart .woocommerce {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        max-width: 1200px;
        margin: 0 auto;
    }
    /* Force notifications to take full width */
    .woocommerce-cart .woocommerce-notices-wrapper,
    .woocommerce-cart .woocommerce > *:not(.woocommerce-cart-form):not(.cart-collaterals) {
        flex: 0 0 100% !important;
        width: 100% !important;
    }
    /* Left Column */
    .woocommerce-cart-form {
        flex: 0 0 63% !important;
        width: 63% !important;
    }
    /* Right Column (Summary) */
    .cart-collaterals {
        flex: 0 0 33% !important;
        width: 33% !important;
        margin-top: 0 !important;
    }
}

/* --- 2. ISOLATED TOP AREAS & HEADERS --- */
.woocommerce-cart .woocommerce-notices-wrapper,
.woocommerce-cart .woocommerce > *:not(.woocommerce-cart-form):not(.cart-collaterals),
.woocommerce-cart .gfw-cart-header,
.woocommerce-checkout .woocommerce-notices-wrapper,
.woocommerce-checkout #wc-stripe-express-checkout-button-container,
.woocommerce-checkout .express-checkout-wrapper,
.woocommerce-checkout .woocommerce > *:not(form) {
    flex: 0 0 100% !important;
    width: 100% !important;
    clear: both !important;
}

.gfw-cart-header {
    text-align: left;
    margin-bottom: 2rem;
}
.gfw-cart-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gfw-forest-green);
    margin: 0 0 10px 0;
    display: flex;
    align-items: center; /* Aligned vertically center */
    gap: 8px;
}
.gfw-cart-header h1 svg {
    margin-top: 0; 
}
.gfw-cart-header p {
    color: var(--gfw-text-muted);
    font-size: 1.1rem;
    margin: 0;
}

.gfw-shipping-success {
    background: var(--gfw-sage-green);
    border-radius: 8px;
    padding: 20px 24px;
    display: flex !important;
    align-items: center !important;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem !important;
}
.gfw-shipping-success .truck-icon {
    margin-right: 15px;
    flex-shrink: 0;
}
.gfw-shipping-success .shipping-success-text {
    margin: 0;
    color: var(--gfw-forest-green);
    font-size: 1.1rem;
    z-index: 2;
}
.gfw-shipping-success .leaf-bg-icon {
    position: absolute;
    right: -10px;
    bottom: -10px;
    opacity: 0.5;
    z-index: 1;
}

/* --- 3. CART TABLE REBUILD --- */
.shop_table {
    width: 100%;
    border-collapse: collapse;
}
.shop_table th {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1.2px;
    color: var(--gfw-text-muted);
    padding: 10px 0 20px 0;
    border-bottom: 2px solid var(--gfw-border);
    font-weight: 600;
}
.shop_table td {
    padding: 24px 0;
    vertical-align: middle;
    border-bottom: 1px solid var(--gfw-border);
}
.shop_table th.product-price, .shop_table td.product-price,
.shop_table th.product-quantity, .shop_table td.product-quantity,
.shop_table th.product-subtotal, .shop_table td.product-subtotal {
    text-align: center;
}
.shop_table td.product-price, .shop_table td.product-subtotal {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gfw-text-dark);
}

.product-info-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}
.product-remove .custom-trash {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f3f4f6;
    border-radius: 50%;
    color: var(--gfw-text-muted);
    transition: all 0.2s ease;
}
.product-remove .custom-trash:hover {
    background: #fee2e2;
    color: #ef4444;
}
.product-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}
.product-name-details .gfw-cart-product-title {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gfw-forest-green);
    line-height: 1.4;
    max-width: 250px;
}
.product-custom-attributes {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.attr-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--gfw-text-muted);
    font-weight: 500;
}

/* Custom Quantity Selector */
.gfw-custom-quantity {
    display: inline-flex;
    align-items: center;
    background: #f9fafb;
    border: 1px solid var(--gfw-border);
    border-radius: 6px;
    overflow: hidden;
    height: 40px;
}
.gfw-custom-quantity .gfw-qty-btn {
    width: 36px;
    height: 100%;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: var(--gfw-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gfw-custom-quantity .gfw-qty-btn:hover {
    background: #f3f4f6;
    color: var(--gfw-text-dark);
}
.gfw-custom-quantity input.qty {
    width: 40px;
    height: 100%;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 700;
    color: var(--gfw-text-dark);
    -moz-appearance: textfield;
}
.gfw-custom-quantity input.qty::-webkit-outer-spin-button,
.gfw-custom-quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Cart Actions & Coupon */
.cart-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    flex-wrap: wrap;
    gap: 20px;
}
.gfw-custom-coupon {
    display: flex;
    gap: 12px;
    flex: 1;
    max-width: 450px;
}
.coupon-input-wrapper {
    position: relative;
    flex: 1;
}
.coupon-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
}
.gfw-custom-coupon input.input-text {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 44px !important;
    border: 1px solid var(--gfw-border);
    border-radius: 8px;
    font-size: 1rem;
}
.gfw-custom-coupon button.button {
    height: 48px;
    padding: 0 24px;
    background: var(--gfw-forest-green);
    color: var(--gfw-white);
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}
.update-cart-btn {
    height: 48px;
    padding: 0 24px;
    background: #f3f4f6;
    color: var(--gfw-text-dark);
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

/* --- 4. CROSS SELLS GRID --- */
.gfw-custom-cross-sells {
    margin-top: 60px;
}
.cross-sells-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gfw-forest-green);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.gfw-cross-sells-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.gfw-cross-sell-card {
    background: var(--gfw-white);
    border: 1px solid var(--gfw-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gfw-cross-sell-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.card-image-wrapper {
    position: relative;
    padding: 16px;
    background: #f9fafb;
    border-bottom: 1px solid var(--gfw-border);
}
.card-image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}
.floating-rating {
    position: absolute;
    bottom: 8px;
    left: 16px;
    background: var(--gfw-white);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.card-content-wrapper {
    padding: 16px;
}
.card-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.4;
}
.card-title a {
    color: var(--gfw-forest-green);
    text-decoration: none;
}
.card-price-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-price {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--gfw-text-dark);
}
.card-add-to-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--gfw-border);
    border-radius: 8px;
    color: var(--gfw-text-dark);
    transition: all 0.2s ease;
}
.card-add-to-cart:hover {
    border-color: var(--gfw-forest-green);
    color: var(--gfw-forest-green);
}

/* --- 5. ORDER SUMMARY CARD (RIGHT COLUMN) --- */
.cart-collaterals .cart_totals {
    background: var(--gfw-bg-light);
    border: 1px solid #eee5d8;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}
.cart_totals h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--gfw-forest-green);
    margin: 0 0 24px 0;
}
.cart_totals .shop_table {
    width: 100%;
}
.cart_totals .shop_table th {
    padding: 16px 0;
    border-bottom: 1px solid var(--gfw-border);
    text-transform: none;
    letter-spacing: normal;
    color: var(--gfw-text-dark);
    font-size: 1rem;
    font-weight: 600;
}
.cart_totals .shop_table td {
    padding: 16px 0;
    border-bottom: 1px solid var(--gfw-border);
    text-align: right;
    font-weight: 600;
}
.cart_totals .shop_table tr.order-total th,
.cart_totals .shop_table tr.order-total td {
    font-size: 1.25rem;
    font-weight: 800;
    border-bottom: none;
    padding-top: 24px;
}

.shipping-calculator-button {
    color: var(--gfw-primary-orange) !important;
    font-size: 0.9rem;
    font-weight: 600;
}
#shipping_method label {
    color: var(--gfw-forest-green);
    font-weight: 700;
}

.wc-proceed-to-checkout {
    padding: 20px 0 0 0;
}
.checkout-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: var(--gfw-primary-orange) !important;
    color: var(--gfw-white) !important;
    padding: 16px !important;
    border-radius: 8px !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    border: none;
    text-decoration: none;
    position: relative;
}
.checkout-button::before {
    content: "🔒";
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Trust Badges under summary */
.gfw-trust-badges-right {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
}
.gfw-trust-badges-right span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--gfw-text-muted);
    font-weight: 500;
}

/* --- 6. PRE-FOOTER TRUST BAR --- */
.gfw-pre-footer-trust-bar {
    max-width: 1200px;
    margin: 60px auto;
    padding: 40px 0;
    border-top: 1px solid var(--gfw-border);
    display: flex;
    justify-content: space-between;
    gap: 20px;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 16px;
}
.trust-text {
    display: flex;
    flex-direction: column;
}
.trust-text strong {
    font-size: 1rem;
    color: var(--gfw-forest-green);
    font-weight: 800;
}
.trust-text span {
    font-size: 0.85rem;
    color: var(--gfw-text-muted);
    margin-top: 2px;
}

/* --- TABLET & IPAD PRO FIX (769px - 1024px) --- */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Bring back the missing content! */
    .woocommerce-cart .woocommerce {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        flex-direction: column !important; /* Stack on iPad */
        width: 100% !important;
    }
    .woocommerce-cart-form, 
    .cart-collaterals {
        width: 100% !important;
        flex: 0 0 100% !important;
        margin-bottom: 30px !important;
    }
}

/* --- MOBILE TYPOGRAPHY & OVERFLOW FIX (Max 768px) --- */
@media (max-width: 768px) {
    /* Prevent horizontal scrolling (Overflow Fix) */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
    }
    .woocommerce-cart .woocommerce {
        padding: 0 15px !important; /* Add breathing room on edges */
        box-sizing: border-box !important;
    }

    /* Mobile Cart Item Card Fixes */
    .woocommerce-cart-form .shop_table tr.cart_item {
        display: flex !important;
        flex-wrap: wrap !important;
        padding: 15px !important;
        background: #fff;
        border: 1px solid #e5e7eb !important;
        border-radius: 12px;
        margin-bottom: 20px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.04);
        position: relative;
    }
    
    .woocommerce-cart-form .shop_table td {
        display: block !important;
        border: none !important;
        padding: 0 !important;
        text-align: left !important;
    }
    .woocommerce-cart-form .shop_table thead {
        display: none !important;
    }

    /* Product Info Wrapper (100% Width) */
    .woocommerce-cart-form .shop_table td.product-info-column {
        width: 100% !important;
        margin-bottom: 15px !important;
    }
    .product-info-wrapper {
        display: flex !important;
        align-items: flex-start !important;
        gap: 15px !important;
        width: 100% !important;
    }
    .product-info-wrapper .product-remove {
        position: absolute !important;
        top: 15px !important;
        right: 15px !important;
        z-index: 10;
        width: auto !important;
    }
    .product-info-wrapper .product-thumbnail {
        width: 70px !important;
        flex-shrink: 0 !important;
    }
    .product-info-wrapper .product-thumbnail img {
        width: 100% !important;
        height: auto !important;
        border-radius: 6px !important;
    }
    .product-info-wrapper .product-name-details {
        flex: 1 !important;
        padding-right: 35px !important; /* space for trash */
    }
    .product-info-wrapper .gfw-cart-product-title {
        font-size: 13px !important;
        line-height: 1.3 !important;
        margin-bottom: 5px !important;
    }
    
    /* Bottom Row (Price, Qty, Total) */
    .woocommerce-cart-form .shop_table td.product-price,
    .woocommerce-cart-form .shop_table td.product-quantity,
    .woocommerce-cart-form .shop_table td.product-subtotal {
        width: 33.33% !important;
        padding-top: 15px !important;
        border-top: 1px solid #f3f4f6 !important;
        text-align: center !important;
        font-size: 14px !important;
    }
    
    /* Quantity input adjustment */
    .woocommerce-cart-form .shop_table td.product-quantity .gfw-custom-quantity {
        width: 100% !important;
        max-width: 90px !important;
        margin: 0 auto !important;
        height: 32px !important;
    }
    .woocommerce-cart-form .shop_table td.product-quantity .gfw-qty-btn {
        width: 25px !important;
    }
    
    /* Shrink the attribute tags (Instant, Focus, Wellness) */
    .product-attributes-mockup {
        font-size: 11px !important;
        margin-top: 5px !important;
    }
    
    /* Cross-Sells Mobile Horizontal Scroll */
    .gfw-cross-sells-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        padding-bottom: 15px !important;
        gap: 15px !important;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .gfw-cross-sells-grid::-webkit-scrollbar {
        display: none;
    }
    .gfw-cross-sell-card {
        flex: 0 0 220px !important;
        width: 220px !important;
        margin: 0 !important;
    }
    
    /* Shrink Trust Bar Icons so they don't overlap */
    .gfw-pre-footer-trust-bar {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important; /* 2x2 Grid instead of squishing 4 columns */
        gap: 15px !important;
        padding: 20px 10px !important;
    }
    .gfw-pre-footer-trust-bar .trust-item {
        font-size: 12px !important;
    }
    .gfw-pre-footer-trust-bar .trust-item svg {
        width: 24px !important;
        height: 24px !important;
    }
    
    /* Fix Coupon Input */
    .coupon {
        display: flex !important;
        flex-direction: column !important; /* Stack input and button */
        gap: 10px !important;
    }
    .coupon input.input-text, .coupon button.button {
        width: 100% !important;
    }
}

/* --- CHECKOUT PROGRESS BAR & SECURITY BANNER --- */
.gfw-checkout-header-wrapper {
    text-align: center;
    margin-bottom: 40px;
}
.gfw-secure-checkout-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a4a38;
    margin-bottom: 30px;
}
.gfw-progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto 30px;
    gap: 15px;
}
.gfw-progress-bar .step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #9ca3af;
}
.gfw-progress-bar .step.active {
    color: #1a4a38;
}
.gfw-progress-bar .step.completed {
    color: #1a4a38;
}
.gfw-progress-bar .step-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}
.gfw-progress-bar .step.active .step-icon {
    background: #1a4a38;
    color: white;
}
.gfw-progress-bar .step.completed .step-icon {
    background: #1a4a38;
    color: white;
}
.gfw-progress-bar .step-line {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
}
.gfw-progress-bar .step-line.active {
    background: #1a4a38;
}
.gfw-security-banner {
    background: #f4fbf6;
    border-radius: 8px;
    padding: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #1a4a38;
    font-weight: 600;
    font-size: 14px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* --- CHECKOUT COMPONENT STYLING --- */
/* Order Summary Card (Left Column) */
.woocommerce-checkout #order_review {
    background: #faf9f6 !important;
    border-radius: 12px;
    padding: 30px;
    border: none !important;
}

/* Billing Form (Right Column) */
.woocommerce-checkout #customer_details {
    background: #ffffff;
    padding: 20px 0;
}
.woocommerce-checkout .form-row input.input-text {
    border-radius: 6px !important;
    border: 1px solid #e5e7eb !important;
    padding-left: 40px !important; /* Make room for icons */
    background-repeat: no-repeat;
    background-position: 12px center;
    background-size: 16px;
}

/* Input Icons via CSS Background */
#billing_email {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%239ca3af" stroke-width="2"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline></svg>');
}
#billing_first_name, #billing_last_name {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%239ca3af" stroke-width="2"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>');
}
#billing_address_1 {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%239ca3af" stroke-width="2"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg>');
}
#billing_city {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%239ca3af" stroke-width="2"><path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"></path><line x1="4" y1="22" x2="4" y2="15"></line></svg>');
}
#billing_postcode {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%239ca3af" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline></svg>');
}
#billing_phone {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%239ca3af" stroke-width="2"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>');
}

/* --- CHECKOUT MISC FIXES --- */
/* Force Express Checkout button into the Left Column */
#wc-stripe-express-checkout-button-container,
.express-checkout-wrapper,
.woocommerce-checkout .woocommerce > *:not(form) {
    grid-column: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 20px 0 !important;
    box-sizing: border-box !important;
}

/* Fix Squished Place Order Button */
#place_order {
    width: 100% !important;
    border-radius: 8px !important;
    padding: 18px !important;
    display: block !important;
    white-space: normal !important;
}

/* Fix Product Table inside Summary */
.woocommerce-checkout #order_review table.shop_table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
}

/* Mobile Adjustments for Checkout Grid */
@media (max-width: 1024px) {
    /* Force Elementor containers to full width to prevent squishing */
    body.woocommerce-checkout .elementor-container,
    body.woocommerce-checkout .elementor-column,
    body.woocommerce-checkout .elementor-widget-wrap,
    body.woocommerce-checkout .elementor-widget-container {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .woocommerce-checkout .woocommerce {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 15px !important;
        box-sizing: border-box !important;
    }
    .woocommerce-checkout .woocommerce form.checkout {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }
    
    /* Reduce padding on mobile so text has room */
    .woocommerce-checkout #order_review {
        padding: 20px 15px !important;
    }
    
    /* Stack Order Summary then Billing Details */
    .woocommerce-checkout #order_review_heading,
    .woocommerce-checkout #order_review {
        order: 1 !important;
    }
    .woocommerce-checkout #customer_details {
        order: 2 !important;
        margin-top: 30px !important;
    }
    
    .gfw-progress-bar {
        flex-wrap: wrap;
    }
    
    /* Thank You Page Mobile Rules */
    ul.order_details {
        flex-direction: column !important;
        padding: 20px !important;
    }
    ul.order_details li {
        border-right: none !important;
        border-bottom: 1px solid #e5e7eb !important;
        padding: 15px 0 !important;
    }
    ul.order_details li:last-child {
        border-bottom: none !important;
    }
    .woocommerce-customer-details {
        grid-template-columns: 1fr !important;
    }
    
    /* Responsive Order Details Table on Mobile */
    body.woocommerce-order-received table.shop_table thead {
        display: none !important;
    }
    body.woocommerce-order-received table.shop_table tbody tr {
        display: flex !important;
        flex-direction: column !important;
        border-bottom: 1px solid #e5e7eb !important;
        padding-bottom: 15px !important;
    }
    body.woocommerce-order-received table.shop_table tbody td {
        width: 100% !important;
        display: block !important;
        text-align: left !important;
        border: none !important;
        padding: 10px 15px !important;
    }
    body.woocommerce-order-received table.shop_table tbody td.product-total {
        font-weight: 700;
        font-size: 16px;
        padding-top: 0 !important;
        padding-bottom: 15px !important;
    }
    /* Subtotal, Shipping, Total Rows - Flex Row */
    body.woocommerce-order-received table.shop_table tfoot tr {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 15px !important;
        border-bottom: 1px solid #e5e7eb !important;
    }
    body.woocommerce-order-received table.shop_table tfoot tr:last-child {
        border-bottom: none !important;
    }
    body.woocommerce-order-received table.shop_table tfoot th,
    body.woocommerce-order-received table.shop_table tfoot td {
        border: none !important;
        padding: 0 !important;
        width: auto !important;
        display: block !important;
    }
    body.woocommerce-order-received table.shop_table tfoot th {
        text-align: left !important;
    }
    body.woocommerce-order-received table.shop_table tfoot td {
        text-align: right !important;
    }
}

/* ==========================================
   THANK YOU PAGE (ORDER RECEIVED) CSS
========================================== */

/* Strip WooCommerce default white box on Thank You page */
body.woocommerce-order-received .woocommerce {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    border: none !important;
    max-width: 900px;
}
/* Hide the Secure Checkout Header on Thank You page */
body.woocommerce-order-received .gfw-checkout-header-wrapper {
    display: none !important;
}
/* Hide default Order Details heading */
body.woocommerce-order-received h2.woocommerce-order-details__title {
    display: none !important;
}

/* Order Overview Bar */
ul.order_details {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    background-color: #fcfaf8 !important; /* Light beige matching mockup */
    padding: 30px !important;
    border-radius: 12px !important;
    margin-bottom: 40px !important;
    border: 1px solid #f3f4f6 !important;
    list-style: none !important;
}
ul.order_details li {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    border-right: 1px solid #e5e7eb !important;
    padding: 0 20px !important;
    flex: 1;
    font-size: 14px !important;
    text-transform: uppercase;
    color: #4b5563;
    position: relative;
    padding-left: 50px !important; /* Space for icons */
}
ul.order_details li strong {
    font-size: 16px !important;
    color: #111827;
    text-transform: none;
    margin-top: 5px;
}
ul.order_details li:last-child { border-right: none !important; }

/* Injected Icons for Overview Bar */
ul.order_details li::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 5px;
    width: 28px;
    height: 28px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.8;
}
ul.order_details li.order::before { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%231a4a38" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>'); }
ul.order_details li.date::before { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23a4c639" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>'); }
ul.order_details li.email::before { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%231a4a38" stroke-width="2"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline></svg>'); }
ul.order_details li.total::before { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%231a4a38" stroke-width="2"><line x1="12" y1="1" x2="12" y2="23"></line><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"></path></svg>'); }
ul.order_details li.method::before { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%231a4a38" stroke-width="2"><rect x="1" y="4" width="22" height="16" rx="2" ry="2"></rect><line x1="1" y1="10" x2="23" y2="10"></line></svg>'); }

/* Order Details Table */
body.woocommerce-order-received table.shop_table {
    background: #fff !important;
    border-radius: 12px !important;
    border: 1px solid #e5e7eb !important;
    overflow: hidden;
    border-collapse: separate !important;
    border-spacing: 0;
    width: 100% !important;
}
body.woocommerce-order-received table.shop_table th,
body.woocommerce-order-received table.shop_table td {
    padding: 20px !important;
    border-bottom: 1px solid #e5e7eb !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
}
body.woocommerce-order-received table.shop_table th {
    background: #f9fafb !important;
    text-transform: uppercase;
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}
/* Highlight Total Row */
body.woocommerce-order-received table.shop_table tfoot tr:last-child th,
body.woocommerce-order-received table.shop_table tfoot tr:last-child td {
    background: #f4fbf6 !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    color: #1a4a38 !important;
    border-bottom: none !important;
}
body.woocommerce-order-received table.shop_table tfoot tr:last-child td .woocommerce-Price-amount {
    color: #1a4a38 !important;
}

/* Hide Rogue WooCommerce Store Notice / Top Bar */
p.woocommerce-store-notice,
p.demo_store,
body > .trust-item {
    display: none !important;
}

/* Address Cards Grid */
.woocommerce-customer-details {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 30px !important;
    margin-top: 40px !important;
}
.woocommerce-customer-details address {
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 30px !important;
    background: #fff !important;
    font-style: normal !important;
    line-height: 1.6;
}
.woocommerce-customer-details .woocommerce-column__title {
    font-size: 18px !important;
    color: #1a4a38 !important;
    font-weight: 700 !important;
    margin-bottom: 20px !important;
    display: flex;
    align-items: center;
    gap: 10px;
}
.woocommerce-customer-details .woocommerce-column__title::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
}
.woocommerce-customer-details .col-1 .woocommerce-column__title::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23a4c639" stroke-width="2"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>');
}
.woocommerce-customer-details .col-2 .woocommerce-column__title::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23a4c639" stroke-width="2"><rect x="1" y="3" width="15" height="13"></rect><polygon points="16 8 20 8 23 11 23 16 16 16 16 8"></polygon><circle cx="5.5" cy="18.5" r="2.5"></circle><circle cx="18.5" cy="18.5" r="2.5"></circle></svg>');
}
