/*
Theme Name: Garden Eagle Shop - WooCommerce Styles
*/

/*--------------------------------------------------------------
## 1. GLOBAL BUTTONS & FORMS
--------------------------------------------------------------*/

/* Main Buttons */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    background-color: var(--secondary-color);
    color: var(--cream);
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--border-radius);
    padding: 12px 24px;
    border: 2px solid var(--secondary-color);
    transition: var(--transition);
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* Secondary Buttons */
.woocommerce a.button.alt,
.woocommerce button.button.alt {
    background: transparent;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.woocommerce a.button.alt:hover {
    background: var(--secondary-color);
    color: var(--cream);
}

/* Form Inputs */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce-page form .form-row input.input-text,
.woocommerce-page form .form-row textarea,
.woocommerce-input-wrapper input,
.select2-container--default .select2-selection--single {
    background-color: var(--background);
    border: 3px solid var(--primary-color);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-color);
    font-family: var(--font-body);
}

.woocommerce form .form-row input:focus,
.woocommerce form .form-row textarea:focus {
    border-color: var(--secondary-color);
    outline: none;
}

/*--------------------------------------------------------------
## 2. SHOP PAGE LAYOUT (Kiosko Style)
--------------------------------------------------------------*/

/* Hero Header */
.shop-hero-header {
    background: none;
    color: var(--secondary-color);
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.shop-hero-header .page-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    margin: 0;
    text-transform: uppercase;
    line-height: 1.1;
    text-shadow: 3px 3px 0px rgba(0,0,0,0.2);
    color: var(--secondary-color);
}

.shop-hero-header .term-description,
.shop-hero-header .page-description {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 1rem auto 0;
    opacity: 0.9;
    line-height: 1.6;
}

/* Main Flex Container (Sidebar Left, Content Right) */
.striker-shop-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 3rem;
}

/* Sidebar Styling */
.striker-shop-container .widget-area {
    flex: 0 0 280px;
    width: 280px;
    order: 1;
    
    background: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.striker-shop-container .widget-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

/* Main Content Area */
.striker-shop-main {
    flex: 1;
    order: 2;
    min-width: 0;
}

/*--------------------------------------------------------------
## 3. PRODUCT GRID & CARDS (Unified)
--------------------------------------------------------------*/

/* The Grid Container */
.woocommerce ul.products {
    display: grid !important;
    gap: 20px;
    margin: 0;
    padding: 0;
    width: 100%;
    clear: both; /* Ensure no floating issues */
}

/* FIX: Force 3 Columns specifically on Shop Page */
.striker-shop-main .woocommerce ul.products {
    grid-template-columns: repeat(3, 1fr) !important;
}

/* FIX: Force 2 Columns on Single Product (Related Products) */
.single-product .woocommerce ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
}

/* The Card */
.woocommerce ul.products li.product {
    width: 100% !important;
    max-width: none !important;
    float: none !important;
    margin: 0 !important;
    clear: none !important; /* Fix WooCommerce clearing glitches */
    
    /* Theme Card Style */
    background: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    position: relative;
    transition: var(--transition);
    display: block; /* Ensure block display */
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* Image Styling */
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
    display: block;
    width: 100%;
}

.woocommerce ul.products li.product img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.woocommerce ul.products li.product:hover img {
    transform: scale(1.05);
}

/* Text Overlay Gradient */
.woocommerce ul.products li.product::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

/* Title & Price Positioning */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .price {
    position: absolute;
    left: 0;
    right: 0;
    padding: 10px 20px;
    color: var(--cream) !important;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    bottom: 15px;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.1rem;
    margin: 0;
}

