/* ==========================================================
   MARBOCRAFT SINGLE PRODUCT PAGE - MASTER CSS (REDESIGN PASS)
   Changes from original are marked with "// UPDATED" or "// NEW"
========================================================== */

/* ==========================================================
   SECTION 0: DESIGN TOKENS (NEW)
   Centralizing these makes future restyling a one-place edit
   instead of hunting through 300+ lines.
========================================================== */
.woocommerce div.product {
    --marbo-ink: #111111;
    --marbo-ink-soft: #555555;
    --marbo-ink-faint: #888888;
    --marbo-border: #eaeaea;
    --marbo-surface: #faf8f5;
    --marbo-accent: #C08B4B;
    --marbo-success: #27ae60;
    --marbo-danger: #e74c3c;
    --marbo-radius-sm: 8px;
    --marbo-radius-md: 12px;
    --marbo-radius-pill: 30px;
    --marbo-gap-section: 64px;
    --marbo-header-offset: 100px; /* UPDATED: see sticky note below */
}

/* ==========================================================
   SECTION 1: DESKTOP & BASE STYLES
========================================================== */

/* --- 1. SINGLE PRODUCT PAGE BASE --- */
.woocommerce div.product {
    padding: 0 2% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
    margin-top: 40px;
}

/* UPDATED: removed the contradictory duplicate rule that existed later in the
   original file (display:none here, display:block later — same selector,
   same specificity, order-dependent and fragile). Category is intentionally
   shown; styled properly under "Extra Utilities" below. */
.woocommerce-breadcrumb {
    display: none !important;
}

/* The Top Row Structure */
.marbo-single-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 48px; /* NEW: explicit gap instead of relying on justify-content alone */
    margin-bottom: var(--marbo-gap-section);
}

/* Yanks the image gallery perfectly to the left physical screen edge */
.woocommerce div.product div.images {
    width: calc(66% + 50vw - 50%) !important; /* UPDATED: 68% -> 66%, gives summary a touch more breathing room */
    margin: 0 0 0 calc(-50vw + 50%) !important;
    padding-left: 0 !important;
    padding-right: 0 !important; /* UPDATED: gap now handled by flex `gap` on parent, not padding hack */
    box-sizing: border-box !important;
    float: none !important;
}

/* Leaves the summary text column exactly as it is */
.woocommerce div.product div.summary {
    width: 34% !important; /* UPDATED: 32% -> 34% to match gallery adjustment */
    margin: 0 !important;
    box-sizing: border-box !important;
    float: none !important;
    position: -webkit-sticky;
    position: sticky;
    top: var(--marbo-header-offset); /* UPDATED: now a token; adjust one place if header height changes */
    align-self: flex-start; /* NEW: prevents sticky column from stretching to gallery height, which can cause odd sticky behavior on short summaries */
    /* REMOVED: max-height + overflow-y:auto — this produced a visible internal
       scrollbar next to the summary column, which looked broken rather than helpful.
       Reverted to letting the column scroll with the page, same as the original. */
}

/* 2x2 Image Grid */
.woocommerce-product-gallery__wrapper {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 2px; /* UPDATED: 4px -> 6px, slightly more breathing room between tiles */
    margin: 0 !important;
}
.woocommerce-product-gallery__image { width: 100% !important; float: none !important; margin: 0 !important; }
.woocommerce-product-gallery__image img {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 4 / 5;
    border-radius: 0px !important; /* UPDATED: was 0, small radius softens the grid without looking rounded/playful */
    display: block;
    object-fit: cover;
    transition: transform 0.4s ease; /* NEW */
}


/* Typography Formatting (Sizes controlled in typography.css) */
.woocommerce div.product .product_title {
    margin-top: 0 !important;
    margin-bottom: 4px !important; /* UPDATED: 0 -> 4px, title needs a hair of room before category line */
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
    clear: none !important;
    letter-spacing: -0.01em; /* NEW: tightens large headline type slightly, common for premium feel */
}
.woocommerce-product-details__short-description {
    margin-top: 25px;
    margin-bottom: 30px;
    border-top: 1px solid var(--marbo-border);
    padding-top: 25px;
    color: var(--marbo-ink-soft); /* NEW: body copy shouldn't compete with headline black */
    line-height: 1.6; /* NEW */
}

