/* ============================================================
   NEON//FLUX — futuristic storefront design system
   Shared across: home, product, cart, checkout & info pages
   Concept: mission-control retail. Deep-space navy, holographic
   glass, electric cyan + volt-lime signal accents, chamfered
   controls, blueprint grids, HUD corner brackets, mono labels.
   ============================================================ */

/* ------------------------------------------------------------
   1. DESIGN TOKENS
   ------------------------------------------------------------ */
:root {
    --ink: #0a1420;
    --ink-soft: #5d6b80;
    --paper: #eef2f8;
    --paper-deep: #e3eaf3;
    --card: #ffffff;
    --card-soft: #f6f9fd;
    --line: rgba(10, 20, 32, 0.10);
    --line-strong: rgba(10, 20, 32, 0.18);
    --glass-bg: rgba(240, 244, 250, 0.78);
    --glass-border: rgba(10, 20, 32, 0.08);
    --accent: #00a6d6;
    --accent-strong: #0079a3;
    --accent-tint: rgba(0, 166, 214, 0.12);
    --volt: #79c90e;
    --volt-tint: rgba(121, 201, 14, 0.14);
    --tag: #ff3d5a;
    --tag-tint: rgba(255, 61, 90, 0.12);
    --danger: #e11d48;
    --danger-tint: rgba(225, 29, 72, 0.10);
    --success: #0fa968;
    --success-tint: rgba(15, 169, 104, 0.12);
    --radius-s: 10px;
    --radius-m: 16px;
    --radius-l: 22px;
    --shadow-card: 0 1px 2px rgba(10, 20, 32, 0.04), 0 14px 34px -22px rgba(10, 20, 32, 0.28);
    --shadow-card-hover: 0 2px 6px rgba(0, 121, 163, 0.10), 0 22px 44px -20px rgba(0, 121, 163, 0.35);
    --glow-cyan: rgba(0, 166, 214, 0.12);
    --glow-volt: rgba(121, 201, 14, 0.09);
    --grid-line: rgba(10, 20, 32, 0.035);
    --font-display: 'Syne', 'Manrope', sans-serif;
    --font-body: 'Manrope', 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', 'Consolas', monospace;
    --header-h: 72px;
    --header-h-mobile: 128px;
}

body.dark-mode {
    --ink: #e9f2ff;
    --ink-soft: #8ba0c0;
    --paper: #05070d;
    --paper-deep: #02040a;
    --card: #0c1424;
    --card-soft: #0f1a2e;
    --line: rgba(150, 190, 255, 0.14);
    --line-strong: rgba(150, 190, 255, 0.24);
    --glass-bg: rgba(5, 7, 13, 0.72);
    --glass-border: rgba(150, 190, 255, 0.12);
    --accent: #35e0ff;
    --accent-strong: #8ff0ff;
    --accent-tint: rgba(53, 224, 255, 0.14);
    --volt: #c8ff3d;
    --volt-tint: rgba(200, 255, 61, 0.14);
    --tag: #ff5c78;
    --tag-tint: rgba(255, 92, 120, 0.16);
    --danger: #ff5d6e;
    --danger-tint: rgba(255, 93, 110, 0.14);
    --success: #34e89b;
    --success-tint: rgba(52, 232, 155, 0.14);
    --shadow-card: 0 1px 0 rgba(0, 0, 0, 0.4), 0 16px 40px -20px rgba(0, 0, 0, 0.7);
    --shadow-card-hover: 0 20px 50px -22px rgba(0, 0, 0, 0.8), 0 0 44px -18px rgba(53, 224, 255, 0.35);
    --glow-cyan: rgba(53, 224, 255, 0.10);
    --glow-volt: rgba(200, 255, 61, 0.06);
    --grid-line: rgba(150, 190, 255, 0.05);
}

/* ------------------------------------------------------------
   2. BASE / RESET
   ------------------------------------------------------------ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    color: var(--ink);
    background:
        radial-gradient(1100px 520px at 88% -12%, var(--glow-cyan), transparent 62%),
        radial-gradient(900px 460px at -8% 0%, var(--glow-volt), transparent 55%),
        repeating-linear-gradient(0deg, transparent 0 39px, var(--grid-line) 39px 40px),
        repeating-linear-gradient(90deg, transparent 0 39px, var(--grid-line) 39px 40px),
        var(--paper);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.25s ease, color 0.25s ease;
}

a { color: inherit; }
img { max-width: 100%; }
button { font-family: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: #fff; }

body::-webkit-scrollbar { width: 10px; height: 10px; }
body::-webkit-scrollbar-track { background: transparent; }
body::-webkit-scrollbar-thumb { background: linear-gradient(var(--accent), var(--volt)); border-radius: 999px; }
body::-webkit-scrollbar-thumb:hover { background: var(--accent-strong); }

.visually-hidden {
    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;
}

/* Hide the store logo on mobile while scrolling down (added by JS) */
.header-left.logo-hidden {
    max-height: 0;
    opacity: 0;
    margin: 0 !important;
    overflow: hidden;
    pointer-events: none;
}

/* Remove number arrows */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}


/* ============================================================
   3. UNIFIED HEADER — holographic control deck
   ============================================================ */
.unified-header {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 4.5%;
    height: var(--header-h);
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 1000;
}
/* Signal line under the header */
.unified-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, transparent 2%, var(--accent) 28%, var(--volt) 72%, transparent 98%);
    opacity: 0.55;
    pointer-events: none;
}