.woocommerce ul.products li.product .price {
    bottom: 45px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Button Styling */
.woocommerce ul.products li.product .button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    z-index: 3;
    
    background-color: var(--secondary-color);
    color: var(--cream);
    border: 2px solid var(--cream);
    border-radius: 50px;
    padding: 12px 25px;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.woocommerce ul.products li.product:hover .button {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.woocommerce ul.products li.product .button:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Sale Badge */
.woocommerce span.onsale {
    top: 15px;
    left: 15px;
    z-index: 3;
    border-radius: 0;
    background: var(--primary-color);
    color: #fff;
    font-family: var(--font-heading);
    text-transform: uppercase;
    min-height: auto;
    line-height: 1;
    padding: 6px 12px;
}

/*--------------------------------------------------------------
## 4. SINGLE PRODUCT PAGE
--------------------------------------------------------------*/

/* Layout Grid */
.single-product .striker-grid-layout {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 30px;
    align-items: flex-start;
}

/* Product Wrapper */
.woocommerce div.product {
    padding: 20px;
    display: flex !important;
    flex-wrap: wrap;
    gap: 30px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0;
    top: 20px;
}

/* ========================================
   IMAGE COLUMN — FIXED OVERFLOW
   ======================================== */
.woocommerce div.product div.images {
    flex: 0 0 calc(50% - 15px);
    width: calc(50% - 15px);
    float: none;
    margin: 0;

    background: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    box-sizing: border-box;
    position: sticky;
    align-self: flex-start;
    overflow: hidden; /* PREVENT OVERFLOW */
}

/* Main product image */
.woocommerce div.product div.images a img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 500px;
    object-fit: contain; /* contain = no crop, cover = crop to fill */
    margin: 0 auto;
}

/* Gallery thumbnails strip */
.woocommerce div.product div.images .flex-control-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding: 0;
    list-style: none;
}

.woocommerce div.product div.images .flex-control-thumbs li {
    width: calc(20% - 7px) !important;
    margin: 0 !important;
    float: none !important;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
}

.woocommerce div.product div.images .flex-control-thumbs li:hover,
.woocommerce div.product div.images .flex-control-thumbs li.flex-active {
    opacity: 1;
    border-color: var(--secondary-color);
}

.woocommerce div.product div.images .flex-control-thumbs li img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 1/1;
}

/* WooCommerce zoom/lighbox plugin overrides */
.woocommerce div.product div.images .woocommerce-product-gallery__trigger {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-indent: -9999px;
    font-size: 0;
}

.woocommerce div.product div.images .woocommerce-product-gallery__trigger::before {
    content: '\f00e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1rem;
    text-indent: 0;
}

/* Fix: WC gallery sometimes sets inline width that overflows */
.woocommerce div.product div.images .woocommerce-product-gallery {
    position: relative;
    width: 100% !important;
    max-width: 100%;
}

.woocommerce div.product div.images .woocommerce-product-gallery .woocommerce-product-gallery__image {
    width: 100%;
    overflow: hidden;
}

.woocommerce div.product div.images .woocommerce-product-gallery .woocommerce-product-gallery__image a,
.woocommerce div.product div.images .woocommerce-product-gallery .woocommerce-product-gallery__image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
}

/* ========================================
   SUMMARY COLUMN — REMOVED max-height
   ======================================== */
.woocommerce div.product .summary {
    flex: 0 0 calc(50% - 15px);
    width: calc(50% - 15px);
    float: none;
    margin: 0;

    background: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    box-sizing: border-box;
    /* NO max-height — let content flow naturally */
}