/* Badges & Elements */
.marbo-product-badges { display: flex; flex-direction: column; gap: 15px; margin: 25px 0; }
.badge-item { background-color: #E5DED1; padding: 16px 20px; border-radius: var(--marbo-radius-sm); display: flex; align-items: center; justify-content: center; gap: 12px; border: none; width: 100%; box-sizing: border-box; }
.marbo-scarcity-text { color: #b00000; margin-bottom: 25px; display: flex; align-items: center; gap: 8px; font-weight: 500; } /* UPDATED: added font-weight for urgency emphasis */
.pulse-dot { width: 8px; height: 8px; background-color: #b00000; border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(176, 0, 0, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(176, 0, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(176, 0, 0, 0); } }

/* Accordion */
.marbo-product-accordion { margin-top: 40px; border-top: 1px solid var(--marbo-border); }
.marbo-product-accordion details { border-bottom: 1px solid var(--marbo-border); }
.marbo-product-accordion summary::-webkit-details-marker { display: none; }
.marbo-product-accordion summary {
    padding: 20px 4px; /* UPDATED: added horizontal padding so hover background (new) doesn't look clipped */
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    outline: none;
    font-weight: 500; /* NEW: summary text slightly heavier than default paragraph weight */
    transition: color 0.2s ease;
    border-radius: 4px; /* NEW: pairs with hover bg */
}
.marbo-product-accordion summary:hover { color: var(--marbo-accent); } /* NEW */
.marbo-product-accordion .toggle-icon { font-size: 20px; font-weight: 300; transition: transform 0.3s ease; flex-shrink: 0; }
.marbo-product-accordion details[open] .toggle-icon { transform: rotate(45deg); }
.accordion-content { padding: 0 4px 25px; color: var(--marbo-ink-soft); line-height: 1.7; } /* UPDATED: matched horizontal padding + readability line-height */

/* Bottom USP Tiles */
.marbo-usp-tiles-section { clear: both !important; width: 100% !important; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 80px; padding-top: 60px; border-top: 1px solid var(--marbo-border); }
.usp-tile {
    text-align: center;
    padding: 30px 20px;
    background: var(--marbo-surface);
    border-radius: var(--marbo-radius-md);
    border: 1px solid #f0eee9;
    transition: transform 0.25s ease, box-shadow 0.25s ease; /* NEW */
}
.usp-tile:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); } /* NEW: subtle lift, ties into the rest of the hover language on the page */
.usp-tile .usp-icon { font-size: 30px; display: block; margin-bottom: 15px; }

/* Layout Fixes */
.woocommerce div.product .woocommerce-tabs, .woocommerce div.product .related.products, .woocommerce div.product .up-sells { flex: 0 0 100%; width: 100%; clear: both; margin-top: var(--marbo-gap-section); padding-top: 40px; border-top: 1px solid var(--marbo-border); }
body.woocommerce span.onsale, body.woocommerce div.product div.images .woocommerce-product-gallery__trigger, .woocommerce-message, .woocommerce-error, .woocommerce-info { display: none !important; }
body.woocommerce div.product div.images .woocommerce-product-gallery__image a { cursor: zoom-in !important; display: block !important; }
body.woocommerce div.product div.images .woocommerce-product-gallery__image img { transition: transform 0.3s ease; }
body.woocommerce div.product div.images .woocommerce-product-gallery__image:hover img { opacity: 0.97; } /* UPDATED: 0.95 -> 0.97, previous dimming read as slightly muddy combined with new zoom */

/* Add to Cart Layout */
.woocommerce div.product form.cart .quantity label, .woocommerce div.product form.cart .quantity .qty { display: none !important; }
.woocommerce div.product form.cart .quantity::before { content: "Quantity"; font-size: 14px; color: var(--marbo-ink); font-weight: 500; display: block; margin-bottom: 8px; } /* UPDATED: 16px -> 14px so it reads as a label, not body text */
.marbo-qty-dropdown { width: 110px; height: 48px; border: 1px solid var(--marbo-ink); border-radius: 25px; padding: 0 20px; font-size: 16px; color: var(--marbo-ink); background-color: #fff; background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="%23111" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>'); background-repeat: no-repeat; background-position: right 15px center; appearance: none; cursor: pointer; outline: none; transition: border-color 0.2s ease; }
.marbo-qty-dropdown:focus { border-color: var(--marbo-accent); }

/* ==========================================================
   ADD TO CART BUTTON SHIMMER (BULLETPROOF VERSION)
========================================================== */

/* 1. Prep the button */
.woocommerce div.product form.cart .single_add_to_cart_button {
    position: relative !important;
    overflow: hidden !important; 
}

/* 2. Create the light beam */
.woocommerce div.product form.cart .single_add_to_cart_button::after {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important; /* Lock starting position off-screen */
    width: 60% !important;
    height: 100% !important;
    background: linear-gradient(
        to right, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.4) 50%, 
        rgba(255, 255, 255, 0) 100%
    ) !important;
    z-index: 10 !important;
    pointer-events: none !important; 
    /* 3.5 seconds total: ~1.4s sweep + ~2.1s pause */
    animation: marbo-shimmer 3.5s infinite !important; 
}

/* 3. The Animation Keyframes (Hardware Accelerated) */
@keyframes marbo-shimmer {
    0% {
        transform: skewX(-25deg) translateX(0);
    }
    40% {
        /* Sweeps completely across the button */
        transform: skewX(-25deg) translateX(400%); 
    }
    100% {
        /* Pauses completely out of view */
        transform: skewX(-25deg) translateX(400%); 
    }
}

/* NEW: shared button base — both the plain single_add_to_cart_button and any
   Buy Now button (simple OR variable product) now inherit from one place,
   so styling can never drift out of sync between the two contexts again. */
.woocommerce div.product form.cart .single_add_to_cart_button,
.woocommerce div.product .marbo-buy-now-button {
    height: 54px !important;
    border-radius: var(--marbo-radius-pill) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
    font-weight: 500 !important;
    transition: opacity 0.3s ease, background-color 0.3s ease, transform 0.15s ease !important;
    text-decoration: none !important;
    cursor: pointer;
}
.woocommerce div.product form.cart .single_add_to_cart_button:hover,
.woocommerce div.product .marbo-buy-now-button:hover {
    opacity: 0.85 !important;
    transform: translateY(-1px); /* NEW: tiny lift on hover, consistent with usp-tile hover language */
}
.woocommerce div.product form.cart .single_add_to_cart_button:active,
.woocommerce div.product .marbo-buy-now-button:active {
    transform: translateY(0); /* NEW: press feedback */
}

/* Fill vs outline variants — reused for both simple and variable product buttons */
.woocommerce div.product form.cart .single_add_to_cart_button {
    background-color: var(--marbo-ink) !important;
    color: #fff !important;
    border: 2px solid var(--marbo-ink) !important;
}
.woocommerce div.product .marbo-buy-now-button { /* NEW: this class needs to be added to the Buy Now
    template part's <button>/<a> tag in template-parts/woocommerce/buy-now-button.php.
    Previously only `.marbo-buy-now` existed, scoped inside the variations selector,
    so simple products' Buy Now button had no styling at all. */
    background-color: #fff !important;
    color: var(--marbo-ink) !important;
    border: 1.5px solid var(--marbo-ink) !important;
}
.woocommerce div.product .marbo-buy-now-button:hover { background-color: #f7f7f7 !important; }

.woocommerce div.product form.cart:not(.variations_form) {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important; /* UPDATED: was center. The quantity column is taller than the
        button (it has a "Quantity" label stacked above the dropdown), so center-aligning the row
        centered the button against that *combined* height — making the button appear to float
        slightly above the quantity box instead of lining up with it. flex-end aligns both elements'
        bottoms, so the button bottom matches the dropdown bottom and they read as one line. */
    gap: 12px !important; /* UPDATED: 15px -> 12px to tighten pairing between two buttons */
    width: 100% !important;
    flex-wrap: wrap !important;
}
.woocommerce div.product form.cart:not(.variations_form) .single_add_to_cart_button,
.woocommerce div.product form.cart:not(.variations_form) .marbo-buy-now-button {
    flex: 1 1 calc(50% - 6px) !important; /* UPDATED: previously 100% (forced full-width stack); now sits
        side-by-side on desktop like the variable-product version already does, for consistency.
        Falls back to stacking on narrow screens via the 768px media query below. */
    width: auto !important;
}

/* Price and Tax Alignment */
.woocommerce div.product p.price { display: inline-flex !important; align-items: baseline; gap: 12px; margin-bottom: 20px !important; flex-wrap: wrap; }
.woocommerce div.product p.price ins { text-decoration: none !important; font-weight: 600; } /* UPDATED: added weight so sale price is unmistakably the "real" price */
.woocommerce div.product p.price del { color: var(--marbo-ink-faint); font-weight: 400; } /* NEW: explicitly de-emphasize the struck-through original price */
.marbo-tax-text { display: inline-block !important; color: var(--marbo-ink-faint); margin-top: 0 !important; margin-bottom: 20px !important; margin-left: 8px !important; font-size: 13px; } /* NEW: explicit smaller size so it reads as a footnote, not body copy */

/* Status, Badges & Utilities */
.marbo-stock-status { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 14px; font-weight: 500; } /* UPDATED: margin 5px->8px, added size/weight for clearer label styling */
.marbo-stock-status .stock-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 3px rgba(0,0,0,0.05); }
.marbo-stock-status.in-stock { color: var(--marbo-success); }
.marbo-stock-status.in-stock .stock-dot { background-color: var(--marbo-success); box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.2); }
.marbo-stock-status.out-of-stock { color: var(--marbo-danger); }
.marbo-stock-status.out-of-stock .stock-dot { background-color: var(--marbo-danger); box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2); }