.header-left {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    transition: max-height 0.25s ease, opacity 0.25s ease, margin 0.25s ease;
    min-height: 0;
}
.store-logo {
    height: 40px;
    width: auto;
    cursor: pointer;
    transition: opacity 0.2s ease, filter 0.2s ease, transform 0.2s ease;
    object-fit: contain;
}
.store-logo:hover { opacity: 0.8; transform: translateY(-1px); }
body.dark-mode .store-logo {
    filter: brightness(0) invert(1) drop-shadow(0 0 6px rgba(53, 224, 255, 0.35));
}

.header-center {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    height: 100%;
    position: relative;
}

.categories-ribbon {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 0 10px;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.categories-ribbon::-webkit-scrollbar { display: none; }
.categories-ribbon .dropdown { position: static; }
.categories-ribbon .dropdown-content { top: 62px; left: 10px; }

/* Category chips — HUD mode */
.ribbon-tag {
    color: var(--ink-soft);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    font-family: var(--font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}
.ribbon-tag:hover {
    color: var(--ink);
    background: var(--card);
    border-color: var(--line);
}
body.dark-mode .ribbon-tag:hover { background: var(--card-soft); }
.ribbon-tag.active {
    color: var(--accent-strong);
    background: var(--accent-tint);
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-tint), 0 6px 18px -8px var(--accent);
}
.ribbon-tag.active::before {
    content: '';
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 1px;
    flex-shrink: 0;
    box-shadow: 0 0 8px currentColor;
}
body.dark-mode .ribbon-tag.active { color: var(--accent-strong); }


/* "More" dropdown in the ribbon */
.dropdown { position: relative; display: inline-flex; flex-shrink: 0; }
.dropdown-toggle { display: inline-flex; align-items: center; gap: 5px; }
.dropdown-arrow { display: inline-block; font-size: 9px; transition: transform 0.2s ease; transform: translateY(1px); }
.dropdown.open .dropdown-arrow { transform: rotate(180deg) translateY(-1px); }
.dropdown.open .dropdown-toggle { color: var(--ink); background: var(--card); border-color: var(--line); }
.dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 190px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-card-hover);
    padding: 6px;
    z-index: 1200;
    flex-direction: column;
    gap: 2px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.dropdown.open .dropdown-content { display: flex; }
.dropdown-item {
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
    font-family: var(--font-display);
    text-decoration: none;
    display: block;
}
.dropdown-item:hover { background: var(--accent-tint); color: var(--accent-strong); }
.dropdown-item.active { background: var(--accent); color: #fff; }

.header-right { flex-shrink: 0; display: flex; align-items: center; gap: 12px; }

/* Search console */
.search-container { width: 170px; position: relative; transition: width 0.3s ease; }
.search-container:focus-within { width: 230px; }
.search-container::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    width: 14px;
    height: 14px;
    transform: translateY(-50%);
    background: var(--ink-soft);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M21 21l-4.35-4.35m1.35-5.15a7 7 0 11-14 0 7 7 0 0114 0z' stroke='black' stroke-width='2' fill='none'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M21 21l-4.35-4.35m1.35-5.15a7 7 0 11-14 0 7 7 0 0114 0z' stroke='black' stroke-width='2' fill='none'/%3E%3C/svg%3E") center / contain no-repeat;
    pointer-events: none;
}
.search-container input {
    padding: 9px 12px 9px 32px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    font-family: var(--font-body);
    outline: none;
    width: 100%;
    font-size: 13.5px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}
.search-container input::placeholder { color: var(--ink-soft); }
.search-container input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-tint), 0 6px 18px -10px var(--accent);
}
body.dark-mode .search-container input { background: var(--card-soft); }

/* Theme switch */
.theme-btn {
    background: transparent;
    border: 1px solid var(--line);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
    overflow: hidden;
}
.theme-btn:hover {
    border-color: var(--accent);
    background: var(--accent-tint);
    box-shadow: 0 0 0 4px var(--accent-tint);
    transform: rotate(8deg);
}
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .icon-moon { display: none; }
body.dark-mode .theme-btn .icon-sun { display: none; }
body.dark-mode .theme-btn .icon-moon { display: block; }

/* Cart toggle */
.cart-toggle {
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card);
    border: 1px solid var(--line);
    padding: 0 14px;
    height: 38px;
    border-radius: 999px;
    transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}
.cart-toggle:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px -10px var(--accent);
}
.cart-toggle .icon { width: 17px; height: 17px; display: flex; align-items: center; color: var(--ink); }
.cart-toggle .icon svg { width: 100%; height: 100%; }
.cart-badge {
    background: var(--tag);
    color: #fff;
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
    min-width: 12px;
    text-align: center;
    box-shadow: 0 2px 10px -2px var(--tag);
    animation: badge-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes badge-pop {
    0% { transform: scale(0.6); }
    100% { transform: scale(1); }
}

/* Legacy mobile search toggle (kept for safety) */
.search-toggle-btn { display: none; }
.search-toggle-btn .icon-close-glyph { display: none; }
.unified-header.search-open .search-toggle-btn .icon-search-glyph { display: none; }
.unified-header.search-open .search-toggle-btn .icon-close-glyph { display: block; }


/* ============================================================
   4. LAYOUT & STOREFRONT (home)
   ============================================================ */
.container {
    max-width: 1240px;
    margin: calc(var(--header-h) + 24px) auto 60px auto;
    padding: 0 4.5%;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

/* ---------------- Filter console ---------------- */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 34px;
    flex-wrap: wrap;
    padding: 12px 20px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-card);
    position: relative;
}
.filter-bar::before {
    content: 'FILTERS';
    position: absolute;
    top: -9px;
    left: 18px;
    padding: 0 8px;
    background: var(--card);
    color: var(--accent-strong);
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.22em;
}
.filter-controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.filter-group { display: flex; align-items: center; gap: 10px; }
.filter-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-soft);
    white-space: nowrap;
}
.filter-bar select, .filter-bar input, .custom-select-btn {
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    color: var(--ink);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
body.dark-mode .filter-bar select,
body.dark-mode .filter-bar input,
body.dark-mode .custom-select-btn { background: var(--card-soft); }
.custom-select-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    min-width: 140px;
}
.filter-bar input { width: 88px; text-align: center; }
.filter-bar select:focus, .filter-bar input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-tint);
}
.filter-divider { width: 1px; height: 22px; background: var(--line); flex-shrink: 0; }
.filter-reset {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-soft);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    padding: 8px 12px;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.filter-reset:hover { color: var(--tag); border-color: var(--line); }
.filter-reset svg { flex-shrink: 0; }