/* Tabs */
.woocommerce div.product .woocommerce-tabs {
    flex: 0 0 100%;
    width: 100%;
    float: none;
    margin: 0;

    background: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    box-sizing: border-box;
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
    padding: 0;
    margin: 0 0 20px 0;
    display: flex;
    border-bottom: 3px solid var(--secondary-color);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after {
    display: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 1rem;
    padding: 10px 20px;
    color: var(--text-muted);
    transition: var(--transition);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    color: var(--secondary-color);
    font-weight: 700;
}

.woocommerce div.product .woocommerce-tabs .panel {
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

/* Elements */
.woocommerce div.product .product_title {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    text-transform: uppercase;
    font-size: 2rem;
    margin: 0 0 10px 0;
}

.woocommerce div.product p.price {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--primary-color);
    background: rgba(171, 30, 37, 0.05);
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
    margin: 0 0 15px 0;
}

/* Star ratings */
.woocommerce div.product .woocommerce-product-rating {
    margin-bottom: 15px;
}

.woocommerce div.product .woocommerce-product-rating .star-rating {
    font-size: 1.1rem;
    color: #ffc107;
}

/* Short description */
.woocommerce div.product .woocommerce-product-details__short-description {
    margin: 0 0 20px 0;
    line-height: 1.7;
    color: var(--text-muted);
}

/* Add to cart form */
.woocommerce div.product form.cart {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed var(--grid-line, #ddd);
}

.woocommerce div.product .quantity .qty {
    width: 70px;
    height: 48px;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid var(--secondary-color);
    background: #fff;
    border-radius: 5px;
}

.woocommerce div.product form.cart button.button {
    flex: 1;
    height: 48px;
}

/* Meta (SKU, categories, tags) */
.woocommerce div.product .product_meta {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color, #ddd);
    font-size: 0.85rem;
}

.woocommerce div.product .product_meta span {
    display: block;
    margin-bottom: 4px;
}

.woocommerce div.product .product_meta span a {
    color: var(--secondary-color);
    text-decoration: none;
}

.woocommerce div.product .product_meta span a:hover {
    text-decoration: underline;
}
/*--------------------------------------------------------------
## 5. CART, CHECKOUT & ACCOUNT
--------------------------------------------------------------*/

/* Cart Table */
.woocommerce-cart table.cart {
    border-collapse: collapse;
    width: 100%;
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.woocommerce-cart table.cart th {
    background-color: var(--secondary-color);
    color: var(--cream);
    font-family: var(--font-heading);
    text-transform: uppercase;
    padding: 15px;
    font-size: 0.9rem;
}

.woocommerce-cart table.cart td {
    padding: 20px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.woocommerce-cart table.cart img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.woocommerce-cart table.cart .product-name a {
    font-family: var(--font-heading);
    color: var(--dark-color);
    text-transform: uppercase;
    font-size: 1.1rem;
}

.woocommerce-cart table.cart .quantity .qty {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: 5px;
}

.cart-collaterals .cart_totals {
    float: none;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    background: var(--cream75);
    border: 3px solid var(--border-color);
    padding: 25px;
    border-radius: var(--border-radius);
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
    font-size: 1.2rem;
    padding: 20px;
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Checkout */
.woocommerce-checkout h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 5px;
    margin-bottom: 20px;
}

#order_review {
    background: #fff;
    border: 3px solid var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
}

.woocommerce-checkout-review-order-table thead th {
    background: var(--secondary-color);
    color: var(--cream);
}

.woocommerce-checkout-payment .place-order .button {
    background: var(--primary-color);
    font-size: 1.3rem;
    padding: 18px;
    width: 100%;
}

/* Account */
.woocommerce-account .woocommerce-MyAccount-content-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.woocommerce-account .woocommerce-MyAccount-navigation {
    flex: 0 0 250px;
    background: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 12px 15px;
    background: transparent;
    color: var(--text-color);
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 5px;
    border-left: 4px solid transparent;
    transition: var(--transition);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    background: var(--secondary-color);
    color: var(--cream);
    font-weight: 700;
    border-left-color: var(--primary-color);
}

.woocommerce-account .woocommerce-MyAccount-content {
    flex: 1;
    background: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    min-height: 400px;
}

/*--------------------------------------------------------------
## 6. RESPONSIVE STYLES
--------------------------------------------------------------*/

@media (max-width: 1100px) {
    /* Shop grid becomes 2 columns on tablet */
    .striker-shop-main .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 990px) {
    /* Single product stack */
    .single-product .striker-grid-layout {
        grid-template-columns: 1fr !important;
    }
    .single-product #secondary.widget-area {
        display: none; 
    }
    
    .woocommerce div.product div.images,
    .woocommerce div.product .summary,
    .woocommerce div.product .woocommerce-tabs {
        flex: 0 0 100% !important;
        width: 100% !important;
    }

    /* On mobile, let images be taller since full width */
    .woocommerce div.product div.images {
        position: static;
        padding: 15px;
    }

    .woocommerce div.product div.images a img,
    .woocommerce div.product div.images .woocommerce-product-gallery__image img {
        max-height: 400px;
    }

    /* Smaller title on mobile */
    .woocommerce div.product .product_title {
        font-size: 1.5rem;
    }
}

@media (max-width: 992px) {
    /* Shop page stack */
    .striker-shop-container {
        flex-direction: column;
    }
    
    .striker-shop-container .widget-area {
        width: 100%;
        flex: none;
        order: 1;
        position: static;
        margin-bottom: 2rem;
    }
    
    .striker-shop-main {
        order: 2;
    }
}

@media (max-width: 768px) {
    /* Everything 1 column on mobile */
    .woocommerce ul.products {
        grid-template-columns: 1fr !important;
    }
    
    .woocommerce ul.products li.product img {
        height: 280px;
    }
    
    .shop-hero-header .page-title {
        font-size: 2.5rem;
    }
    
    .woocommerce-account .woocommerce-MyAccount-content-wrapper {
        flex-direction: column;
    }
    
    .woocommerce-account .woocommerce-MyAccount-navigation {
        width: 100%;
        flex: none;
    }
}
/* ========================================
   NUCULAR FIX: FORCE 3 COLUMNS ON SHOP
   ======================================== */

/* Target the main Shop Page specifically */
body.post-type-archive-product ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
}

/* Ensure the items don't have weird widths */
body.post-type-archive-product ul.products li.product {
    width: 100% !important;
    max-width: none !important;
    float: none !important;
}
/* ========================================
   FIX: GAP IN FIRST POSITION
   ======================================== */

/* 1. Force the First Product to be normal width (not full span) */
body.post-type-archive-product ul.products li.product.first-product,
body.post-type-archive-product ul.products li.product.first {
    grid-column: auto !important; /* Resets any spanning */
    grid-row: auto !important;    /* Resets any row spanning */
    clear: none !important;       /* Removes clearing that pushes it down */
}

/* 2. Ensure the Grid starts tightly */
body.post-type-archive-product ul.products {
    grid-auto-flow: row; /* Ensures standard left-to-right flow */
}

/* ========================================
   FIX: GHOST GRID ITEMS (THE GAP)
   ======================================== */

/* 1. Kill pseudo-elements on the grid container */
/* These become grid items and take up space in Grid layouts */
body.post-type-archive-product ul.products::before,
body.post-type-archive-product ul.products::after {
    display: none !important;
    content: none !important;
}

/* 2. Force First Item to Position 1 */
/* Ensures the first product starts exactly at Row 1, Column 1 */
body.post-type-archive-product ul.products li.product:first-child {
    grid-column: 1 / 2 !important;
    grid-row: 1 / 2 !important;
}
/* ========================================
   HEADER CART & ACCOUNT ICONS
   ======================================== */

/* 1. Cart Link Container */
.header-cart-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cream);
    font-size: 1rem;
    padding: 5px;
    transition: all 0.3s ease;
    margin-right: 10px; /* Space between Cart and Account links */
}