/* Tighter cart spacing */
.woocommerce div.product form.cart { margin-bottom: 8px !important; }
.marbo-safe-checkout-wrap { margin-top: 0px !important; margin-bottom: 20px; text-align: center; }
.safe-checkout-divider { display: flex; align-items: center; text-align: center; margin-bottom: 15px; }
.safe-checkout-divider::before, .safe-checkout-divider::after { content: ''; flex: 1; border-bottom: 1px solid var(--marbo-border); }
.safe-checkout-divider span { padding: 0 15px; color: var(--marbo-ink-faint); font-size: 12px; letter-spacing: 0.05em; } /* UPDATED: added size/tracking, "GUARANTEED SAFE CHECKOUT" reads better as a small caps-style label */
.marbo-safe-checkout-wrap img { max-width: 100%; height: auto; display: inline-block; }

.marbo-delivery-estimate { display: flex; align-items: center; gap: 15px; background: #F9F9F9; padding: 16px 20px; border-radius: var(--marbo-radius-sm); margin-bottom: 25px; border: none; }
.marbo-delivery-estimate .delivery-icon { width: 22px; height: 22px; color: var(--marbo-ink-soft); flex-shrink: 0; } /* UPDATED: flex-shrink added, prevents icon squashing if delivery text wraps to two lines */
.marbo-delivery-estimate .delivery-text { font-size: 14px; } /* NEW: explicit size */

.marbo-trust-badges-container { display: flex; justify-content: space-between; align-items: stretch; border: 1px solid var(--marbo-border); border-radius: var(--marbo-radius-sm); padding: 25px 15px; margin-bottom: 40px; background: #fff; }
.marbo-trust-badges-container .badge-box { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 5px; }
.marbo-trust-badges-container .badge-box:not(:last-child) { border-right: 1px solid var(--marbo-border); }
.marbo-trust-badges-container .badge-box img { width: 36px; height: 36px; object-fit: contain; margin-bottom: 12px; }
.marbo-trust-badges-container .badge-title { font-size: 13px; font-weight: 600; color: var(--marbo-ink); display: block; } /* NEW: was unstyled inline <span>, no visual hierarchy vs badge-sub */
.marbo-trust-badges-container .badge-sub { font-size: 12px; color: var(--marbo-ink-faint); display: block; margin-top: 2px; } /* NEW */

/* Extra Utilities */
.marbo-single-category { margin-bottom: 6px; display: block !important; font-size: 13px; letter-spacing: 0.03em; text-transform: uppercase; } /* UPDATED: margin 2px->6px, added small-caps eyebrow treatment so it reads as a category label above the title, not stray text */
.marbo-single-category a { color: var(--marbo-ink-faint) !important; text-decoration: none !important; transition: color 0.3s ease !important; }
.marbo-single-category a:hover { color: var(--marbo-ink) !important; }
.marbo-bulk-box { background: var(--marbo-surface); border-radius: var(--marbo-radius-sm); padding: 25px; margin-top: 35px; }
.marbo-bulk-box .bulk-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-weight: 600; } /* UPDATED: added font-weight, header should look like a header */
.marbo-bulk-box .bulk-content { font-size: 14px; color: var(--marbo-ink-soft); line-height: 1.6; } /* NEW: was unstyled, blended into header visually */
.dynamic-woo-content table { width: 100%; border-collapse: collapse; }
.dynamic-woo-content th { text-align: left; padding: 8px 0; color: var(--marbo-ink); width: 30%; font-weight: 500; }
.dynamic-woo-content td { padding: 8px 0; color: var(--marbo-ink-soft); }
.related.products { margin-top: var(--marbo-gap-section); padding-top: 0; border-top: none; }
.related.products > h2 { text-transform: capitalize; position: relative; display: inline-block; padding-bottom: 15px; margin-bottom: 40px; }
.related.products > h2::before { content: ''; position: absolute; bottom: 0; left: 0; width: 250px; height: 3px; background: var(--marbo-border); }
.related.products > h2::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background: var(--marbo-ink); }
.marbo-reviews-section { margin-top: 60px; width: 100%; clear: both; }