/* ---------------- Category titles ---------------- */
.category-title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 22px 0;
    letter-spacing: -0.02em;
    color: var(--ink);
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.category-title::before {
    content: '';
    width: 9px;
    height: 9px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    border-radius: 2px;
    align-self: center;
    flex-shrink: 0;
}
.category-title::after {
    content: '';
    flex: 1;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--volt));
    opacity: 0.5;
}

/* ---------------- Product grid ---------------- */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
@media (min-width: 900px) {
    .product-grid { grid-template-columns: repeat(4, 1fr); }
    .product-grid.featured { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 899px) {
    .product-grid.swipeable {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 14px;
        padding-bottom: 6px;
        margin: 0 -16px;
        padding-left: 16px;
        padding-right: 16px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .product-grid.swipeable::-webkit-scrollbar { display: none; }
    .product-grid.swipeable .product-card {
        flex: 0 0 62%;
        scroll-snap-align: start;
        max-width: 260px;
    }
}


/* ---------------- Product card — data module ---------------- */
.product-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    box-shadow: var(--shadow-card);
    text-align: left;
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    cursor: pointer;
    overflow: hidden;

    /* Scroll-in reveal (animated by IntersectionObserver JS) */
    opacity: 0;
    transform: translateY(30px);
    transition: transform 0.8s ease-out, opacity 0.8s ease-out, box-shadow 0.25s ease, border-color 0.25s ease;

    /* HUD corner brackets */
    background-image:
        linear-gradient(var(--accent), var(--accent)),
        linear-gradient(var(--accent), var(--accent)),
        linear-gradient(var(--accent), var(--accent)),
        linear-gradient(var(--accent), var(--accent));
    background-size: 13px 2px, 2px 13px, 13px 2px, 2px 13px;
    background-position: 9px 9px, 9px 9px, right 9px top 9px, right 9px top 9px;
    background-repeat: no-repeat;
}
.product-card::before {
    /* scan line that sweeps on hover */
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -40%;
    height: 30%;
    background: linear-gradient(180deg, transparent, var(--accent-tint), transparent);
    opacity: 0;
    pointer-events: none;
    z-index: 3;
    transition: opacity 0.3s ease;
}
.product-card.animate-in { opacity: 1; transform: translateY(0); }
.product-card.animate-in:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--line-strong);
    background-size: 16px 2px, 2px 16px, 16px 2px, 2px 16px;
}
.product-card.animate-in:hover::before { opacity: 1; animation: card-scan 0.9s ease; }
@keyframes card-scan {
    0% { top: -40%; }
    100% { top: 110%; }
}
/* SSR / first-paint cards never start hidden (protects LCP) */
.product-card.no-anim {
    opacity: 1;
    transform: translateY(0);
    transition: box-shadow 0.25s ease, border-color 0.25s ease, background-size 0.25s ease;
}
.product-card.no-anim:hover {
    box-shadow: var(--shadow-card-hover);
    border-color: var(--line-strong);
    background-size: 16px 2px, 2px 16px, 16px 2px, 2px 16px;
}

/* Product visual — containment cell */
.product-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(var(--grid-line), var(--grid-line)) 0 0 / 100% 1px no-repeat,
        linear-gradient(var(--grid-line), var(--grid-line)) 0 100% / 100% 1px no-repeat,
        linear-gradient(var(--grid-line), var(--grid-line)) 0 0 / 1px 100% no-repeat,
        linear-gradient(var(--grid-line), var(--grid-line)) 100% 0 / 1px 100% no-repeat,
        var(--card-soft);
    border-radius: 13px;
    aspect-ratio: 1 / 1;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.03);
}
body.dark-mode .product-visual { background-color: #ffffff0d; }
.product-visual img {
    max-width: 84%;
    max-height: 84%;
    height: auto;
    width: auto;
    object-fit: contain;
    border-radius: 10px;
    transition: transform 0.35s ease;
    will-change: transform;
}
.product-card:hover .product-visual img { transform: scale(1.05); }

.card-content-wrap { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.product-card h3 {
    margin: 0 0 6px 0;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-display);
    letter-spacing: -0.01em;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}
.product-card h3 a { color: inherit; text-decoration: none; }
.short-desc {
    font-size: 12.5px;
    color: var(--ink-soft);
    line-height: 1.5;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}
.see-more-link {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-strong);
    margin-bottom: 10px;
    display: inline-block;
    font-family: var(--font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


/* Tags, variants, price & CTA on cards */
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.card-tag-pill {
    background: var(--accent-tint);
    color: var(--accent-strong);
    padding: 3px 9px;
    border-radius: 5px;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: var(--font-mono);
}
body.dark-mode .card-tag-pill { color: var(--accent-strong); }

.variant-circles { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.color-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--line);
    cursor: pointer;
    transition: transform 0.15s ease, outline-color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: inset 0 0 0 2px var(--card);
    outline: 2px solid transparent;
    outline-offset: 2px;
    padding: 0;
}
.color-circle:hover { transform: scale(1.1); }
.color-circle.active {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--accent-tint);
}
.color-circle.disabled-variant { opacity: 0.65; cursor: pointer; position: relative; }
.color-circle.disabled-variant::after {
    content: '';
    position: absolute;
    top: 50%; left: -3px; right: -3px;
    height: 2px;
    background: var(--danger);
    transform: translateY(-50%) rotate(45deg);
    box-shadow: 0 0 2px var(--card);
}
body.dark-mode .color-circle { border: 1px solid rgba(255, 255, 255, 0.35); }