.header-cart-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* 2. The Red Badge (Count) */
.header-cart-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-heading);
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 3. Mobile Adjustments */
@media (max-width: 768px) {
    /* Hide text labels on mobile to save space, keep icons */
    .auth-links-top span {
        display: none;
    }
    
    /* Adjust padding for touch targets */
    .auth-links-top a {
        padding: 5px 8px;
    }
}
/* ========================================
   OFF-CANVAS CART MODAL (Cart Page Style)
   ======================================== */

/* 1. Overlay */
.cart-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 9998;
    display: none;
    cursor: pointer;
}
.cart-modal-overlay.active {
    display: block;
}

/* 2. The Panel (600px Wide) */
.cart-modal {
    position: fixed;
    top: 20px;
    right: -600px; 
    width: 600px;
    height: 100%;
    background-color: #fff;
    z-index: 9999;
    transition: right 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column; 
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
}

.cart-modal.active {
    right: 0;
}

/* 3. Header */
.cart-modal-header {
    background-color: var(--secondary-color);
    color: var(--cream);
    padding: 0 30px;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid var(--primary-color);
    flex-shrink: 0; 
}
.cart-modal-header h3 {
    margin: 0;
    color: var(--cream)
    font-size: 1.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-heading);
}
.cart-modal-close {
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--cream);
    font-size: 1.2rem;
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.cart-modal-close:hover {
    background: var(--primary-color);
    color: #fff;
}

/* 4. Body Container */
.cart-modal-body {
    flex: 1; 
    display: flex;
    flex-direction: column;
    overflow: hidden; 
    background: #fff;
}

