/* ═══════════════════════════════════════════════════════════
   Selltrove Storefront CSS v6.0 Additions
   Append this to the existing store.css — it ADDS features without
   touching existing selectors, so it's fully backward compatible.
   ═══════════════════════════════════════════════════════════ */

/* ── Spinner animation ────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinning { animation: spin .6s linear infinite; }

/* ── Add-to-cart success state ────────────────────────────── */
.add-to-cart-btn.added,
.btn.added {
    background: var(--color-success, #10b981) !important;
    color: #fff !important;
}
.add-to-cart-btn.added::after,
.btn.added::after {
    content: '✓';
    display: inline-block;
    margin-left: 4px;
}

/* ── Wishlist button active state ─────────────────────────── */
.wishlist-btn.active svg,
.wishlist-btn-lg.active svg { fill: var(--color-danger, #ef4444) !important; color: var(--color-danger, #ef4444) !important; }
.wishlist-btn, .wishlist-btn-lg { transition: transform .2s ease; }

/* ── Cookie consent banner ────────────────────────────────── */
.cookie-consent-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #1a1a1a;
    color: #fff;
    padding: 16px 20px;
    z-index: 9998;
    transform: translateY(100%);
    transition: transform .4s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 -4px 20px rgba(0,0,0,.15);
}
.cookie-consent-banner.show { transform: translateY(0); }
.cookie-consent-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.cookie-consent-text p { font-size: .875rem; line-height: 1.5; color: rgba(255,255,255,.85); margin: 0; }
.cookie-consent-text strong { color: #fff; }
.cookie-consent-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-consent-actions .btn-outline { border-color: rgba(255,255,255,.25); color: #fff; background: transparent; }
.cookie-consent-actions .btn-outline:hover { background: rgba(255,255,255,.08); color: #fff; }
@media (max-width: 640px) {
    .cookie-consent-inner { flex-direction: column; align-items: stretch; }
    .cookie-consent-actions { justify-content: flex-end; }
}

/* ── Back to top button ───────────────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: 100px; right: 24px;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--color-primary, #6366f1);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all .3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 998;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.2); }

/* ── Image lightbox ───────────────────────────────────────── */
.image-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s;
    cursor: zoom-out;
}
.image-lightbox.open { opacity: 1; }
.image-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}
.image-lightbox-close {
    position: absolute;
    top: 20px; right: 24px;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.75rem;
    line-height: 1;
    padding: 0;
}

/* ── Product gallery zoom effect ──────────────────────────── */
.main-image-container.has-zoom .main-image { overflow: hidden; }
.main-image-container.has-zoom #mainProductImage { transition: transform .2s ease-out; }

/* ── Quick View modal ─────────────────────────────────────── */
.quickview-modal {
    position: fixed; inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity .25s;
}
.quickview-modal.open { opacity: 1; }
.quickview-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.55);
}
.quickview-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    animation: quickviewSlideUp .3s cubic-bezier(.4,0,.2,1);
}
@keyframes quickviewSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.quickview-close {
    position: absolute;
    top: 12px; right: 12px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,.06);
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    z-index: 1;
}
.quickview-close:hover { background: rgba(0,0,0,.12); }
.quickview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 24px;
}
.quickview-image img {
    width: 100%;
    border-radius: 10px;
    aspect-ratio: 1;
    object-fit: cover;
}
.quickview-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.quickview-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary, #6366f1);
}
@media (max-width: 640px) {
    .quickview-grid { grid-template-columns: 1fr; padding: 16px; }
}