.size-pill {
    font-size: 10.5px;
    padding: 8px 12px;
    border-radius: 7px;
    background: var(--paper);
    border: 1px solid var(--line);
    color: var(--ink-soft);
    font-weight: 600;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: 0.2s ease;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    box-sizing: border-box;
}
.size-pill:hover { border-color: var(--accent); color: var(--ink); }
.size-pill.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 14px -6px var(--accent);
}
body.dark-mode .size-pill { background: var(--card-soft); border-color: var(--line); color: var(--ink-soft); }
body.dark-mode .size-pill:hover { border-color: var(--accent); color: var(--ink); }
body.dark-mode .size-pill.active { background: var(--accent); color: #05070d; border-color: var(--accent); }
.size-pill.disabled-variant {
    opacity: 0.55;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-color: var(--line);
    color: var(--ink-soft);
    text-decoration: none;
}
.size-pill.disabled-variant::after {
    content: '';
    position: absolute;
    top: 50%; left: -5%; right: -5%;
    height: 1.5px;
    background: var(--danger);
    transform: translateY(-50%) rotate(15deg);
}

/* Price chip — mono HUD */
.price-row {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    margin: 4px 0 12px 2px;
    position: relative;
    background: var(--accent-tint);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    padding: 6px 14px;
    border-radius: 8px;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
    width: fit-content;
}
body.dark-mode .price-row { background: var(--card-soft); }
.price {
    font-family: var(--font-mono);
    font-size: 18px;
    color: var(--accent-strong);
    font-weight: 600;
    display: flex;
    align-items: flex-start;
    gap: 3px;
    line-height: 1;
    letter-spacing: -0.01em;
}
body.dark-mode .price { color: var(--accent-strong); }
.price .currency { font-size: 10px; font-weight: 600; margin-top: 2px; opacity: 0.85; }
.was-price {
    font-size: 12px;
    color: var(--ink-soft);
    text-decoration: line-through;
    font-weight: 500;
    font-family: var(--font-mono);
}


/* CTA — chamfered "execute" button */
.add-to-cart-btn {
    background: linear-gradient(120deg, var(--accent), #008aa8);
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    width: 100%;
    transition: transform 0.15s ease, filter 0.2s ease;
    margin-top: auto;
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    position: relative;
    overflow: hidden;
}
.add-to-cart-btn svg { flex-shrink: 0; }
.add-to-cart-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -70%;
    width: 40%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
    pointer-events: none;
}
.add-to-cart-btn:hover:not(:disabled) {
    filter: drop-shadow(0 8px 18px rgba(0, 166, 214, 0.45));
    transform: translateY(-2px);
}
.add-to-cart-btn:hover:not(:disabled)::after { left: 130%; }
.add-to-cart-btn:active { transform: scale(0.98); }
.add-to-cart-btn:disabled {
    background: var(--paper-deep);
    color: var(--ink-soft);
    cursor: not-allowed;
    filter: none;
    clip-path: none;
}
body.dark-mode .add-to-cart-btn:disabled { background: var(--card); color: var(--ink-soft); }

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 4;
    background: var(--tag);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 4px 9px;
    border-radius: 5px;
    box-shadow: 0 4px 14px -4px var(--tag);
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
    box-shadow: var(--shadow-card);
}
.carousel-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.loading-text {
    text-align: center;
    width: 100%;
    color: var(--ink-soft);
    grid-column: 1 / -1;
    padding: 40px 0;
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.lazy-img { opacity: 0; transition: opacity 0.5s ease-in-out; }
.lazy-img.loaded { opacity: 1; }

/* Slide transitions used by the swipeable grid arrows */
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes slideInLeft { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.slide-right { animation: slideInRight 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.slide-left { animation: slideInLeft 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94); }


/* ---------------- Banner carousel — viewport frame ---------------- */
.banner-carousel-container {
    position: relative;
    width: 100%;
    margin-bottom: 24px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
    background: var(--card);
}
.banner-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}
.banner-track::-webkit-scrollbar { display: none; }
.banner-slide { width: 100%; flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 21 / 8; }
.banner-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}
.banner-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--card);
    color: var(--ink);
    border: 1px solid var(--line);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    z-index: 10;
    font-size: 14px;
    box-shadow: var(--shadow-card);
}
.banner-carousel-container:hover .banner-btn { opacity: 1; }
.banner-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.banner-btn.left { left: 12px; }
.banner-btn.right { right: 12px; }
.banner-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    z-index: 10;
}
.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    border: none;
    padding: 0;
}
.banner-dot.active {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    transform: scale(1.25);
}