/* 5. The Scrollable List */
.cart-modal-body ul.cart_list {
    flex: 1;
    overflow-y: auto;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ========================================
   FIX: MATCH WOOCOMMERCE'S ACTUAL DOM
   ========================================
   WooCommerce mini-cart <li> structure:
     1. <a class="remove">×</a>
     2. <a><img /><span class="product-title">Name</span></a>
     3. <span class="quantity">1 × $9.99</span>
   
   Old code used a 4-column grid that didn't match.
   New code uses flexbox with absolute remove button.
   ======================================== */

/* 6. Item Row */
.cart-modal-body ul.cart_list li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 45px 20px 25px;  /* Extra right padding for remove btn */
    border-bottom: 1px solid #eee;
    background: #fff;
    transition: background 0.2s;
    position: relative;
    min-height: 100px;
}

.cart-modal-body ul.cart_list li:hover {
    background: #fafafa;
}

/* Remove Button — absolutely positioned top-right */
.cart-modal-body a.remove {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    color: #ccc !important;
    font-size: 1rem;
    font-weight: 400;
    text-align: center;
    line-height: 28px;
    border: 1px solid #eee;
    text-decoration: none !important;
    z-index: 2;
    transition: all 0.2s;
}

.cart-modal-body a.remove:hover {
    background: var(--primary-color);
    color: #fff !important;
    border-color: var(--primary-color);
}

/* Product Link — contains image + title side by side */
.cart-modal-body ul.cart_list li > a:not(.remove) {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    flex: 1;
    min-width: 0; /* Prevent flex overflow */
}

/* Image */
.cart-modal-body ul.cart_list img {
    width: 80px;
    height: 80px;
    min-width: 80px;  /* Prevent shrinking */
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Product Title */
.cart-modal-body ul.cart_list .product-title {
    font-weight: 700;
    color: var(--dark-color);
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 0.9rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Quantity / Price — sits below image+title row */
.cart-modal-body .quantity {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.cart-modal-body .quantity .amount {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 0.95rem;
}

/* ========================================
   7. FOOTER (Total & Buttons)
   ======================================== */

.cart-modal-body .woocommerce-mini-cart__total,
.cart-modal-body .woocommerce-mini-cart__buttons {
    flex-shrink: 0; 
    background: #fff;
    border-top: 1px solid #eee;
    padding: 20px 30px;
}

.cart-modal-body .woocommerce-mini-cart__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--dark-color);
    margin: 0;
    border-top: 2px solid var(--cream);
}

.cart-modal-body .woocommerce-mini-cart__total strong {
    font-weight: 800;
    color: var(--secondary-color);
}

/* Buttons Side by Side */
.cart-modal-body .woocommerce-mini-cart__buttons {
    display: flex;
    flex-direction: row;
    gap: 15px;
    padding-bottom: 30px; 
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
}

.cart-modal-body .woocommerce-mini-cart__buttons a {
    flex: 1;
    text-align: center;
    padding: 15px;
    border-radius: var(--border-radius);
    font-family: var(--font-heading);
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* View Cart Button */
.cart-modal-body .woocommerce-mini-cart__buttons .wc-forward:not(.checkout) {
    background-color: transparent;
    border: 2px solid var(--border-color);
    color: var(--secondary-color);
    order: 1;
}
.cart-modal-body .woocommerce-mini-cart__buttons .wc-forward:not(.checkout):hover {
    background: var(--cream);
    border-color: var(--secondary-color);
}

/* Checkout Button */
.cart-modal-body .woocommerce-mini-cart__buttons .checkout {
    background-color: var(--secondary-color);
    color: var(--cream);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    order: 2;
}
.cart-modal-body .woocommerce-mini-cart__buttons .checkout:hover {
    background-color: var(--primary-color);
}

/* Empty Message */
.cart-modal-body .woocommerce-mini-cart__empty-message {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-style: italic;
}

/* ========================================
   8. RESPONSIVE
   ======================================== */

@media (max-width: 650px) {
    .cart-modal {
        width: 100%;
        right: -100%;
    }

    .cart-modal-body ul.cart_list li {
        gap: 12px;
        padding: 15px 40px 15px 20px;
        min-height: 85px;
    }

    .cart-modal-body ul.cart_list img {
        width: 65px;
        height: 65px;
        min-width: 65px;
    }

    .cart-modal-body ul.cart_list .product-title {
        font-size: 0.8rem;
    }

    .cart-modal-body .woocommerce-mini-cart__buttons {
        flex-direction: column;
        gap: 10px;
    }

    .cart-modal-body .woocommerce-mini-cart__buttons a {
        width: 100%;
    }
}
/* Price Column (Explicit width) */
/* We move the price to the 3rd column visually if possible, 
   but WC default puts it inside .quantity. 
   We will style it inline for stability. */

/* Remove Button Column */
.cart-modal-body a.remove {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #fff;
    color: #ccc !important;
    font-size: 1rem;
    text-align: center;
    line-height: 33px;
    border: 1px solid #eee;
    text-decoration: none !important;
    justify-self: center; /* Center in grid cell */
}
.cart-modal-body a.remove:hover {
    background: var(--primary-color);
    color: #fff !important;
    border-color: var(--primary-color);
}

/* 7. FOOTER (Total & Buttons) */
.cart-modal-body .woocommerce-mini-cart__total,
.cart-modal-body .woocommerce-mini-cart__buttons {
    flex-shrink: 0; 
    background: #fff;
    border-top: 1px solid #eee;
    padding: 20px 30px;
}

.cart-modal-body .woocommerce-mini-cart__total {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--dark-color);
    margin: 0;
    border-top: 2px solid var(--cream);
}

.cart-modal-body .woocommerce-mini-cart__total strong {
    font-weight: 800;
    color: var(--secondary-color);
}

/* Buttons Side by Side */
.cart-modal-body .woocommerce-mini-cart__buttons {
    display: flex;
    flex-direction: row;
    gap: 15px;
    padding-bottom: 30px; 
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
}

.cart-modal-body .woocommerce-mini-cart__buttons a {
    flex: 1;
    text-align: center;
    padding: 15px;
    border-radius: var(--border-radius);
    font-family: var(--font-heading);
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    margin: 0 !important;
}

/* View Cart Button */
.cart-modal-body .woocommerce-mini-cart__buttons .wc-forward:not(.checkout) {
    background-color: transparent;
    border: 2px solid var(--border-color);
    color: var(--secondary-color);
    order: 1;
}
.cart-modal-body .woocommerce-mini-cart__buttons .wc-forward:not(.checkout):hover {
    background: var(--cream);
    border-color: var(--secondary-color);
}

/* Checkout Button */
.cart-modal-body .woocommerce-mini-cart__buttons .checkout {
    background-color: var(--secondary-color);
    color: var(--cream);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    order: 2;
}
.cart-modal-body .woocommerce-mini-cart__buttons .checkout:hover {
    background-color: var(--primary-color);
}

/* Empty Message */
.cart-modal-body .woocommerce-mini-cart__empty-message {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-style: italic;
}

/* 8. Responsive */
@media (max-width: 650px) {
    .cart-modal {
        width: 100%;
        right: -100%;
    }
    
    .cart-modal-body ul.cart_list li {
        grid-template-columns: 80px 1fr auto; /* Hide explicit price col on mobile */
        gap: 15px;
        padding: 15px;
    }
    
    /* Hide remove button text visually if needed, keep icon */
}
/* ========================================
   MINI CART QUANTITY CONTROLS
   ======================================== */

/* Controls container — sits below product name */
.mini-cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}

