/* ==========================================================================
   CRO FEATURES — Lumive Conversion Optimization Styles
   ========================================================================== */

/* ─── COMPATIBILITY CHECKER ──────────────────────────────────────────────── */

.compatibility-checker {
    background: var(--lumive-gray-50, #F9FAFB);
    border: 1px solid var(--lumive-gray-200, #E5E7EB);
    border-radius: var(--radius-lg, 12px);
    padding: 1.25rem;
    margin: 1rem 0;
}

.compatibility-checker-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--lumive-dark, #1E2228);
    margin: 0 0 1rem;
}

.compatibility-checker-title svg {
    color: var(--lumive-primary, #0191EE);
    flex-shrink: 0;
}

.compat-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.compat-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.compat-field.full-width {
    grid-column: 1 / -1;
}

.compat-field label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--lumive-gray-600, #4B5563);
}

.compat-field select,
.compat-field input[type="number"] {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--lumive-gray-300, #D1D5DB);
    border-radius: var(--radius-md, 8px);
    font-size: 0.875rem;
    background: #fff;
    color: var(--lumive-dark, #1E2228);
    transition: border-color var(--transition-fast, 150ms ease);
    appearance: auto;
}

.compat-field select:focus,
.compat-field input:focus {
    outline: none;
    border-color: var(--lumive-primary, #0191EE);
    box-shadow: 0 0 0 3px rgba(1, 145, 238, 0.1);
}

.compat-check-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.625rem;
    background: var(--lumive-primary, #0191EE);
    color: #fff;
    border: none;
    border-radius: var(--radius-md, 8px);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast, 150ms ease);
}

.compat-check-btn:hover {
    background: var(--lumive-primary-hover, #0077CC);
}

.compat-result {
    display: none;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md, 8px);
    font-size: 0.875rem;
    line-height: 1.5;
}

.compat-result.is-visible {
    display: flex;
}

.compat-result.compatible {
    background: var(--lumive-success-bg, #D1FAE5);
    color: #065F46;
}

.compat-result.maybe {
    background: #FEF3C7;
    color: #92400E;
}

.compat-result.incompatible {
    background: #FEE2E2;
    color: #991B1B;
}

.compat-result svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.compat-result-text strong {
    display: block;
    margin-bottom: 0.25rem;
}

/* ─── INSTALLATION DIFFICULTY BADGE ──────────────────────────────────────── */

.difficulty-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full, 9999px);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

/* Card variant — smaller */
.product-card .difficulty-badge {
    margin-top: 0.375rem;
}

/* Colors per difficulty level */
.difficulty-badge[data-level="1"] { background: #D1FAE5; color: #065F46; }
.difficulty-badge[data-level="2"] { background: #A7F3D0; color: #065F46; }
.difficulty-badge[data-level="3"] { background: #FEF3C7; color: #92400E; }
.difficulty-badge[data-level="4"] { background: #FED7AA; color: #9A3412; }
.difficulty-badge[data-level="5"] { background: #FEE2E2; color: #991B1B; }

.difficulty-badge svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* Product page — larger variant */
.difficulty-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--lumive-gray-50, #F9FAFB);
    border-radius: var(--radius-md, 8px);
    margin: 0.75rem 0;
}

.difficulty-section .difficulty-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

.difficulty-info {
    flex: 1;
}

.difficulty-info .difficulty-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--lumive-dark, #1E2228);
}

.difficulty-info .difficulty-desc {
    font-size: 0.75rem;
    color: var(--lumive-gray-500, #6B7280);
    margin: 0;
}

.difficulty-info a {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--lumive-primary, #0191EE);
}

/* ─── FREQUENTLY BOUGHT TOGETHER ─────────────────────────────────────────── */

.fbt-section {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--lumive-gray-50, #F9FAFB);
    border-radius: var(--radius-xl, 16px);
}

.fbt-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--lumive-dark, #1E2228);
    margin: 0 0 1.5rem;
}

.fbt-items {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.fbt-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #fff;
    border: 2px solid var(--lumive-gray-200, #E5E7EB);
    border-radius: var(--radius-lg, 12px);
    flex: 1;
    min-width: 200px;
    max-width: 280px;
    cursor: pointer;
    transition: border-color var(--transition-fast, 150ms ease);
}

.fbt-item.is-checked {
    border-color: var(--lumive-primary, #0191EE);
}

.fbt-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--lumive-primary, #0191EE);
    flex-shrink: 0;
}

.fbt-item-image {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
    flex-shrink: 0;
}

.fbt-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fbt-item-info {
    flex: 1;
    min-width: 0;
}

.fbt-item-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--lumive-dark, #1E2228);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fbt-item-price {
    font-size: 0.75rem;
    color: var(--lumive-primary, #0191EE);
    font-weight: 700;
    margin-top: 0.125rem;
}

.fbt-plus {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--lumive-gray-400, #9CA3AF);
    flex-shrink: 0;
}

.fbt-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--lumive-gray-200, #E5E7EB);
    flex-wrap: wrap;
}

.fbt-total {
    font-size: 0.875rem;
    color: var(--lumive-gray-600, #4B5563);
}

.fbt-total-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--lumive-dark, #1E2228);
}

.fbt-add-all-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--lumive-primary, #0191EE);
    color: #fff;
    border: none;
    border-radius: var(--radius-lg, 12px);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast, 150ms ease), transform var(--transition-fast, 150ms ease);
}

.fbt-add-all-btn:hover {
    background: var(--lumive-primary-hover, #0077CC);
    transform: translateY(-1px);
}

.fbt-add-all-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ─── PRODUCT Q&A ────────────────────────────────────────────────────────── */

.qa-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.qa-item {
    padding: 1.25rem;
    background: var(--lumive-gray-50, #F9FAFB);
    border-radius: var(--radius-lg, 12px);
}

.qa-question-text {
    display: flex;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--lumive-dark, #1E2228);
    font-size: 0.9375rem;
    margin-bottom: 0.625rem;
}

.qa-question-text .qa-icon {
    font-weight: 800;
    color: var(--lumive-primary, #0191EE);
    flex-shrink: 0;
}

.qa-answer-text {
    display: flex;
    gap: 0.5rem;
    color: var(--lumive-gray-600, #4B5563);
    font-size: 0.875rem;
    line-height: 1.6;
    padding-left: 1.5rem;
}

.qa-answer-text .qa-icon {
    font-weight: 800;
    color: var(--lumive-success, #10B981);
    flex-shrink: 0;
}

.qa-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-left: 1.5rem;
    font-size: 0.75rem;
    color: var(--lumive-gray-400, #9CA3AF);
}

/* Q&A Form */
.qa-form-wrapper {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--lumive-gray-200, #E5E7EB);
}

.qa-form-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: var(--lumive-dark, #1E2228);
}

.qa-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.qa-form .qa-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.qa-form .qa-field.full-width {
    grid-column: 1 / -1;
}

.qa-form label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--lumive-gray-600, #4B5563);
}

.qa-form input,
.qa-form textarea {
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--lumive-gray-300, #D1D5DB);
    border-radius: var(--radius-md, 8px);
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--lumive-dark, #1E2228);
    transition: border-color var(--transition-fast, 150ms ease);
}

.qa-form input:focus,
.qa-form textarea:focus {
    outline: none;
    border-color: var(--lumive-primary, #0191EE);
    box-shadow: 0 0 0 3px rgba(1, 145, 238, 0.1);
}

.qa-form textarea {
    resize: vertical;
    min-height: 80px;
}

.qa-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--lumive-primary, #0191EE);
    color: #fff;
    border: none;
    border-radius: var(--radius-md, 8px);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast, 150ms ease);
}

.qa-submit-btn:hover {
    background: var(--lumive-primary-hover, #0077CC);
}

.qa-success-msg {
    display: none;
    padding: 0.75rem 1rem;
    background: var(--lumive-success-bg, #D1FAE5);
    color: #065F46;
    border-radius: var(--radius-md, 8px);
    font-size: 0.875rem;
    font-weight: 600;
    grid-column: 1 / -1;
}

.qa-success-msg.is-visible {
    display: block;
}

/* Honeypot (hidden) */
/* Honeypot: hidden in place (v1.2.63). left:-9999px made Arabic (RTL) pages ~10,000 px wide on phones. */
.qa-hp { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ─── FREE SHIPPING PROGRESS BAR ─────────────────────────────────────────── */

.shipping-bar {
    background: var(--lumive-primary-light, #E6F4FD);
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(1, 145, 238, 0.1);
    overflow: hidden;
}

.shipping-bar-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: var(--container-xl, 1280px);
    margin: 0 auto;
    padding: 0 var(--space-4, 1rem);
}

.shipping-bar-icon {
    flex-shrink: 0;
    color: var(--lumive-primary, #0191EE);
}

.shipping-bar-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--lumive-dark, #1E2228);
    flex-shrink: 0;
}

.shipping-bar-track {
    flex: 1;
    height: 6px;
    background: rgba(1, 145, 238, 0.15);
    border-radius: 3px;
    overflow: hidden;
    min-width: 80px;
}

.shipping-bar-fill {
    height: 100%;
    background: var(--lumive-primary, #0191EE);
    border-radius: 3px;
    transition: width 0.6s ease;
}

.shipping-bar.reached .shipping-bar-fill {
    background: var(--lumive-success, #10B981);
}

.shipping-bar.reached .shipping-bar-icon {
    color: var(--lumive-success, #10B981);
}

/* ─── EXIT-INTENT POPUP ──────────────────────────────────────────────────── */

.exit-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.exit-popup-overlay.is-visible {
    display: flex;
}

.exit-popup {
    background: #fff;
    border-radius: var(--radius-xl, 16px);
    max-width: 480px;
    width: 100%;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    position: relative;
}

.exit-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    color: #fff;
    cursor: pointer;
    z-index: 1;
    transition: background 0.2s;
}

.exit-popup-close:hover {
    background: rgba(0, 0, 0, 0.3);
}

.exit-popup-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
}

.exit-popup-body {
    padding: 2rem;
    text-align: center;
}

.exit-popup-heading {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--lumive-dark, #1E2228);
    margin: 0 0 0.75rem;
}

.exit-popup-text {
    font-size: 0.9375rem;
    color: var(--lumive-gray-600, #4B5563);
    margin: 0 0 1.25rem;
    line-height: 1.5;
}

.exit-popup-code {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--lumive-gray-100, #F3F4F6);
    border: 2px dashed var(--lumive-primary, #0191EE);
    border-radius: var(--radius-md, 8px);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--lumive-primary, #0191EE);
    margin-bottom: 1.25rem;
}

.exit-popup-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: var(--lumive-primary, #0191EE);
    color: #fff;
    border: none;
    border-radius: var(--radius-lg, 12px);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition-fast, 150ms ease);
}

.exit-popup-cta:hover {
    background: var(--lumive-primary-hover, #0077CC);
    color: #fff;
}

/* v1.2.52: code + copy button */
.exit-popup-label {
    font-size: 0.8125rem;
    color: var(--lumive-gray-500, #6B7280);
    margin: 0 0 0.5rem;
}

.exit-popup-code-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.exit-popup-code-row .exit-popup-code {
    margin-bottom: 0;
}

.exit-popup-copy {
    min-height: 44px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--lumive-primary, #0191EE);
    border-radius: var(--radius-md, 8px);
    background: #fff;
    color: var(--lumive-primary, #0191EE);
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
}

/* v1.2.54: desktop popup - the image box was a fixed 200px, so the wide transparent logo
   (1080x228) sat in the middle of it with ~110px of blank space above the heading. The box now
   follows the image's own shape (a photo is still capped at 200px, as before); the top padding
   keeps the logo clear of the close button (12px from the top, 44px tall). The phone card
   (.is-compact) hides the image and is not affected; the built-in fallback logo keeps its inline
   height and padding. */
.exit-popup-overlay:not(.is-compact) .exit-popup-image {
    height: auto;
    max-height: 200px;
    padding-top: 36px;
}

.exit-popup-overlay:not(.is-compact) .exit-popup-image + .exit-popup-body {
    padding-top: 1rem;
}

/* v1.2.52: phones - a small card at the bottom instead of a full-screen modal. The page stays
   usable behind it (no dark backdrop); it sits above the bottom navigation bar. */
@media (max-width: 767px) {
    .exit-popup-overlay.is-compact {
        /* Below the menu drawer / search overlay (9999) and quick view, above the bottom nav. */
        z-index: 9998;
        background: transparent;
        pointer-events: none;
        align-items: flex-end;
        padding: 0 12px calc(96px + env(safe-area-inset-bottom, 0px));
    }

    /* The card sits where the WhatsApp button is: hide the button while the card is open
       (same approach as the sticky add-to-cart bar), and hide the card under an open menu/search. */
    body.lumive-offer-open .whatsapp-float {
        visibility: hidden;
    }

    body:has(#mobile-menu.open) .exit-popup-overlay.is-compact,
    body:has(#search-overlay.open) .exit-popup-overlay.is-compact {
        display: none;
    }

    /* The "someone recently bought" toast covered the Add to Cart button and the returns line on
       product pages at phone width (live test, 24 Sep): keep it for the home and shop pages only. */
    body.single-product .social-proof-toast {
        display: none !important;
    }

    .exit-popup-overlay.is-compact .exit-popup {
        pointer-events: auto;
        max-width: 420px;
        border-radius: 14px;
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
        animation: lumive-offer-in 0.25s ease-out;
    }

    .exit-popup-overlay.is-compact .exit-popup-image,
    .exit-popup-overlay.is-compact .exit-popup-heading,
    .exit-popup-overlay.is-compact .exit-popup-label,
    .exit-popup-overlay.is-compact .exit-popup-cta {
        display: none;
    }

    .exit-popup-overlay.is-compact .exit-popup-body {
        padding: 12px 48px 12px 14px;
        text-align: start;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px 10px;
    }

    .exit-popup-overlay.is-compact .exit-popup-text {
        margin: 0;
        font-size: 0.875rem;
        font-weight: 700;
        color: var(--lumive-dark, #1E2228);
        flex: 1 1 100%;
    }

    .exit-popup-overlay.is-compact .exit-popup-code-row {
        margin: 0;
        justify-content: flex-start;
    }

    .exit-popup-overlay.is-compact .exit-popup-code {
        padding: 0.3rem 0.75rem;
        font-size: 1rem;
    }

    .exit-popup-overlay.is-compact .exit-popup-copy {
        min-height: 36px;
        padding: 0.3rem 0.85rem;
    }

    .exit-popup-overlay.is-compact .exit-popup-close {
        top: 8px;
        right: 8px;
        width: 36px;
        height: 36px;
        background: rgba(0, 0, 0, 0.06);
        color: var(--lumive-dark, #1E2228);
    }

    [dir="rtl"] .exit-popup-overlay.is-compact .exit-popup-body {
        padding: 12px 14px 12px 48px;
    }

    [dir="rtl"] .exit-popup-overlay.is-compact .exit-popup-close {
        right: auto;
        left: 8px;
    }
}

@keyframes lumive-offer-in {
    from { transform: translateY(16px); opacity: 0; }
    to { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .exit-popup-overlay.is-compact .exit-popup {
        animation: none;
    }
}

/* v1.2.52: deal countdown (product page) and "Ends ..." badge (product cards) */
.lumive-deal-countdown {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0;
    padding: 4px 12px;
    border-radius: 999px;
    background: #FEF2F2;
    color: #B91C1C;
    font-size: 0.8125rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.lumive-deal-countdown svg {
    flex-shrink: 0;
}

.product-badge.deal-badge {
    top: auto;
    bottom: 0.75rem;
    background: #B91C1C;
    color: #fff;
    text-transform: none;
    font-variant-numeric: tabular-nums;
}

.lumive-deal-countdown[hidden],
.product-badge.deal-badge[hidden],
.cta-offer-note[hidden] {
    display: none !important;
}

.cta-offer-code {
    letter-spacing: 0.04em;
    color: var(--lumive-primary, #0191EE);
}

/* ─── SOCIAL PROOF NOTIFICATION TOAST ────────────────────────────────────── */

.social-proof-toast {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border-radius: var(--radius-lg, 12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--lumive-gray-100, #F3F4F6);
    max-width: 320px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.social-proof-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.social-proof-toast-close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--lumive-gray-400, #9CA3AF);
    font-size: 14px;
}

/* A 20x20 button is under half the 44px minimum touch target, and this one sits inside a
   toast whose whole body is a link — so a missed tap does not just fail to close, it
   navigates the shopper away from the page they were on. Expand the hit area with a
   centred pseudo-element rather than resizing the button, so the glyph stays small and the
   layout does not shift. Centred on the button, so it works in LTR and RTL alike. */
.social-proof-toast-close::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
}

.social-proof-image {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md, 8px);
    object-fit: cover;
    flex-shrink: 0;
}

.social-proof-info {
    flex: 1;
    min-width: 0;
}

.social-proof-name {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--lumive-dark, #1E2228);
}

.social-proof-product {
    font-size: 0.75rem;
    color: var(--lumive-gray-600, #4B5563);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.social-proof-time {
    font-size: 0.6875rem;
    color: var(--lumive-gray-500, #6B7280); /* v1.2.56: contrast */
}

/* ─── QUICK VIEW MODAL ───────────────────────────────────────────────────── */

.quick-view-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.quick-view-overlay.is-visible {
    display: flex;
}

.quick-view-modal {
    background: #fff;
    border-radius: var(--radius-xl, 16px);
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    position: relative;
}

.quick-view-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: var(--lumive-gray-100, #F3F4F6);
    cursor: pointer;
    z-index: 1;
    transition: background 0.2s;
}

.quick-view-close:hover {
    background: var(--lumive-gray-200, #E5E7EB);
}

.quick-view-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.quick-view-image {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius-xl, 16px) 0 0 var(--radius-xl, 16px);
}

.quick-view-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quick-view-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.quick-view-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--lumive-dark, #1E2228);
    margin: 0 0 0.5rem;
}

.quick-view-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.quick-view-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--lumive-primary, #0191EE);
    margin-bottom: 1rem;
}

.quick-view-desc {
    font-size: 0.875rem;
    color: var(--lumive-gray-600, #4B5563);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.quick-view-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.quick-view-qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--lumive-gray-300, #D1D5DB);
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
}

.quick-view-qty button {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--lumive-gray-50, #F9FAFB);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
}

.quick-view-qty input {
    width: 40px;
    height: 36px;
    border: none;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
}

.quick-view-add-btn {
    flex: 1;
    padding: 0.625rem 1rem;
    background: var(--lumive-primary, #0191EE);
    color: #fff;
    border: none;
    border-radius: var(--radius-md, 8px);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast, 150ms ease);
}

.quick-view-add-btn:hover {
    background: var(--lumive-primary-hover, #0077CC);
}

.quick-view-link {
    display: block;
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--lumive-primary, #0191EE);
}

/* ─── PRODUCT CARD OVERLAYS (Quick View + Wishlist + Compare) ────────────── */

.product-card {
    position: relative;
}

.product-card-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
}

.product-card:hover .product-card-overlay {
    opacity: 1;
}

.product-card-overlay-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    color: var(--lumive-gray-600, #4B5563);
    transition: color 0.15s, background 0.15s;
}

.product-card-overlay-btn:hover {
    background: var(--lumive-primary, #0191EE);
    color: #fff;
}

.product-card-overlay-btn.is-wishlisted {
    color: #EF4444;
}

.product-card-overlay-btn.is-wishlisted:hover {
    background: #EF4444;
    color: #fff;
}

/* Compare checkbox on card */
.product-card-compare {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.25rem;
    font-size: 0.6875rem;
    color: var(--lumive-gray-500, #6B7280);
}

.product-card-compare input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--lumive-primary, #0191EE);
}

/* ─── COMPARE STICKY BAR ────────────────────────────────────────────────── */

.compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--lumive-dark, #1E2228);
    color: #fff;
    padding: 0.75rem 1rem;
    z-index: 9500;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
}

.compare-bar.is-visible {
    transform: translateY(0);
}

.compare-bar-inner {
    max-width: var(--container-xl, 1280px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.compare-bar-text {
    font-size: 0.875rem;
    font-weight: 600;
}

.compare-bar-text span {
    color: var(--lumive-primary, #0191EE);
    font-weight: 800;
}

.compare-bar-actions {
    display: flex;
    gap: 0.5rem;
}

.compare-bar-btn {
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-md, 8px);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: background 0.15s;
}

.compare-bar-btn.primary {
    background: var(--lumive-primary, #0191EE);
    color: #fff;
}

.compare-bar-btn.primary:hover {
    background: var(--lumive-primary-hover, #0077CC);
}

.compare-bar-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.compare-bar-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ─── RECENTLY VIEWED ────────────────────────────────────────────────────── */

.recently-viewed-section {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 2rem 0;
    padding: 1.5rem 0;
    overflow: hidden;
}

.recently-viewed-inner {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.recently-viewed-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--lumive-dark, #1E2228);
    margin: 0 0 1rem;
}

.recently-viewed-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
}

.recently-viewed-item {
    flex-shrink: 0;
    width: 140px;
    text-align: center;
    text-decoration: none;
}

.recently-viewed-item img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: var(--radius-lg, 12px);
    margin-bottom: 0.5rem;
}

.recently-viewed-item .rv-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--lumive-dark, #1E2228);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.recently-viewed-item .rv-price {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--lumive-primary, #0191EE);
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .compat-fields {
        grid-template-columns: 1fr;
    }

    .fbt-items {
        flex-direction: column;
    }

    .fbt-item {
        max-width: 100%;
    }

    .fbt-plus {
        transform: rotate(90deg);
    }

    .fbt-footer {
        flex-direction: column;
        text-align: center;
    }

    .quick-view-inner {
        grid-template-columns: 1fr;
    }

    .quick-view-image {
        border-radius: var(--radius-xl, 16px) var(--radius-xl, 16px) 0 0;
        aspect-ratio: 4/3;
    }

    .qa-form {
        grid-template-columns: 1fr;
    }

    /* Lift the toast clear of the fixed bottom navigation, and of the sticky add-to-cart bar
       when that is showing. At bottom:12px it spanned the full width directly on top of the
       bottom nav, so Home/Shop/Cart/Wishlist/Account were untappable for the several seconds
       the toast was on screen — and a mistap landed on the toast's own link instead,
       navigating the shopper away. Same custom properties the sticky CTA already keeps in
       sync from JS, so this follows a nav or bar of any height. */
    .social-proof-toast {
        left: 12px;
        right: 12px;
        bottom: calc(12px + var(--lumive-nav-h, 72px) + env(safe-area-inset-bottom, 0px));
        max-width: none;
    }

    body.lumive-cta-visible .social-proof-toast {
        bottom: calc(12px + var(--lumive-nav-h, 72px) + var(--lumive-cta-h, 71px) + env(safe-area-inset-bottom, 0px));
    }

    .shipping-bar-inner {
        flex-wrap: wrap;
    }

    .shipping-bar-track {
        width: 100%;
        order: 3;
    }
}

@media (max-width: 480px) {
    .exit-popup-heading {
        font-size: 1.125rem;
    }

    .exit-popup-body {
        padding: 1.5rem;
    }
}

/* ============================================================
   FBT in product info column (moved up from full-width)
   ============================================================ */
.product-info-section .fbt-section {
    margin: 1.5rem 0;
    padding: 1.25rem;
}
.product-info-section .fbt-items {
    flex-direction: column;
    gap: 0.75rem;
}
.product-info-section .fbt-plus {
    align-self: center;
    margin: 0;
}
.product-info-section .fbt-item {
    width: 100%;
}

/* ============================================================
   Reviews Highlight (standalone social proof section)
   ============================================================ */
.reviews-highlight-section {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--lumive-gray-50, #F9FAFB);
    border-radius: var(--radius-xl, 16px);
}
.reviews-highlight-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.reviews-highlight-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}
.reviews-highlight-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.reviews-highlight-summary .avg-rating {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--lumive-primary, #0EA5E9);
}
.reviews-highlight-summary .rating-stars-group {
    display: flex;
    gap: 2px;
}
.reviews-highlight-summary .rating-stars-group .star.filled {
    color: #F59E0B;
}
.reviews-highlight-summary .rating-stars-group .star.empty {
    color: #D1D5DB;
}
.reviews-highlight-summary .total-reviews {
    color: #6B7280;
    font-size: 0.875rem;
}
.reviews-highlight-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.review-highlight-card {
    background: #fff;
    border-radius: var(--radius-lg, 12px);
    padding: 1.25rem;
    border: 1px solid #E5E7EB;
}
.review-highlight-stars {
    display: flex;
    gap: 2px;
    margin-bottom: 0.5rem;
}
.review-highlight-stars .star.filled { color: #F59E0B; }
.review-highlight-stars .star.empty { color: #D1D5DB; }
.review-highlight-text {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.5;
    margin: 0 0 0.75rem;
}
.review-highlight-author {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
}
.review-highlight-author strong {
    color: #111827;
}
.review-highlight-author span {
    color: #9CA3AF;
}
.see-all-reviews-link {
    display: inline-block;
    color: var(--lumive-primary, #0EA5E9);
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
}
.see-all-reviews-link:hover {
    text-decoration: underline;
}

/* Upsells section */
.upsells-section {
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .reviews-highlight-grid {
        grid-template-columns: 1fr;
    }
    .reviews-highlight-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