/* ---------------- Infinite marquee (tag carousels) ---------------- */
@keyframes scrollMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 9px)); }
}
.marquee-track {
    display: flex;
    gap: 18px;
    width: max-content;
    animation: scrollMarquee 15s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }

/* ---------------- Pagination ---------------- */
.pagination { display: flex; justify-content: center; gap: 14px; margin-top: 56px; align-items: center; }
.page-btn {
    padding: 10px 22px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    font-weight: 600;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.2s ease;
}
.page-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.page-btn:disabled { cursor: not-allowed; opacity: 0.55; }
#page-info {
    font-weight: 600;
    color: var(--ink-soft);
    font-size: 12px;
    font-family: var(--font-mono);
    letter-spacing: 0.08em;
}

/* ---------------- Skeleton loading ---------------- */
@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skel {
    background: linear-gradient(90deg, var(--paper) 25%, var(--line) 37%, var(--paper) 63%);
    background-size: 400% 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
}
.skel-card { opacity: 1 !important; transform: none !important; }
.skel-card .product-visual.skel { border-radius: 13px; }
.skel-line { height: 13px; border-radius: 4px; margin-bottom: 8px; }
.skel-line.w80 { width: 80%; }
.skel-line.w45 { width: 45%; }
.skel-line.w30 { height: 18px; width: 30%; margin-top: 6px; }


/* ============================================================
   5. FOOTER
   ============================================================ */
footer {
    background: var(--paper-deep);
    border-top: 1px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--accent) 30%, var(--volt) 70%, transparent) 1;
    padding: 52px 20px 36px;
    text-align: center;
    margin-top: auto;
    position: relative;
}
body.dark-mode footer { background: #03050b; }
.footer-brand {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 6px;
    font-family: var(--font-display);
    letter-spacing: -0.01em;
    background: linear-gradient(120deg, var(--accent-strong), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.social-links { display: flex; justify-content: center; gap: 20px; margin-top: 18px; flex-wrap: wrap; }
.social-links a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}
.social-links a:hover { color: var(--accent); text-shadow: 0 0 12px var(--accent); }
.footer-nav { display: flex; justify-content: center; gap: 18px; margin-top: 26px; flex-wrap: wrap; }
.footer-nav a {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-soft);
    text-decoration: none;
    transition: color 0.2s ease;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.footer-nav a:hover { color: var(--accent); }

/* ============================================================
   6. TOAST
   ============================================================ */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: linear-gradient(120deg, var(--accent-strong), var(--accent));
    color: #fff;
    padding: 14px 22px;
    border-radius: 12px;
    font-weight: 600;
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.04em;
    box-shadow: 0 14px 34px -12px var(--accent);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: 0.3s ease;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.toast.show { opacity: 1; visibility: visible; transform: translateY(0); }


/* ============================================================
   7. CART PAGE
   ============================================================ */
.container.cart-page { max-width: 900px; }
.cart-container {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 34px;
    box-shadow: var(--shadow-card);
    position: relative;
}
.cart-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 0;
    margin-bottom: 26px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.cart-title::before {
    content: '';
    width: 9px;
    height: 9px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    border-radius: 2px;
    align-self: center;
    flex-shrink: 0;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
}
.cart-item:last-child { border-bottom: none; }

.item-img {
    width: 96px;
    height: 96px;
    background: var(--card-soft);
    border: 1px solid var(--line);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    flex-shrink: 0;
}
body.dark-mode .item-img { background: #ffffff0d; }
.item-img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }

.item-details { flex: 1; min-width: 0; }
.item-name {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px 0;
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}
.item-variants { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 10px; font-family: var(--font-mono); }

.item-price {
    display: inline-flex;
    align-items: baseline;
    position: relative;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--accent-strong);
    font-weight: 600;
    background: var(--accent-tint);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    padding: 4px 12px;
    border-radius: 8px;
}
body.dark-mode .item-price { background: var(--card-soft); }

.qty-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 6px 14px;
    border-radius: 10px;
    flex-shrink: 0;
}
body.dark-mode .qty-controls { background: var(--card-soft); }
.qty-btn {
    background: transparent;
    border: none;
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
    line-height: 1;
    padding: 2px;
    transition: color 0.15s ease, transform 0.15s ease;
}
.qty-btn:hover { color: var(--accent); transform: scale(1.2); }