/* +/- button group */
.mini-cart-qty-controls {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--border-color, #ddd);
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

/* The +/- buttons */
.mini-cart-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--secondary-color, #333);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    line-height: 1;
    padding: 0;
}

.mini-cart-qty-btn:hover:not(:disabled) {
    background: var(--secondary-color, #333);
    color: #fff;
}

.mini-cart-qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* The quantity number in the middle */
.mini-cart-qty-display {
    width: 36px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--dark-color, #222);
    border-left: 2px solid var(--border-color, #ddd);
    border-right: 2px solid var(--border-color, #ddd);
    font-family: var(--font-body, 'Roboto', sans-serif);
}

/* Price display */
.mini-cart-item-price {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--secondary-color, #333);
    font-family: var(--font-heading, 'Oswald', sans-serif);
    white-space: nowrap;
}

/* Updating animation (while AJAX is processing) */
.mini-cart-updating {
    opacity: 0.5;
    transition: opacity 0.15s ease;
}

/* Remove the old static .quantity span that's no longer needed */
.cart-modal-body .quantity {
    display: none;
}

/* Responsive */
@media (max-width: 650px) {
    .mini-cart-item-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .mini-cart-qty-btn {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .mini-cart-qty-display {
        width: 30px;
        height: 28px;
        font-size: 0.8rem;
    }
}