/* ── Share menu ───────────────────────────────────────────── */
.share-menu {
    position: fixed; inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity .25s;
}
.share-menu.open { opacity: 1; }
.share-menu-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.5);
}
.share-menu-content {
    position: relative;
    background: #fff;
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 500px;
    padding: 24px;
    animation: shareSlideUp .3s cubic-bezier(.4,0,.2,1);
}
@keyframes shareSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
.share-menu-content h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1rem;
    font-weight: 700;
}
.share-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.share-buttons a,
.share-buttons button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    background: #f9fafb;
    border-radius: 12px;
    text-decoration: none;
    color: #111;
    border: none;
    cursor: pointer;
    font-size: .75rem;
    font-weight: 500;
    transition: all .2s;
}
.share-buttons a:hover,
.share-buttons button:hover {
    background: var(--color-primary, #6366f1);
    color: #fff;
}

/* ── Mobile menu overlay ──────────────────────────────────── */
.mobile-menu-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: all .3s;
}
.mobile-menu-overlay.open { opacity: 1; visibility: visible; }

/* ── Product filters sidebar ──────────────────────────────── */
.products-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    align-items: start;
}
.products-filter-sidebar {
    position: sticky;
    top: 100px;
    background: #fff;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-lg, 16px);
    padding: 20px;
}
.products-filter-sidebar h3 {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-text-muted, #9ca3af);
    margin-bottom: 12px;
    font-weight: 700;
}
.filter-group { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--color-border, #e5e7eb); }
.filter-group:last-child { border-bottom: none; padding-bottom: 0; }
.filter-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: .875rem;
    cursor: pointer;
    color: var(--color-text, #111827);
}
.filter-group input[type="checkbox"],
.filter-group input[type="radio"] { accent-color: var(--color-primary, #6366f1); }
.filter-group .price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.filter-group .price-inputs input {
    padding: 8px 12px;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 8px;
    font-size: .875rem;
    width: 100%;
}
.filter-toggle-mobile {
    display: none;
    width: 100%;
    padding: 12px 16px;
    background: var(--color-primary, #6366f1);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    margin-bottom: 16px;
    cursor: pointer;
}
@media (max-width: 900px) {
    .products-layout { grid-template-columns: 1fr; }
    .filter-toggle-mobile { display: flex; align-items: center; justify-content: center; gap: 8px; }
    .products-filter-sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: 85%;
        max-width: 320px;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform .3s;
        overflow-y: auto;
        border-radius: 0;
        border: none;
    }
    .products-filter-sidebar.open { transform: translateX(0); box-shadow: 4px 0 20px rgba(0,0,0,.15); }
    body.filters-open { overflow: hidden; }
    body.filters-open::before {
        content: '';
        position: fixed; inset: 0;
        background: rgba(0,0,0,.5);
        z-index: 199;
    }
}

/* ── 404 page ─────────────────────────────────────────────── */
.error-page {
    max-width: 500px;
    margin: 80px auto;
    padding: 40px 20px;
    text-align: center;
}
.error-page h1 {
    font-size: 8rem;
    font-weight: 900;
    color: var(--color-primary, #6366f1);
    line-height: 1;
    margin-bottom: 8px;
}
.error-page h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.error-page p {
    color: var(--color-text-secondary, #6b7280);
    margin-bottom: 24px;
}

/* ── Recently viewed ──────────────────────────────────────── */
#recentlyViewedContainer { margin-top: 48px; }

/* ── Product card hover enhancement ──────────────────────── */
.product-card-actions {
    position: absolute;
    top: 12px; right: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transform: translateX(10px);
    transition: all .2s;
}
.product-card:hover .product-card-actions { opacity: 1; transform: translateX(0); }
@media (hover: none) {
    .product-card-actions { opacity: 1; transform: translateX(0); }
}

/* ── Better mobile checkout ──────────────────────────────── */
@media (max-width: 767px) {
    .checkout-layout {
        display: flex !important;
        flex-direction: column;
    }
    .checkout-main { order: 1; }
    .cart-summary { order: 2; }
    .summary-card { position: static !important; }
}

/* ── Continue as guest banner ────────────────────────────── */
.guest-banner {
    padding: 16px;
    background: linear-gradient(to right, #f0fdf4, #dcfce7);
    border-left: 3px solid #10b981;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.guest-banner-icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #10b981;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.guest-banner-text p { margin: 0; font-size: .875rem; line-height: 1.5; }
.guest-banner-text strong { color: #065f46; }

/* ── Toast container positioning ─────────────────────────── */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: calc(100vw - 40px);
}
.toast {
    padding: 12px 16px;
    border-radius: 10px;
    background: #111;
    color: #fff;
    font-size: .875rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    opacity: 0;
    transform: translateX(20px);
    transition: all .3s cubic-bezier(.4,0,.2,1);
    min-width: 200px;
    max-width: 360px;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast.success { background: #10b981; }
.toast.error { background: #ef4444; }
.toast.info { background: #3b82f6; }
.toast.warning { background: #f59e0b; color: #000; }



/* ==========================================================================
 * v19 MOBILE FIXES — appended; loads after store.css so these win.
 * Fixes: invisible mobile-menu overlay/drawer, hamburger robustness,
 * duplicate/conflicting gallery rules, and product-page responsiveness.
 * ========================================================================== */

/* --- Mobile menu: the JS creates .mobile-menu-overlay but store.css never
   styled it, and an open .main-nav just dumped inline with no drawer. Make it
   a real slide-in drawer with a dimmed backdrop. --- */
.mobile-menu-overlay{position:fixed;inset:0;background:rgba(15,40,40,.5);opacity:0;visibility:hidden;
  transition:opacity .3s;z-index:140}
.mobile-menu-overlay.open{opacity:1;visibility:visible}

@media(max-width:767px){
  /* Hamburger: force-visible + tappable, immune to theme overrides */
  .mobile-menu-toggle{display:flex !important;align-items:center;justify-content:center;
    width:42px;height:42px;flex:0 0 auto;flex-direction:column;gap:5px;padding:9px;background:transparent;border:0;cursor:pointer}
  .mobile-menu-toggle span{display:block;width:22px;height:2px;border-radius:2px;
    background:var(--color-text,#111827);transition:transform .25s,opacity .25s}
  .mobile-menu-toggle.active span:nth-child(1){transform:translateY(7px) rotate(45deg)}
  .mobile-menu-toggle.active span:nth-child(2){opacity:0}
  .mobile-menu-toggle.active span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

  /* Slide-in nav drawer instead of inline block */
  .main-nav{position:fixed;top:0;right:0;height:100dvh;width:280px;max-width:84vw;background:#fff;
    border-top:0;box-shadow:-16px 0 44px -22px rgba(15,40,40,.5);
    transform:translateX(100%);transition:transform .3s cubic-bezier(.22,1,.36,1);
    z-index:150;overflow-y:auto;display:block;padding:64px 0 24px}
  .main-nav.open{transform:translateX(0)}
  .nav-list{flex-direction:column;gap:0;padding:0}
  .nav-list a{padding:14px 22px;font-size:.95rem;border-bottom:1px solid var(--color-border,#e5e7eb)}
  .has-dropdown .dropdown-menu{display:none;background:var(--color-surface,#f9fafb)}
  .has-dropdown.open .dropdown-menu{display:block}
  .has-dropdown.open .dropdown-toggle svg{transform:rotate(180deg)}
  .has-dropdown .dropdown-toggle svg{transition:transform .2s}
}

/* --- Product gallery: store.css defines these selectors twice with
   conflicting rules. Pin a single, correct behaviour so the main image is
   one square, contained shot and never appears oversized/duplicated as the
   page scrolls on mobile. --- */
.product-gallery .main-image-container{aspect-ratio:1/1;overflow:hidden;border-radius:var(--radius-lg,12px);background:var(--color-surface,#f9fafb)}
.product-gallery .main-image{width:100%;height:100%}
.product-gallery .main-image > picture,
.product-gallery .main-image > img,
.product-gallery .main-image picture img{display:block;width:100%;height:100%;object-fit:contain}
/* If the image helper ever emits more than one <img>/<picture>, only show the
   first — kills any duplicate large image. */
.product-gallery .main-image > *:not(:first-child){display:none !important}
.gallery-thumbnails{display:flex;gap:8px;margin-top:12px;overflow-x:auto;-webkit-overflow-scrolling:touch}
.gallery-thumb{width:64px;height:64px;flex:0 0 64px;border-radius:var(--radius-sm,8px);overflow:hidden;border:2px solid transparent;cursor:pointer}
.gallery-thumb img{width:100%;height:100%;object-fit:cover}

/* --- Product page responsiveness on small screens --- */
@media(max-width:767px){
  .product-layout{grid-template-columns:1fr;gap:24px}
  .product-info h1{font-size:1.35rem;line-height:1.25}
  .add-to-cart-section{flex-wrap:wrap;gap:10px}
  .add-to-cart-section .add-cart-btn{flex:1 1 auto;min-height:48px}
  .quantity-selector .qty-btn{min-width:42px;min-height:42px}
  .variant-options{display:flex;flex-wrap:wrap;gap:8px}
  .variant-option{min-height:42px}
  .review-summary{gap:20px}
  /* Stop wide inline-styled blocks from overflowing the viewport */
  .product-page .container,.reviews-section .container{overflow-x:hidden}
}

/* Tap-target floor for interactive controls across the storefront */
@media(max-width:767px){
  .header-actions a,.header-actions button{min-width:42px;min-height:42px}
}

/* v19.3: the v19.1 mini-cart override block was removed from here. Its
   !important declarations would have out-ranked the consolidated v19.3 block
   at the end of this file. The hamburger rules it also carried are retained
   immediately below. */

/* Hamburger: make it obvious — darker, thicker bars + a clear button shape */
@media(max-width:767px){
  .mobile-menu-toggle{display:flex !important;align-items:center;justify-content:center;
    width:44px;height:44px;flex-direction:column;gap:5px;padding:9px;cursor:pointer;
    background:var(--color-surface,#f3f5f4);border:1px solid var(--color-border,#e5e7eb);
    border-radius:10px}
  .mobile-menu-toggle:active{background:#e7ecea}
  /* v19.3: was background:var(--color-primary) — on tenants whose primary is a
     light/neon brand colour (e.g. #b9eb2e) that renders near-invisible on the
     light button. --color-text is the neutral ink token and is tenant-safe. */
  .mobile-menu-toggle span{display:block;width:22px;height:2.5px;border-radius:3px;
    background:var(--color-text,#111827) !important}
}


/* ==========================================================================
 * v19.3 — SINGLE SOURCE OF TRUTH for the mini-cart drawer + root overflow.
 *
 * History: .mini-cart was defined in FOUR places (store.css:144 right:-100%
 * model, store.css:1187 !important transform model, the v19.1 block above,
 * and an injected <style> in cart.js). The !important blocks won on the
 * properties they redeclared, but store.css's `transition:right` was never
 * redeclared so it survived — and nothing clipped the root, so a 410px fixed
 * drawer translated off-canvas still extended document scrollWidth. Every
 * .container then re-centred against the wider document and shifted left.
 *
 * Fix: store.css:144 deleted, store.css:1187 deleted, cart.js injector
 * neutered. This block is the only drawer positioning in the codebase.
 * ========================================================================== */

/* --- Root overflow containment. This is the part that actually stops the
   left-shift. `clip` not `hidden`: hidden creates a scroll container and
   breaks position:sticky on the header. --- */
html { overflow-x: clip; }
body { overflow-x: clip; position: relative; width: 100%; }
@supports not (overflow: clip) {
  html { overflow-x: hidden; }
}

/* --- Overlay --- */
#miniCartOverlay, .mini-cart-overlay {
  position: fixed; inset: 0; right: auto;
  background: rgba(15,40,40,.5);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .3s ease, visibility 0s linear .3s;
  z-index: 1100;
}
#miniCartOverlay.open, .mini-cart-overlay.open {
  opacity: 1; visibility: visible; pointer-events: auto;
  transition: opacity .3s ease, visibility 0s;
}

/* --- Drawer. Every property the old model set is explicitly redeclared
   here — including `transition`, whose survival was the original bug. --- */
.mini-cart {
  position: fixed;
  top: 0; right: 0; bottom: auto; left: auto;
  width: 410px; max-width: 94vw;
  height: 100dvh;
  background: #fff;
  z-index: 1110;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .32s cubic-bezier(.22,1,.36,1), visibility 0s linear .32s;
  box-shadow: -18px 0 50px -24px rgba(15,40,40,.5);
  will-change: transform;
  contain: layout paint;
  overscroll-behavior: contain;
}
.mini-cart.open {
  transform: translateX(0);
  visibility: visible;
  transition: transform .32s cubic-bezier(.22,1,.36,1), visibility 0s;
}
@media (max-width: 440px) { .mini-cart { width: 100vw; max-width: 100vw; } }

/* Scroll lock — set by cart.js via class, not inline style, so it composes
   with .filters-open and the mobile menu instead of clobbering them. */
body.cart-open, body.menu-open { overflow: hidden; }

/* --- Same containment for the other off-canvas panels, which have the same
   latent bug and would resurface it the moment they render. --- */
.main-nav, .products-filter-sidebar { will-change: transform; contain: layout paint; }

/* ==========================================================================
 * v19.3 — Account / dashboard nav.
 *
 * Two problems: (1) store.css:377 sets overflow-x:auto but no flex-wrap:nowrap,
 * so items shrank and clipped instead of scrolling (screenshots 3 & 4);
 * (2) it had no visual design — bare text links with no card, no active state
 * beyond a colour swap that fails on neon-primary tenants.
 *
 * Contrast rule throughout: NEVER use --color-primary for text or icons.
 * Tenant primaries range from dark teal to neon lime. Use --color-text for
 * ink and --color-primary only for fills/rules where contrast is controlled.
 * ========================================================================== */

/* ---------- Mobile: horizontal scroller ---------- */
@media (max-width: 767px) {
  .account-nav {
    position: relative;
    margin: 0 -16px 20px;           /* bleed past .container padding */
    border-bottom: 1px solid var(--color-border, #e5e7eb);
  }
  .account-nav ul {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 2px;
    margin: 0;
    padding: 0 16px;
    list-style: none;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x proximity;
    scroll-padding-left: 16px;
  }
  .account-nav ul::-webkit-scrollbar { display: none; }
  .account-nav li { flex: 0 0 auto; scroll-snap-align: start; }

  .account-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 14px;
    font-size: .875rem;
    font-weight: 600;
    color: var(--color-text-secondary, #6b7280);
    white-space: nowrap;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
  }
  .account-nav a svg { width: 18px; height: 18px; flex-shrink: 0; }

  /* Active tab: dark ink + primary underline. Works on any tenant palette. */
  .account-nav a.active {
    color: var(--color-text, #111827);
    border-bottom-color: var(--color-primary, #1C4040);
    background: transparent;
  }

  /* Right-edge fade signals "scrollable" rather than "cut off". */
  .account-nav::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 1px;
    width: 32px;
    pointer-events: none;
    background: linear-gradient(to right, rgba(255,255,255,0), #fff 70%);
  }
}

/* ---------- Desktop: sidebar card ---------- */
@media (min-width: 768px) {
  .account-nav {
    background: #fff;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-lg, 16px);
    padding: 8px;
    position: sticky;
    top: 96px;
  }
  .account-nav ul {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: visible;
    margin: 0; padding: 0;
    list-style: none;
  }
  .account-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    font-size: .875rem;
    font-weight: 500;
    color: var(--color-text-secondary, #6b7280);
    border-radius: 10px;
    white-space: nowrap;
    position: relative;
    transition: background .15s ease, color .15s ease;
  }
  .account-nav a svg {
    width: 18px; height: 18px; flex-shrink: 0;
    color: var(--color-text-muted, #9ca3af);
    transition: color .15s ease;
  }
  .account-nav a:hover {
    background: var(--color-surface, #f9fafb);
    color: var(--color-text, #111827);
  }
  .account-nav a:hover svg { color: var(--color-text, #111827); }

  .account-nav a.active {
    background: var(--color-surface, #f9fafb);
    color: var(--color-text, #111827);
    font-weight: 700;
  }
  .account-nav a.active svg { color: var(--color-text, #111827); }
  /* Primary used as a 3px rule — a fill, where any brand colour reads fine. */
  .account-nav a.active::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 20px;
    border-radius: 0 3px 3px 0;
    background: var(--color-primary, #1C4040);
  }

  /* Logout sits apart from navigation items. */
  .account-nav li:last-child {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--color-border, #e5e7eb);
  }
}

/* Unread-count badge (partial emits it inline on the Messages link) */
.account-nav a > span:last-child:not(:only-child) { margin-left: auto; }

/* ==========================================================================
 * v19.3 — Mobile menu panel (screenshot 2: panel is translucent, hero image
 * readable through it). Opaque background + explicit link colours.
 * ========================================================================== */
@media (max-width: 767px) {
  .main-nav { background: #fff; opacity: 1; }
  .main-nav .nav-list a { color: var(--color-text, #111827); background: #fff; }
  /* v19.3 fix: do NOT use --color-primary for text. Tenant primaries can be
     neon (#b9eb2e on this store) and fail contrast on white. Mark the active
     item with weight + an accent RULE instead of recolouring the label. */
  .main-nav .nav-list a.active {
    color: var(--color-text, #111827);
    font-weight: 700;
    box-shadow: inset 3px 0 0 var(--color-primary, #1C4040);
    background: var(--color-surface, #f9fafb);
  }
  .main-nav .dropdown-menu { background: var(--color-surface, #f9fafb); }
}

/* ==========================================================================
 * v19.3 — Accessibility floor: visible focus for keyboard users.
 * ========================================================================== */
:focus-visible {
  /* v19.3: --color-text not --color-primary; a neon primary gives an
     unreadable focus ring on white. */
  outline: 2px solid var(--color-text, #111827);
  outline-offset: 2px;
  border-radius: 4px;
}
.mobile-menu-toggle:focus-visible,
.close-mini-cart:focus-visible { outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .mini-cart, .main-nav, #miniCartOverlay, .mobile-menu-overlay,
  .products-filter-sidebar { transition-duration: .01ms !important; }
}

/* ==========================================================================
 * v19.3 — Account content: stat cards, tables, page title.
 *
 * The dashboard template writes these inline, including
 * `color:var(--color-primary)` on the big stat numbers — which on a neon
 * tenant (#b9eb2e) renders as pale lime on white and is effectively
 * unreadable. These rules override the inline colour via specificity on the
 * cascade layer that loads last; the template itself should eventually drop
 * the inline styles (see notes).
 * ========================================================================== */

.page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text, #111827);
  letter-spacing: -.02em;
  margin-bottom: 20px;
}
@media (min-width: 768px) { .page-title { font-size: 1.875rem; } }

/* --- Stat cards --- */
.account-content > div[style*="grid-template-columns"] { gap: 12px !important; }

.account-content > div[style*="grid"] > div,
.account-content > div[style*="grid"] > a {
  background: #fff !important;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 14px !important;
  padding: 18px 16px !important;
  text-align: left !important;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.account-content > div[style*="grid"] > a:hover {
  border-color: var(--color-text-muted, #9ca3af);
  box-shadow: 0 4px 16px -8px rgba(15,40,40,.25);
  transform: translateY(-1px);
}
/* Big number — force readable ink regardless of tenant primary. */
.account-content > div[style*="grid"] > div > p:first-child,
.account-content > div[style*="grid"] > a > p:first-child {
  color: var(--color-text, #111827) !important;
  font-size: 1.75rem !important;
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 4px;
}
.account-content > div[style*="grid"] > div > p:last-child,
.account-content > div[style*="grid"] > a > p:last-child {
  color: var(--color-text-secondary, #6b7280) !important;
  font-size: .8125rem !important;
  font-weight: 600;
}

/* --- Orders table --- */
.orders-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.orders-table th {
  text-align: left;
  font-size: .6875rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
  color: var(--color-text-muted, #9ca3af);
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  white-space: nowrap;
}
.orders-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  color: var(--color-text, #111827);
  vertical-align: middle;
}
.orders-table tbody tr:last-child td { border-bottom: 0; }
.orders-table tbody tr { transition: background .15s ease; }
.orders-table tbody tr:hover { background: var(--color-surface, #f9fafb); }

/* Table wrapper: scrolls rather than clipping on mobile */
.account-content div[style*="overflow-x:auto"],
.account-content div[style*="overflow-x: auto"] {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 14px;
  background: #fff;
}
.account-content div[style*="overflow-x:auto"]::-webkit-scrollbar { display: none; }

/* --- Section headings inside account content --- */
.account-content h2 {
  color: var(--color-text, #111827);
  letter-spacing: -.01em;
}

/* --- Account layout spacing --- */
@media (max-width: 767px) {
  .account-layout { gap: 0 !important; padding: 16px 0 40px !important; }
  .account-content { min-width: 0; }
}
@media (min-width: 768px) {
  .account-layout { align-items: start; }
  .account-content { min-width: 0; }
}

/* ==========================================================================
 * v19.3 — Contrast guard for neon tenant primaries.
 * .btn-primary sets background:var(--color-primary) with color:#fff. On
 * #b9eb2e that is white-on-lime ≈ 1.7:1 and fails WCAG badly. Flip the label
 * to dark ink when the tenant primary is light. Uses --color-secondary
 * (#1c4040 here) which tenants set as the companion dark tone.
 * ========================================================================== */
.btn-primary { color: var(--color-btn-ink, #fff); }

/* Live-chat widget header/FAB have the same white-on-primary problem. */
#chatPanel > div:first-child { color: var(--color-btn-ink, #fff); }
#chatFab { color: var(--color-btn-ink, #fff); }

/* ==========================================================================
 * v19.3 — Layering & floating-element collisions.
 *
 * The stack was ad-hoc: chat widget at z-index 9999, toasts 9999, lightbox
 * 10000, mini-cart 1110, header 100 (store.css) vs 50 (inline block in
 * header.php — the inline one won). Result: the chat FAB floated over the
 * open mini-cart, and .back-to-top (bottom:100px right:24px) stacked
 * directly above the FAB (bottom:24px right:24px) on mobile.
 * Documented scale: header 100 · filters 200 · overlay 1100 · drawer 1110
 * · floating widgets 1200 · toasts 1300 · modals/lightbox 1400.
 * ========================================================================== */

#liveChatWidget { z-index: 1200; }
.toast-container  { z-index: 1300; }
.image-lightbox,
.quickview-modal,
.share-menu       { z-index: 1400; }

/* Back-to-top sits above the 56px FAB + 24px offset + 16px gap. */
.back-to-top { bottom: 96px; right: 24px; z-index: 1200; }

/* Hide both floating buttons while the cart drawer or mobile menu is open —
   they overlapped the drawer and stole taps near the checkout button. */
body.cart-open #liveChatWidget,
body.menu-open #liveChatWidget,
body.cart-open .back-to-top,
body.menu-open .back-to-top { opacity: 0; pointer-events: none; }

/* Small screens: tighten so the FAB clears the iOS home indicator. */
@media (max-width: 480px) {
  #liveChatWidget { bottom: max(16px, env(safe-area-inset-bottom)); right: 16px; }
  .back-to-top    { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 68px); right: 16px; }
}

/* Header: store.css sets z-index:100, the inline block in header.php sets 50
   and wins by source order. Pin it here so the drawer overlay (1100) still
   covers it but page content never does. */
.store-header { z-index: 100; }

/* Chat panel must not exceed the viewport on small screens. */
#chatPanel { max-height: min(70vh, 560px); overflow: hidden; display: flex; flex-direction: column; }
#chatMessages { flex: 1 1 auto; min-height: 0; }