.remove-btn {
    background: var(--danger-tint);
    color: var(--danger);
    border: none;
    padding: 9px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
    transition: 0.2s ease;
    flex-shrink: 0;
}
.remove-btn:hover { background: var(--danger); color: #fff; }

.cart-summary {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    flex-direction: column;
    gap: 18px;
}
.total-row {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--ink-soft);
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.total-price { color: var(--accent-strong); font-size: 24px; font-weight: 700; font-family: var(--font-mono); }
body.dark-mode .total-price { color: var(--accent-strong); }

.checkout-btn {
    background: linear-gradient(120deg, var(--accent), #008aa8);
    color: #fff;
    border: none;
    padding: 15px 38px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: 0.2s ease;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.checkout-btn:hover {
    filter: drop-shadow(0 8px 18px rgba(0, 166, 214, 0.45));
    transform: translateY(-1px);
}

.empty-state { text-align: center; padding: 60px 0; color: var(--ink-soft); font-size: 16px; line-height: 1.7; }
.empty-state a { color: var(--accent); text-decoration: none; font-weight: 600; }
.empty-state a:hover { text-decoration: underline; }

/* Cart skeletons */
.skel-cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
}
.skel-cart-item .skel-img { width: 96px; height: 96px; flex-shrink: 0; border-radius: 14px; }
.skel-cart-item .skel-lines { flex: 1; min-width: 0; }
.skel-cart-item .skel-line { height: 14px; margin-bottom: 10px; border-radius: 4px; }
.skel-cart-item .skel-line.w60 { width: 60%; }
.skel-cart-item .skel-line.w35 { width: 35%; }
.skel-cart-item .skel-line.w25 { height: 20px; width: 25%; margin-bottom: 0; }
.skel-cart-item .skel-qty { width: 96px; height: 38px; flex-shrink: 0; border-radius: 10px; }


/* ============================================================
   8. CHECKOUT PAGE
   ============================================================ */
#checkout-container {
    max-width: 1100px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: start;
}

.checkout-box {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 34px;
    box-shadow: var(--shadow-card);
    position: relative;
}
.box-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 24px 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 10px;
}
.box-title::before {
    content: '';
    width: 9px;
    height: 9px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    border-radius: 2px;
    flex-shrink: 0;
}

.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--ink-soft);
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    color: var(--ink);
    font-family: inherit;
    font-size: 14px;
    transition: 0.2s ease;
    box-sizing: border-box;
}
body.dark-mode .form-group input, body.dark-mode .form-group textarea { background: var(--card-soft); }
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-tint);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}
.summary-item:last-child { border-bottom: none; }
.item-info { display: flex; gap: 14px; align-items: center; }
.item-img {
    width: 56px;
    height: 56px;
    background: var(--card-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
body.dark-mode .item-img { background: #ffffff0d; }
.item-img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.item-name { font-weight: 700; font-size: 14.5px; font-family: var(--font-display); }
.item-qty { font-size: 12px; color: var(--ink-soft); margin-top: 2px; font-family: var(--font-mono); }
.item-price { font-weight: 700; font-family: var(--font-mono); color: var(--ink); }

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
}
.total-price { color: var(--accent-strong); font-size: 24px; font-weight: 700; font-family: var(--font-mono); }

.submit-btn {
    background: linear-gradient(120deg, var(--accent), #008aa8);
    color: #fff;
    border: none;
    padding: 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    width: 100%;
    margin-top: 30px;
    transition: 0.2s ease;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.submit-btn:hover:not(:disabled) {
    filter: drop-shadow(0 8px 18px rgba(0, 166, 214, 0.45));
    transform: translateY(-1px);
}
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; filter: none; }

.success-msg { display: none; text-align: center; padding: 40px 20px; }
.success-msg h2 {
    color: var(--accent-strong);
    font-family: var(--font-display);
    font-size: 28px;
    margin-bottom: 10px;
}

.skel-summary-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; }
.skel-summary-row .skel-a { height: 14px; width: 55%; border-radius: 4px; }
.skel-summary-row .skel-b { height: 14px; width: 20%; border-radius: 4px; }


/* ============================================================
   9. PRODUCT PAGE
   ============================================================ */
#product-container {
    max-width: 1200px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 36px;
    align-items: start;
}

/* Left: gallery */
.image-gallery { display: flex; flex-direction: column; gap: 12px; position: relative; min-width: 0; width: 100%; height: fit-content; }
.main-image-box {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 24px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    width: 100%;
    max-height: 500px;
    min-width: 0;
    box-sizing: border-box;
    position: relative;
    cursor: zoom-in;
}
.main-image-box img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 14px;
    transition: transform 0.15s ease-out, opacity 0.2s ease;
    will-change: transform;
}
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--card);
    color: var(--ink);
    border: 1px solid var(--line);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
    box-shadow: var(--shadow-card);
    z-index: 10;
    font-size: 14px;
}
.main-image-box:hover .gallery-arrow { opacity: 1; }
.gallery-arrow:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.gallery-arrow.left { left: 12px; }
.gallery-arrow.right { right: 12px; }

.thumbnail-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumbnail-box {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    background: var(--card);
    border: 2px solid var(--line);
    border-radius: 12px;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.thumbnail-box:hover { border-color: var(--accent); }
.thumbnail-box.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.thumbnail-box img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }

/* Right: details */
.product-details {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 34px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    position: relative;
}
.title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.25;
    letter-spacing: -0.02em;
}
.tags-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tag-pill {
    background: var(--accent-tint);
    color: var(--accent-strong);
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: var(--font-mono);
    border: 1px solid transparent;
}
body.dark-mode .tag-pill { color: var(--accent-strong); }

/* Price section — HUD block */
.price-section {
    display: inline-flex;
    align-items: baseline;
    gap: 12px;
    margin: 4px 0 26px 2px;
    position: relative;
    background: var(--accent-tint);
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    padding: 10px 22px 10px 26px;
    border-radius: 10px;
    width: fit-content;
}
body.dark-mode .price-section { background: var(--card-soft); }
.price-section .price {
    font-family: var(--font-mono);
    font-size: 30px;
    font-weight: 600;
    color: var(--accent-strong);
    letter-spacing: -0.01em;
    line-height: 1;
}
body.dark-mode .price-section .price { color: var(--accent-strong); }
.price-section .was-price { font-size: 16px; color: var(--ink-soft); text-decoration: line-through; font-family: var(--font-mono); }