/* ==========================================================
   VARIABLE PRODUCT FIXES (Swatches & Layout)
========================================================== */

.woocommerce div.product form.variations_form.cart { display: block !important; width: 100% !important; }
.woocommerce div.product table.variations,
.woocommerce div.product table.variations tbody,
.woocommerce div.product table.variations tr,
.woocommerce div.product table.variations th,
.woocommerce div.product table.variations td {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    text-align: left !important;
    border: none !important;
    background: transparent !important;
}
.woocommerce div.product table.variations th { margin-bottom: 10px !important; font-weight: 500 !important; } /* UPDATED: added weight */
.woocommerce div.product table.variations td { margin-bottom: 15px !important; }
.woocommerce div.product table.variations .reset_variations { display: inline-block !important; margin-top: 10px !important; font-size: 12px !important; color: var(--marbo-ink-faint) !important; text-decoration: underline !important; }

.woocommerce div.product table.variations select { display: none !important; }

.marbo-swatches-container { display: flex !important; flex-wrap: wrap !important; gap: 10px !important; margin-top: 5px !important; } /* UPDATED: 12px -> 10px, tighter swatch grouping */
.marbo-swatch-btn {
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 33px !important;
    padding: 11px 18px !important; /* UPDATED: 12px -> 11px vertical, slight tightening for visual balance with the new 10px gap */
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #444 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    line-height: 1 !important;
}
.marbo-swatch-btn:hover { border-color: var(--marbo-ink) !important; color: var(--marbo-ink) !important; }
.marbo-swatch-btn.selected { background: var(--marbo-ink) !important; color: #fff !important; border-color: var(--marbo-ink) !important; }
.marbo-swatch-btn:focus-visible { outline: 2px solid var(--marbo-accent) !important; outline-offset: 2px !important; } /* NEW: keyboard-navigation accessibility, previously outline was unconditionally removed */

.woocommerce div.product .woocommerce-variation-price { display: none !important; }

.woocommerce div.product form.variations_form .woocommerce-variation-add-to-cart .quantity { display: none !important; }
.woocommerce div.product form.variations_form .woocommerce-variation-add-to-cart {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important; /* UPDATED: 15px -> 12px to match the simple-product button gap above */
    width: 100% !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-top: 25px !important;
    clear: both !important;
}
.woocommerce div.product form.variations_form .woocommerce-variation-add-to-cart button[type="submit"] {
    flex: 1 1 calc(50% - 6px) !important; /* UPDATED: was 100% forced stacking; now matches simple-product side-by-side layout */
    width: auto !important;
    max-width: 100% !important;
    height: 54px !important;
    border-radius: var(--marbo-radius-pill) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    transition: opacity 0.3s ease, background-color 0.3s ease, transform 0.15s ease !important;
}
.woocommerce div.product form.variations_form .woocommerce-variation-add-to-cart button[type="submit"]:hover { transform: translateY(-1px); } /* NEW: consistent with simple-product hover */
.woocommerce div.product form.variations_form .woocommerce-variation-add-to-cart .single_add_to_cart_button { background-color: var(--marbo-ink) !important; color: #fff !important; border: 2px solid var(--marbo-ink) !important; }
.woocommerce div.product form.variations_form .woocommerce-variation-add-to-cart .marbo-buy-now,
.woocommerce div.product form.variations_form .woocommerce-variation-add-to-cart .marbo-buy-now-button { background-color: #fff !important; color: var(--marbo-ink) !important; border: 1.5px solid var(--marbo-ink) !important; } /* UPDATED: now also matches new shared .marbo-buy-now-button class */
.woocommerce div.product form.variations_form .woocommerce-variation-add-to-cart .marbo-buy-now:hover,
.woocommerce div.product form.variations_form .woocommerce-variation-add-to-cart .marbo-buy-now-button:hover { background-color: #f7f7f7 !important; }
.woocommerce div.product form.variations_form .woocommerce-variation-add-to-cart .single_add_to_cart_button.disabled,
.woocommerce div.product form.variations_form .woocommerce-variation-add-to-cart .single_add_to_cart_button:disabled { background-color: #f2f2f2 !important; border-color: #e0e0e0 !important; color: #a0a0a0 !important; cursor: not-allowed !important; opacity: 1 !important; }
.woocommerce div.product .woocommerce-variation.single_variation { margin-bottom: 0 !important; margin-top: 15px !important; }

/* ==========================================================
   LIGHTBOX Z-INDEX OVERRIDE
========================================================== */
.pswp { z-index: 2147483647 !important; }
body.pswp-open .site-header,
body.pswp-open .marbo-announcement-bar {
    opacity: 0 !important;
    visibility: hidden !important;
    z-index: 0 !important;
}

/* ==========================================================
   SECTION 2: MOBILE & TABLET OVERRIDES & SWIPER
========================================================== */

.marbo-mobile-gallery-wrapper { display: none; }

/* --- 1. TABLET ONLY (1024px) --- */
@media screen and (max-width: 1024px) {

    .marbo-single-top-row { flex-direction: column !important; gap: 0 !important; margin-bottom: 40px; }
    .woocommerce div.product div.images,
    .woocommerce div.product div.summary { width: 100% !important; padding-right: 0 !important; margin-left: 0 !important; margin: 0 !important; }

    .woocommerce div.product div.summary {
        position: static !important; /* NEW: sticky summary makes no sense once columns stack on tablet/mobile — it was previously left sticky, which on some devices causes the summary to pin awkwardly mid-scroll on a single-column layout */
        max-height: none !important;
        overflow-y: visible !important;
    }

    .woocommerce div.product div.images { display: none !important; }
    .marbo-mobile-gallery-wrapper { display: block; width: 100%; position: relative; margin-top: -15px !important; }

    .woocommerce div.product,
    .marbo-single-product-layout { padding-left: 2% !important; padding-right: 2% !important; margin-top: 5px !important; margin-bottom: 0px !important; box-sizing: border-box !important; }
    .woocommerce div.product div.summary { margin-top: 18px !important; } /* UPDATED: 15px -> 18px, slightly more breathing room under the gallery */

    .marbo-main-swiper { width: 100%; border-radius: var(--marbo-radius-md); margin-bottom: 15px; background: #f9f9f9; aspect-ratio: 4 / 5; overflow: hidden; }
    .marbo-main-swiper .swiper-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

    .marbo-main-swiper .marbo-nav-btn { background-color: #ffffff; width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 4px 12px rgba(0,0,0,0.15); color: var(--marbo-ink); opacity: 0.9; transition: opacity 0.2s ease; }
    .marbo-main-swiper .marbo-nav-btn:hover { opacity: 1; }
    .marbo-main-swiper .marbo-nav-btn::after { font-size: 16px; font-weight: bold; }

    .marbo-thumb-swiper { width: 100%; padding: 5px 0; }
    .marbo-thumb-swiper .swiper-slide { opacity: 0.5; cursor: pointer; transition: all 0.3s ease; border-radius: 8px; overflow: hidden; aspect-ratio: 1 / 1; border: 2px solid transparent; }
    .marbo-thumb-swiper .swiper-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .marbo-thumb-swiper .swiper-slide-thumb-active { opacity: 1; border-color: #fff; }

    .marbo-mobile-gallery-wrapper.style-immersive { width: 100vw !important; margin-left: calc(-50vw + 50%) !important; margin-top: -20px !important; margin-bottom: 0px !important; }
    .marbo-mobile-gallery-wrapper.style-immersive .marbo-main-swiper { border-radius: 0 !important; box-shadow: none !important; aspect-ratio: 4 / 5 !important; margin-bottom: 0 !important; background-color: transparent !important; }
    .marbo-mobile-gallery-wrapper.style-immersive .marbo-main-swiper img { border-radius: 0 !important; width: 100% !important; height: 100% !important; object-fit: cover !important; }

    .marbo-immersive-pagination { position: absolute !important; bottom: 20px !important; left: 50% !important; transform: translateX(-50%) !important; background: rgba(30, 30, 30, 0.4) !important; backdrop-filter: blur(15px) saturate(150%) !important; -webkit-backdrop-filter: blur(15px) saturate(150%) !important; border: 1px solid rgba(255, 255, 255, 0.2) !important; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), inset 0 1px 3px rgba(255, 255, 255, 0.1) !important; padding: 8px 14px !important; border-radius: 30px !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 8px !important; z-index: 20 !important; width: auto !important; margin: 0 !important; transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s !important; }
    .marbo-mobile-gallery-wrapper.style-immersive.pagination-hidden .marbo-immersive-pagination { opacity: 0 !important; visibility: hidden !important; transform: translate(-50%, 10px) !important; }

    .marbo-mobile-gallery-wrapper.style-carousel {
        width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-top: -10px !important;
        overflow: hidden !important;
        padding-bottom: 0 !important;
    }

    .marbo-mobile-gallery-wrapper.style-carousel .marbo-main-swiper {
        width: 90vw !important;
        margin-left: 15px !important;
        padding: 0 !important;
        overflow: visible !important;
        background: transparent !important;
    }

    .marbo-mobile-gallery-wrapper.style-carousel .swiper-slide {
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        padding-right: 4px !important;
        aspect-ratio: 4 / 5 !important;
        height: auto !important;
        opacity: 1 !important;
    }

    .marbo-mobile-gallery-wrapper.style-carousel .marbo-main-swiper img {
        border-radius: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .marbo-mobile-gallery-wrapper.style-carousel .marbo-immersive-pagination { bottom: 0 !important; background: #111111 !important; }
    .marbo-mobile-gallery-wrapper.style-carousel .swiper-pagination-bullet { width: 6px !important; height: 6px !important; background: rgba(255, 255, 255, 0.4) !important; border-radius: 50% !important; opacity: 1 !important; margin: 0 !important; transition: all 0.3s ease !important; }
    .marbo-mobile-gallery-wrapper.style-carousel .swiper-pagination-bullet-active { background: #ffffff !important; transform: scale(1.4) !important; }

    body.single-product .site-header { border-bottom: none !important; box-shadow: none !important; }
}

/* --- 2. MOBILE & SMALL TABLET (768px) --- */
@media screen and (max-width: 768px) {
    .woocommerce div.product .product_title { font-size: 22px !important; margin-top: 0 !important; margin-bottom: 6px !important; margin-block-start: 0 !important; margin-block-end: 0px !important; letter-spacing: -0.01em; } /* UPDATED: added explicit font-size ceiling — large desktop headline sizes often overflow narrow mobile summary columns if font-size is only set elsewhere at a large fixed px */

    .woocommerce div.product p.price, .marbo-tax-text { margin-bottom: 10px !important; }

    .woocommerce-product-details__short-description { margin-top: 20px !important; margin-bottom: 25px !important; padding-top: 20px !important; }

    .marbo-product-accordion { margin-top: 15px !important; }
    .marbo-product-accordion summary { padding: 15px 4px !important; }
    .accordion-content { padding: 0 4px 20px !important; }

    .marbo-usp-tiles-section { grid-template-columns: 1fr 1fr !important; gap: 12px !important; margin-top: 50px !important; padding-top: 40px !important; }
    .usp-tile { padding: 20px 15px !important; }
    .usp-tile .usp-icon { margin-bottom: 10px !important; }

    .marbo-trust-badges-container { flex-wrap: wrap; padding: 20px 10px; gap: 20px 0; }
    .marbo-trust-badges-container .badge-box { flex: 0 0 50%; border-right: none; }
    .related.products { margin-top: 60px !important; }
    .related.products > h2 { margin-bottom: 30px !important; padding-bottom: 10px !important; }
    .related.products > h2::before { width: 150px; }
    .marbo-bulk-box { padding: 20px; }

    /* NEW: on mobile, stack Add to Cart / Buy Now full-width again — side-by-side
       buttons get cramped under ~480px, and thumb-reachability favors full-width
       stacked CTAs on small screens anyway. */
    .woocommerce div.product form.cart:not(.variations_form) .single_add_to_cart_button,
    .woocommerce div.product form.cart:not(.variations_form) .marbo-buy-now-button,
    .woocommerce div.product form.variations_form .woocommerce-variation-add-to-cart button[type="submit"] {
        flex: 1 1 100% !important;
        width: 100% !important;
    }
}

@media (max-width: 600px) {
    .marbo-usp-tiles-section { grid-template-columns: 1fr !important; }
}

/* ==========================================================
   NEW MOCKUP UI ELEMENTS (Summary Column)
========================================================== */

/* Subtitle & Ratings */
.marbo-product-subtitle { font-size: 14px; color: var(--marbo-ink-soft); margin: 0 0 12px 0; }
.woocommerce-product-rating { margin-bottom: 25px !important; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--marbo-ink-soft); }

/* Feature Pills */
.marbo-feature-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.marbo-feature-pills .pill { background: #fdfaf6; border: 1px solid #f0e6d2; padding: 6px 14px; border-radius: 4px; font-size: 12px; font-weight: 500; color: var(--marbo-ink-soft); display: flex; align-items: center; gap: 6px; }
.marbo-feature-pills .pill svg { color: var(--marbo-accent); }

/* Breeze Checkout Wrapper */
.marbo-safe-checkout-wrap { text-align: center; margin-bottom: 30px; margin-top: 15px; }
.breeze-trust { font-size: 12px; color: var(--marbo-ink-soft); display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 0 12px; }

/* Styles the new inline Breeze Logo */
img.breeze-logo-inline {
    height: 14px !important; 
    width: auto !important; 
    margin-left: 2px;
    margin-top: -2px; /* Pulls it up slightly so it aligns perfectly with the text */
}

/* Styles the main payment icons below it */
img.payment-methods-img { 
    height: 24px !important; 
    width: auto !important; 
}
.marbo-pincode-checker { background: #f8f8f8; border-radius: var(--marbo-radius-md); padding: 20px; margin-bottom: 25px; }
.pincode-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 15px; }
.pincode-header .truck-icon { color: var(--marbo-ink); margin-top: 2px; }
.pincode-text .label { display: block; font-size: 12px; color: var(--marbo-ink-soft); margin-bottom: 4px; }
.pincode-text strong { display: block; font-size: 14px; color: var(--marbo-ink); }
.pincode-input-group { display: flex; gap: 10px; }
.pincode-input-group input { flex: 1; border: 1px solid #e0e0e0; border-radius: var(--marbo-radius-sm); padding: 12px 15px; font-size: 14px; outline: none; background: #fff; }
.pincode-input-group input:focus { border-color: var(--marbo-ink); }
.pincode-input-group button { background: var(--marbo-ink); color: #fff; border: none; border-radius: var(--marbo-radius-sm); padding: 0 24px; font-size: 13px; font-weight: 600; cursor: pointer; transition: background 0.3s; }
.pincode-input-group button:hover { background: var(--marbo-ink-soft); }
.pincode-msg { font-size: 12px; margin-top: 10px; display: none; }
.pincode-msg .success { color: var(--marbo-success); }
.pincode-msg .error { color: var(--marbo-danger); }

/* 4-Grid Trust Features */
.marbo-trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; border: 1px solid var(--marbo-border); border-radius: var(--marbo-radius-md); padding: 20px 10px; margin-bottom: 30px; background: #fff; }
.marbo-trust-grid .trust-item { text-align: center; padding: 0 5px; }
.marbo-trust-grid .trust-item:not(:last-child) { border-right: 1px solid var(--marbo-border); }
.marbo-trust-grid .trust-item svg { color: var(--marbo-ink-soft); margin-bottom: 8px; }
.marbo-trust-grid .trust-item strong { display: block; font-size: 11px; color: var(--marbo-ink); margin-bottom: 4px; line-height: 1.2; }
.marbo-trust-grid .trust-item span { display: block; font-size: 10px; color: var(--marbo-ink-faint); line-height: 1.3; }

/* B2B Box */
.marbo-bulk-box { background: #f8f7f5; border-radius: var(--marbo-radius-md); padding: 25px; margin-top: 30px; display: flex; gap: 15px; align-items: flex-start; }
.marbo-bulk-box .bulk-icon { color: var(--marbo-ink); }
.marbo-bulk-box .bulk-content strong { display: block; font-size: 15px; color: var(--marbo-ink); margin-bottom: 6px; }
.marbo-bulk-box .bulk-content p { font-size: 13px; color: var(--marbo-ink-soft); margin-bottom: 15px; line-height: 1.5; }
.b2b-whatsapp-btn { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--marbo-border); padding: 10px 18px; border-radius: var(--marbo-radius-pill); font-size: 12px; font-weight: 600; color: var(--marbo-ink); text-decoration: none; transition: border-color 0.3s; }
.b2b-whatsapp-btn:hover { border-color: var(--marbo-ink); }


/* Responsive adjustments for new elements */
@media screen and (max-width: 768px) {
    .marbo-trust-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 10px; }
    .marbo-trust-grid .trust-item:nth-child(2) { border-right: none; }
    .marbo-trust-grid .trust-item:nth-child(1), .marbo-trust-grid .trust-item:nth-child(2) { border-bottom: 1px solid var(--marbo-border); padding-bottom: 15px; }
}

/* ==========================================================
   MOBILE STICKY ADD TO CART BAR
========================================================== */
.marbo-sticky-cart-bar {
    display: none; /* Hidden on Desktop */
}
@media screen and (max-width: 1024px) {
    .marbo-sticky-cart-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.82);
        backdrop-filter: blur(14px) saturate(160%);
        -webkit-backdrop-filter: blur(14px) saturate(160%);
        padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.10), 0 -1px 0 rgba(0, 0, 0, 0.04);
        z-index: 9999;
        transform: translateY(120%);
        opacity: 0;
        transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                    opacity 0.35s ease;
        box-sizing: border-box;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
    }

    /* Class injected by JS when the main button scrolls out of view */
    .marbo-sticky-cart-bar.is-visible {
        transform: translateY(0);
        opacity: 1;
    }

    .sticky-cart-left {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .sticky-price-row {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }

    .sticky-cart-left .sticky-price {
        font-family: 'Poppins', sans-serif;
        font-size: 19px;
        font-weight: 400;
        color: #0d0d0d;
        line-height: 1.2;
        display: flex;
        align-items: center;
        gap: 8px;
        letter-spacing: -0.2px;
    }

    /* The Dynamic Variant Pill (e.g. "UK6") */
    .sticky-variant-info {
        background: #f2f2f2;
        color: #111;
        font-size: 10px;
        font-weight: 600;
        padding: 3px 9px;
        border-radius: 5px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .sticky-cart-left .sticky-tax {
        font-size: 10px;
        color: #a3a3a3;
        margin-top: 1px;
        letter-spacing: 0.1px;
    }

    /* ---------- Button base ---------- */
    .sticky-cart-right .marbo-trigger-main-cart {
        background: #111;
        color: #fff;
        border: none;
        border-radius: 30px;
        padding: 14px 30px;
        min-height: 46px;
        min-width: 168px;
        font-size: 14px;
        font-weight: 400;
        letter-spacing: 0.6px;
        cursor: pointer;
        position: relative;
        overflow: hidden;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
        transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
        animation: marbo-btn-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s backwards;
    }

    .sticky-cart-right .marbo-trigger-main-cart:active {
        transform: scale(0.96);
    }

    @keyframes marbo-btn-in {
        from { opacity: 0; transform: scale(0.85); }
        to { opacity: 1; transform: scale(1); }
    }

    /* ---------- State layers (idle / rolling / loading / success) ---------- */
    .btn-state {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        opacity: 0;
        transform: translateY(6px);
        transition: opacity 0.25s ease, transform 0.25s ease;
        pointer-events: none;
    }

    .marbo-trigger-main-cart[data-state="idle"] .btn-state--idle,
    .marbo-trigger-main-cart[data-state="rolling"] .btn-state--rolling,
    .marbo-trigger-main-cart[data-state="loading"] .btn-state--loading,
    .marbo-trigger-main-cart[data-state="success"] .btn-state--success {
        opacity: 1;
        transform: translateY(0);
    }

    .btn-cart-icon {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

    /* ---------- Rolling cart animation ---------- */
    .btn-state--rolling {
        overflow: hidden;
    }

    .btn-cart-icon--rolling {
        position: absolute;
        left: -20%;
        top: 50%;
        width: 18px;
        height: 18px;
        transform: translateY(-50%) rotate(0deg);
    }

    .marbo-trigger-main-cart[data-state="rolling"] .btn-cart-icon--rolling {
        animation: marbo-cart-roll 0.7s cubic-bezier(0.55, 0, 0.35, 1) forwards;
    }

    @keyframes marbo-cart-roll {
        0% {
            left: -15%;
            transform: translateY(-50%) rotate(0deg);
            opacity: 1;
        }
        85% {
            opacity: 1;
        }
        100% {
            left: 105%;
            transform: translateY(-50%) rotate(340deg);
            opacity: 0;
        }
    }

    /* ---------- Loading dots ---------- */
    .btn-dots {
        display: flex;
        gap: 5px;
    }

    .btn-dots span {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #fff;
        animation: marbo-dot-bounce 1s ease-in-out infinite;
    }

    .btn-dots span:nth-child(2) { animation-delay: 0.15s; }
    .btn-dots span:nth-child(3) { animation-delay: 0.3s; }

    @keyframes marbo-dot-bounce {
        0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
        40% { transform: translateY(-4px); opacity: 1; }
    }

    /* ---------- Success state ---------- */
    .btn-check-icon {
        width: 15px;
        height: 15px;
        stroke-dasharray: 24;
        stroke-dashoffset: 24;
    }

    .marbo-trigger-main-cart[data-state="success"] .btn-check-icon {
        animation: marbo-check-draw 0.4s ease forwards 0.1s;
    }

    @keyframes marbo-check-draw {
        to { stroke-dashoffset: 0; }
    }

    @media (prefers-reduced-motion: reduce) {
        .marbo-sticky-cart-bar,
        .sticky-cart-right .marbo-trigger-main-cart,
        .btn-state,
        .btn-cart-icon--rolling,
        .btn-dots span,
        .btn-check-icon {
            animation: none !important;
            transition: none !important;
        }
    }
}

/* ==========================================================
   STICKY ADD TO CART BUTTON SHIMMER
========================================================== */

/* 1. Prep the sticky button to contain the light beam */
.sticky-cart-right .marbo-trigger-main-cart {
    position: relative !important;
    overflow: hidden !important; 
}

/* 2. Attach the exact same light beam and animation */
.sticky-cart-right .marbo-trigger-main-cart::after {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 60% !important;
    height: 100% !important;
    background: linear-gradient(
        to right, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.4) 50%, 
        rgba(255, 255, 255, 0) 100%
    ) !important;
    z-index: 10 !important;
    pointer-events: none !important; 
    /* Uses the 3.5-second rhythm we built earlier */
    animation: marbo-shimmer 3.5s infinite !important; 
}

/* ==========================================================
   PREVENT FOOTER OVERLAP FROM STICKY CART
========================================================== */
@media screen and (max-width: 1024px) {
    /* Adds extra padding to the bottom of the dark footer ONLY on product pages */
    body.single-product .footer-bottom-dark {
        padding-bottom: 100px !important; 
    }
}

/* ==========================================================
   HIDE WOOCOMMERCE "CLEAR" VARIATION BUTTON
========================================================== */
.woocommerce div.product table.variations .reset_variations { 
    display: none !important; 
}

/* ==========================================================
   SITE REVIEWS PLUGIN INTEGRATION
========================================================== */

/* 1. Top Stars (Under Title) */
.marbo-top-stars {
    margin-bottom: 25px;
}
.marbo-top-stars .gl-star-rating--stars {
    color: var(--marbo-accent) !important; /* Forces stars to your bronze/gold */
}

/* 2. Bottom Reviews Section */
.marbo-reviews-section {
    clear: both;
    width: 100%;
    margin-top: var(--marbo-gap-section);
    padding-top: 60px;
    border-top: 1px solid var(--marbo-border);
}

.marbo-reviews-title {
    font-family: 'Times New Roman', Times, serif;
    font-size: 32px;
    color: var(--marbo-ink);
    text-align: center;
    margin-bottom: 50px;
    letter-spacing: -0.5px;
}

/* Split-Screen Grid */
.marbo-reviews-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}

/* Form Card Styling */
.marbo-form-card {
    background: #fff;
    padding: 40px;
    border-radius: var(--marbo-radius-md);
    box-shadow: 0 15px 40px rgba(0,0,0,0.04);
    border: 1px solid var(--marbo-border);
    position: sticky;
    top: calc(var(--marbo-header-offset) + 20px);
}
.marbo-write-review-title {
    font-family: 'Times New Roman', Times, serif;
    font-size: 24px;
    color: var(--marbo-ink);
    margin: 0 0 5px;
}
.marbo-review-subtitle {
    font-size: 13px;
    color: var(--marbo-ink-soft);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--marbo-border);
}

/* Override Site Reviews Default Button */
.gl-form-button {
    background: var(--marbo-ink) !important;
    color: #fff !important;
    border-radius: var(--marbo-radius-pill) !important;
    padding: 14px 30px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    width: 100% !important;
    transition: background 0.3s ease !important;
}
.gl-form-button:hover {
    background: var(--marbo-accent) !important;
}

/* Overrides for inputs to match your luxury inputs */
.gl-field input, 
.gl-field textarea {
    border: 1px solid #e0e0e0 !important;
    border-radius: var(--marbo-radius-sm) !important;
    padding: 12px 15px !important;
    background: #fafafa !important;
    font-family: 'Poppins', sans-serif !important;
}
.gl-field input:focus, 
.gl-field textarea:focus {
    border-color: var(--marbo-ink) !important;
    background: #fff !important;
}

/* ==========================================================
   REVIEWS MOBILE RESPONSIVENESS
========================================================== */
@media screen and (max-width: 991px) {
    .marbo-reviews-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    .marbo-form-card {
        position: relative;
        top: 0;
        padding: 30px 20px;
    }
}