/* Stock status */
.stock-status {
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 22px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 8px;
    width: fit-content;
}
.stock-in { color: var(--success); background: var(--success-tint); border: 1px solid var(--success); }
.stock-out { color: var(--danger); background: var(--danger-tint); border: 1px solid var(--danger); }


/* Variant selectors */
.selector-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-family: var(--font-mono);
}
.options-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }

.color-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--line);
    cursor: pointer;
    transition: transform 0.15s ease, outline-color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: inset 0 0 0 2px var(--card);
    outline: 2px solid transparent;
    outline-offset: 2px;
    padding: 0;
}
.color-btn:hover { transform: scale(1.1); }
.color-btn.active { outline-color: var(--accent); box-shadow: inset 0 0 0 2px var(--card), 0 0 0 4px var(--accent-tint); }
.color-btn.disabled-variant {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
    position: relative;
}
.color-btn.disabled-variant::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -4px;
    right: -4px;
    height: 2px;
    background: var(--danger);
    transform: translateY(-50%) rotate(45deg);
}

.size-btn {
    padding: 9px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}
body.dark-mode .size-btn { background: var(--card-soft); }
.size-btn:hover { border-color: var(--accent); }
.size-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 14px -6px var(--accent);
}
body.dark-mode .size-btn.active { color: #05070d; }
.size-btn.disabled-variant {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    text-decoration: line-through;
}

/* Product page CTA (full-width version) */
.product-details .add-to-cart-btn {
    background: linear-gradient(120deg, var(--accent), #008aa8);
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    width: 100%;
    transition: 0.2s ease;
    margin-bottom: 28px;
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.product-details .add-to-cart-btn:hover:not(:disabled) {
    filter: drop-shadow(0 8px 18px rgba(0, 166, 214, 0.45));
    transform: translateY(-1px);
}
.product-details .add-to-cart-btn:disabled {
    background: var(--paper-deep);
    cursor: not-allowed;
    color: var(--ink-soft);
    filter: none;
    clip-path: none;
}

/* Full description */
.full-description-wrapper {
    grid-column: 1 / -1;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 850px;
    justify-self: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 36px 44px;
    box-shadow: var(--shadow-card);
    box-sizing: border-box;
}
.description-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 24px;
    text-align: left;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 10px;
}
.description-title::before {
    content: '';
    width: 9px;
    height: 9px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    border-radius: 2px;
}
.description { font-size: 14.5px; line-height: 1.7; color: var(--ink-soft); overflow-x: auto; width: 100%; text-align: left; }


/* Spec table */
.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 14px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
}
.spec-table th, .spec-table td { padding: 12px 16px; border: 1px solid var(--line); text-align: left; }
.spec-table th {
    background: var(--accent-tint);
    font-weight: 600;
    color: var(--accent-strong);
    width: 35%;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.spec-table td { background: var(--card); }
.spec-table tr:nth-child(even) td { background: var(--card-soft); }

/* Related products */
.related-section {
    grid-column: 1 / -1;
    margin-top: 50px;
    border-top: 1px solid var(--line);
    padding-top: 40px;
    position: relative;
    z-index: 20;
    background: transparent;
}
.related-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 24px 0;
    text-align: left;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 10px;
}
.related-title::before {
    content: '';
    width: 9px;
    height: 9px;
    background: var(--volt);
    box-shadow: 0 0 10px var(--volt);
    border-radius: 2px;
}
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.related-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
}
.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--line-strong);
}
.related-card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: contain;
    background: var(--card-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 10px;
    box-sizing: border-box;
    transition: transform 0.3s ease;
}
.related-card:hover img { transform: scale(1.04); }
.related-card h4 {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-display);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.related-card .rel-price {
    color: var(--accent-strong);
    font-weight: 600;
    font-size: 14px;
    margin-top: auto;
    font-family: var(--font-mono);
}
body.dark-mode .related-card .rel-price { color: var(--accent-strong); }


/* ============================================================
   10. STATIC INFO PAGES (about / contact / terms / policies)
   ============================================================ */
body.static-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 56px 20px 90px;
    text-align: center;
    align-items: center;
}
.static-page .logo-container {
    margin-bottom: 44px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
    position: relative;
}
.static-page .logo-container::after {
    content: '';
    position: absolute;
    left: 20%;
    right: 20%;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--volt) 70%, transparent);
    opacity: 0.6;
}
.static-page .store-logo { height: 54px; width: auto; }
body.dark-mode .static-page .store-logo {
    filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(53, 224, 255, 0.35));
}
.static-page h1 {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.static-page h1::before {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
    border-radius: 2px;
}
.static-page h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    margin-top: 32px;
    margin-bottom: 10px;
    color: var(--accent-strong);
    text-align: left;
}
.static-page p, .static-page li {
    font-size: 15.5px;
    margin-bottom: 15px;
    color: var(--ink-soft);
    line-height: 1.75;
}
.static-page ul, .static-page ol { text-align: left; }
.static-page a { color: var(--accent-strong); font-weight: 600; }
.static-page .back-link {
    display: inline-block;
    margin-top: 52px;
    background: linear-gradient(120deg, var(--accent), #008aa8);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 13px 26px;
    border-radius: 10px;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    transition: filter 0.2s ease, transform 0.2s ease;
}
.static-page .back-link:hover {
    filter: drop-shadow(0 8px 18px rgba(0, 166, 214, 0.45));
    transform: translateY(-1px);
}


/* ============================================================
   11. MOBILE / RESPONSIVE
   ============================================================ */
@media (max-width: 800px) {
    #product-container {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }
    #checkout-container { grid-template-columns: 1fr; gap: 24px; }
    .image-gallery { position: static; }
    .gallery-arrow { display: none !important; }
    .main-image-box { cursor: grab; }
    .main-image-box:active { cursor: grabbing; }
    .full-description-wrapper { padding: 24px 20px; border-radius: var(--radius-m); max-width: 100%; margin-top: 0; }
}

@media (max-width: 768px) {
    .unified-header {
        position: fixed;
        display: grid;
        grid-template-columns: auto 1fr auto auto;
        grid-template-rows: auto auto;
        padding: 10px 12px;
        column-gap: 8px;
        row-gap: 10px;
        align-items: center;
        height: auto;
    }
    .header-left {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        align-self: center;
        justify-self: start;
        max-height: none;
        opacity: 1;
        margin: 0 !important;
        overflow: visible;
    }
    .store-logo { height: 32px; }
    .header-center { display: contents; }
    .header-right { display: contents; }
    .search-container {
        display: block;
        position: relative;
        top: 0;
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        width: 100%;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        z-index: 1;
    }
    .search-container input { width: 100%; font-size: 13px; padding: 8px 10px 8px 30px; }
    .search-container::before { left: 10px; width: 13px; height: 13px; }
    .theme-btn { grid-column: 3 / 4; grid-row: 1 / 2; justify-self: end; width: 34px; height: 34px; }
    .cart-toggle { grid-column: 4 / 5; grid-row: 1 / 2; padding: 0 10px; height: 34px; justify-self: end; }

    .categories-ribbon {
        grid-column: 1 / -1;
        grid-row: 2 / 3;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 2px 0;
    }
    .categories-ribbon::-webkit-scrollbar { display: none; }
    .ribbon-tag { font-size: 11px; padding: 7px 12px; }

    /* Force the dropdown into a fixed overlay on mobile */
    .categories-ribbon .dropdown { position: static; }
    .categories-ribbon .dropdown-content {
        position: fixed;
        top: var(--header-h-mobile);
        left: 12px;
        right: 12px;
        width: auto;
        margin-top: 4px;
        border-radius: 12px;
        box-shadow: var(--shadow-card-hover);
        z-index: 2000;
    }

    .container {
        margin-top: calc(var(--header-h-mobile) + 16px);
        padding: 0 16px;
    }
    #checkout-container { margin-top: calc(var(--header-h-mobile) + 16px); padding: 0 16px; }
    .category-title { font-size: 19px; margin-bottom: 14px; }
    .product-card { padding: 10px; border-radius: 14px; }
    .product-card h3 { font-size: 13px; }
    .product-visual { margin-bottom: 8px; }
    .carousel-btn { display: none !important; }
    .discount-badge { font-size: 9.5px; padding: 3px 6px; top: 6px; left: 6px; }
    .short-desc, .see-more-link { display: none; }
    .variant-circles { margin-bottom: 6px; gap: 4px; }
    .color-circle { width: 24px; height: 24px; }
    .price-row { padding: 4px 10px; margin: 6px 0 8px 1px; }
    .price { font-size: 15px; }
    .price .currency { font-size: 9px; }
    .was-price { font-size: 10px; }
    .card-tags { margin-bottom: 8px; }
    .add-to-cart-btn { padding: 10px; font-size: 11.5px; margin-top: 6px; }

    .banner-btn { display: none !important; }
    .banner-slide { aspect-ratio: 21 / 8; }
}


@media (max-width: 768px) {
    /* Cart page mobile */
    .cart-container { padding: 20px; border-radius: var(--radius-m); }
    .cart-title { font-size: 20px; }
    .cart-item { flex-wrap: wrap; gap: 12px; padding: 18px 0; }
    .item-img { width: 76px; height: 76px; }
    .item-details { width: calc(100% - 96px); }
    .qty-controls { width: 100%; justify-content: space-between; padding: 10px 18px; order: 3; }
    .remove-btn { width: 100%; padding: 12px; font-size: 13px; order: 4; }
    .cart-summary { align-items: stretch; }
    .total-row { justify-content: space-between; font-size: 15px; }
    .total-price { font-size: 20px; }
    .checkout-btn { width: 100%; padding: 15px; }

    .skel-cart-item { flex-wrap: wrap; gap: 12px; padding: 18px 0; }
    .skel-cart-item .skel-img { width: 76px; height: 76px; }
}

@media (max-width: 600px) {
    .filter-bar { justify-content: space-between; gap: 8px; padding: 10px 12px; }
    .filter-controls { gap: 8px; flex: 1; }
    .filter-group { flex-direction: row; align-items: center; gap: 6px; }
    .filter-label { display: none; }
    .filter-bar select, .custom-select-btn { padding: 8px 10px; font-size: 12.5px; width: auto; min-width: 130px; }
    .filter-bar input { width: 62px; padding: 8px 8px; font-size: 12.5px; }
    .filter-divider { display: none; }
    .filter-reset { padding: 8px; }
    .filter-reset span.reset-text { display: none; }
    .sort-dropdown .dropdown-content { left: 0; right: auto; }
}


/* ---------------- JS-injected helper classes ---------------- */
/* Placeholder shown when a product has no images */
.empty-visual {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-soft);
    opacity: 0.5;
}
.empty-visual svg { width: 48px; height: 48px; }
/* Clone slide used by the banner's infinite-loop track */
.banner-slide.clone { flex: 0 0 100%; }
/* Color label under the swatches (fully inline-styled, baseline only) */
.active-color-label { font-family: var(--font-mono); letter-spacing: 0.04em; }

