 /* ── Self-hosted fonts (no Google Fonts dependency) ── */
        @font-face {
            font-family: 'Orbitron';
            src: url('fonts/orbitron-variable.woff2') format('woff2');
            font-weight: 400 700;
            font-display: block;
        }

        @font-face {
            font-family: 'Share Tech Mono';
            src: url('fonts/share-tech-mono-400.woff2') format('woff2');
            font-weight: 400;
            font-display: block;
        }

        @font-face {
            font-family: 'Rajdhani';
            src: url('fonts/rajdhani-400.woff2') format('woff2');
            font-weight: 400;
            font-display: block;
        }

        @font-face {
            font-family: 'Rajdhani';
            src: url('fonts/rajdhani-500.woff2') format('woff2');
            font-weight: 500;
            font-display: block;
        }

        @font-face {
            font-family: 'Rajdhani';
            src: url('fonts/rajdhani-600.woff2') format('woff2');
            font-weight: 600;
            font-display: block;
        }

        @font-face {
            font-family: 'Rajdhani';
            src: url('fonts/rajdhani-700.woff2') format('woff2');
            font-weight: 700;
            font-display: block;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* ── Font smoothing ── */
        html {
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        /* Scroll snap removed — JS-based snap-on-idle handles alignment
           without blocking fast scrolling momentum (see js/ui/scrollSnap.js) */

        /* ═══ M3-INSPIRED DESIGN TOKENS ═══════════════════════════════ */

        :root {
            /* ── Shape Scale (M3 corner radius system) ── */
            --shape-none: 0px;
            --shape-xs: 4px;
            --shape-sm: 8px;
            --shape-md: 12px;
            --shape-lg: 16px;
            --shape-xl: 28px;
            --shape-full: 9999px;

            /* ── Elevation Shadows (M3 z-levels) ── */
            --elevation-0: none;
            --elevation-1: 0 1px 4px 0 rgba(0, 0, 0, 0.37);
            --elevation-2: 0 2px 2px 0 rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.15);
            --elevation-3: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 4px 8px 3px rgba(0, 0, 0, 0.15);
            --elevation-4: 0 2px 3px 0 rgba(0, 0, 0, 0.3), 0 6px 14px 5px rgba(0, 0, 0, 0.15);
            --elevation-5: 0 4px 4px 0 rgba(0, 0, 0, 0.3), 0 8px 20px 6px rgba(0, 0, 0, 0.15);

            /* ── Motion (M3 easing curves + durations) ── */
            --motion-standard: cubic-bezier(0.2, 0, 0, 1);
            --motion-emphasized: cubic-bezier(0.32, 0.72, 0, 1);
            --motion-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
            --duration-short: 150ms;
            --duration-medium: 300ms;
            --duration-long: 500ms;
            --duration-xl: 1s;

            /* ── State Layer Opacities (M3 interaction feedback) ── */
            --state-hover: 0.08;
            --state-focus: 0.12;
            --state-pressed: 0.16;
            --state-dragged: 0.16;

            /* ── Typography Scale (M3 type ramp) ── */
            --font-display: 'Orbitron', sans-serif;
            --font-body: 'Rajdhani', sans-serif;
            --font-mono: 'Share Tech Mono', monospace;

            --text-display: 700 clamp(36px, 8vw, 56px)/1.1 var(--font-display);
            --text-headline-lg: 700 clamp(1.4rem, 4vw, 2.2rem)/1.2 var(--font-display);
            --text-headline-md: 700 1.2rem/1.3 var(--font-display);
            --text-title-lg: 700 1rem/1.4 var(--font-display);
            --text-title-md: 600 0.9rem/1.4 var(--font-body);
            --text-body-lg: 400 1rem/1.6 var(--font-body);
            --text-body-md: 400 0.9rem/1.5 var(--font-body);
            --text-body-sm: 400 0.85rem/1.5 var(--font-body);
            --text-label-lg: 700 0.85rem/1 var(--font-mono);
            --text-label-md: 600 0.75rem/1 var(--font-mono);
            --text-label-sm: 600 0.7rem/1 var(--font-mono);

            /* ── Spacing ── */
            --space-xs: 4px;
            --space-sm: 8px;
            --space-md: 16px;
            --space-lg: 24px;
            --space-xl: 32px;

            /* ── Semantic Colors (shared) ── */
            --on-accent: #000;
            --error: #ff4444;
            --error-hover: #ff6666;
            --error-container: rgba(255, 60, 60, 0.08);
            --warning: #ff6b35;
        }

        :root[data-theme="light"] {
            --bg-primary: #FAFCF8;
            --bg-secondary: #F0F4ED;
            --text-primary: #1a1f1a;
            --text-secondary: #4a5248;
            --text-muted: #8a8a8a;
            --accent: #00a840;
            --accent-hover: #008c35;
            --accent-dim: #007a2e;
            --accent-bright: #00c44a;
            --accent-secondary: #00b89a;
            --card-bg: rgba(255, 255, 255, 0.85);
            --surface-hover: #e0e5dd;
            --border: #d0d5cd;
            --icon-default: #888888;

            /* M3 surface tint: primary color at increasing opacity per elevation */
            --surface-tint: 0, 168, 64;
            --surface-1: rgba(var(--surface-tint), 0.05);
            --surface-2: rgba(var(--surface-tint), 0.08);
            --surface-3: rgba(var(--surface-tint), 0.11);
            --surface-4: rgba(var(--surface-tint), 0.12);
            --surface-5: rgba(var(--surface-tint), 0.14);

            /* Outline tokens */
            --outline: rgba(0, 0, 0, 0.1);
            --outline-variant: rgba(0, 0, 0, 0.05);
            --outline-accent: rgba(0, 168, 64, 0.3);
            --outline-accent-strong: rgba(0, 168, 64, 0.55);

            /* State layer color (accent-tinted) */
            --state-layer: 0, 168, 64;

            /* Glass surfaces */
            --glass-bg: rgba(255, 255, 255, 0.5);
            --glass-border: rgba(0, 0, 0, 0.08);

            /* Glow (visible in light mode now) */
            --glow-accent: rgba(0, 168, 64, 0.25);
            --glow-accent-strong: rgba(0, 168, 64, 0.45);
        }

        :root[data-theme="dark"] {
            --bg-primary: #0a0a0f;
            --bg-secondary: #111118;
            --text-primary: #e8e8e8;
            --text-secondary: #999999;
            --text-muted: #666666;
            --accent: #00ff64;
            --accent-hover: #33ff85;
            --accent-dim: #009940;
            --accent-bright: #00ee5e;
            --accent-secondary: #00ffd5;
            --card-bg: rgba(17, 17, 24, 0.8);
            --surface-hover: #16161f;
            --border: #1a1a24;
            --icon-default: #555555;

            /* M3 surface tint: accent tint gets stronger at higher elevation */
            --surface-tint: 0, 255, 100;
            --surface-1: rgba(var(--surface-tint), 0.04);
            --surface-2: rgba(var(--surface-tint), 0.07);
            --surface-3: rgba(var(--surface-tint), 0.10);
            --surface-4: rgba(var(--surface-tint), 0.12);
            --surface-5: rgba(var(--surface-tint), 0.15);

            /* Outline tokens */
            --outline: rgba(255, 255, 255, 0.1);
            --outline-variant: rgba(255, 255, 255, 0.05);
            --outline-accent: rgba(0, 255, 100, 0.25);
            --outline-accent-strong: rgba(0, 255, 100, 0.5);

            /* State layer color (accent-tinted) */
            --state-layer: 0, 255, 100;

            /* Glass surfaces */
            --glass-bg: rgba(17, 17, 24, 0.5);
            --glass-border: rgba(255, 255, 255, 0.08);

            /* Glow (prominent in dark mode) */
            --glow-accent: rgba(0, 255, 100, 0.3);
            --glow-accent-strong: rgba(0, 255, 100, 0.55);
        }
        
        body {
            font-family: var(--font-body);
            line-height: 1.6;
            color: var(--text-primary);
            transition: background var(--duration-medium) var(--motion-standard),
                        color var(--duration-medium) var(--motion-standard);
        }
        
        :root[data-theme="dark"] body {
            background: linear-gradient(180deg, #0a0a0f 0%, #0f0f14 50%, #0a0a0f 100%);
        }

        :root[data-theme="light"] body {
            background: #edf2f7;
            min-height: 100vh;
        }

        /* Custom scrollbar — mobile */
        @media (max-width: 600px) {
            :root[data-theme="dark"] {
                scrollbar-color: #00ff64 transparent;
                scrollbar-width: thin;
            }

            :root[data-theme="light"] {
                scrollbar-color: rgba(0, 140, 18, 0.4) transparent;
                scrollbar-width: thin;
            }
        }

        /* Film grain overlay for texture */
        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 9999;
            opacity: 0.035;
            background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
        }

        :root[data-theme="light"] body::before {
            opacity: 0.04;
        }


        /* ── Focus-visible: keyboard navigation ring ── */
        :focus-visible {
            outline: 2px solid var(--accent);
            outline-offset: 2px;
        }

        :focus:not(:focus-visible) {
            outline: none;
        }

        /* ── Utility: hidden ── */
        .hidden {
            display: none !important;
        }

        /* ── Skip-to-content link (screen readers + keyboard nav) ── */
        .skip-link {
            position: absolute;
            top: -100%;
            left: var(--space-md);
            padding: var(--space-sm) var(--space-md);
            background: var(--accent);
            color: var(--on-accent);
            font: var(--text-label-lg);
            border-radius: var(--shape-sm);
            z-index: 10000;
            text-decoration: none;
        }

        .skip-link:focus {
            top: var(--space-md);
        }

        @keyframes blink {
            0%, 49% { opacity: 1; }
            50%, 100% { opacity: 0; }
        }
        
        .hero-section {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 20px;
            color: white;
            position: sticky;
            top: 0;
            z-index: 100;
            gap: 20px;
            transition: all var(--duration-medium) var(--motion-standard);
        }
        
        :root[data-theme="dark"] .hero-section {
            background: rgba(6, 8, 6, 0.8);
            backdrop-filter: blur(14px) saturate(1.4);
            -webkit-backdrop-filter: blur(14px) saturate(1.4);
            color: var(--text-primary);
            border-bottom: 1px solid rgba(0, 255, 100, 0.12);
            box-shadow: 0 1px 20px rgba(0, 255, 100, 0.06), 0 1px 0 rgba(0, 255, 100, 0.08);
        }

        :root[data-theme="light"] .hero-section {
            background: rgba(242, 245, 240, 0.85);
            backdrop-filter: blur(12px) saturate(1.3);
            -webkit-backdrop-filter: blur(12px) saturate(1.3);
            color: #1a1f1a;
            border-bottom: 1px solid rgba(0, 168, 22, 0.15);
            box-shadow: 0 1px 12px rgba(0, 168, 22, 0.06);
        }
        
        .hero-content {
            text-align: center;
            flex: 1;
        }
        
        .hero-title {
            font: var(--text-display);
            letter-spacing: 5px;
            margin: 0 0 6px 0;
            text-transform: uppercase;
            transition: text-shadow var(--duration-medium) var(--motion-standard),
                        color var(--duration-medium) var(--motion-standard);
            position: relative;
        }

        :root[data-theme="dark"] .hero-title {
            color: #ffffff;
            text-shadow:
                3px 3px 0px rgba(0, 255, 100, 0.4),
                -1px -1px 0px rgba(255, 0, 255, 0.2);
        }

        :root[data-theme="light"] .hero-title {
            color: #1a1f1a;
            text-shadow:
                3px 3px 0px rgba(0, 200, 26, 0.35),
                -1px -1px 0px rgba(0, 120, 0, 0.15),
                0 0 20px rgba(0, 168, 22, 0.08);
        }

        /* Glitch effect on hover */
        .hero-title:hover {
            animation: glitch 0.3s ease;
        }

        @keyframes glitch {
            0% { transform: translate(0); }
            20% { transform: translate(-2px, 2px); }
            40% { transform: translate(2px, -2px); text-shadow: -3px 0 #ff00ff, 3px 0 #00ffff; }
            60% { transform: translate(-1px, -1px); }
            80% { transform: translate(1px, 1px); text-shadow: 2px 0 #ff00ff, -2px 0 #00ffff; }
            100% { transform: translate(0); }
        }
        
        .hero-title .cursor {
            display: inline-block;
            animation: blink 1s infinite;
            color: var(--accent);
            margin-left: 4px;
        }
        
        .hero-subtitle {
            font: var(--text-body-md);
            letter-spacing: 2px;
            margin: 0;
            color: var(--accent);
        }
        
        /* ── Rank Up FAB (floating, guests only) ── */
        .rank-up-fab {
            position: fixed;
            bottom: 24px;
            right: 24px;
            z-index: 900;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 16px 10px 12px;
            background: rgba(0, 255, 100, 0.08);
            border: 1px solid rgba(0, 255, 100, 0.25);
            border-radius: var(--shape-full);
            color: var(--accent);
            cursor: pointer;
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            transition: all var(--duration-medium) var(--motion-standard);
            overflow: hidden;
            animation: fabBreathe 4s ease-in-out infinite;
        }

        /* Shimmer sweep across the pill */
        .rank-up-fab::after {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(0, 255, 100, 0.12), transparent);
            pointer-events: none;
            animation: fabShimmer 4s ease-in-out infinite;
        }

        .rank-up-fab svg {
            width: 18px;
            height: 18px;
            flex-shrink: 0;
            filter: drop-shadow(0 0 4px rgba(0, 255, 100, 0.4));
        }

        .fab-label {
            font-family: var(--font-mono);
            font-size: 0.65rem;
            font-weight: 700;
            letter-spacing: 0.15em;
            color: var(--accent);
            white-space: nowrap;
        }

        /* Hide the ring element (no longer used) */
        .fab-ring { display: none; }

        .rank-up-fab.hidden { display: none; }

        /* Hide FAB when mobile menu is open */
        body:has(.mobile-menu.active) .rank-up-fab,
        body:has(.cart-drawer.active) .rank-up-fab { opacity: 0; pointer-events: none; }

        .rank-up-fab.fab-vibrate {
            animation: fabVibrate 0.7s ease-in-out;
        }

        .rank-up-fab.fab-collapsed {
            padding: 10px;
            gap: 0;
            opacity: 0.5;
        }
        .rank-up-fab.fab-collapsed .fab-label {
            width: 0;
            overflow: hidden;
            opacity: 0;
        }

        @keyframes fabVibrate {
            0%, 100% { transform: translateX(0) rotate(0); }
            5% { transform: translateX(-3px) rotate(-2deg); }
            10% { transform: translateX(3px) rotate(2deg); }
            15% { transform: translateX(-3px) rotate(-1.5deg); }
            20% { transform: translateX(3px) rotate(1.5deg); }
            25% { transform: translateX(-2.5px) rotate(-1deg); }
            30% { transform: translateX(2.5px) rotate(1deg); }
            35% { transform: translateX(-2px) rotate(-1deg); }
            40% { transform: translateX(2px) rotate(1deg); }
            45% { transform: translateX(-1.5px); }
            50% { transform: translateX(1.5px); }
            55% { transform: translateX(-1px); }
            60% { transform: translateX(1px); }
            65% { transform: translateX(0); }
        }

        @keyframes fabBreathe {
            0%, 100% { box-shadow: 0 0 12px rgba(0, 255, 100, 0.1); }
            50% { box-shadow: 0 0 20px rgba(0, 255, 100, 0.25); }
        }

        @keyframes fabShimmer {
            0%, 70% { left: -100%; }
            100% { left: 100%; }
        }

        @media (hover: hover) {
            .rank-up-fab:hover {
                background: rgba(0, 255, 100, 0.15);
                border-color: rgba(0, 255, 100, 0.5);
                box-shadow: 0 0 25px rgba(0, 255, 100, 0.3);
                transform: translateY(-2px);
            }
        }

        :root[data-theme="light"] .rank-up-fab {
            background: rgba(0, 168, 22, 0.06);
            border-color: rgba(0, 168, 22, 0.2);
        }
        :root[data-theme="light"] .rank-up-fab:hover {
            background: rgba(0, 168, 22, 0.12);
            border-color: rgba(0, 168, 22, 0.4);
        }

        /* ── Rank Up Modal ── */
        .rankup-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            z-index: 1000;
            opacity: 0;
            pointer-events: none;
            transition: opacity var(--duration-medium) var(--motion-standard);
        }

        .rankup-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }

        .rankup-modal {
            position: fixed;
            top: 50%; left: 50%;
            transform: translate(-50%, -50%) scale(0.9);
            z-index: 1001;
            width: min(420px, 90vw);
            max-height: 85vh;
            overflow-y: auto;
            padding: 32px 28px;
            background: rgba(12, 16, 12, 0.85);
            backdrop-filter: blur(20px) saturate(1.4);
            -webkit-backdrop-filter: blur(20px) saturate(1.4);
            border: 1px solid rgba(0, 255, 100, 0.15);
            border-radius: var(--shape-lg);
            box-shadow: 0 0 40px rgba(0, 255, 100, 0.08), var(--elevation-3);
            text-align: center;
            opacity: 0;
            pointer-events: none;
            transition: opacity var(--duration-medium) var(--motion-standard),
                        transform var(--duration-medium) var(--motion-standard);
        }

        .rankup-modal.active {
            opacity: 1;
            pointer-events: auto;
            transform: translate(-50%, -50%) scale(1);
        }

        .rankup-close {
            position: absolute;
            top: 14px; right: 14px;
            background: none;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: var(--shape-full);
            color: rgba(255, 255, 255, 0.5);
            width: 32px; height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all var(--duration-short) var(--motion-standard);
        }

        .rankup-close:hover {
            color: #fff;
            border-color: rgba(255, 255, 255, 0.3);
        }

        .rankup-icon {
            color: var(--accent);
            margin-bottom: 12px;
            filter: drop-shadow(0 0 10px rgba(0, 255, 100, 0.4));
        }

        .rankup-title {
            font: var(--text-headline-lg);
            font-size: 1.4rem;
            color: var(--text-primary);
            margin: 0 0 8px;
            letter-spacing: 3px;
        }

        .rankup-subtitle {
            font-family: var(--font-body);
            font-size: 0.9rem;
            color: var(--text-secondary);
            margin: 0 0 20px;
            line-height: 1.5;
        }

        .rankup-perks {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-bottom: 24px;
            text-align: left;
        }

        .rankup-perk {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            background: rgba(0, 255, 100, 0.04);
            border: 1px solid rgba(0, 255, 100, 0.08);
            border-radius: var(--shape-md);
            color: var(--text-secondary);
            font-family: var(--font-body);
            font-size: 0.85rem;
        }

        .rankup-perk svg {
            color: var(--accent);
            flex-shrink: 0;
        }

        .rankup-cta {
            display: inline-block;
            padding: 14px 40px;
            background: linear-gradient(135deg, var(--accent-bright), var(--accent-dim));
            border-radius: var(--shape-md);
            color: var(--on-accent);
            font: var(--text-label-lg);
            font-family: var(--font-mono);
            letter-spacing: 2px;
            text-decoration: none;
            box-shadow: 0 0 20px rgba(0, 255, 100, 0.2);
            transition: all var(--duration-medium) var(--motion-standard);
        }

        .rankup-cta:hover {
            box-shadow: 0 0 30px rgba(0, 255, 100, 0.35);
            transform: translateY(-2px);
        }

        .rankup-note {
            font-family: var(--font-body);
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin: 14px 0 0;
        }

        .rankup-note a {
            color: var(--accent);
            text-decoration: none;
        }

        /* Light theme */
        :root[data-theme="light"] .rankup-modal {
            background: rgba(255, 255, 255, 0.9);
            border-color: rgba(0, 168, 22, 0.15);
            box-shadow: 0 0 40px rgba(0, 168, 22, 0.06), var(--elevation-3);
        }

        :root[data-theme="light"] .rankup-close {
            color: rgba(0, 0, 0, 0.4);
            border-color: rgba(0, 0, 0, 0.1);
        }

        :root[data-theme="light"] .rankup-perk {
            background: rgba(0, 168, 22, 0.04);
            border-color: rgba(0, 168, 22, 0.1);
        }

        /* Wishlist nav button (header) */
        .wishlist-nav-btn {
            background: none;
            border: 2px solid var(--accent);
            color: var(--accent);
            padding: var(--space-sm);
            border-radius: var(--shape-full);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 50px;
            height: 50px;
            transition: all var(--duration-medium) var(--motion-standard);
            flex-shrink: 0;
            position: relative;
        }

        .wishlist-nav-btn svg {
            width: 22px;
            height: 22px;
        }

        @media (hover: hover) {
            .wishlist-nav-btn:hover {
                background-color: rgba(0, 255, 100, 0.12);
                color: var(--accent);
                box-shadow: 0 0 8px rgba(0, 255, 100, 0.15);
            }
        }

        .wishlist-badge {
            position: absolute;
            top: -4px; right: -4px;
            min-width: 18px; height: 18px;
            background: #ff2828;
            color: #fff;
            border-radius: var(--shape-full);
            font-family: var(--font-heading);
            font-size: 0.6rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 4px;
        }

        .moon-btn, .cart-btn, .hamburger-btn {
            background: none;
            border: 2px solid var(--accent);
            color: var(--accent);
            padding: var(--space-sm);
            border-radius: var(--shape-full);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 50px;
            height: 50px;
            transition: all var(--duration-medium) var(--motion-standard);
            flex-shrink: 0;
        }

        .moon-btn svg, .cart-btn svg, .hamburger-btn svg {
            width: 24px;
            height: 24px;
            stroke-width: 2.5;
        }

        @media (hover: hover) {
            .moon-btn:hover, .cart-btn:hover, .hamburger-btn:hover {
                background-color: rgba(0, 255, 100, 0.12);
                color: var(--accent);
                box-shadow: 0 0 8px rgba(0, 255, 100, 0.15);
            }
        }

        .auth-btn {
            display: flex;
            align-items: center;
            gap: var(--space-sm);
            padding: var(--space-sm) var(--space-md);
            background: none;
            border: 2px solid var(--accent);
            border-radius: var(--shape-full);
            color: var(--accent);
            text-decoration: none;
            font: var(--text-body-sm);
            font-weight: 600;
            cursor: pointer;
            transition: all var(--duration-medium) var(--motion-standard);
            flex-shrink: 0;
        }

        @media (hover: hover) {
            .auth-btn:hover {
                background-color: rgba(0, 255, 100, 0.12);
                color: var(--accent);
                box-shadow: 0 0 8px rgba(0, 255, 100, 0.15);
            }
        }

        .auth-btn svg {
            flex-shrink: 0;
            stroke-width: 2.5;
        }

        .auth-avatar {
            width: 30px;
            height: 30px;
            border-radius: var(--shape-full);
            object-fit: cover;
            flex-shrink: 0;
        }

        .mobile-user-link .auth-avatar {
            width: 28px;
            height: 28px;
        }

        #auth-text {
            max-width: 100px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .auth-wrapper {
            position: relative;
        }

        .auth-dropdown {
            position: absolute;
            top: calc(100% + var(--space-sm));
            right: 0;
            background: rgba(10, 14, 10, 0.95);
            backdrop-filter: blur(14px) saturate(1.3);
            -webkit-backdrop-filter: blur(14px) saturate(1.3);
            border: 1px solid var(--outline-accent);
            border-radius: var(--shape-md);
            padding: var(--space-sm);
            min-width: 150px;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: all var(--duration-short) var(--motion-standard);
            z-index: 150;
            box-shadow: var(--elevation-3), 0 4px 20px rgba(0, 255, 100, 0.05);
        }

        :root[data-theme="light"] .auth-dropdown {
            background: rgba(255, 255, 255, 0.95);
            border: 1px solid var(--outline-accent);
        }

        .auth-dropdown.active {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .dropdown-item {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            padding: 10px 14px;
            background: none;
            border: none;
            border-radius: var(--shape-sm);
            color: var(--text-secondary);
            font: var(--text-body-md);
            cursor: pointer;
            transition: all var(--duration-short) var(--motion-standard);
        }

        :root[data-theme="light"] .dropdown-item {
            color: var(--text-secondary);
        }

        .dropdown-item:hover {
            background: rgba(var(--state-layer), var(--state-hover));
            color: var(--accent);
        }

        :root[data-theme="light"] .dropdown-item:hover {
            background: rgba(var(--state-layer), var(--state-hover));
            color: var(--accent-hover);
        }

        .cart-btn {
            position: relative;
        }

        .cart-badge {
            position: absolute;
            top: -5px;
            right: -5px;
            background: var(--error);
            color: white;
            font: var(--text-label-md);
            min-width: 18px;
            height: 18px;
            padding: 0 5px;
            border-radius: var(--shape-full);
            display: none;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 6px rgba(255, 51, 51, 0.5);
            transition: transform var(--duration-medium) var(--motion-spring);
        }

        .cart-badge.pulse {
            animation: pulse-badge 0.6s ease;
        }

        @keyframes pulse-badge {
            0% { transform: scale(1); }
            50% { transform: scale(1.4); }
            100% { transform: scale(1); }
        }

        @keyframes low-stock-pulse {
            0%, 100% { box-shadow: 0 0 0 rgba(255, 59, 48, 0); }
            50% { box-shadow: 0 0 10px rgba(255, 59, 48, 0.5); }
        }

        .hamburger-btn {
            display: none;
        }

        /* ===== SEARCH BAR ===== */
        .search-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }

        .search-toggle {
            background: none;
            border: 2px solid var(--accent);
            color: var(--accent);
            padding: var(--space-sm);
            border-radius: var(--shape-full);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 50px;
            height: 50px;
            transition: all var(--duration-medium) var(--motion-standard);
            flex-shrink: 0;
        }

        .search-toggle svg {
            stroke-width: 2.5;
        }

        @media (hover: hover) {
            .search-toggle:hover {
                background-color: rgba(0, 255, 100, 0.12);
                color: var(--accent);
                box-shadow: 0 0 8px rgba(0, 255, 100, 0.15);
            }
        }

        .search-toggle.hidden {
            opacity: 0;
            pointer-events: none;
            transform: scale(0.8);
        }

        :root[data-theme="light"] .search-toggle {
            border-color: var(--accent);
            color: var(--accent);
        }

        @media (hover: hover) {
            :root[data-theme="light"] .search-toggle:hover {
                background-color: rgba(0, 168, 22, 0.1);
                color: var(--accent);
                box-shadow: 0 0 8px rgba(0, 168, 22, 0.12);
            }
        }

        .search-input-container {
            position: absolute;
            right: 0;
            display: flex;
            align-items: center;
            width: 0;
            opacity: 0;
            overflow: hidden;
            transition: width var(--duration-medium) var(--motion-emphasized), opacity var(--duration-medium) var(--motion-standard);
        }

        .search-input-container.expanded {
            width: min(280px, calc(100vw - 80px));
            opacity: 1;
        }

        .search-input-container .search-icon-inner {
            position: absolute;
            left: 14px;
            color: var(--accent);
            pointer-events: none;
            opacity: 0.7;
        }

        .search-input {
            width: 100%;
            padding: var(--space-md) 40px var(--space-md) 44px;
            background: rgba(var(--state-layer), var(--state-hover));
            border: 2px solid var(--accent);
            border-radius: var(--shape-full);
            color: var(--text-primary);
            font: var(--text-body-md);
            outline: none;
            transition: all var(--duration-medium) var(--motion-standard);
        }

        .search-input::placeholder {
            color: rgba(255, 255, 255, 0.5);
        }

        .search-input:focus {
            background: rgba(var(--state-layer), var(--state-focus));
            box-shadow: 0 0 20px var(--glow-accent);
        }

        :root[data-theme="light"] .search-input {
            background: rgba(var(--state-layer), var(--state-hover));
        }

        :root[data-theme="light"] .search-input::placeholder {
            color: rgba(0, 0, 0, 0.55);
        }

        :root[data-theme="light"] .search-input:focus {
            background: rgba(var(--state-layer), var(--state-focus));
            box-shadow: 0 0 20px var(--glow-accent);
        }

        :root[data-theme="light"] .search-input-container .search-icon-inner {
            color: var(--accent);
        }

        .search-close {
            position: absolute;
            right: 10px;
            background: none;
            border: none;
            color: rgba(255, 255, 255, 0.5);
            cursor: pointer;
            padding: var(--space-xs);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all var(--duration-short) var(--motion-standard);
        }

        .search-close:hover {
            color: var(--error-hover);
            transform: rotate(90deg);
        }

        :root[data-theme="light"] .search-close {
            color: rgba(0, 0, 0, 0.4);
        }

        :root[data-theme="light"] .search-close:hover {
            color: var(--error);
        }

        /* Mobile search in hamburger menu */
        .mobile-search-wrapper {
            padding: 0 0 20px 0;
            border-bottom: 1px solid rgba(0, 255, 100, 0.2);
            margin-bottom: 10px;
        }

        .mobile-search-container {
            position: relative;
            display: flex;
            align-items: center;
        }

        .mobile-search-container .search-icon {
            position: absolute;
            left: 16px;
            color: var(--accent);
            pointer-events: none;
        }

        .mobile-search-input {
            width: 100%;
            padding: 14px 20px 14px 48px;
            background: rgba(var(--state-layer), 0.1);
            border: 2px solid var(--outline-accent);
            border-radius: var(--shape-md);
            color: var(--accent);
            font-family: var(--font-body);
            font-size: 0.9375rem;
            font-weight: 500;
            outline: none;
            transition: all var(--duration-medium) var(--motion-standard);
        }

        .mobile-search-input::placeholder {
            color: rgba(var(--state-layer), 0.5);
        }

        .mobile-search-input:focus {
            border-color: var(--accent);
            box-shadow: 0 0 15px var(--glow-accent);
        }

        :root[data-theme="light"] .mobile-search-input {
            color: var(--accent);
            border-color: var(--outline-accent);
        }

        :root[data-theme="light"] .mobile-search-input::placeholder {
            color: rgba(var(--state-layer), 0.5);
        }

        :root[data-theme="light"] .mobile-search-container .search-icon {
            color: var(--accent);
        }

        /* No results message */
        .no-results {
            grid-column: 1 / -1;
            text-align: center;
            padding: 60px 20px;
            font-family: var(--font-body);
        }

        .no-results h3 {
            font: var(--text-headline-lg);
            margin-bottom: 10px;
            color: var(--accent);
        }

        .no-results p {
            font: var(--text-body-lg);
            color: var(--text-secondary);
        }

        /* Store layout: sidebar + product grid */
        .store-layout {
            display: flex;
            gap: 0;
            padding-left: 200px;
        }

        .sidebar {
            width: 200px;
            flex-shrink: 0;
            position: fixed;
            left: 0;
            top: 140px;
            height: calc(100vh - 140px);
            padding: 20px 12px;
            display: flex;
            flex-direction: column;
            transition: all var(--duration-medium) var(--motion-standard);
            border-right: 1px solid var(--outline-accent);
            overflow-y: auto;
        }

        :root[data-theme="dark"] .sidebar {
            background: rgba(6, 10, 6, 0.5);
            backdrop-filter: blur(14px) saturate(1.3);
            -webkit-backdrop-filter: blur(14px) saturate(1.3);
            border-right-color: rgba(0, 255, 100, 0.1);
        }

        :root[data-theme="light"] .sidebar {
            background: rgba(236, 240, 232, 0.7);
            backdrop-filter: blur(12px) saturate(1.2);
            -webkit-backdrop-filter: blur(12px) saturate(1.2);
            border-right-color: rgba(0, 168, 22, 0.12);
        }

        .sidebar-filters {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .filter-btn.sidebar-filter {
            display: flex;
            align-items: center;
            gap: var(--space-md);
            padding: var(--space-md);
            border: 1px solid transparent;
            border-left: 3px solid transparent;
            border-radius: 0 var(--shape-sm) var(--shape-sm) 0;
            cursor: pointer;
            font: var(--text-body-md);
            font-weight: 600;
            letter-spacing: 1.5px;
            transition: color var(--duration-short) var(--motion-standard), background var(--duration-short) var(--motion-standard), border-color var(--duration-short) var(--motion-standard), box-shadow var(--duration-short) var(--motion-standard);
            background: transparent;
            text-transform: uppercase;
            width: 100%;
        }

        /* --- DARK MODE filter buttons --- */
        :root[data-theme="dark"] .filter-btn.sidebar-filter {
            color: rgba(255, 255, 255, 0.55);
            border-color: rgba(0, 255, 100, 0.2);
            border-left-color: rgba(0, 255, 100, 0.15);
            background: rgba(20, 24, 20, 0.6);
            box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.6),
                        inset 0 -1px 1px rgba(255, 255, 255, 0.06),
                        inset 0 0 0 1px rgba(255, 255, 255, 0.03);
        }

        @media (hover: hover) {
            :root[data-theme="dark"] .filter-btn.sidebar-filter:hover {
                color: #00ff64;
                border-color: rgba(0, 255, 100, 0.25);
                border-left-color: rgba(0, 255, 100, 0.25);
                background: rgba(17, 17, 24, 0.8);
                box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3),
                            inset 0 -1px 1px rgba(0, 255, 100, 0.1),
                            0 1px 4px rgba(0, 0, 0, 0.3),
                            0 0 12px rgba(0, 255, 100, 0.1);
            }
        }

        :root[data-theme="dark"] .filter-btn.sidebar-filter.active {
            color: #00ff64;
            border-color: #00ff64;
            border-left-color: #00ff64;
            background: rgba(0, 255, 100, 0.08);
            box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.7),
                        inset 0 -1px 1px rgba(0, 255, 100, 0.1),
                        0 0 12px rgba(0, 255, 100, 0.3),
                        0 0 30px rgba(0, 255, 100, 0.06);
        }

        /* --- LIGHT MODE filter buttons --- */
        :root[data-theme="light"] .filter-btn.sidebar-filter {
            color: #3d4a3b;
            border-color: rgba(0, 168, 22, 0.2);
            border-left-color: rgba(0, 168, 22, 0.15);
            background: rgba(255, 255, 255, 0.55);
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06),
                        inset 0 -1px 2px rgba(255, 255, 255, 0.7);
        }

        @media (hover: hover) {
            :root[data-theme="light"] .filter-btn.sidebar-filter:hover {
                color: #008c12;
                border-color: rgba(0, 168, 22, 0.3);
                border-left-color: rgba(0, 168, 22, 0.3);
                background: rgba(255, 255, 255, 0.65);
                box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04),
                            inset 0 -1px 2px rgba(255, 255, 255, 0.8),
                            0 2px 6px rgba(0, 0, 0, 0.06),
                            0 0 8px rgba(0, 168, 22, 0.08);
            }
        }

        :root[data-theme="light"] .filter-btn.sidebar-filter.active {
            color: #008c12;
            border-color: #008c12;
            border-left-color: #008c12;
            background: rgba(0, 168, 22, 0.08);
            box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.12),
                        inset 0 -1px 2px rgba(255, 255, 255, 0.5),
                        0 0 10px rgba(0, 168, 22, 0.25);
        }

        .filter-icon {
            width: 20px;
            height: 20px;
            flex-shrink: 0;
            color: var(--icon-default);
            stroke-width: 2.5;
            transition: color var(--duration-medium) var(--motion-standard),
                        fill var(--duration-medium) var(--motion-standard);
        }

        .filter-btn:hover .filter-icon,
        .filter-btn.active .filter-icon {
            color: var(--accent);
            fill: currentColor;
        }

        /* Mobile filter buttons (keep glass-btn style for mobile menu) */
        .filter-btn.glass-btn {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 24px;
            border: 2px solid var(--accent);
            border-radius: var(--shape-xl);
            cursor: pointer;
            font-family: var(--font-body);
            font-size: 0.875rem;
            font-weight: 600;
            letter-spacing: 1px;
            transition: all var(--duration-medium) var(--motion-standard);
            backdrop-filter: blur(10px);
            background: rgba(var(--state-layer), 0.1);
            color: var(--accent);
            text-transform: uppercase;
        }

        :root[data-theme="dark"] .filter-btn.glass-btn {
            background: rgba(var(--state-layer), 0.08);
            border: 2px solid var(--outline-accent-strong);
        }

        :root[data-theme="light"] .filter-btn.glass-btn {
            background: rgba(var(--state-layer), 0.12);
            border: 2px solid var(--outline-accent-strong);
        }

        .filter-btn.glass-btn:hover {
            background: rgba(var(--state-layer), 0.25);
            border-color: var(--accent);
            box-shadow: 0 0 20px var(--glow-accent);
        }

        .filter-btn.glass-btn.active {
            background: rgba(var(--state-layer), 0.35);
            box-shadow: 0 0 25px var(--glow-accent-strong), inset 0 0 20px rgba(var(--state-layer), 0.15);
            border-color: var(--accent);
        }

        /* Mobile menu */
        .mobile-menu {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            z-index: 200;
            animation: slideIn var(--duration-medium) var(--motion-standard);
        }

        .mobile-menu.active {
            display: flex;
        }

        @keyframes slideIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }

        .mobile-menu-content {
            background: var(--bg-primary);
            width: 100%;
            max-width: 300px;
            height: 100dvh;
            height: 100vh; /* fallback for older browsers */
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 16px;
            overflow-y: auto;
            animation: slideInLeft var(--duration-medium) var(--motion-emphasized);
        }

        @supports (height: 100dvh) {
            .mobile-menu-content {
                height: 100dvh;
            }
        }

        @keyframes slideInLeft {
            from {
                transform: translateX(-100%);
            }
            to {
                transform: translateX(0);
            }
        }

        .close-btn {
            background: none;
            border: 2px solid var(--accent);
            color: var(--accent);
            padding: var(--space-sm);
            border-radius: var(--shape-full);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 44px;
            height: 44px;
            flex-shrink: 0;
            transition: all var(--duration-medium) var(--motion-standard);
            align-self: flex-end;
        }

        .close-btn:hover {
            background-color: var(--accent);
            color: var(--on-accent);
            box-shadow: 0 0 10px var(--accent);
        }

        .close-btn svg {
            width: 24px;
            height: 24px;
        }

        /* Mobile auth section */
        .mobile-auth-section {
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding-bottom: 16px;
            border-bottom: 1px solid rgba(0, 255, 100, 0.15);
        }

        .mobile-auth-btn {
            display: flex;
            align-items: center;
            gap: var(--space-md);
            padding: 12px 16px;
            background: rgba(var(--state-layer), 0.1);
            border: 2px solid var(--outline-accent);
            border-radius: var(--shape-md);
            color: var(--accent);
            font-family: var(--font-body);
            font-size: 0.9375rem;
            font-weight: 600;
            text-decoration: none;
            cursor: pointer;
            transition: all var(--duration-medium) var(--motion-standard);
        }

        .mobile-auth-btn:hover {
            background: rgba(var(--state-layer), var(--state-pressed));
            border-color: var(--accent);
            box-shadow: 0 0 15px var(--glow-accent);
        }

        /* Username link → taps to profile */
        .mobile-user-link {
            display: flex;
            align-items: center;
            gap: var(--space-md);
            padding: 12px 16px;
            background: rgba(var(--state-layer), 0.08);
            border: 1px solid var(--outline-accent);
            border-radius: var(--shape-md);
            color: var(--accent);
            font-family: var(--font-body);
            font-size: 0.9375rem;
            font-weight: 600;
            text-decoration: none;
            cursor: pointer;
            transition: all var(--duration-medium) var(--motion-standard);
            min-width: 0;
        }

        .mobile-user-link span {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            flex: 1;
        }

        .mobile-user-chevron {
            opacity: 0.4;
            flex-shrink: 0;
            margin-left: auto;
        }

        .mobile-user-link:hover {
            background: rgba(var(--state-layer), var(--state-pressed));
            border-color: var(--accent);
        }

        :root[data-theme="light"] .mobile-user-link {
            color: var(--accent-hover);
            border-color: var(--outline-accent);
        }

        :root[data-theme="light"] .mobile-auth-btn {
            color: var(--accent);
            border-color: var(--outline-accent);
        }

        /* Logout — quiet, pushed to bottom */
        .mobile-logout-btn {
            display: flex;
            align-items: center;
            gap: var(--space-sm);
            margin-top: auto;
            padding: 12px 16px;
            padding-bottom: 20px;
            background: none;
            border: none;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            color: var(--text-muted);
            font-family: var(--font-mono);
            font-size: 0.8125rem;
            letter-spacing: 0.05em;
            cursor: pointer;
            transition: color var(--duration-short) var(--motion-standard);
        }

        .mobile-logout-btn:hover {
            color: var(--error-hover);
        }

        :root[data-theme="light"] .mobile-logout-btn {
            border-top-color: rgba(0, 0, 0, 0.08);
            color: var(--text-muted);
        }

        :root[data-theme="light"] .mobile-logout-btn:hover {
            color: #cc4444;
        }

        .mobile-filter-buttons {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding-top: 12px;
        }

        .mobile-filter {
            justify-content: flex-start;
            width: 100%;
            padding: 10px 16px;
            font-size: 0.9375rem;
        }

        #product-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 35px;
            padding: 20px;
            flex: 1;
            min-width: 0;
            min-height: 80vh;
            max-width: 1100px;
            margin: 0 auto;
            position: relative;
            z-index: 1;
        }

        .store-error-state {
            grid-column: 1 / -1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.75rem;
            padding: 4rem 2rem;
            text-align: center;
            color: var(--text-secondary);
        }
        .store-error-state svg {
            opacity: 0.5;
            color: var(--accent);
        }
        .store-error-state p {
            font-family: var(--font-heading);
            font-size: 1rem;
            font-weight: 600;
            letter-spacing: 0.1em;
            color: var(--text-primary);
        }
        .store-error-state span {
            font-family: var(--font-body);
            font-size: 0.85rem;
        }

        .product-card {
            padding: 20px;
            box-shadow: var(--elevation-1), 0 0 0 1px var(--outline-accent);
            display: flex;
            flex-direction: column;
            backdrop-filter: blur(10px);
            border-radius: var(--shape-lg);
            transition: box-shadow var(--duration-medium) var(--motion-standard),
                        border-color var(--duration-medium) var(--motion-standard),
                        filter var(--duration-medium) var(--motion-standard),
                        opacity var(--duration-medium) var(--motion-standard);
            gap: 15px;
            position: relative;
            overflow: hidden;
            transform: translateZ(0); /* GPU compositing — fixes iOS scroll jank */
        }

        /* Scanline sweep effect */
        .product-card::after {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(
                90deg,
                transparent 0%,
                rgba(0, 255, 100, 0.03) 45%,
                rgba(0, 255, 100, 0.08) 50%,
                rgba(0, 255, 100, 0.03) 55%,
                transparent 100%
            );
            pointer-events: none;
            transition: none;
            z-index: 10;
        }

        .product-card:hover::after {
            animation: scanline-sweep 0.6s ease-out;
        }

        @keyframes scanline-sweep {
            0% { left: -100%; }
            100% { left: 100%; }
        }

        .product-card:hover {
            transform: translateY(-8px) rotate(0deg);
            box-shadow: var(--elevation-3), 0 0 0 2px var(--outline-accent-strong);
        }

        /* Break the perfect grid - stagger cards with subtle rotation */
        .product-card:nth-child(odd) {
            transform: translateY(0) rotate(-0.3deg);
        }

        .product-card:nth-child(even) {
            transform: translateY(20px) rotate(0.3deg);
        }

        .product-card:nth-child(odd):hover {
            transform: translateY(-8px) rotate(0deg);
        }

        .product-card:nth-child(even):hover {
            transform: translateY(12px) rotate(0deg);
        }

        .product-image {
            width: 100%;
            aspect-ratio: 4 / 5;
            overflow: hidden;
            border-radius: var(--shape-md);
            background: rgba(0, 0, 0, 0.2);
            position: relative;
        }

        /* Lazy loading image animations */
        .product-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform var(--duration-long) var(--motion-emphasized),
                        opacity 0.6s var(--motion-standard),
                        filter var(--duration-medium) var(--motion-standard);
        }

        .product-image img.lazy-load {
            opacity: 0;
            transform: scale(0.95);
        }

        .product-image img.loaded {
            opacity: 1;
            transform: scale(1);
        }

        /* Gallery arrows for front/back images */
        .product-image.has-gallery .gallery-arrow {
            position: absolute;
            top: 50%;
            transform: translateY(-50%) translateZ(0);
            width: 36px;
            height: 36px;
            border: none;
            border-radius: var(--shape-full);
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(4px);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0.35;
            transition: all var(--duration-short) var(--motion-standard);
            z-index: 10;
        }

        .product-image.has-gallery .gallery-arrow svg {
            stroke: #fff;
        }

        @media (hover: hover) {
            .product-image.has-gallery .gallery-arrow {
                opacity: 0;
            }
            .product-image.has-gallery:hover .gallery-arrow {
                opacity: 1;
            }
        }

        .product-image.has-gallery .gallery-arrow:hover {
            background: rgba(var(--state-layer), 0.8);
            transform: translateY(-50%) scale(1.1);
        }

        .product-image.has-gallery .gallery-arrow:hover svg {
            stroke: var(--on-accent);
        }

        .product-image.has-gallery .gallery-prev {
            left: 8px;
        }

        .product-image.has-gallery .gallery-next {
            right: 8px;
        }

        /* Gallery dots indicator */
        .gallery-dots {
            position: absolute;
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 6px;
            z-index: 10;
        }

        .gallery-dot {
            width: 6px;
            height: 6px;
            border-radius: var(--shape-full);
            background: rgba(255, 255, 255, 0.4);
            transition: all var(--duration-short) var(--motion-standard);
        }

        .gallery-dot.active {
            background: var(--accent);
            box-shadow: 0 0 6px var(--glow-accent-strong);
        }

        .product-card:hover .product-image img {
            transform: scale(1.05);
            filter: saturate(1.1);
        }

        /* Chromatic aberration on hover - subtle RGB split */
        .product-image::before,
        .product-image::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            pointer-events: none;
            opacity: 0;
            transition: opacity var(--duration-medium) var(--motion-standard);
            z-index: 5;
        }

        .product-image::before {
            box-shadow: inset -2px 0 0 rgba(255, 0, 0, 0.15);
        }

        .product-image::after {
            box-shadow: inset 2px 0 0 rgba(0, 255, 255, 0.15);
        }

        .product-card:hover .product-image::before,
        .product-card:hover .product-image::after {
            opacity: 1;
        }

        .product-footer {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .product-info {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .product-card h3 {
            font: var(--text-headline-md);
            font-size: clamp(0.85rem, 2.8vw, 1.2rem);
            margin: 0;
            color: var(--text-primary);
            line-height: 1.3;
            text-shadow: 0 0 8px rgba(0, 255, 100, 0.3), 0 0 20px rgba(0, 255, 100, 0.1);
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
        }

        .product-price-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: var(--space-sm);
        }

        .product-card p {
            font: var(--text-title-lg);
            font-size: clamp(0.85rem, 2.5vw, 1rem);
            color: var(--accent);
            margin: 0;
        }

        .product-actions {
            flex-shrink: 0;
            display: flex;
            align-items: center;
        }

        /* ─── Card Size Picker (glass overlay on image) ─── */
        .product-image > img {
            transition: filter var(--duration-medium) var(--motion-standard);
        }

        .product-image.picker-blur > img {
            filter: blur(6px) brightness(0.5);
        }

        .card-size-picker {
            display: none;
            position: absolute;
            inset: 0;
            z-index: 10;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 12px;
            padding: 16px;
            background: rgba(10, 10, 15, 0.6);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            border-radius: var(--shape-md);
        }

        .card-size-picker.open {
            display: flex;
            animation: sizePickerIn var(--duration-medium) var(--motion-standard);
        }

        @keyframes sizePickerIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .card-size-label {
            font-family: var(--font-mono);
            font-size: 0.75rem;
            letter-spacing: 0.15em;
            color: rgba(255, 255, 255, 0.7);
            text-transform: uppercase;
        }

        .card-size-chips {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 8px;
        }

        .card-size-chip {
            font-family: var(--font-mono);
            font-size: 0.8125rem;
            font-weight: 600;
            padding: 8px 16px;
            border: 1.5px solid rgba(255, 255, 255, 0.25);
            border-radius: var(--shape-sm);
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
            cursor: pointer;
            transition: all var(--duration-short) var(--motion-standard);
        }

        .card-size-chip:hover:not([disabled]) {
            border-color: var(--accent);
            background: rgba(0, 255, 100, 0.15);
            color: var(--accent);
            box-shadow: 0 0 12px var(--glow-accent);
        }

        .card-size-chip.out-of-stock {
            opacity: 0.35;
            text-decoration: line-through;
            cursor: not-allowed;
            border-color: var(--error);
            color: rgba(255, 255, 255, 0.4);
            background: rgba(255, 59, 48, 0.08);
        }

        .card-size-chip.low-stock {
            border-color: var(--error);
            animation: low-stock-pulse 2s ease-in-out infinite;
            position: relative;
        }

        .card-size-chip.low-stock::after {
            content: attr(data-stock-label);
            position: absolute;
            top: -10px;
            right: -10px;
            background: var(--error);
            color: #fff;
            font-family: var(--font-mono);
            font-size: 0.55rem;
            font-weight: 700;
            letter-spacing: 0.5px;
            padding: 2px 5px;
            border-radius: var(--shape-xs);
            white-space: nowrap;
            line-height: 1.3;
        }

        .add-to-cart-btn.added-flash {
            background: var(--accent) !important;
            box-shadow: 0 0 16px var(--glow-accent-strong) !important;
        }

        /* Light mode: same dark glass overlay for contrast */
        :root[data-theme="light"] .card-size-picker {
            background: rgba(10, 10, 15, 0.55);
        }

        :root[data-theme="dark"] .product-card {
            background: rgba(16, 20, 16, 0.75);
            border: 1px solid rgba(0, 255, 100, 0.08);
        }

        :root[data-theme="dark"] .product-card:hover {
            box-shadow: var(--elevation-3),
                        0 0 0 2px var(--outline-accent-strong),
                        0 4px 30px rgba(0, 255, 100, 0.1),
                        0 0 60px rgba(0, 255, 100, 0.04);
            border-color: rgba(0, 255, 100, 0.2);
        }

        :root[data-theme="light"] .product-card {
            background: #ffffff;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06),
                        0 0 0 1px rgba(0, 168, 22, 0.12),
                        inset 0 1px 0 rgba(255, 255, 255, 0.9);
        }

        :root[data-theme="light"] .product-card h3 {
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
        }

        :root[data-theme="light"] .product-card:hover {
            box-shadow: 0 4px 20px rgba(0, 168, 22, 0.12),
                        0 0 0 2px var(--outline-accent-strong),
                        0 8px 24px rgba(0, 0, 0, 0.08),
                        inset 0 1px 0 rgba(255, 255, 255, 0.9);
        }

        /* New product — red accent border + glow */
        :root[data-theme="dark"] .product-card.new-product {
            border-color: rgba(255, 40, 40, 0.25);
            box-shadow: var(--elevation-1), 0 0 0 1px rgba(255, 40, 40, 0.2);
        }
        :root[data-theme="dark"] .product-card.new-product:hover {
            border-color: rgba(255, 40, 40, 0.45);
            box-shadow: var(--elevation-3),
                        0 0 0 2px rgba(255, 40, 40, 0.35),
                        0 4px 30px rgba(255, 40, 40, 0.1),
                        0 0 60px rgba(255, 40, 40, 0.04);
        }
        :root[data-theme="light"] .product-card.new-product {
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06),
                        0 0 0 1px rgba(255, 40, 40, 0.2),
                        inset 0 1px 0 rgba(255, 255, 255, 0.9);
        }
        :root[data-theme="light"] .product-card.new-product:hover {
            box-shadow: 0 4px 20px rgba(255, 40, 40, 0.12),
                        0 0 0 2px rgba(255, 40, 40, 0.35),
                        0 8px 24px rgba(0, 0, 0, 0.08),
                        inset 0 1px 0 rgba(255, 255, 255, 0.9);
        }

        /* NEW tag */
        .new-tag {
            position: absolute;
            top: 12px; left: 12px;
            z-index: 5;
            padding: 3px 10px;
            font-family: var(--font-mono);
            font-size: 0.65rem;
            font-weight: 700;
            letter-spacing: 0.15em;
            text-transform: uppercase;
            color: #fff;
            background: rgba(255, 40, 40, 0.85);
            backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 40, 40, 0.5);
            border-radius: var(--shape-sm);
            box-shadow: 0 0 12px rgba(255, 40, 40, 0.3);
        }

        /* Stock tags (low stock + sold out) */
        .stock-tag {
            position: absolute;
            top: 10px; right: 10px;
            z-index: 5;
            padding: 5px 12px;
            font-family: var(--font-mono);
            font-size: 0.7rem;
            font-weight: 700;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            border-radius: var(--shape-sm);
            backdrop-filter: blur(8px);
        }

        .low-stock-tag {
            color: #fff;
            background: rgba(255, 160, 0, 0.85);
            border: 1px solid rgba(255, 160, 0, 0.5);
            box-shadow: 0 0 10px rgba(255, 160, 0, 0.25);
            animation: stock-pulse 2s ease-in-out infinite;
        }

        .sold-out-tag {
            color: var(--text-secondary);
            background: rgba(80, 80, 80, 0.85);
            border: 1px solid rgba(120, 120, 120, 0.4);
        }

        .product-card.sold-out .product-image img {
            opacity: 0.45;
            filter: grayscale(0.6);
        }

        .product-card.sold-out .add-to-cart-btn {
            opacity: 0.4;
            pointer-events: none;
        }

        @keyframes stock-pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }

        :root[data-theme="light"] .low-stock-tag {
            background: rgba(230, 140, 0, 0.9);
            border-color: rgba(200, 120, 0, 0.5);
            box-shadow: 0 0 10px rgba(200, 120, 0, 0.2);
        }

        :root[data-theme="light"] .sold-out-tag {
            background: rgba(160, 160, 160, 0.85);
            color: #fff;
        }

        /* ── Wishlist Heart (on product cards) ── */
        .wishlist-heart {
            position: absolute;
            bottom: 10px; right: 10px;
            z-index: 6;
            min-width: 36px; height: 36px;
            padding: 0 10px;
            gap: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(0, 0, 0, 0.45);
            backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: var(--shape-full);
            color: rgba(255, 255, 255, 0.7);
            cursor: pointer;
            transition: all var(--duration-medium) var(--motion-standard);
            opacity: 0;
            transform: scale(0.85);
        }

        .wishlist-heart svg {
            width: 16px; height: 16px;
            transition: all var(--duration-medium) var(--motion-standard);
            pointer-events: none;
        }

        .like-count {
            font-size: 0.75rem;
            font-family: var(--font-mono);
            color: inherit;
            pointer-events: none;
            line-height: 1;
        }

        .product-card:hover .wishlist-heart,
        .wishlist-heart.active {
            opacity: 1;
            transform: scale(1);
        }

        .wishlist-heart:hover {
            background: rgba(255, 40, 40, 0.2);
            border-color: rgba(255, 40, 40, 0.4);
            color: #ff2828;
        }

        .wishlist-heart.active {
            color: #ff2828;
            background: rgba(255, 40, 40, 0.2);
            border-color: rgba(255, 40, 40, 0.4);
        }

        .wishlist-heart.active svg {
            fill: #ff2828;
            stroke: #ff2828;
        }

        @keyframes heart-pop {
            0% { transform: scale(1); }
            30% { transform: scale(1.35); }
            60% { transform: scale(0.9); }
            100% { transform: scale(1); }
        }

        .wishlist-heart.heart-pop {
            animation: heart-pop 0.4s ease-out;
        }

        /* Always show heart on touch devices */
        @media (hover: none) {
            .wishlist-heart { opacity: 1; transform: scale(1); }
        }

        :root[data-theme="light"] .wishlist-heart {
            background: rgba(255, 255, 255, 0.65);
            border-color: rgba(0, 0, 0, 0.08);
            color: rgba(0, 0, 0, 0.35);
        }

        :root[data-theme="light"] .wishlist-heart:hover {
            background: rgba(255, 40, 40, 0.12);
            color: #e02020;
        }

        :root[data-theme="light"] .wishlist-heart.active {
            color: #e02020;
            background: rgba(255, 40, 40, 0.12);
            border-color: rgba(255, 40, 40, 0.25);
        }

        :root[data-theme="light"] .wishlist-heart.active svg {
            fill: #e02020;
            stroke: #e02020;
        }

        /* ── PDP Wishlist Heart ── */
        .pdp-action-row {
            display: flex;
            gap: var(--space-sm);
            align-items: stretch;
        }

        .pdp-action-row .pdp-add-btn {
            flex: 1;
        }

        .pdp-wishlist-heart {
            position: static;
            opacity: 1;
            transform: none;
            width: 52px; height: auto;
            flex-shrink: 0;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid var(--outline-faint);
            border-radius: var(--shape-md);
            color: var(--text-secondary);
        }

        .pdp-wishlist-heart svg {
            width: 22px; height: 22px;
        }

        .pdp-wishlist-heart:hover {
            border-color: rgba(255, 40, 40, 0.4);
            color: #ff2828;
            background: rgba(255, 40, 40, 0.08);
        }

        .pdp-wishlist-heart.active {
            color: #ff2828;
            border-color: rgba(255, 40, 40, 0.4);
            background: rgba(255, 40, 40, 0.08);
        }

        /* ===== WISHLIST DRAWER ===== */

        .wishlist-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.45);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            z-index: 185;
            opacity: 0;
            visibility: hidden;
            transition: opacity var(--duration-medium) var(--motion-standard), visibility var(--duration-medium) var(--motion-standard);
        }

        :root[data-theme="light"] .wishlist-overlay {
            background: rgba(26, 31, 26, 0.25);
        }

        .wishlist-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .wishlist-drawer {
            position: fixed;
            top: 0;
            right: 0;
            width: 420px;
            height: 100%;
            z-index: 190;
            display: flex;
            flex-direction: column;
            transform: translateX(100%);
            transition: transform var(--duration-medium) var(--motion-emphasized);
            background: rgba(6, 10, 6, 0.6);
            backdrop-filter: blur(32px) saturate(1.6);
            -webkit-backdrop-filter: blur(32px) saturate(1.6);
            border-left: 1px solid rgba(0, 255, 100, 0.1);
            box-shadow:
                var(--elevation-5),
                -2px 0 20px rgba(0, 255, 100, 0.04),
                inset 1px 0 0 rgba(0, 255, 100, 0.06),
                inset 0 1px 0 rgba(255, 255, 255, 0.03);
        }

        :root[data-theme="light"] .wishlist-drawer {
            background: rgba(242, 245, 240, 0.6);
            backdrop-filter: blur(32px) saturate(1.8);
            -webkit-backdrop-filter: blur(32px) saturate(1.8);
            border-left: 1px solid rgba(0, 168, 22, 0.1);
            box-shadow:
                -8px 0 40px rgba(0, 0, 0, 0.06),
                -2px 0 20px rgba(0, 168, 22, 0.04),
                inset 1px 0 0 rgba(255, 255, 255, 0.8),
                inset 0 1px 0 rgba(255, 255, 255, 0.5);
        }

        .wishlist-drawer.active {
            transform: translateX(0);
        }

        .wishlist-drawer-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: var(--space-lg) var(--space-lg) 20px;
            border-bottom: 1px solid var(--outline-variant);
        }

        :root[data-theme="light"] .wishlist-drawer-header {
            border-bottom-color: rgba(0, 168, 22, 0.1);
        }

        .wishlist-drawer-header h2 {
            font-family: var(--font-display);
            font-size: 0.85rem;
            letter-spacing: 0.12em;
            color: var(--accent);
        }

        .wishlist-drawer-close {
            background: none;
            border: 1px solid var(--outline-variant);
            color: var(--text-secondary);
            cursor: pointer;
            padding: 8px;
            border-radius: var(--shape-sm);
            transition: all var(--duration-short) var(--motion-standard);
        }

        .wishlist-drawer-close:hover {
            color: var(--accent);
            border-color: var(--accent);
            background: rgba(0, 255, 100, 0.05);
        }

        :root[data-theme="light"] .wishlist-drawer-close {
            border-color: rgba(0, 168, 22, 0.12);
        }

        .wishlist-drawer-items {
            flex: 1;
            overflow-y: auto;
            padding: var(--space-md);
        }

        .wishlist-drawer-items::-webkit-scrollbar { width: 4px; }
        .wishlist-drawer-items::-webkit-scrollbar-thumb {
            background: var(--outline-variant);
            border-radius: 4px;
        }

        .wishlist-drawer-item {
            display: flex;
            align-items: center;
            gap: var(--space-sm);
            padding: var(--space-sm) 0;
            border-bottom: 1px solid var(--outline-variant);
        }

        .wishlist-drawer-item:last-child { border-bottom: none; }

        .wishlist-drawer-item-img {
            width: 64px;
            height: 64px;
            object-fit: cover;
            border-radius: var(--shape-sm);
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--outline-variant);
            flex-shrink: 0;
        }

        :root[data-theme="light"] .wishlist-drawer-item-img {
            background: #f5f7f4;
        }

        .wishlist-drawer-item-details {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 4px;
            min-width: 0;
        }

        .wishlist-drawer-item-name {
            font-family: var(--font-body);
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .wishlist-drawer-item-price {
            font-family: var(--font-mono);
            font-size: 0.75rem;
            color: var(--accent);
        }

        .wishlist-drawer-item-actions {
            display: flex;
            gap: 6px;
            flex-shrink: 0;
        }

        .wishlist-drawer-view,
        .wishlist-drawer-remove {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            border-radius: var(--shape-sm);
            border: 1px solid var(--outline-variant);
            background: none;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all var(--duration-short) var(--motion-standard);
            text-decoration: none;
        }

        .wishlist-drawer-view:hover {
            color: var(--accent);
            border-color: var(--accent);
            background: rgba(0, 255, 100, 0.05);
        }

        .wishlist-drawer-remove:hover {
            color: #ff2828;
            border-color: rgba(255, 40, 40, 0.4);
            background: rgba(255, 40, 40, 0.08);
        }

        .wishlist-drawer-empty {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            gap: var(--space-md);
            color: var(--text-secondary);
            text-align: center;
            padding: var(--space-xl);
        }

        .wishlist-drawer-empty svg {
            opacity: 0.4;
        }

        .wishlist-drawer-empty p {
            font-family: var(--font-display);
            font-size: 0.8rem;
            letter-spacing: 0.1em;
            color: var(--text-primary);
        }

        .wishlist-drawer-empty span {
            font-family: var(--font-body);
            font-size: 0.8rem;
            opacity: 0.6;
        }

        @media (max-width: 480px) {
            .wishlist-drawer { width: 100%; }
        }

        :root[data-theme="light"] .product-card p {
            color: var(--accent-hover);
        }

        :root[data-theme="light"] .product-image {
            background: #f5f7f4;
        }

        :root[data-theme="light"] .product-card button:not(.wishlist-heart):not(.gallery-arrow) {
            background: linear-gradient(135deg, var(--accent), var(--accent-dim));
            box-shadow: 0 0 12px var(--glow-accent), 0 2px 8px rgba(0, 0, 0, 0.12);
        }

        :root[data-theme="light"] .product-card button:not(.wishlist-heart):not(.gallery-arrow):hover {
            background: linear-gradient(135deg, var(--accent-bright), var(--accent));
            box-shadow: 0 0 22px var(--glow-accent-strong), 0 4px 16px rgba(0, 0, 0, 0.15);
            color: #fff;
        }

        /* Skeleton loading cards */
        @keyframes shimmer {
            0% { background-position: -400px 0; }
            100% { background-position: 400px 0; }
        }

        .skeleton-card {
            pointer-events: none;
        }

        .skeleton-image,
        .skeleton-title,
        .skeleton-price,
        .skeleton-button {
            background: linear-gradient(90deg, rgba(0, 255, 100, 0.03) 25%, rgba(0, 255, 100, 0.07) 50%, rgba(0, 255, 100, 0.03) 75%);
            background-size: 800px 100%;
            animation: shimmer 1.5s infinite;
            border-radius: var(--shape-sm);
        }

        .skeleton-image {
            width: 100%;
            aspect-ratio: 4 / 5;
            border-radius: var(--shape-md);
        }

        .skeleton-title {
            height: 18px;
            width: 70%;
        }

        .skeleton-price {
            height: 14px;
            width: 40%;
            margin-top: 8px;
        }

        .skeleton-button {
            height: 36px;
            width: 100px;
        }

        :root[data-theme="light"] .skeleton-image,
        :root[data-theme="light"] .skeleton-title,
        :root[data-theme="light"] .skeleton-price,
        :root[data-theme="light"] .skeleton-button {
            background: linear-gradient(90deg, #e6ebe3 25%, #f0f4ed 50%, #e6ebe3 75%);
            background-size: 800px 100%;
            animation: shimmer 1.5s infinite;
        }

        /* ── S97 HUD Progress Bar Loader ── */
        .s97-loader {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 4rem 1rem;
            grid-column: 1 / -1;
            min-height: 60vh;
            width: 100%;
        }

        /* Auth page: loader lives inside the card, keep it compact */
        .auth-card-inner .s97-loader {
            min-height: auto;
            padding: 1.5rem 0;
            grid-column: unset;
            width: auto;
        }

        .auth-card-inner .s97-progress {
            max-width: 100%;
            padding: 0;
        }

        .auth-card-inner .s97-progress__ticks,
        .auth-card-inner .s97-progress__status {
            display: none;
        }

        .s97-loader.hidden { display: none; }

        .s97-progress {
            width: 100%;
            max-width: 520px;
            margin: 0 auto;
            padding: 0 24px;
        }

        .s97-progress__header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
        }

        .s97-progress__label {
            font-family: var(--font-mono);
            font-size: 0.8rem;
            font-weight: 600;
            color: var(--text-secondary);
            letter-spacing: 0.18em;
        }

        .s97-progress__percent {
            font-family: var(--font-mono);
            font-size: 0.85rem;
            font-weight: 700;
            color: var(--accent);
            letter-spacing: 0.15em;
            text-shadow: 0 0 8px var(--glow-accent);
        }

        .s97-progress__track {
            position: relative;
            height: 6px;
            background-color: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(0, 255, 100, 0.08);
            overflow: hidden;
        }

        :root[data-theme="light"] .s97-progress__track {
            background-color: rgba(0, 0, 0, 0.02);
            border-color: rgba(0, 168, 64, 0.1);
        }

        /* Corner brackets */
        .s97-progress .corner-bracket {
            position: absolute;
            width: 7px;
            height: 7px;
            z-index: 5;
        }
        .corner-bracket--tl { top: 0; left: 0; border-top: 1.5px solid rgba(0, 255, 100, 0.25); border-left: 1.5px solid rgba(0, 255, 100, 0.25); }
        .corner-bracket--tr { top: 0; right: 0; border-top: 1.5px solid rgba(0, 255, 100, 0.25); border-right: 1.5px solid rgba(0, 255, 100, 0.25); }
        .corner-bracket--bl { bottom: 0; left: 0; border-bottom: 1.5px solid rgba(0, 255, 100, 0.25); border-left: 1.5px solid rgba(0, 255, 100, 0.25); }
        .corner-bracket--br { bottom: 0; right: 0; border-bottom: 1.5px solid rgba(0, 255, 100, 0.25); border-right: 1.5px solid rgba(0, 255, 100, 0.25); }

        :root[data-theme="light"] .corner-bracket--tl,
        :root[data-theme="light"] .corner-bracket--tr,
        :root[data-theme="light"] .corner-bracket--bl,
        :root[data-theme="light"] .corner-bracket--br {
            border-color: rgba(0, 168, 64, 0.25);
        }

        .s97-progress__fill {
            height: 100%;
            width: 0%;
            background-color: var(--accent);
            box-shadow: 0 0 12px var(--glow-accent), 0 0 30px rgba(0, 255, 100, 0.08);
            position: relative;
            transition: width var(--duration-medium) var(--motion-standard);
        }

        :root[data-theme="light"] .s97-progress__fill {
            box-shadow: 0 0 10px rgba(0, 168, 64, 0.2), 0 0 24px rgba(0, 168, 64, 0.06);
        }

        @keyframes shine-sweep {
            0%   { left: -30%; }
            100% { left: 130%; }
        }

        .s97-progress__fill::after {
            content: "";
            position: absolute;
            top: 0;
            width: 30%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
            animation: shine-sweep 1.5s infinite 0.5s;
        }

        /* Tick marks */
        .s97-progress__ticks {
            display: flex;
            justify-content: space-between;
            margin-top: 6px;
        }

        .s97-progress__tick {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 3px;
        }

        .s97-progress__tick-mark {
            width: 1.5px;
            height: 7px;
            background-color: var(--text-muted);
            opacity: 0.3;
            transition: background-color var(--duration-medium), opacity var(--duration-medium), box-shadow var(--duration-medium);
        }

        .s97-progress__tick-mark.active {
            background-color: var(--accent);
            opacity: 0.8;
            box-shadow: 0 0 4px var(--glow-accent);
        }

        .s97-progress__tick-label {
            font-family: var(--font-mono);
            font-size: 0.55rem;
            font-weight: 600;
            color: var(--text-muted);
            letter-spacing: 0.1em;
            transition: color var(--duration-medium);
        }

        .s97-progress__tick-label.active {
            color: var(--text-secondary);
        }

        /* Status indicators row */
        .s97-progress__status {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 16px;
        }

        .s97-progress__indicators {
            display: flex;
            gap: 16px;
        }

        .s97-progress__indicator {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .s97-progress__indicator-dot {
            width: 6px;
            height: 6px;
            background-color: var(--text-muted);
            transition: background-color var(--duration-medium), box-shadow var(--duration-medium);
        }

        .s97-progress__indicator-dot.active {
            background-color: var(--accent);
            box-shadow: 0 0 6px var(--glow-accent);
        }

        .s97-progress__indicator-label {
            font-family: var(--font-mono);
            font-size: 0.6rem;
            font-weight: 600;
            color: var(--text-muted);
            letter-spacing: 0.12em;
            transition: color var(--duration-medium);
        }

        .s97-progress__indicator-label.active {
            color: var(--accent);
        }

        @keyframes blink-state {
            0%, 100% { opacity: 0.4; }
            50%      { opacity: 1; }
        }

        .s97-progress__state {
            font-family: var(--font-mono);
            font-size: 0.6rem;
            font-weight: 600;
            color: var(--text-muted);
            letter-spacing: 0.12em;
            animation: blink-state 1.5s infinite;
        }

        .s97-progress__state.complete {
            color: var(--accent);
            text-shadow: 0 0 6px var(--glow-accent);
        }

        /* Collapse auth + cart + wishlist buttons while search is expanded */
        .hero-section:has(.search-input-container.expanded) > .auth-wrapper,
        .hero-section:has(.search-input-container.expanded) > .wishlist-nav-btn,
        .hero-section:has(.search-input-container.expanded) > .cart-btn {
            display: none;
        }

        /* Tablet landscape / small desktop - hide sidebar, show hamburger */
        @media (max-width: 992px) {
            .hamburger-btn {
                display: flex;
            }

            .sidebar {
                display: none;
            }

            .store-layout {
                padding-left: 0;
            }

            .auth-wrapper {
                display: none;
            }

            .search-wrapper {
                display: none;
            }

            .search-toggle {
                display: none;
            }
        }

        /* M3 Medium — tablet portrait */
        @media (max-width: 840px) {
            .hero-title {
                font-size: 2rem;
                letter-spacing: 2px;
            }

            .hero-subtitle {
                font-size: 0.875rem;
            }

            .hero-section {
                padding: 20px 15px;
            }

            #product-container {
                gap: 20px;
                padding: 15px;
            }
        }

        /* M3 Compact — mobile */
        @media (max-width: 600px) {
            .hero-title {
                font-size: clamp(1.25rem, 5vw, 1.5rem);
                letter-spacing: 1px;
                white-space: nowrap;
            }

            .hero-subtitle {
                font-size: 0.95rem;
            }

            .hero-section {
                padding: 15px 10px;
                gap: 8px;
            }

            .moon-btn, .cart-btn, .hamburger-btn, .wishlist-nav-btn {
                width: 40px;
                height: 40px;
                border-width: 1.5px;
            }

            .moon-btn svg, .cart-btn svg, .hamburger-btn svg, .wishlist-nav-btn svg {
                width: 18px;
                height: 18px;
            }

            #product-container {
                grid-template-columns: 1fr;
                gap: 20px;
                padding: 10px;
            }

            .product-card {
                padding: 10px;
            }

            .product-card h3 {
                -webkit-line-clamp: 1;
                line-clamp: 1;
                font-size: clamp(0.75rem, 2.5vw, 0.9rem);
            }

            .add-to-cart-btn {
                padding: 10px 14px;
                font-size: 0.7rem;
            }

            .card-size-chip {
                font-size: 0.6875rem;
                padding: 6px 12px;
            }

            .card-size-label {
                font-size: 0.625rem;
            }

            .card-size-picker {
                padding: 12px;
                gap: 8px;
            }
        }

        /* Single column only on very small screens */
        @media (max-width: 380px) {
            #product-container {
                grid-template-columns: 1fr;
                gap: 20px;
            }

            .product-card {
                padding: 15px;
            }
        }

        .product-card button:not(.wishlist-heart):not(.gallery-arrow) {
            margin: 0;
            padding: 10px 22px;
            border-radius: var(--shape-md);
            border: none;
            color: white;
            background: linear-gradient(135deg, var(--accent-bright), var(--accent-dim));
            box-shadow: var(--elevation-2), 0 0 12px var(--glow-accent);
            transition: background var(--duration-short) var(--motion-standard),
                        box-shadow var(--duration-short) var(--motion-standard),
                        transform var(--duration-short) var(--motion-standard);
            white-space: nowrap;
            font: var(--text-label-lg);
            letter-spacing: 1.5px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            text-transform: uppercase;
        }

        .product-card button:not(.wishlist-heart):not(.gallery-arrow):hover {
            background: linear-gradient(135deg, var(--accent), var(--accent-bright));
            box-shadow: var(--elevation-3), 0 0 20px var(--glow-accent-strong);
            transform: scale(1.05);
            color: var(--on-accent);
            animation: btn-pulse 0.4s var(--motion-standard);
        }

        @keyframes btn-pulse {
            0% { box-shadow: var(--elevation-3), 0 0 20px var(--glow-accent-strong); }
            50% { box-shadow: var(--elevation-4), 0 0 30px var(--glow-accent-strong); }
            100% { box-shadow: var(--elevation-3), 0 0 20px var(--glow-accent-strong); }
        }

        .product-card button:not(.wishlist-heart):not(.gallery-arrow):active {
            transform: scale(0.97);
        }

        .product{
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform var(--duration-medium) var(--motion-standard);
        }


        footer {
            margin-top: 100px;
            padding: 0 20px 0;
            position: relative;
            transition: all var(--duration-medium) var(--motion-standard);
        }

        :root[data-theme="dark"] footer {
            background: rgba(6, 8, 6, 0.9);
            color: var(--text-secondary);
        }

        :root[data-theme="light"] footer {
            background: rgba(236, 240, 232, 0.95);
            color: #4a5248;
        }

        /* ── Accent divider line at top ── */
        .footer-divider {
            height: 1px;
            background: linear-gradient(90deg, transparent 0%, var(--accent) 20%, var(--accent) 80%, transparent 100%);
            opacity: 0.3;
            margin-bottom: 48px;
        }

        /* ── 3-column grid layout ── */
        .footer-content {
            max-width: 1000px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 2fr 1fr 1fr;
            gap: 40px;
            padding-bottom: 40px;
        }

        /* ── Brand column ── */
        .footer-brand {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .footer-logo {
            font: var(--text-headline-lg);
            letter-spacing: 4px;
            transition: color var(--duration-medium) var(--motion-standard),
                        text-shadow var(--duration-medium) var(--motion-standard);
        }

        :root[data-theme="dark"] .footer-logo {
            color: var(--text-primary);
            text-shadow: 0 0 20px var(--glow-accent);
        }

        :root[data-theme="light"] .footer-logo {
            color: #1a1f1a;
        }

        .footer-logo-accent {
            color: var(--accent);
        }

        .footer-tagline {
            font: var(--text-label-lg);
            letter-spacing: 5px;
            color: var(--accent);
            animation: blink-underscore 1.2s infinite;
        }

        @keyframes blink-underscore {
            0%, 49% { opacity: 1; }
            50%, 100% { opacity: 0.4; }
        }

        .footer-desc {
            font: var(--text-body-sm);
            color: var(--text-muted);
            max-width: 280px;
            margin-top: 8px;
            line-height: 1.6;
        }

        /* ── Nav + Social columns ── */
        .footer-nav,
        .footer-social {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .footer-nav-heading {
            font: var(--text-label-sm);
            letter-spacing: 3px;
            color: var(--accent);
            margin-bottom: 4px;
            opacity: 0.7;
        }

        .footer-link {
            font: var(--text-label-md);
            letter-spacing: 2px;
            text-decoration: none;
            transition: all var(--duration-medium) var(--motion-standard);
            position: relative;
            width: fit-content;
        }

        :root[data-theme="dark"] .footer-link {
            color: var(--text-secondary);
        }

        :root[data-theme="light"] .footer-link {
            color: #666;
        }

        .footer-link:hover {
            color: var(--accent);
            padding-left: 8px;
        }

        .footer-link::before {
            content: '';
            position: absolute;
            left: -4px;
            top: 50%;
            transform: translateY(-50%);
            width: 0;
            height: 1px;
            background: var(--accent);
            transition: width var(--duration-medium) var(--motion-standard);
        }

        .footer-link:hover::before {
            width: 8px;
            left: -8px;
        }

        /* ── Social icons ── */
        .footer-social-icons {
            display: flex;
            gap: 12px;
        }

        .footer-social-link {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            border-radius: var(--shape-sm);
            border: 1px solid var(--outline);
            color: var(--text-secondary);
            transition: all var(--duration-medium) var(--motion-standard);
        }

        .footer-social-link:hover {
            color: var(--accent);
            border-color: var(--outline-accent);
            background: rgba(var(--state-layer), var(--state-hover));
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }

        :root[data-theme="dark"] .footer-social-link:hover {
            box-shadow: 0 4px 16px rgba(0, 255, 100, 0.1);
        }

        /* ── Bottom bar ── */
        .footer-bottom {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 0;
            border-top: 1px solid var(--outline-variant);
            max-width: 1000px;
            margin: 0 auto;
        }

        .footer-copy {
            font: var(--text-label-sm);
            letter-spacing: 1.5px;
            color: var(--text-muted);
        }

        .footer-status {
            display: flex;
            align-items: center;
            gap: 6px;
            font: var(--text-label-sm);
            letter-spacing: 1.5px;
            color: var(--text-muted);
        }

        .footer-status-dot {
            width: 6px;
            height: 6px;
            border-radius: var(--shape-full);
            background: var(--accent);
            animation: statusPulse 2s ease-in-out infinite;
        }

        @keyframes statusPulse {
            0%, 100% { opacity: 1; box-shadow: 0 0 4px var(--glow-accent); }
            50% { opacity: 0.4; box-shadow: none; }
        }

        /* ── Footer responsive ── */
        @media (max-width: 768px) {
            .footer-content {
                grid-template-columns: 1fr 1fr;
                gap: 32px;
            }

            .footer-brand {
                grid-column: 1 / -1;
            }

            .footer-desc {
                max-width: 100%;
            }
        }

        @media (max-width: 480px) {
            footer {
                margin-top: 40px;
            }

            .footer-divider {
                margin-bottom: 20px;
            }

            .footer-content {
                grid-template-columns: 1fr 1fr;
                gap: 20px;
                padding-bottom: 20px;
            }

            .footer-brand {
                grid-column: 1 / -1;
            }

            .footer-desc {
                display: none;
            }

            .footer-bottom {
                flex-direction: column;
                gap: 8px;
                align-items: flex-start;
                padding: 14px 0;
            }
        }

        /* ===== CART DRAWER ===== */

        .cart-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.45);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            z-index: 185;
            opacity: 0;
            visibility: hidden;
            transition: opacity var(--duration-medium) var(--motion-standard), visibility var(--duration-medium) var(--motion-standard);
        }

        :root[data-theme="light"] .cart-overlay {
            background: rgba(26, 31, 26, 0.25);
        }

        .cart-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .cart-drawer {
            position: fixed;
            top: 0;
            right: 0;
            width: 420px;
            height: 100%;
            z-index: 190;
            display: flex;
            flex-direction: column;
            transform: translateX(100%);
            transition: transform var(--duration-medium) var(--motion-emphasized);

            /* Liquid glass - dark mode */
            background: rgba(6, 10, 6, 0.6);
            backdrop-filter: blur(32px) saturate(1.6);
            -webkit-backdrop-filter: blur(32px) saturate(1.6);
            border-left: 1px solid rgba(0, 255, 100, 0.1);
            box-shadow:
                var(--elevation-5),
                -2px 0 20px rgba(0, 255, 100, 0.04),
                inset 1px 0 0 rgba(0, 255, 100, 0.06),
                inset 0 1px 0 rgba(255, 255, 255, 0.03);
        }

        :root[data-theme="light"] .cart-drawer {
            background: rgba(242, 245, 240, 0.6);
            backdrop-filter: blur(32px) saturate(1.8);
            -webkit-backdrop-filter: blur(32px) saturate(1.8);
            border-left: 1px solid rgba(0, 168, 22, 0.1);
            box-shadow:
                -8px 0 40px rgba(0, 0, 0, 0.06),
                -2px 0 20px rgba(0, 168, 22, 0.04),
                inset 1px 0 0 rgba(255, 255, 255, 0.8),
                inset 0 1px 0 rgba(255, 255, 255, 0.5);
        }

        .cart-drawer.active {
            transform: translateX(0);
        }

        /* Drawer Header */
        .cart-drawer-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: var(--space-lg) var(--space-lg) 20px;
            border-bottom: 1px solid var(--outline-variant);
        }

        :root[data-theme="light"] .cart-drawer-header {
            border-bottom: 1px solid var(--outline-variant);
        }

        .cart-drawer-header h2 {
            font: var(--text-headline-md);
            letter-spacing: 2px;
            color: var(--text-primary);
        }

        .cart-drawer-close {
            background: rgba(0, 255, 100, 0.04);
            border: 1px solid var(--outline);
            border-radius: var(--shape-full);
            width: 38px;
            height: 38px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all var(--duration-medium) var(--motion-standard);
            color: var(--text-secondary);
        }

        .cart-drawer-close:hover {
            background: rgba(255, 0, 0, var(--state-pressed));
            border-color: rgba(255, 0, 0, 0.3);
            color: var(--error);
        }

        :root[data-theme="light"] .cart-drawer-close {
            background: rgba(0, 0, 0, 0.04);
            border: 1px solid var(--outline);
        }

        /* Drawer Items */
        .cart-drawer-items {
            flex: 1;
            overflow-y: auto;
            padding: var(--space-md) var(--space-lg);
        }

        .cart-drawer-items::-webkit-scrollbar {
            width: var(--space-xs);
        }

        .cart-drawer-items::-webkit-scrollbar-thumb {
            background: rgba(var(--state-layer), 0.2);
            border-radius: var(--shape-xs);
        }

        .cart-drawer-item {
            display: flex;
            gap: 14px;
            padding: var(--space-md) 0;
            border-bottom: 1px solid var(--outline-variant);
            animation: cart-item-in var(--duration-medium) var(--motion-emphasized) both;
        }

        .cart-drawer-item:last-child {
            border-bottom: none;
        }

        .cart-drawer-item-img {
            width: 72px;
            height: 72px;
            border-radius: var(--shape-md);
            object-fit: cover;
            background: var(--surface-1);
            border: 1px solid var(--outline-variant);
        }

        :root[data-theme="light"] .cart-drawer-item-img {
            background: var(--surface-1);
            border: 1px solid var(--outline-variant);
        }

        .cart-drawer-item-details {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            min-width: 0;
        }

        .cart-drawer-item-name {
            font: var(--text-title-md);
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .cart-drawer-item-size {
            font: var(--text-label-md);
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 1px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .cart-drawer-item-price {
            font: var(--text-label-lg);
            color: var(--accent);
        }

        .cart-drawer-item-actions {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 6px;
        }

        .cart-drawer-qty {
            display: flex;
            align-items: center;
            gap: 0;
            border-radius: var(--shape-sm);
            overflow: hidden;
            border: 1px solid var(--outline);
        }


        .cart-drawer-qty button {
            background: var(--surface-1);
            border: none;
            color: var(--text-primary);
            width: 44px;
            height: 44px;
            font: var(--text-body-lg);
            cursor: pointer;
            transition: background var(--duration-short) var(--motion-standard);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        :root[data-theme="light"] .cart-drawer-qty button {
            background: var(--surface-1);
        }

        .cart-drawer-qty button:hover {
            background: rgba(var(--state-layer), var(--state-pressed));
            color: var(--accent);
        }

        .cart-drawer-qty span {
            width: 32px;
            text-align: center;
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-primary);
        }

        .cart-drawer-remove {
            background: none;
            border: none;
            color: var(--text-secondary);
            font: var(--text-label-md);
            cursor: pointer;
            padding: 2px 6px;
            border-radius: var(--shape-xs);
            transition: all var(--duration-short) var(--motion-standard);
        }

        .cart-drawer-remove:hover {
            color: var(--error);
            background: var(--error-container);
        }

        /* Empty State */
        .cart-drawer-empty {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            color: var(--text-secondary);
            gap: 12px;
            padding: 40px;
        }

        .cart-drawer-empty svg {
            opacity: 0.3;
        }

        .cart-drawer-empty p {
            font-size: 0.95rem;
        }

        /* Drawer Footer */
        .cart-drawer-footer {
            padding: 20px var(--space-lg) var(--space-lg);
            border-top: 1px solid var(--outline-variant);
            background: rgba(0, 0, 0, 0.2);
        }

        :root[data-theme="light"] .cart-drawer-footer {
            border-top: 1px solid var(--outline-variant);
            background: rgba(255, 255, 255, 0.3);
        }

        .cart-drawer-total {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: var(--space-md);
        }

        .cart-drawer-total span:first-child {
            font: var(--text-body-md);
            color: var(--text-secondary);
        }

        .cart-drawer-total span:last-child {
            font: var(--text-headline-md);
            font-size: 1.3rem;
            color: var(--accent);
        }

        .cart-drawer-checkout {
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, var(--accent-bright), var(--accent-dim));
            border: none;
            border-radius: var(--shape-md);
            color: var(--on-accent);
            font: var(--text-title-lg);
            letter-spacing: 1.5px;
            cursor: pointer;
            transition: all var(--duration-medium) var(--motion-standard);
        }

        .cart-drawer-checkout:hover {
            background: linear-gradient(135deg, var(--accent), var(--accent-bright));
            box-shadow: 0 0 24px var(--glow-accent);
            transform: translateY(-2px);
        }

        /* Stock limit toast */
        .cart-stock-toast {
            position: absolute;
            bottom: 90px;
            left: 50%;
            transform: translateX(-50%);
            background: var(--error);
            color: #fff;
            font: var(--text-label-md);
            letter-spacing: 0.03em;
            padding: 8px 18px;
            border-radius: var(--shape-full);
            white-space: nowrap;
            z-index: 10;
            animation: toast-in 0.3s var(--motion-standard), toast-out 0.3s var(--motion-standard) 2.2s forwards;
            pointer-events: none;
        }

        @keyframes toast-in {
            from { opacity: 0; transform: translateX(-50%) translateY(8px); }
            to   { opacity: 1; transform: translateX(-50%) translateY(0); }
        }
        @keyframes toast-out {
            from { opacity: 1; }
            to   { opacity: 0; }
        }

        /* Shake animation for + button at stock limit */
        .cart-drawer-qty button.shake {
            animation: btn-shake 0.4s ease;
        }

        @keyframes btn-shake {
            0%, 100% { transform: translateX(0); }
            20% { transform: translateX(-3px); }
            40% { transform: translateX(3px); }
            60% { transform: translateX(-2px); }
            80% { transform: translateX(2px); }
        }

        /* Disabled + button at stock limit */
        .cart-drawer-qty button:disabled {
            opacity: 0.3;
            cursor: not-allowed;
        }

        /* Iridescent edge glow on open */
        .cart-drawer::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 1px;
            height: 100%;
            background: linear-gradient(
                180deg,
                transparent 0%,
                rgba(0, 255, 100, 0.5) 25%,
                rgba(0, 255, 100, 0.2) 50%,
                rgba(0, 255, 100, 0.5) 75%,
                transparent 100%
            );
            opacity: 0;
            transition: opacity var(--duration-long) var(--motion-standard) 0.2s;
            pointer-events: none;
        }

        .cart-drawer.active::before {
            opacity: 1;
            animation: cart-edge-glow 4s ease-in-out infinite;
        }

        :root[data-theme="light"] .cart-drawer::before {
            background: linear-gradient(
                180deg,
                transparent 0%,
                rgba(0, 200, 0, 0.4) 25%,
                rgba(0, 180, 80, 0.15) 50%,
                rgba(0, 200, 0, 0.4) 75%,
                transparent 100%
            );
        }

        @keyframes cart-edge-glow {
            0%, 100% { opacity: 0.4; }
            50% { opacity: 1; }
        }

        @keyframes cart-item-in {
            from {
                opacity: 0;
                transform: translateX(24px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        /* Item removal animation */
        .cart-drawer-item.removing {
            animation: cart-item-out var(--duration-medium) var(--motion-standard) forwards;
            pointer-events: none;
        }

        @keyframes cart-item-out {
            to {
                opacity: 0;
                transform: translateX(-40px);
            }
        }

        /* Checkout button shimmer */
        .cart-drawer-checkout {
            position: relative;
            overflow: hidden;
        }

        .cart-drawer-checkout::after {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 60%;
            height: 100%;
            background: linear-gradient(
                90deg,
                transparent 0%,
                rgba(255, 255, 255, 0.25) 50%,
                transparent 100%
            );
            animation: checkout-shimmer 3s ease-in-out infinite;
        }

        @keyframes checkout-shimmer {
            0% { left: -100%; }
            40%, 100% { left: 150%; }
        }

        /* Empty state floating bag */
        .cart-drawer-empty svg {
            animation: float-bag 3s ease-in-out infinite;
        }

        @keyframes float-bag {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-8px); }
        }

        /* Responsive */
        /* M3 Compact — full-width cart on mobile */
        @media (max-width: 600px) {
            .cart-drawer {
                width: 100%;
            }
        }

/* ===== PRODUCT DETAILS PAGE ===== */

.pdp-container {
    min-height: 100vh;
    background: var(--bg-primary);
    padding: clamp(0.75rem, 3vw, 2rem);
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.pdp-container--transparent {
    background: transparent;
    z-index: 1;
}

/* Top bar: back link + cart + theme */
.pdp-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.pdp-top-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pdp-back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: clamp(0.65rem, 2vw, 0.75rem);
    font-weight: 700;
    letter-spacing: 1px;
    padding: var(--space-xs) clamp(var(--space-sm), 2vw, var(--space-md));
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--shape-xs);
    transition: color var(--duration-medium) var(--motion-standard),
                background var(--duration-medium) var(--motion-standard),
                border-color var(--duration-medium) var(--motion-standard);
}

.pdp-back-link:hover {
    color: var(--accent);
    background: rgba(0, 255, 100, 0.08);
    border-color: rgba(0, 255, 100, 0.25);
}

:root[data-theme="light"] .pdp-back-link {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.12);
}

:root[data-theme="light"] .pdp-back-link:hover {
    background: rgba(0, 168, 64, 0.08);
    border-color: rgba(0, 168, 64, 0.25);
}

.pdp-theme-toggle,
.pdp-cart-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--outline);
    color: var(--text-primary);
    width: 48px;
    height: 48px;
    border-radius: var(--shape-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--duration-medium) var(--motion-standard);
    backdrop-filter: blur(10px);
    position: relative;
}

.pdp-cart-btn svg {
    stroke-width: 2.5;
}

.pdp-theme-toggle:hover,
.pdp-cart-btn:hover {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--glow-accent);
}

.pdp-cart-btn .cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: var(--shape-full);
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
}

/* Loading skeleton */
.pdp-skeleton {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    animation: pdp-pulse 1.5s ease-in-out infinite;
}

@keyframes pdp-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pdp-skeleton-gallery {
    aspect-ratio: 1;
    background: var(--bg-secondary);
    border-radius: var(--shape-lg);
}

.pdp-skeleton-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1rem;
}

.pdp-skeleton-brand {
    width: 80px;
    height: 14px;
    background: var(--bg-secondary);
    border-radius: var(--shape-xs);
}

.pdp-skeleton-title {
    width: 70%;
    height: 32px;
    background: var(--bg-secondary);
    border-radius: var(--shape-sm);
}

.pdp-skeleton-price {
    width: 100px;
    height: 28px;
    background: var(--bg-secondary);
    border-radius: var(--shape-sm);
}

.pdp-skeleton-desc {
    width: 100%;
    height: 16px;
    background: var(--bg-secondary);
    border-radius: var(--shape-xs);
}

.pdp-skeleton-desc.short {
    width: 60%;
}

.pdp-skeleton-sizes {
    width: 100%;
    height: 44px;
    background: var(--bg-secondary);
    border-radius: var(--shape-sm);
    margin-top: 0.5rem;
}

.pdp-skeleton-btn {
    width: 100%;
    height: 52px;
    background: var(--bg-secondary);
    border-radius: var(--shape-md);
    margin-top: 0.5rem;
}

/* Product content */
.pdp-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Gallery */
.pdp-gallery {
    position: sticky;
    top: 2rem;
}

.pdp-main-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--shape-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--outline-variant);
    transition: transform var(--duration-medium) var(--motion-emphasized);
}

.pdp-main-image:hover {
    transform: scale(1.02);
}

.pdp-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.pdp-thumb {
    width: clamp(44px, 12vw, 72px);
    height: clamp(44px, 12vw, 72px);
    object-fit: cover;
    border-radius: var(--shape-md);
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.6;
    transition: all var(--duration-medium) var(--motion-standard);
    background: var(--bg-secondary);
}

.pdp-thumb:hover {
    opacity: 0.85;
}

.pdp-thumb.active {
    border-color: var(--accent);
    opacity: 1;
    box-shadow: 0 0 12px var(--glow-accent);
}

/* Product info */
.pdp-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 0.5rem;
}

.pdp-brand {
    font: var(--text-label-sm);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--outline-accent);
    border-radius: var(--shape-xs);
    background: var(--surface-1);
    width: fit-content;
}

:root[data-theme="light"] .pdp-brand {
    border-color: var(--outline-accent);
    background: var(--surface-1);
}

.pdp-name {
    font: var(--text-headline-lg);
    font-size: clamp(1rem, 3.5vw, 2.2rem);
    color: var(--text-primary);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdp-price {
    font: var(--text-headline-lg);
    font-size: clamp(1rem, 3.5vw, 2.2rem);
    color: var(--accent);
    margin: 0.25rem 0;
    text-shadow: 0 0 12px var(--glow-accent);
}

.pdp-description {
    font: var(--text-body-lg);
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0.5rem 0 1rem;
}

/* Size section */
.pdp-size-section {
    margin-top: 0.5rem;
}

.pdp-size-label {
    font: var(--text-label-md);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.75rem;
}

.pdp-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pdp-size-chip {
    font: var(--text-body-sm);
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border: 1.5px solid var(--outline);
    border-radius: var(--shape-sm);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--duration-medium) var(--motion-standard);
}

:root[data-theme="light"] .pdp-size-chip {
    border-color: var(--outline);
}

:root[data-theme="light"] .pdp-theme-toggle,
:root[data-theme="light"] .pdp-cart-btn {
    border-color: rgba(0,0,0,0.1);
}

.pdp-size-chip:hover {
    border-color: var(--accent);
    background: rgba(var(--state-layer), var(--state-hover));
}

.pdp-size-chip.active {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--on-accent);
    box-shadow: 0 0 15px var(--glow-accent);
}

:root[data-theme="light"] .pdp-size-chip.active {
    box-shadow: 0 0 12px var(--glow-accent);
}

.pdp-size-chip:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.pdp-size-chip.out-of-stock {
    opacity: 0.35;
    text-decoration: line-through;
    cursor: not-allowed;
    border-color: var(--error);
    color: var(--text-secondary);
    background: rgba(255, 59, 48, 0.06);
}

.pdp-size-chip.low-stock {
    border-color: var(--error);
    animation: low-stock-pulse 2s ease-in-out infinite;
    position: relative;
}

.pdp-size-chip.low-stock::after {
    content: attr(data-stock-label);
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--error);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: var(--shape-xs);
    white-space: nowrap;
    line-height: 1.3;
}

.pdp-no-sizes {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Stock info */
.pdp-stock-info {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-height: 1.2rem;
}

.pdp-stock-info.low-stock {
    color: var(--warning);
}

.pdp-stock-info.out-of-stock {
    color: var(--error);
}

/* Add to bag button */
.pdp-add-btn {
    width: 100%;
    padding: clamp(0.75rem, 2.5vw, 1rem);
    margin-top: 0.75rem;
    border: none;
    border-radius: var(--shape-md);
    background: var(--accent);
    color: var(--on-accent);
    font-family: var(--font-display);
    font-size: clamp(0.8rem, 2.5vw, 1rem);
    font-weight: 700;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all var(--duration-medium) var(--motion-standard);
    position: relative;
    overflow: hidden;
}

.pdp-add-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 45%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0.15) 55%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.pdp-add-btn:hover:not(:disabled)::after {
    animation: pdp-shimmer-sweep 0.6s ease-out;
}

@keyframes pdp-shimmer-sweep {
    0% { left: -100%; }
    100% { left: 100%; }
}

.pdp-add-btn:hover:not(:disabled) {
    box-shadow: 0 0 24px var(--glow-accent);
    transform: translateY(-2px);
}

.pdp-add-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

/* Error state */
.pdp-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 50vh;
    color: var(--text-secondary);
    text-align: center;
}

.pdp-error h2 {
    font-family: var(--font-display);
    color: var(--text-primary);
    margin: 0;
}

.pdp-error p {
    font-family: var(--font-body);
    font-size: 0.95rem;
    margin: 0;
}

.pdp-error-link {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.75rem 2rem;
    border: 1.5px solid var(--accent);
    border-radius: var(--shape-sm);
    color: var(--accent);
    text-decoration: none;
    font: var(--text-body-md);
    font-weight: 600;
    transition: all var(--duration-medium) var(--motion-standard);
}

.pdp-error-link:hover {
    background: var(--accent);
    color: var(--on-accent);
}

/* Entrance animations */
@keyframes pdp-fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.pdp-content.pdp-enter .pdp-gallery {
    animation: pdp-fade-in-up var(--duration-long) var(--motion-emphasized) both;
}

.pdp-content.pdp-enter .pdp-info {
    animation: pdp-fade-in-up var(--duration-long) var(--motion-emphasized) 0.1s both;
}

/* Ambient glow behind product image */
.pdp-gallery::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(0, 255, 100, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    filter: blur(40px);
}

:root[data-theme="light"] .pdp-gallery::before {
    background: radial-gradient(circle, rgba(0, 200, 0, 0.06) 0%, transparent 70%);
}

/* M3 Medium — stack PDP on tablets */
@media (max-width: 840px) {
    .pdp-skeleton {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .pdp-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .pdp-gallery {
        position: static;
    }
}

/* ── PDP: phone — name wraps instead of truncating ── */
@media (max-width: 480px) {
    .pdp-name {
        white-space: normal;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* Accessibility: disable animations for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .pdp-content.pdp-enter .pdp-gallery,
    .pdp-content.pdp-enter .pdp-info {
        animation: none;
    }
    .pdp-add-btn:hover:not(:disabled)::after {
        animation: none;
    }
}

/* ── PDP Sticky ATC Bar (mobile) ─────────────────── */

.pdp-sticky-bar {
    display: none;  /* hidden on desktop */
}

@media (max-width: 840px) {
    .pdp-sticky-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 90;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
        background: var(--glass-bg);
        backdrop-filter: blur(20px) saturate(1.6);
        -webkit-backdrop-filter: blur(20px) saturate(1.6);
        border-top: 1px solid var(--glass-border);
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
        transform: translateY(100%);
        opacity: 0;
        transition: transform var(--duration-medium) var(--motion-emphasized),
                    opacity var(--duration-medium) var(--motion-standard);
        pointer-events: none;
    }

    .pdp-sticky-bar.visible {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .pdp-sticky-bar-info {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
        min-width: 0;
        flex: 1;
    }

    .pdp-sticky-name {
        font: var(--text-body-sm);
        font-weight: 600;
        color: var(--text-primary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .pdp-sticky-price {
        font-family: var(--font-display);
        font-size: 0.85rem;
        font-weight: 700;
        color: var(--accent);
        text-shadow: 0 0 8px var(--glow-accent);
    }

    .pdp-sticky-atc {
        flex-shrink: 0;
        padding: 0.7rem 1.25rem;
        border: none;
        border-radius: var(--shape-md);
        background: var(--accent);
        color: var(--on-accent);
        font-family: var(--font-display);
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 1px;
        cursor: pointer;
        white-space: nowrap;
        transition: all var(--duration-short) var(--motion-standard);
        position: relative;
        overflow: hidden;
    }

    .pdp-sticky-atc::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
        pointer-events: none;
    }

    .pdp-sticky-atc:active:not(:disabled)::after {
        animation: pdp-shimmer-sweep 0.4s ease-out;
    }

    .pdp-sticky-atc:active:not(:disabled) {
        transform: scale(0.97);
    }

    .pdp-sticky-atc:disabled {
        opacity: 0.4;
        cursor: not-allowed;
        background: var(--bg-secondary);
        color: var(--text-secondary);
    }

    /* Give content breathing room so it doesn't hide behind the bar */
    .pdp-container {
        padding-bottom: 5rem;
    }
}

:root[data-theme="light"] .pdp-sticky-bar {
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
}

/* ===== PROFILE PAGE ===== */

/* Dropdown items as links (profile link in auth dropdown) */
a.dropdown-item {
    text-decoration: none;
    color: inherit;
}

/* Skeleton loading */
/* ═══════════════════════════════════════════════════════════
   PROFILE PAGE — HUD Terminal
   ═══════════════════════════════════════════════════════════ */

/* ── Skeleton loading ── */
.profile-skeleton {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: pdp-pulse 1.5s ease-in-out infinite;
}

.profile-skeleton-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.profile-skeleton-avatar {
    width: 120px;
    height: 120px;
    border-radius: var(--shape-full);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.profile-skeleton-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.profile-skeleton-name {
    width: 180px;
    height: 28px;
    background: var(--bg-secondary);
}

.profile-skeleton-email {
    width: 220px;
    height: 16px;
    background: var(--bg-secondary);
}

.profile-skeleton-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.profile-skeleton-stat {
    height: 110px;
    background: var(--bg-secondary);
}

.profile-skeleton-orders {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-skeleton-order {
    height: 100px;
    background: var(--bg-secondary);
}

/* ── Profile content — entrance animations ── */
.profile-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-content.profile-enter .profile-card {
    animation: pdp-fade-in-up var(--duration-long) var(--motion-emphasized) both;
}

.profile-content.profile-enter .profile-stats {
    animation: pdp-fade-in-up var(--duration-long) var(--motion-emphasized) 0.1s both;
}

.profile-content.profile-enter .profile-actions {
    animation: pdp-fade-in-up var(--duration-long) var(--motion-emphasized) 0.15s both;
}

.profile-content.profile-enter .profile-orders-card {
    animation: pdp-fade-in-up var(--duration-long) var(--motion-emphasized) 0.2s both;
}

.profile-content.profile-enter .profile-achievements-card {
    animation: pdp-fade-in-up var(--duration-long) var(--motion-emphasized) 0.3s both;
}

/* ── Main profile card (HUD frame) ── */
.profile-card {
    position: relative;
    background: rgba(10, 10, 15, 0.92);
    border: 3px solid rgba(0, 255, 100, 0.2);
    padding: var(--space-lg) var(--space-xl);
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 100, 0.08),
                0 0 60px rgba(0, 255, 100, 0.03),
                inset 0 0 30px rgba(0, 255, 100, 0.02);
}

:root[data-theme="light"] .profile-card {
    background: rgba(255, 255, 255, 0.88);
    border-width: 2px;
    border-color: rgba(0, 168, 64, 0.25);
    box-shadow: 0 2px 20px rgba(0, 168, 64, 0.08),
                0 0 40px rgba(0, 168, 64, 0.03);
}

/* ── Profile scanlines ── */
.profile-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.015) 2px,
        rgba(255, 255, 255, 0.015) 4px
    );
    pointer-events: none;
    z-index: 1;
}

:root[data-theme="light"] .profile-scanlines {
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 140, 18, 0.02) 2px,
        rgba(0, 140, 18, 0.02) 4px
    );
}

/* ── Profile header (avatar + identity + XP) ── */
.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 2;
}

/* ── Avatar with dual rotating ring ── */
.profile-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 120px;
    height: 120px;
}

.profile-avatar-ring {
    position: absolute;
    inset: -8px;
    border-radius: var(--shape-full);
    border: 2px solid transparent;
    border-top-color: var(--accent);
    border-right-color: var(--accent);
    opacity: 0.6;
    will-change: transform;
    animation: profile-ring-cw 3s linear infinite;
}

.profile-avatar-ring-inner {
    inset: -4px;
    border-top-color: transparent;
    border-right-color: transparent;
    border-bottom-color: var(--accent-bright);
    border-left-color: var(--accent-bright);
    opacity: 0.4;
    will-change: transform;
    animation: profile-ring-ccw 2s linear infinite;
}

@keyframes profile-ring-cw {
    to { transform: rotate(360deg); }
}

@keyframes profile-ring-ccw {
    to { transform: rotate(-360deg); }
}

:root[data-theme="light"] .profile-avatar-ring {
    border-top-color: var(--accent-hover);
    border-right-color: var(--accent-hover);
    opacity: 0.5;
}

:root[data-theme="light"] .profile-avatar-ring-inner {
    border-bottom-color: var(--accent);
    border-left-color: var(--accent);
    opacity: 0.3;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: var(--shape-full);
    object-fit: cover;
    border: 3px solid var(--bg-primary);
    background: var(--bg-primary);
    position: relative;
    z-index: 1;
}

:root[data-theme="dark"] .profile-avatar {
    box-shadow: 0 0 30px rgba(0, 255, 100, 0.15), 0 0 60px rgba(0, 255, 100, 0.05);
}

:root[data-theme="light"] .profile-avatar {
    box-shadow: 0 0 20px rgba(0, 168, 22, 0.12);
}

.profile-avatar-upload {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    border-radius: var(--shape-full);
    background: var(--accent);
    color: var(--on-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform var(--duration-short) var(--motion-standard), box-shadow var(--duration-short) var(--motion-standard);
    border: 2px solid var(--bg-primary);
    z-index: 3;
    opacity: 0;
    transition: transform var(--duration-short) var(--motion-standard),
                box-shadow var(--duration-short) var(--motion-standard),
                opacity var(--duration-short) var(--motion-standard);
}

.profile-avatar-wrapper:hover .profile-avatar-upload,
.profile-avatar-upload:focus-visible {
    opacity: 1;
}

/* Always show upload button on touch devices */
@media (hover: none) {
    .profile-avatar-upload {
        opacity: 0.8;
    }
}

.profile-avatar-upload:hover {
    transform: translateX(-50%) scale(1.15);
    box-shadow: 0 0 15px var(--glow-accent-strong);
}

/* Avatar uploading state */
.profile-avatar.uploading {
    opacity: 0.4;
    filter: blur(2px);
}

.profile-avatar-wrapper.uploading .profile-avatar-upload {
    pointer-events: none;
    opacity: 0.5;
}

.profile-avatar-wrapper.uploading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid transparent;
    border-top-color: var(--accent);
    border-radius: var(--shape-full);
    animation: profile-spin 0.7s linear infinite;
    z-index: 4;
}

@keyframes profile-spin {
    to { transform: rotate(360deg); }
}

/* Avatar upload error */
.profile-avatar-error {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    font: var(--text-label-sm);
    color: var(--error);
    white-space: nowrap;
    animation: pdp-fade-in-up var(--duration-medium) var(--motion-emphasized) both;
}

/* ── Identity: username + email + XP ── */
.profile-identity {
    flex: 1;
    min-width: 0;
}

.profile-name-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.profile-username {
    font: var(--text-headline-lg);
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    animation: auth-glitch 4s ease infinite;
}

.profile-username::before {
    content: '[ ';
    color: var(--accent);
    font-weight: 700;
}

.profile-username::after {
    content: ' ]';
    color: var(--accent);
    font-weight: 700;
}

/* Rank badge — color set dynamically via --rank-color */
.profile-rank-badge {
    font: var(--text-label-sm);
    letter-spacing: 1px;
    padding: 3px 10px;
    color: var(--rank-color, #8a8a8a);
    background: color-mix(in srgb, var(--rank-color, #8a8a8a) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--rank-color, #8a8a8a) 30%, transparent);
    box-shadow: 0 0 8px color-mix(in srgb, var(--rank-color, #8a8a8a) 25%, transparent),
                0 0 20px color-mix(in srgb, var(--rank-color, #8a8a8a) 10%, transparent);
    transition: color var(--duration-medium) var(--motion-standard),
                background var(--duration-medium) var(--motion-standard),
                border-color var(--duration-medium) var(--motion-standard),
                box-shadow var(--duration-medium) var(--motion-standard);
}

.profile-email {
    font: var(--text-body-sm);
    color: var(--text-secondary);
    margin: 0.4rem 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

/* ── Level / XP bar ── */
.profile-xp-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.profile-level {
    font: var(--text-label-md);
    color: var(--accent);
    letter-spacing: 1px;
    white-space: nowrap;
}

.profile-xp-bar {
    flex: 1;
    height: 10px;
    background: rgba(0, 255, 100, 0.08);
    border: 1px solid rgba(0, 255, 100, 0.2);
    overflow: hidden;
    position: relative;
}

:root[data-theme="light"] .profile-xp-bar {
    background: rgba(0, 168, 64, 0.06);
    border-color: rgba(0, 168, 64, 0.18);
}

.profile-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff64 0%, #00ffd5 40%, #00d4ff 65%, #ff00ff 100%);
    box-shadow: 0 0 12px rgba(0, 255, 100, 0.5), 0 0 4px rgba(0, 255, 100, 0.8);
    transition: width var(--duration-xl) var(--motion-emphasized);
    position: relative;
}

/* Bright edge tick at the end of the fill */
.profile-xp-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

:root[data-theme="light"] .profile-xp-fill {
    background: linear-gradient(90deg, #00a842 0%, #00b89c 40%, #0099cc 65%, #cc00cc 100%);
    box-shadow: 0 0 8px rgba(0, 168, 64, 0.4);
}

:root[data-theme="light"] .profile-xp-fill::after {
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 4px rgba(0, 168, 64, 0.5);
}

.profile-xp-text {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--accent);
    opacity: 0.6;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* ── Stats bar — HUD stat cards ── */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.profile-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem 1.25rem;
    text-align: center;
    position: relative;
    background: rgba(10, 10, 15, 0.92);
    border: 2px solid rgba(0, 255, 100, 0.15);
    overflow: hidden;
    transition: border-color var(--duration-medium) var(--motion-standard),
                box-shadow var(--duration-medium) var(--motion-standard);
    box-shadow: 0 0 15px rgba(0, 255, 100, 0.05),
                inset 0 0 20px rgba(0, 255, 100, 0.02);
}

:root[data-theme="light"] .profile-stat-card {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(0, 168, 64, 0.2);
    box-shadow: 0 2px 12px rgba(0, 168, 64, 0.06);
}

.profile-stat-card:hover {
    border-color: rgba(0, 255, 100, 0.35);
    box-shadow: 0 0 25px rgba(0, 255, 100, 0.1),
                inset 0 0 30px rgba(0, 255, 100, 0.03);
}

:root[data-theme="light"] .profile-stat-card:hover {
    border-color: rgba(0, 168, 64, 0.4);
    box-shadow: 0 2px 20px rgba(0, 168, 64, 0.1);
}

.profile-stat-icon {
    color: var(--accent);
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.profile-stat-label {
    font: var(--text-label-md);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

.profile-stat-value {
    font: var(--text-headline-lg);
    color: var(--accent);
    text-shadow: 0 0 12px var(--glow-accent);
}

:root[data-theme="light"] .profile-stat-value {
    color: var(--accent-hover);
}

/* ── Log out button ── */
.profile-actions {
    display: flex;
    justify-content: flex-end;
}

.profile-logout-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.6rem 2rem;
    background: rgba(255, 60, 60, 0.08);
    border: 2px solid rgba(255, 100, 100, 0.2);
    color: var(--error-hover);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(255, 60, 60, 0.05);
    transition: background var(--duration-short) var(--motion-standard),
                border-color var(--duration-short) var(--motion-standard),
                box-shadow var(--duration-short) var(--motion-standard);
}

.profile-logout-btn:hover {
    background: rgba(255, 60, 60, 0.15);
    border-color: var(--error-hover);
    box-shadow: 0 0 20px rgba(255, 60, 60, 0.15);
}

:root[data-theme="light"] .profile-logout-btn {
    background: rgba(200, 30, 30, 0.06);
    border-color: rgba(200, 50, 50, 0.25);
    color: #c41e1e;
}

:root[data-theme="light"] .profile-logout-btn:hover {
    background: rgba(200, 30, 30, 0.12);
    border-color: #c41e1e;
}

/* ── Achievements card ── */
.profile-achievements-card {
    position: relative;
    background: rgba(10, 10, 15, 0.92);
    border: 3px solid rgba(255, 215, 0, 0.2);
    padding: 0;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.06),
                0 0 50px rgba(255, 215, 0, 0.02),
                inset 0 0 25px rgba(255, 215, 0, 0.02);
}

:root[data-theme="light"] .profile-achievements-card {
    background: rgba(255, 255, 255, 0.88);
    border-width: 2px;
    border-color: rgba(184, 150, 12, 0.25);
    box-shadow: 0 2px 18px rgba(184, 150, 12, 0.06);
}

/* Achievements dropdown button */
.achievements-dropdown-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg) var(--space-lg);
    background: rgba(255, 215, 0, 0.04);
    border: none;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: #ffd700;
    position: relative;
    overflow: hidden;
    animation: btn-glitch-strike 5s infinite;
}

/* Lightning flash overlay */
.achievements-dropdown-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 215, 0, 0.3) 45%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 215, 0, 0.3) 55%, transparent 100%);
    opacity: 0;
    animation: lightning-sweep 5s infinite;
    pointer-events: none;
}

/* Horizontal screen-tear line */
.achievements-dropdown-btn::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 225, 50, 0.9);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.4);
    opacity: 0;
    animation: scanline-tear 5s infinite;
    pointer-events: none;
}

/* The whole button glitches — shifts, flickers, border flash */
@keyframes btn-glitch-strike {
    0%, 100% {
        transform: none;
        box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.08);
        background: rgba(255, 215, 0, 0.04);
    }
    /* Calm phase */
    80% {
        transform: none;
        box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.08);
        background: rgba(255, 215, 0, 0.04);
    }
    /* STRIKE — hard jolt left */
    81% {
        transform: translateX(-3px) skewX(-1deg);
        box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.8),
                    0 0 15px rgba(255, 215, 0, 0.4),
                    3px 0 0 rgba(255, 255, 200, 0.3);
        background: rgba(255, 215, 0, 0.12);
    }
    /* Snap right */
    82% {
        transform: translateX(2px) skewX(0.5deg);
        box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.6),
                    0 0 25px rgba(255, 215, 0, 0.3),
                    -2px 0 0 rgba(255, 200, 0, 0.4);
        background: rgba(255, 215, 0, 0.15);
    }
    /* Flash white-hot */
    83% {
        transform: translateX(-1px);
        box-shadow: inset 0 0 0 1px rgba(255, 235, 100, 1),
                    0 0 40px rgba(255, 215, 0, 0.5),
                    0 0 80px rgba(255, 215, 0, 0.2);
        background: rgba(255, 225, 50, 0.2);
    }
    /* Aftershock */
    84% {
        transform: translateX(1px) skewX(-0.3deg);
        box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.3),
                    0 0 10px rgba(255, 215, 0, 0.15);
        background: rgba(255, 215, 0, 0.08);
    }
    /* Settle */
    86% {
        transform: none;
        box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.1);
        background: rgba(255, 215, 0, 0.04);
    }
}

/* Lightning bolt sweeps across button */
@keyframes lightning-sweep {
    0%, 80%, 86%, 100% { opacity: 0; transform: translateX(-100%); }
    81% { opacity: 1; transform: translateX(-60%); }
    83% { opacity: 1; transform: translateX(120%); }
    84% { opacity: 0; transform: translateX(120%); }
}

/* Horizontal tear line races across */
@keyframes scanline-tear {
    0%, 80%, 85%, 100% { opacity: 0; top: 50%; }
    81% { opacity: 1; top: 30%; }
    82% { opacity: 0.8; top: 70%; }
    83% { opacity: 1; top: 20%; }
    84% { opacity: 0; top: 60%; }
}

.achievements-dropdown-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.25),
                0 0 12px rgba(255, 215, 0, 0.1);
}

.achievements-dropdown-btn svg:first-child {
    width: 18px;
    height: 18px;
    color: #ffd700;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.5));
}

:root[data-theme="light"] .achievements-dropdown-btn {
    background: rgba(184, 150, 12, 0.06);
    color: #b8960c;
}

:root[data-theme="light"] .achievements-dropdown-btn:hover {
    background: rgba(184, 150, 12, 0.1);
}

:root[data-theme="light"] .achievements-dropdown-btn svg:first-child {
    color: #b8960c;
    filter: drop-shadow(0 0 3px rgba(184, 150, 12, 0.4));
}

/* Button text — no individual glitch, rides with the whole button */
.achievements-btn-text {
    position: relative;
    flex: 1;
    text-align: left;
    font-weight: 700;
}

/* IMPORTANT tag */
.achievements-btn-tag {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 4px 12px;
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.35);
    color: #ffd700;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.2),
                0 0 20px rgba(255, 215, 0, 0.08);
    animation: tag-pulse 2s ease-in-out infinite;
}

:root[data-theme="light"] .achievements-btn-tag {
    background: rgba(184, 150, 12, 0.1);
    border-color: rgba(184, 150, 12, 0.3);
    color: #b8960c;
    box-shadow: 0 0 6px rgba(184, 150, 12, 0.15),
                0 0 16px rgba(184, 150, 12, 0.06);
}

@keyframes tag-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Chevron rotation */
.achievements-chevron {
    color: #ffd700;
    transition: transform var(--duration-medium) var(--motion-standard);
}

:root[data-theme="light"] .achievements-chevron {
    color: #b8960c;
}

.achievements-dropdown-btn[aria-expanded="true"] .achievements-chevron {
    transform: rotate(180deg);
}

/* Collapsed content */
.achievements-collapsed {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--duration-medium) var(--motion-standard),
                padding var(--duration-medium) var(--motion-standard);
    padding: 0 var(--space-xl);
}

.achievements-expanded {
    max-height: 600px;
    overflow: hidden;
    padding: var(--space-lg) var(--space-xl);
    transition: max-height var(--duration-long) var(--motion-standard),
                padding var(--duration-medium) var(--motion-standard);
}

.profile-achievements-header {
    display: none; /* Header replaced by dropdown button */
}

/* ── Orders dropdown button (blue themed) ── */
.orders-dropdown-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-xl);
    background: rgba(74, 158, 255, 0.06);
    border: none;
    border-bottom: 1px solid rgba(74, 158, 255, 0.1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    font: var(--text-label-lg);
    color: #4a9eff;
    letter-spacing: 0.15em;
    transition: background var(--duration-short) var(--motion-standard);
}
.orders-dropdown-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(74, 158, 255, 0.08), transparent);
    opacity: 0;
    transition: opacity var(--duration-short);
}
.orders-dropdown-btn:hover::before { opacity: 1; }
.orders-dropdown-btn:hover {
    background: rgba(74, 158, 255, 0.1);
    box-shadow: inset 0 0 0 1px rgba(74, 158, 255, 0.25),
                0 0 20px rgba(74, 158, 255, 0.08);
}
.orders-dropdown-btn svg:first-child {
    width: 18px;
    height: 18px;
    color: #4a9eff;
    filter: drop-shadow(0 0 4px rgba(74, 158, 255, 0.5));
}
:root[data-theme="light"] .orders-dropdown-btn {
    background: rgba(37, 99, 200, 0.06);
    color: #2563c8;
}
:root[data-theme="light"] .orders-dropdown-btn:hover {
    background: rgba(37, 99, 200, 0.1);
}
:root[data-theme="light"] .orders-dropdown-btn svg:first-child {
    color: #2563c8;
    filter: drop-shadow(0 0 3px rgba(37, 99, 200, 0.4));
}
.orders-btn-text {
    flex: 1;
    text-align: left;
    position: relative;
}
.orders-btn-tag {
    font: var(--text-label-sm);
    padding: 2px 8px;
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.2);
    color: #4a9eff;
    letter-spacing: 0.12em;
}
:root[data-theme="light"] .orders-btn-tag {
    background: rgba(37, 99, 200, 0.08);
    border-color: rgba(37, 99, 200, 0.2);
    color: #2563c8;
}
.orders-chevron {
    color: #4a9eff;
    transition: transform var(--duration-medium) var(--motion-standard);
    flex-shrink: 0;
}
:root[data-theme="light"] .orders-chevron { color: #2563c8; }
.orders-dropdown-btn[aria-expanded="true"] .orders-chevron {
    transform: rotate(180deg);
}

/* Collapsed / expanded states */
.orders-collapsed {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--duration-medium) var(--motion-standard),
                padding var(--duration-medium) var(--motion-standard);
    padding: 0 var(--space-xl);
}
.orders-expanded {
    max-height: 2000px;
    overflow: hidden;
    padding: var(--space-lg) var(--space-xl);
    transition: max-height var(--duration-long) var(--motion-standard),
                padding var(--duration-medium) var(--motion-standard);
}

/* ── Leaderboard link on profile page ── */
.profile-leaderboard-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-xl);
    background: rgba(255, 68, 204, 0.04);
    border: 2px solid rgba(255, 68, 204, 0.15);
    text-decoration: none;
    font: var(--text-label-lg);
    color: #ff44cc;
    letter-spacing: 0.15em;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(255, 68, 204, 0.05),
                inset 0 0 20px rgba(255, 68, 204, 0.02);
    transition: background var(--duration-short) var(--motion-standard),
                border-color var(--duration-short) var(--motion-standard),
                box-shadow var(--duration-short) var(--motion-standard);
}
.profile-leaderboard-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 68, 204, 0.06), transparent);
    opacity: 0;
    transition: opacity var(--duration-short);
}
.profile-leaderboard-link:hover::before { opacity: 1; }
.profile-leaderboard-link:hover {
    background: rgba(255, 68, 204, 0.08);
    border-color: rgba(255, 68, 204, 0.25);
    box-shadow: 0 0 20px rgba(255, 68, 204, 0.08);
}
.profile-leaderboard-link svg:first-child {
    color: #ff44cc;
    filter: drop-shadow(0 0 4px rgba(255, 68, 204, 0.5));
}
.profile-leaderboard-text {
    flex: 1;
    text-align: left;
}
.profile-leaderboard-tag {
    font: var(--text-label-sm);
    padding: 2px 8px;
    background: rgba(255, 68, 204, 0.1);
    border: 1px solid rgba(255, 68, 204, 0.2);
    color: #ff44cc;
    letter-spacing: 0.12em;
}
.profile-leaderboard-arrow {
    color: #ff44cc;
    flex-shrink: 0;
    transition: transform var(--duration-short) var(--motion-standard);
}
.profile-leaderboard-link:hover .profile-leaderboard-arrow {
    transform: translateX(3px);
}
:root[data-theme="light"] .profile-leaderboard-link {
    background: rgba(204, 0, 153, 0.04);
    border-color: rgba(204, 0, 153, 0.12);
    color: #cc0099;
}
:root[data-theme="light"] .profile-leaderboard-link:hover {
    background: rgba(204, 0, 153, 0.08);
    border-color: rgba(204, 0, 153, 0.25);
}
:root[data-theme="light"] .profile-leaderboard-link svg:first-child { color: #cc0099; }
:root[data-theme="light"] .profile-leaderboard-tag {
    background: rgba(204, 0, 153, 0.08);
    border-color: rgba(204, 0, 153, 0.2);
    color: #cc0099;
}
:root[data-theme="light"] .profile-leaderboard-arrow { color: #cc0099; }

.profile-section-title {
    font: var(--text-headline-md);
    letter-spacing: 3px;
    color: var(--text-primary);
    margin: 0;
    position: relative;
    padding-left: var(--space-md);
    text-shadow: 0 0 15px var(--glow-accent);
}

.profile-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--accent);
}

.profile-achievements {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 2;
}

/* Hexagonal achievement badge */
.profile-achievement {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 80px;
}

.profile-achievement-hex {
    width: 56px;
    height: 56px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 100, 0.08);
    border: none;
    transition: all var(--duration-medium) var(--motion-standard);
    position: relative;
}

.profile-achievement-hex svg {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
    transition: color var(--duration-medium) var(--motion-standard);
}

.profile-achievement-name {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-align: center;
    text-transform: uppercase;
    line-height: 1.3;
}

/* Unlocked achievement — uses per-achievement --ach-color */
.profile-achievement.unlocked .profile-achievement-hex {
    background: color-mix(in srgb, var(--ach-color, var(--accent)) 15%, transparent);
    box-shadow: 0 0 20px color-mix(in srgb, var(--ach-color, var(--accent)) 20%, transparent),
                inset 0 0 10px color-mix(in srgb, var(--ach-color, var(--accent)) 10%, transparent);
}

.profile-achievement.unlocked .profile-achievement-hex svg {
    color: var(--ach-color, var(--accent));
}

.profile-achievement.unlocked .profile-achievement-name {
    color: var(--ach-color, var(--accent));
}

:root[data-theme="light"] .profile-achievement-hex {
    background: rgba(0, 168, 64, 0.06);
    box-shadow: inset 0 0 0 1px rgba(0, 168, 64, 0.15);
}

:root[data-theme="light"] .profile-achievement.unlocked .profile-achievement-hex {
    background: color-mix(in srgb, var(--ach-color, var(--accent-hover)) 12%, transparent);
    box-shadow: 0 0 12px color-mix(in srgb, var(--ach-color, var(--accent-hover)) 20%, transparent),
                inset 0 0 0 1.5px color-mix(in srgb, var(--ach-color, var(--accent-hover)) 35%, transparent);
}

:root[data-theme="light"] .profile-achievement.unlocked .profile-achievement-hex svg {
    color: color-mix(in srgb, var(--ach-color, var(--accent-hover)) 85%, #333);
}

:root[data-theme="light"] .profile-achievement.unlocked .profile-achievement-name {
    color: color-mix(in srgb, var(--ach-color, var(--accent-hover)) 80%, #333);
}

/* Locked achievement — lock icon overlay */
.profile-achievement.locked .profile-achievement-hex::after {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: rgba(0, 0, 0, 0.3);
}

:root[data-theme="light"] .profile-achievement.locked .profile-achievement-hex::after {
    background: rgba(255, 255, 255, 0.4);
}

/* Achievement progress indicator */
.profile-achievement-progress {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-align: center;
}

.profile-achievement-progress.complete {
    color: var(--accent);
}

:root[data-theme="light"] .profile-achievement-progress.complete {
    color: var(--accent-hover);
}

.profile-achievement-bar {
    width: 100%;
    height: 3px;
    background: rgba(0, 255, 100, 0.08);
    overflow: hidden;
    margin-top: 2px;
}

.profile-achievement-bar-fill {
    height: 100%;
    background: var(--accent);
    opacity: 0.5;
    transition: width var(--duration-long) var(--motion-emphasized);
}

:root[data-theme="light"] .profile-achievement-bar {
    background: rgba(0, 168, 64, 0.06);
}

:root[data-theme="light"] .profile-achievement-bar-fill {
    background: var(--accent-hover);
}

/* ── Wishlist card (dropdown) ── */
.profile-wishlist-card {
    position: relative;
    background: rgba(10, 10, 15, 0.92);
    border: 2px solid rgba(255, 40, 40, 0.18);
    overflow: hidden;
    box-shadow: 0 0 18px rgba(255, 40, 40, 0.06),
                inset 0 0 25px rgba(255, 40, 40, 0.02);
}

:root[data-theme="light"] .profile-wishlist-card {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(200, 40, 40, 0.18);
    box-shadow: 0 2px 15px rgba(200, 40, 40, 0.06);
}

.wishlist-dropdown-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-xl);
    background: rgba(255, 40, 40, 0.04);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    font: var(--text-label-lg);
    color: #ff4444;
    letter-spacing: 0.15em;
    transition: background var(--duration-short) var(--motion-standard);
}
.wishlist-dropdown-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 40, 40, 0.08), transparent);
    opacity: 0;
    transition: opacity var(--duration-short);
}
.wishlist-dropdown-btn:hover::before { opacity: 1; }
.wishlist-dropdown-btn:hover {
    background: rgba(255, 40, 40, 0.1);
    box-shadow: inset 0 0 0 1px rgba(255, 40, 40, 0.25),
                0 0 20px rgba(255, 40, 40, 0.08);
}
.wishlist-dropdown-btn svg:first-child {
    width: 18px;
    height: 18px;
    color: #ff4444;
    filter: drop-shadow(0 0 4px rgba(255, 40, 40, 0.5));
}
:root[data-theme="light"] .wishlist-dropdown-btn {
    background: rgba(200, 40, 40, 0.06);
    color: #cc2020;
}
:root[data-theme="light"] .wishlist-dropdown-btn:hover {
    background: rgba(200, 40, 40, 0.1);
}
:root[data-theme="light"] .wishlist-dropdown-btn svg:first-child {
    color: #cc2020;
    filter: drop-shadow(0 0 3px rgba(200, 40, 40, 0.4));
}
.wishlist-btn-text {
    flex: 1;
    text-align: left;
    position: relative;
}
.wishlist-btn-tag {
    font: var(--text-label-sm);
    padding: 2px 8px;
    background: rgba(255, 40, 40, 0.1);
    border: 1px solid rgba(255, 40, 40, 0.2);
    color: #ff4444;
    letter-spacing: 0.12em;
}
:root[data-theme="light"] .wishlist-btn-tag {
    background: rgba(200, 40, 40, 0.08);
    border-color: rgba(200, 40, 40, 0.2);
    color: #cc2020;
}
.wishlist-chevron {
    color: #ff4444;
    transition: transform var(--duration-medium) var(--motion-standard);
    flex-shrink: 0;
}
:root[data-theme="light"] .wishlist-chevron { color: #cc2020; }
.wishlist-dropdown-btn[aria-expanded="true"] .wishlist-chevron {
    transform: rotate(180deg);
}

.wishlist-collapsed {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--duration-medium) var(--motion-standard),
                padding var(--duration-medium) var(--motion-standard);
    padding: 0 var(--space-xl);
}
.wishlist-expanded {
    max-height: 2000px;
    overflow: hidden;
    padding: var(--space-lg) var(--space-xl);
    transition: max-height var(--duration-long) var(--motion-standard),
                padding var(--duration-medium) var(--motion-standard);
}

/* Wishlist items */
.profile-wishlist-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid rgba(255, 40, 40, 0.08);
}
.profile-wishlist-item:last-child { border-bottom: none; }

.profile-wishlist-item-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: var(--shape-sm);
    background: rgba(255, 255, 255, 0.03);
}
:root[data-theme="light"] .profile-wishlist-item-img {
    background: #f5f7f4;
}

.profile-wishlist-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.profile-wishlist-item-name {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-wishlist-item-price {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
}

.profile-wishlist-item-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.profile-wishlist-view-btn {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    padding: 4px 10px;
    border: 1px solid rgba(255, 40, 40, 0.2);
    color: #ff4444;
    text-decoration: none;
    transition: all var(--duration-short) var(--motion-standard);
}
.profile-wishlist-view-btn:hover {
    background: rgba(255, 40, 40, 0.1);
    border-color: rgba(255, 40, 40, 0.4);
}
:root[data-theme="light"] .profile-wishlist-view-btn {
    color: #cc2020;
    border-color: rgba(200, 40, 40, 0.2);
}

.profile-wishlist-remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--outline-variant);
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--duration-short) var(--motion-standard);
}
.profile-wishlist-remove-btn:hover {
    color: #ff2828;
    border-color: rgba(255, 40, 40, 0.4);
    background: rgba(255, 40, 40, 0.08);
}

.profile-content.profile-enter .profile-wishlist-card {
    animation: pdp-fade-in-up var(--duration-long) var(--motion-emphasized) 0.18s both;
}

/* ── Danger Zone (account deletion) ── */
.profile-danger-zone {
    margin-top: var(--space-xl);
    padding: var(--space-lg) var(--space-xl);
    border: 2px solid rgba(255, 40, 40, 0.25);
    border-radius: var(--shape-md);
    background: rgba(255, 40, 40, 0.04);
}
:root[data-theme="light"] .profile-danger-zone {
    background: rgba(255, 40, 40, 0.06);
    border-color: rgba(200, 30, 30, 0.2);
}
.danger-zone-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #ff4444;
    margin: 0 0 var(--space-sm);
}
.danger-zone-desc {
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0 0 var(--space-md);
    line-height: 1.5;
}
.danger-zone-btn {
    font-family: var(--font-label);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    padding: var(--space-sm) var(--space-lg);
    background: transparent;
    border: 1.5px solid #ff4444;
    color: #ff4444;
    border-radius: var(--shape-sm);
    cursor: pointer;
    transition: background var(--motion-standard), color var(--motion-standard);
}
.danger-zone-btn:hover {
    background: #ff4444;
    color: #fff;
}

/* Delete account modal */
.delete-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.delete-modal-overlay.hidden { display: none; }
.delete-modal {
    width: min(400px, 90vw);
    padding: var(--space-xl);
    background: var(--bg-primary, #0a0a0f);
    border: 2px solid rgba(255, 40, 40, 0.3);
    border-radius: var(--shape-lg);
    box-shadow: 0 0 40px rgba(255, 40, 40, 0.1);
}
:root[data-theme="light"] .delete-modal {
    background: #fff;
    border-color: rgba(200, 30, 30, 0.25);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}
.delete-modal-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: #ff4444;
    margin: 0 0 var(--space-sm);
}
.delete-modal-desc {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 0 var(--space-lg);
}
.delete-modal-desc strong {
    color: #ff4444;
    font-family: var(--font-label);
}
.delete-confirm-input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-label);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--shape-sm);
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--motion-standard);
    box-sizing: border-box;
    margin-bottom: var(--space-lg);
}
.delete-confirm-input:focus {
    border-color: #ff4444;
}
:root[data-theme="light"] .delete-confirm-input {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
}
.delete-modal-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
}
.delete-modal-cancel {
    font-family: var(--font-label);
    font-size: 0.8rem;
    padding: var(--space-sm) var(--space-lg);
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    border-radius: var(--shape-sm);
    cursor: pointer;
    transition: border-color var(--motion-standard), color var(--motion-standard);
}
.delete-modal-cancel:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}
:root[data-theme="light"] .delete-modal-cancel {
    border-color: rgba(0, 0, 0, 0.15);
}
.delete-modal-confirm {
    font-family: var(--font-label);
    font-size: 0.8rem;
    padding: var(--space-sm) var(--space-lg);
    background: #ff4444;
    border: none;
    color: #fff;
    border-radius: var(--shape-sm);
    cursor: pointer;
    transition: opacity var(--motion-standard);
}
.delete-modal-confirm:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.delete-modal-confirm:not(:disabled):hover {
    opacity: 0.85;
}

/* ── Order History card (dropdown) ── */
.profile-orders-card {
    position: relative;
    background: rgba(10, 10, 15, 0.92);
    border: 2px solid rgba(74, 158, 255, 0.18);
    overflow: hidden;
    box-shadow: 0 0 18px rgba(74, 158, 255, 0.06),
                inset 0 0 25px rgba(74, 158, 255, 0.02);
}

:root[data-theme="light"] .profile-orders-card {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(37, 99, 200, 0.18);
    box-shadow: 0 2px 15px rgba(37, 99, 200, 0.06);
}

.profile-orders-header {
    display: none; /* Replaced by dropdown button */
}

/* ── Order history ── */
.profile-orders-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Order row — expandable layout */
.profile-order-row {
    border: 1px solid rgba(0, 255, 100, 0.06);
    transition: border-color var(--duration-short) var(--motion-standard);
    cursor: pointer;
}

.profile-order-row:hover {
    border-color: rgba(0, 255, 100, 0.2);
}

:root[data-theme="light"] .profile-order-row {
    border-color: rgba(0, 168, 64, 0.08);
}

:root[data-theme="light"] .profile-order-row:hover {
    border-color: rgba(0, 168, 64, 0.25);
}

.profile-order-row-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
}

/* Chevron rotates on expand */
.profile-order-chevron {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform var(--duration-medium) var(--motion-standard);
}

.profile-order-row.expanded .profile-order-chevron {
    transform: rotate(180deg);
}

/* Expandable item details */
.profile-order-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--duration-medium) var(--motion-standard);
    border-top: 0 solid rgba(0, 255, 100, 0.06);
}

.profile-order-row.expanded .profile-order-items {
    max-height: 700px;
    border-top-width: 1px;
}

:root[data-theme="light"] .profile-order-row.expanded .profile-order-items {
    border-top-color: rgba(0, 168, 64, 0.08);
}

/* Order status tracker pipeline */
.order-tracker {
    display: flex;
    align-items: flex-start;
    padding: var(--space-md) var(--space-md) var(--space-sm);
    gap: 0;
}
.order-tracker-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    z-index: 1;
}
.order-tracker-dot {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--text-muted);
    color: var(--text-muted);
    background: var(--bg-primary);
    transition: all var(--duration-medium) var(--motion-standard);
}
.order-tracker-dot.done {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 255, 100, 0.06);
}
.order-tracker-dot.current {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 255, 100, 0.06);
    box-shadow: 0 0 12px rgba(0, 255, 100, 0.25);
    animation: tracker-pulse 2s ease-in-out infinite;
}
@keyframes tracker-pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(0, 255, 100, 0.15); }
    50% { box-shadow: 0 0 18px rgba(0, 255, 100, 0.35); }
}
.order-tracker-label {
    font-family: var(--font-mono);
    font-size: 0.45rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color var(--duration-medium) var(--motion-standard);
}
.order-tracker-step.done .order-tracker-label,
.order-tracker-step.current .order-tracker-label {
    color: var(--accent);
}
.order-tracker-line {
    flex: 1;
    height: 1.5px;
    background: var(--outline-variant);
    margin-top: 15px;
    min-width: 12px;
}
.order-tracker-line.done {
    background: var(--accent);
    box-shadow: 0 0 4px rgba(0, 255, 100, 0.2);
}
.order-tracker-cancelled {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
    padding: var(--space-sm) 0;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    color: var(--error);
}

.profile-order-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
}

.profile-order-item + .profile-order-item {
    border-top: 1px solid rgba(0, 255, 100, 0.04);
}

:root[data-theme="light"] .profile-order-item + .profile-order-item {
    border-top-color: rgba(0, 168, 64, 0.06);
}

.profile-order-item-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.profile-order-item-placeholder {
    background: var(--bg-secondary);
}

.profile-order-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.profile-order-item-name {
    font: var(--text-body-sm);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-order-item-meta {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.profile-order-item-price {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.profile-order-row-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 100, 0.06);
    flex-shrink: 0;
}

:root[data-theme="light"] .profile-order-row-icon {
    background: rgba(0, 168, 64, 0.06);
}

.profile-order-row-icon svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
    opacity: 0.7;
}

.profile-order-row-details {
    flex: 1;
    min-width: 0;
}

.profile-order-row-name {
    font: var(--text-body-sm);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-order-row-meta {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.profile-order-status {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 8px;
    white-space: nowrap;
    color: var(--accent);
    background: rgba(0, 255, 100, 0.08);
    border: 1px solid rgba(0, 255, 100, 0.15);
}
.profile-order-status[data-status="pending"] {
    color: #ffaa00; background: rgba(255, 170, 0, 0.08); border-color: rgba(255, 170, 0, 0.25);
}
.profile-order-status[data-status="processing"] {
    color: #ff00ff; background: rgba(255, 0, 255, 0.06); border-color: rgba(255, 0, 255, 0.25);
}
.profile-order-status[data-status="shipped"] {
    color: #00d4ff; background: rgba(0, 212, 255, 0.06); border-color: rgba(0, 212, 255, 0.25);
}
.profile-order-status[data-status="cancelled"] {
    color: var(--error); background: rgba(255, 59, 48, 0.06); border-color: rgba(255, 59, 48, 0.25);
}

:root[data-theme="light"] .profile-order-status {
    color: var(--accent-hover);
    background: rgba(0, 168, 64, 0.08);
    border-color: rgba(0, 168, 64, 0.2);
}
:root[data-theme="light"] .profile-order-status[data-status="pending"] {
    color: #cc8800; background: rgba(204, 136, 0, 0.06); border-color: rgba(204, 136, 0, 0.2);
}
:root[data-theme="light"] .profile-order-status[data-status="processing"] {
    color: #cc00cc; background: rgba(204, 0, 204, 0.05); border-color: rgba(204, 0, 204, 0.2);
}
:root[data-theme="light"] .profile-order-status[data-status="shipped"] {
    color: #0099cc; background: rgba(0, 153, 204, 0.05); border-color: rgba(0, 153, 204, 0.2);
}
:root[data-theme="light"] .profile-order-status[data-status="cancelled"] {
    color: #cc2233; background: rgba(204, 34, 51, 0.05); border-color: rgba(204, 34, 51, 0.2);
}

.profile-order-row-price {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}

/* ── Empty orders state ── */
.profile-orders-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    border: 1px dashed rgba(0, 255, 100, 0.1);
}

:root[data-theme="light"] .profile-orders-empty {
    border-color: rgba(0, 168, 64, 0.12);
}

.profile-orders-empty svg {
    opacity: 0.25;
    margin-bottom: 1rem;
    color: var(--accent);
}

.profile-orders-empty p {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin: 0 0 0.5rem;
    color: var(--text-primary);
}

.profile-orders-empty .profile-empty-sub {
    font-size: 0.8rem;
    opacity: 0.5;
}

.profile-orders-empty .profile-empty-cta {
    display: inline-block;
    margin-top: 1.25rem;
    padding: 0.6rem 1.5rem;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--on-accent);
    background: var(--accent);
    transition: box-shadow var(--duration-short) var(--motion-standard);
}

.profile-orders-empty .profile-empty-cta:hover {
    box-shadow: 0 0 20px var(--glow-accent-strong);
}

.profile-orders-empty .profile-empty-cta:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

:root[data-theme="light"] .profile-orders-empty .profile-empty-cta {
    background: var(--accent-hover);
}

/* ── Responsive: tablet ── */
@media (max-width: 840px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-name-row {
        justify-content: center;
    }

    .profile-xp-row {
        justify-content: center;
    }

    .profile-username {
        font-size: clamp(1.2rem, 4vw, 1.8rem);
    }

    .profile-section-title {
        font-size: 1rem;
    }

    .profile-avatar-wrapper {
        width: 100px;
        height: 100px;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
    }

    .profile-avatar-ring {
        inset: -6px;
    }

    .profile-avatar-ring-inner {
        inset: -3px;
    }

    .profile-skeleton-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-skeleton-avatar {
        width: 100px;
        height: 100px;
    }

    .profile-skeleton-stats {
        grid-template-columns: 1fr;
    }

    .profile-achievements {
        gap: 1rem;
    }

    .profile-orders-card {
        padding: var(--space-md);
    }
}

/* ── Responsive: phone ── */
@media (max-width: 600px) {
    .profile-stats {
        grid-template-columns: 1fr;
    }

    .profile-skeleton-stats {
        grid-template-columns: 1fr;
    }

    .profile-card,
    .profile-achievements-card,
    .profile-orders-card {
        padding: var(--space-md);
    }

    .profile-username {
        font-size: clamp(1rem, 5vw, 1.4rem);
    }

    .profile-stat-value {
        font-size: 1.3rem;
    }

    .profile-section-title {
        font-size: 0.95rem;
    }

    .profile-actions {
        justify-content: center;
    }

    .wishlist-collapsed { padding: 0 var(--space-md); }
    .wishlist-expanded { padding: var(--space-sm) var(--space-md); }
    .orders-collapsed { padding: 0 var(--space-md); }
    .orders-expanded { padding: var(--space-sm) var(--space-md); }
    .achievements-collapsed { padding: 0 var(--space-md); }
    .achievements-expanded { padding: var(--space-sm) var(--space-md); }

    .achievements-dropdown-btn {
        padding: var(--space-md);
        font-size: 0.8rem;
        letter-spacing: 1.5px;
        gap: var(--space-xs);
    }
    .achievements-btn-tag {
        font-size: 0.6rem;
        letter-spacing: 1px;
        padding: 3px 8px;
        white-space: nowrap;
    }

    .profile-orders-list { gap: 0.5rem; }

    .profile-order-row-header {
        flex-wrap: wrap;
        gap: var(--space-xs);
        padding: var(--space-sm);
    }

    .profile-order-row-icon {
        width: 32px;
        height: 32px;
    }

    .profile-order-row-icon svg {
        width: 16px;
        height: 16px;
    }

    .profile-order-row-name {
        font-size: 0.75rem;
        white-space: normal;
    }

    .profile-order-row-meta {
        font-size: 0.5rem;
    }

    .profile-order-status {
        font-size: 0.5rem;
        padding: 2px 5px;
    }

    .profile-order-row-price {
        font-size: 0.8rem;
    }

    .profile-order-item {
        gap: var(--space-sm);
        padding: var(--space-xs) var(--space-sm);
    }

    .profile-order-item-img {
        width: 32px;
        height: 32px;
    }

    .profile-order-item-name {
        font-size: 0.7rem;
    }

    .profile-order-item-price {
        font-size: 0.65rem;
    }

    .profile-achievement {
        width: 60px;
    }

    .profile-achievement-hex {
        width: 46px;
        height: 46px;
    }

    .profile-achievement-hex svg {
        width: 20px;
        height: 20px;
    }

    .profile-achievements {
        gap: 0.75rem;
    }
}

/* ── Responsive: small phone ── */
@media (max-width: 380px) {
    .profile-avatar-wrapper {
        width: 80px;
        height: 80px;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
    }

    .profile-avatar-ring {
        inset: -5px;
    }

    .profile-avatar-ring-inner {
        inset: -2px;
    }

    .profile-skeleton-avatar {
        width: 80px;
        height: 80px;
    }

    .profile-username {
        font-size: 1rem;
    }

    .profile-stat-value {
        font-size: 1.1rem;
    }

    .profile-section-title {
        font-size: 0.85rem;
    }

    .profile-achievement {
        width: 55px;
    }

    .profile-achievement-hex {
        width: 40px;
        height: 40px;
    }

    .profile-achievement-hex svg {
        width: 16px;
        height: 16px;
    }

    .achievements-dropdown-btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.7rem;
        letter-spacing: 1px;
    }
    .achievements-btn-tag {
        font-size: 0.55rem;
        padding: 2px 6px;
        letter-spacing: 0.5px;
    }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .profile-avatar-ring,
    .profile-avatar-ring-inner {
        animation: none;
    }
    .profile-username {
        animation: none;
    }
    .profile-xp-fill {
        transition: none;
    }
    .profile-content.profile-enter .profile-card,
    .profile-content.profile-enter .profile-stats,
    .profile-content.profile-enter .profile-actions,
    .profile-content.profile-enter .profile-achievements-card,
    .profile-content.profile-enter .profile-orders-card {
        animation: none;
    }
    .profile-avatar-wrapper.uploading::after {
        animation: none;
    }
    .profile-avatar-error {
        animation: none;
    }
}

/* ═══════════════════════════════════════════════════════════
   AUTH PAGE — HUD Terminal
   ═══════════════════════════════════════════════════════════ */

/* Dual background system with smooth transitions */
.auth-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.auth-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/auth/auth-bg-login.jpeg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    filter: brightness(0.35) contrast(1.1);
    transition: all var(--duration-xl) var(--motion-standard);
}

.auth-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/auth/auth-bg-signup.jpeg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    filter: brightness(0.35) contrast(1.1);
    opacity: 0;
    transition: all var(--duration-xl) var(--motion-standard);
}

.auth-bg.show-signup::after {
    opacity: 1;
}

:root[data-theme="light"] .auth-bg::before,
:root[data-theme="light"] .auth-bg::after {
    filter: brightness(0.65) contrast(1.05) saturate(0.8);
}

.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    position: relative;
    overflow: hidden;
}

/* Card wrapper */
.auth-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    z-index: 1;
}

/* HUD corner brackets */
.hud-bracket {
    position: absolute;
    width: 24px;
    height: 24px;
    z-index: 3;
    pointer-events: none;
}

.hud-bracket::before,
.hud-bracket::after {
    content: '';
    position: absolute;
    background: var(--accent);
}

.hud-bracket-tl {
    top: -4px;
    left: -4px;
}
.hud-bracket-tl::before { width: 24px; height: 2px; top: 0; left: 0; }
.hud-bracket-tl::after { width: 2px; height: 24px; top: 0; left: 0; }

.hud-bracket-tr {
    top: -4px;
    right: -4px;
}
.hud-bracket-tr::before { width: 24px; height: 2px; top: 0; right: 0; }
.hud-bracket-tr::after { width: 2px; height: 24px; top: 0; right: 0; }

.hud-bracket-bl {
    bottom: -4px;
    left: -4px;
}
.hud-bracket-bl::before { width: 24px; height: 2px; bottom: 0; left: 0; }
.hud-bracket-bl::after { width: 2px; height: 24px; bottom: 0; left: 0; }

.hud-bracket-br {
    bottom: -4px;
    right: -4px;
}
.hud-bracket-br::before { width: 24px; height: 2px; bottom: 0; right: 0; }
.hud-bracket-br::after { width: 2px; height: 24px; bottom: 0; right: 0; }

:root[data-theme="light"] .hud-bracket::before,
:root[data-theme="light"] .hud-bracket::after {
    background: var(--accent-hover);
}

/* Card inner */
.auth-card-inner {
    position: relative;
    background: rgba(10, 10, 15, 0.92);
    border: 1px solid rgba(0, 255, 100, 0.15);
    padding: var(--space-lg) var(--space-xl);
    overflow: hidden;
}

:root[data-theme="light"] .auth-card-inner {
    background: rgba(245, 250, 245, 0.95);
    border: 1px solid rgba(0, 140, 18, 0.2);
}

/* Scanlines overlay */
.auth-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.015) 2px,
        rgba(255, 255, 255, 0.015) 4px
    );
    pointer-events: none;
    z-index: 1;
}

:root[data-theme="light"] .auth-scanlines {
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 140, 18, 0.02) 2px,
        rgba(0, 140, 18, 0.02) 4px
    );
}

/* Scan beam */
.auth-scan-beam {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 100, 0.4),
        rgba(0, 255, 100, 0.8),
        rgba(0, 255, 100, 0.4),
        transparent
    );
    box-shadow: 0 0 20px rgba(0, 255, 100, 0.3);
    z-index: 2;
    pointer-events: none;
    animation: auth-scan-beam 4s linear infinite;
}

@keyframes auth-scan-beam {
    0% { top: -3px; opacity: 0; }
    5% { opacity: 1; }
    95% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

:root[data-theme="light"] .auth-scan-beam {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 140, 18, 0.25),
        rgba(0, 140, 18, 0.5),
        rgba(0, 140, 18, 0.25),
        transparent
    );
    box-shadow: 0 0 15px rgba(0, 140, 18, 0.2);
}

/* System status bar */
.auth-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font: var(--text-label-sm);
    color: rgba(0, 255, 100, 0.5);
    margin-bottom: var(--space-md);
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--shape-full);
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

:root[data-theme="light"] .auth-status-bar {
    color: rgba(0, 140, 18, 0.5);
}

:root[data-theme="light"] .status-dot {
    background: var(--accent-hover);
    box-shadow: 0 0 6px var(--accent-hover);
}

/* Logo */
.auth-logo {
    text-align: center;
    margin-bottom: var(--space-md);
    position: relative;
    z-index: 2;
}

.auth-logo h1 {
    font: var(--text-headline-lg);
    font-size: 2.25rem;
    color: var(--text-primary);
    margin: 0;
    animation: auth-glitch 4s ease infinite;
    text-shadow: 0 0 20px var(--glow-accent);
}

@keyframes auth-glitch {
    0%, 92%, 100% { transform: translate(0); }
    93% { transform: translate(-2px, 2px); }
    95% { transform: translate(2px, -2px); text-shadow: -3px 0 #ff00ff, 3px 0 #00ffff; }
    97% { transform: translate(-1px, -1px); }
    99% { transform: translate(1px, 1px); text-shadow: 2px 0 #ff00ff, -2px 0 #00ffff; }
}

.auth-logo h1 .cursor {
    display: inline-block;
    animation: blink 1s infinite;
    color: var(--accent);
    margin-left: 2px;
    font-weight: 400;
}

.auth-logo p {
    color: var(--text-secondary);
    margin: 6px 0 0 0;
    font: var(--text-body-md);
    position: relative;
    z-index: 2;
}

/* Tabs */
.auth-tabs {
    display: flex;
    margin-bottom: var(--space-md);
    border-bottom: 1px solid var(--outline);
    position: relative;
    z-index: 2;
}

.auth-tab {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font: var(--text-label-lg);
    font-family: var(--font-display);
    letter-spacing: 2px;
    cursor: pointer;
    transition: all var(--duration-medium) var(--motion-standard);
}

.auth-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

@media (hover: hover) {
    .auth-tab:not(.active):hover {
        color: var(--text-primary);
    }
}

/* Message */
.auth-message {
    padding: var(--space-md);
    font: var(--text-body-md);
    display: none;
    position: relative;
    z-index: 2;
    margin-bottom: var(--space-md);
}

.auth-message.success {
    display: block;
    background: rgba(0, 255, 100, 0.08);
    border: 1px solid rgba(0, 255, 100, 0.25);
    color: var(--accent);
}

.auth-message.error {
    display: block;
    background: var(--error-container);
    border: 1px solid rgba(255, 0, 0, 0.25);
    color: var(--error);
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    position: relative;
    z-index: 2;
}

/* Pre-paint signup mode: show signup form, hide login — removed by JS once tab switching is ready */
html[data-auth-mode="signup"] #login-form { display: none !important; }
html[data-auth-mode="signup"] #signup-form { display: flex !important; }

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}


.form-group input {
    padding: 12px var(--space-md);
    border: 1px solid rgba(0, 255, 100, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--duration-medium) var(--motion-standard);
}

:root[data-theme="light"] .form-group input {
    border-color: rgba(0, 140, 18, 0.15);
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-primary);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 2px rgba(0, 255, 100, 0.1), 0 0 20px rgba(0, 255, 100, 0.08);
}

:root[data-theme="light"] .form-group input:focus {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 2px rgba(0, 140, 18, 0.1), 0 0 15px rgba(0, 140, 18, 0.06);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 400;
}

:root[data-theme="light"] .form-group input::placeholder {
    color: rgba(0, 0, 0, 0.35);
}

/* Inline field hints */
.field-hint {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    min-height: 1rem;
    transition: color var(--duration-short) var(--motion-standard);
}
.field-hint:empty {
    display: none;
}
.field-hint.warn {
    color: #ffaa00;
}
.field-hint.valid {
    color: var(--accent);
}
:root[data-theme="light"] .field-hint.warn {
    color: #cc8800;
}

/* Forgot password link */
.forgot-link {
    font: var(--text-label-sm);
    color: rgba(0, 255, 100, 0.4);
    text-decoration: none;
    text-align: right;
    letter-spacing: 1px;
    transition: color var(--duration-medium) var(--motion-standard);
}

.forgot-link:hover {
    color: var(--accent);
}

:root[data-theme="light"] .forgot-link {
    color: rgba(0, 140, 18, 0.45);
}

:root[data-theme="light"] .forgot-link:hover {
    color: var(--accent-hover);
}

/* Submit button — clip-path angled corners */
.auth-submit {
    position: relative;
    padding: 14px var(--space-lg);
    background: var(--accent);
    border: none;
    color: var(--on-accent);
    font: var(--text-title-lg);
    letter-spacing: 2px;
    cursor: pointer;
    transition: all var(--duration-medium) var(--motion-standard);
    margin-top: var(--space-sm);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
    overflow: hidden;
}

.auth-submit::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.25),
        transparent
    );
    transition: none;
    animation: auth-shine-sweep 3s infinite;
}

@keyframes auth-shine-sweep {
    0%, 70% { left: -100%; }
    100% { left: 100%; }
}

.auth-submit:hover {
    background: var(--accent-bright, #2aff7a);
    box-shadow: 0 0 30px rgba(0, 255, 100, 0.35);
}

.auth-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.auth-submit:disabled::after {
    animation: none;
}

/* OR divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-md) 0;
    position: relative;
    z-index: 2;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 255, 100, 0.12);
}

.auth-divider span {
    font: var(--text-label-sm);
    color: var(--text-secondary);
    letter-spacing: 2px;
}

:root[data-theme="light"] .auth-divider::before,
:root[data-theme="light"] .auth-divider::after {
    background: rgba(0, 140, 18, 0.12);
}

/* Guest button */
.auth-guest-btn {
    display: block;
    text-align: center;
    padding: 12px var(--space-lg);
    border: 1px solid rgba(0, 255, 100, 0.2);
    background: transparent;
    color: var(--text-secondary);
    font: var(--text-label-lg);
    font-family: var(--font-display);
    letter-spacing: 2px;
    text-decoration: none;
    transition: all var(--duration-medium) var(--motion-standard);
    position: relative;
    z-index: 2;
}

.auth-guest-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 255, 100, 0.05);
}

:root[data-theme="light"] .auth-guest-btn {
    border-color: rgba(0, 140, 18, 0.2);
}

:root[data-theme="light"] .auth-guest-btn:hover {
    border-color: var(--accent-hover);
    color: var(--accent-hover);
    background: rgba(0, 140, 18, 0.04);
}

/* Auth mode indicator bar */
.auth-mode-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font: var(--text-label-sm);
    color: rgba(0, 255, 100, 0.35);
    margin-top: var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(0, 255, 100, 0.08);
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
}

.encrypted-dots {
    color: var(--accent);
    margin-right: 4px;
}

:root[data-theme="light"] .auth-mode-bar {
    color: rgba(0, 140, 18, 0.35);
    border-top-color: rgba(0, 140, 18, 0.08);
}

:root[data-theme="light"] .encrypted-dots {
    color: var(--accent-hover);
}

/* Accent line beneath card */
.auth-accent-line {
    height: 2px;
    margin-top: 8px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--accent),
        var(--accent),
        transparent
    );
    opacity: 0.5;
}

:root[data-theme="light"] .auth-accent-line {
    background: linear-gradient(
        90deg,
        transparent,
        var(--accent-hover),
        var(--accent-hover),
        transparent
    );
    opacity: 0.4;
}

/* Page footer */
.auth-page-footer {
    font: var(--text-label-sm);
    color: rgba(0, 255, 100, 0.25);
    letter-spacing: 2px;
    margin-top: var(--space-xl);
    text-align: center;
    position: relative;
    z-index: 2;
}

:root[data-theme="light"] .auth-page-footer {
    color: rgba(0, 140, 18, 0.25);
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-primary);
    text-decoration: none;
    margin-bottom: var(--space-lg);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: var(--space-xs) var(--space-md);
    background: rgba(0, 0, 0, 0.5);
    border-radius: var(--shape-xs);
    transition: color var(--duration-medium) var(--motion-standard),
                background var(--duration-medium) var(--motion-standard);
}

.back-link:hover {
    color: var(--accent);
    background: rgba(0, 0, 0, 0.7);
}

:root[data-theme="light"] .back-link {
    background: rgba(255, 255, 255, 0.7);
}

:root[data-theme="light"] .back-link:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* Theme toggle */
.theme-toggle {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: var(--shape-full);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-medium) var(--motion-standard);
    z-index: 10;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 22px;
    height: 22px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2;
}

:root[data-theme="light"] .theme-toggle {
    background: rgba(0, 0, 0, 0.06);
}

:root[data-theme="light"] .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.12);
}

/* Floating particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--accent);
    border-radius: var(--shape-full);
    opacity: 0.3;
    animation: auth-float 10s infinite ease-in-out;
    box-shadow: 0 0 10px var(--accent);
}

@keyframes auth-float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% {
        transform: translateY(-100vh) translateX(20px);
        opacity: 0;
    }
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 12s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; animation-duration: 9s; }
.particle:nth-child(4) { left: 40%; animation-delay: 1s; animation-duration: 11s; }
.particle:nth-child(5) { left: 50%; animation-delay: 5s; }
.particle:nth-child(6) { left: 60%; animation-delay: 3s; animation-duration: 13s; }
.particle:nth-child(7) { left: 70%; animation-delay: 6s; animation-duration: 10s; }
.particle:nth-child(8) { left: 80%; animation-delay: 2s; }
.particle:nth-child(9) { left: 90%; animation-delay: 4s; animation-duration: 14s; }
.particle:nth-child(10) { left: 15%; animation-delay: 7s; animation-duration: 11s; }

/* Auth mobile responsive */
@media (max-width: 600px) {
    .auth-card-inner {
        padding: var(--space-lg);
    }

    .auth-logo h1 {
        font-size: 1.75rem;
    }

    .back-link {
        margin-bottom: var(--space-md);
    }

    .hud-bracket {
        width: 18px;
        height: 18px;
    }

    .hud-bracket-tl::before,
    .hud-bracket-tr::before,
    .hud-bracket-bl::before,
    .hud-bracket-br::before { width: 18px; }

    .hud-bracket-tl::after,
    .hud-bracket-tr::after,
    .hud-bracket-bl::after,
    .hud-bracket-br::after { height: 18px; }

}

/* ═══ CHECKOUT PAGE ═══════════════════════════════ */

.checkout-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-xl);
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--outline-variant);
}

.checkout-back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: var(--space-xs) var(--space-md);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--shape-xs);
    transition: color var(--duration-medium) var(--motion-standard),
                background var(--duration-medium) var(--motion-standard),
                border-color var(--duration-medium) var(--motion-standard);
}

.checkout-back-link:hover {
    color: var(--accent);
    background: rgba(0, 255, 100, 0.08);
    border-color: rgba(0, 255, 100, 0.25);
}

:root[data-theme="light"] .checkout-back-link {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.12);
}

:root[data-theme="light"] .checkout-back-link:hover {
    background: rgba(0, 168, 64, 0.08);
    border-color: rgba(0, 168, 64, 0.25);
}

.checkout-top-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.checkout-brand {
    font: var(--text-title-lg);
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    color: var(--accent);
    letter-spacing: clamp(1px, 0.4vw, 2px);
    white-space: nowrap;
}

.checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(var(--space-sm), 4vw, var(--space-xl));
}

/* ── Checkout Header ── */

.checkout-header {
    display: flex;
    align-items: baseline;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.checkout-title {
    font: var(--text-headline-lg);
    color: var(--text-primary);
    letter-spacing: clamp(1px, 0.5vw, 3px);
}

.checkout-subtitle {
    font: var(--text-label-sm);
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* ── Stepper ── */

.checkout-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: var(--space-xl);
    padding: var(--space-md) 0;
}

.checkout-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    position: relative;
}

.checkout-step-icon {
    width: clamp(32px, 9vw, 48px);
    height: clamp(32px, 9vw, 48px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--outline);
    border-radius: var(--shape-sm);
    color: var(--text-muted);
    transition: all var(--duration-medium) var(--motion-standard);
}

.checkout-step.active .checkout-step-icon {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 12px var(--glow-accent);
    animation: stepIconPulse 2s ease-in-out infinite;
}

@keyframes stepIconPulse {
    0%, 100% { box-shadow: 0 0 12px var(--glow-accent); }
    50% { box-shadow: 0 0 24px var(--glow-accent-strong); }
}

.checkout-step.completed .checkout-step-icon {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(var(--surface-tint), 0.1);
}

.checkout-step-label {
    font: var(--text-label-sm);
    font-size: clamp(0.5rem, 1.8vw, 0.7rem);
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color var(--duration-medium) var(--motion-standard);
}

.checkout-step.active .checkout-step-label {
    color: var(--accent);
}

.checkout-step.completed .checkout-step-label {
    color: var(--accent);
}

.checkout-step-line {
    width: clamp(14px, 6vw, 60px);
    height: 2px;
    background: var(--outline);
    margin: 0 var(--space-xs);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.checkout-step-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--glow-accent);
    transition: width var(--duration-long) var(--motion-standard);
}

.checkout-step-line.completed::after {
    width: 100%;
}

/* ── Step content transitions ── */

.checkout-step-content {
    animation: stepFadeIn 0.4s ease-out both;
}

.checkout-step-content.hidden {
    display: none !important;
}

.checkout-step-content.step-exit {
    animation: stepFadeOut 0.25s ease-in both;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes stepFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-12px);
    }
}

/* ── Confirmation entrance animations ── */

.checkout-confirm-icon {
    animation: confirmIconEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes confirmIconEnter {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.checkout-confirm-title {
    animation: confirmTextEnter 0.5s ease-out 0.2s both;
}

.checkout-confirm-text {
    animation: confirmTextEnter 0.5s ease-out 0.3s both;
}

.checkout-order-id {
    animation: confirmTextEnter 0.5s ease-out 0.4s both;
}

.checkout-confirm-note {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: #ffa726;
    background: rgba(255, 167, 38, 0.08);
    border: 1px solid rgba(255, 167, 38, 0.2);
    border-radius: var(--shape-sm);
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    animation: confirmTextEnter 0.5s ease-out 0.45s both;
}

/* ── Next Steps (post-checkout) ── */

.checkout-next-steps {
    text-align: center;
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--outline-variant);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    animation: confirmTextEnter 0.5s ease-out 0.5s both;
}

.checkout-next-steps-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--shape-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--outline-accent);
    color: var(--accent);
    background: var(--surface-1);
}

.checkout-next-steps-text {
    font: var(--text-body-md);
    color: var(--text-secondary);
    max-width: 320px;
    line-height: 1.5;
}

.checkout-next-steps-text strong {
    color: var(--text-primary);
}

.checkout-next-steps-btn {
    display: inline-block;
    font: var(--text-label-md);
    letter-spacing: 2px;
    padding: var(--space-sm) var(--space-xl);
    border-radius: var(--shape-sm);
    border: 1px solid var(--accent);
    color: var(--bg-primary);
    background: var(--accent);
    text-decoration: none;
    transition: all var(--duration-short) var(--motion-standard);
}

.checkout-next-steps-btn:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 12px var(--glow-accent);
}

.checkout-next-steps-btn--secondary {
    background: transparent;
    color: var(--accent);
}

.checkout-next-steps-btn--secondary:hover {
    background: var(--surface-2);
}

@keyframes confirmTextEnter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Checkout Body (2-col grid) ── */

.checkout-body {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--space-xl);
    align-items: start;
}

.checkout-main {
    min-width: 0;
}

/* ── Checkout Section (card wrapper) ── */

.checkout-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--shape-md);
    padding: var(--space-lg);
}

.checkout-section-title {
    font: var(--text-label-lg);
    color: var(--accent);
    letter-spacing: 2px;
    margin-bottom: var(--space-lg);
    padding-left: var(--space-sm);
    border-left: 3px solid var(--accent);
}

/* ── Cart Items (Step 1) ── */

.checkout-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.checkout-item-card {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--outline-variant);
    border-radius: var(--shape-sm);
    transition: border-color var(--duration-short) var(--motion-standard);
}

.checkout-item-card:hover {
    border-color: var(--outline);
}

.checkout-item-img {
    width: clamp(48px, 15vw, 80px);
    height: clamp(60px, 18vw, 100px);
    object-fit: cover;
    border-radius: var(--shape-xs);
    flex-shrink: 0;
}

.checkout-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-xs);
}

.checkout-item-name {
    font: var(--text-title-md);
    font-size: clamp(0.75rem, 2.5vw, 0.9rem);
    color: var(--text-primary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.checkout-item-tag {
    display: inline-block;
    font: var(--text-label-sm);
    color: var(--text-muted);
    padding: 2px 8px;
    border: 1px solid var(--outline);
    border-radius: var(--shape-xs);
    width: fit-content;
    letter-spacing: 1px;
}

.checkout-item-qty {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: var(--space-xs);
}

.checkout-qty-btn {
    width: clamp(28px, 7vw, 32px);
    height: clamp(28px, 7vw, 32px);
    background: transparent;
    border: 1px solid var(--outline);
    color: var(--text-primary);
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-short) var(--motion-standard);
}

.checkout-qty-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.checkout-qty-val {
    width: clamp(32px, 8vw, 40px);
    height: clamp(28px, 7vw, 32px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid var(--outline);
    border-bottom: 1px solid var(--outline);
    font: var(--text-label-md);
    color: var(--text-primary);
}

.checkout-item-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
}

.checkout-item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: var(--space-xs);
    transition: color var(--duration-short) var(--motion-standard);
}

.checkout-item-remove:hover {
    color: var(--error);
}

.checkout-item-price {
    font: var(--text-headline-md);
    font-size: clamp(0.85rem, 2.8vw, 1.2rem);
    color: var(--accent);
}

/* ── Shipping Form (Step 2) ── */

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.checkout-form .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.checkout-form .form-group label {
    font: var(--text-label-md);
    color: var(--text-secondary);
    letter-spacing: 1.5px;
}

.checkout-form .form-group input {
    width: 100%;
    padding: 14px var(--space-md);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--shape-xs);
    color: var(--text-primary);
    font: var(--text-body-md);
    transition: border-color var(--duration-short) var(--motion-standard),
                background var(--duration-short) var(--motion-standard);
}

:root[data-theme="light"] .checkout-form .form-group input {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.checkout-form .form-group input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 8px var(--glow-accent);
}

.checkout-form .form-group.invalid input {
    border-color: var(--error);
}

.checkout-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.checkout-delivery-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: rgba(var(--surface-tint), 0.06);
    border: 1px solid var(--outline-accent);
    border-radius: var(--shape-sm);
}

.checkout-delivery-info strong {
    font: var(--text-label-md);
    color: var(--accent);
    letter-spacing: 1px;
}

.checkout-delivery-info span {
    font: var(--text-body-sm);
    color: var(--text-muted);
}

/* ── Confirmation (Step 4) ── */

.checkout-confirm-section {
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
}

.checkout-confirm-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border: 2px solid var(--accent);
    border-radius: var(--shape-md);
    color: var(--accent);
    margin-bottom: var(--space-lg);
    box-shadow: 0 0 24px var(--glow-accent);
    animation: checkPulse 2s ease-in-out infinite;
}

@keyframes checkPulse {
    0%, 100% { box-shadow: 0 0 24px var(--glow-accent); }
    50% { box-shadow: 0 0 40px var(--glow-accent-strong); }
}

.checkout-confirm-title {
    font: var(--text-headline-lg);
    color: var(--text-primary);
    letter-spacing: 3px;
    margin-bottom: var(--space-sm);
}

.checkout-confirm-text {
    font: var(--text-body-md);
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.checkout-order-id {
    display: inline-block;
    font: var(--text-label-lg);
    color: var(--accent);
    padding: var(--space-sm) var(--space-lg);
    border: 1px solid var(--outline-accent);
    border-radius: var(--shape-sm);
    letter-spacing: 2px;
    margin-bottom: var(--space-xl);
}

/* ── Delivery Timeline ── */


/* ── Order Summary Sidebar ── */

.checkout-sidebar {
    position: sticky;
    top: 80px;
}

.checkout-summary {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--shape-md);
    padding: var(--space-lg);
}

.checkout-summary-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.checkout-summary-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font: var(--text-body-sm);
}

.checkout-summary-item-qty {
    color: var(--text-muted);
    font: var(--text-label-sm);
    min-width: 24px;
}

.checkout-summary-item-name {
    flex: 1;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checkout-summary-item-price {
    color: var(--text-secondary);
    font: var(--text-label-md);
}

.checkout-summary-totals {
    border-top: 1px solid var(--outline-variant);
    padding-top: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.checkout-summary-row {
    display: flex;
    justify-content: space-between;
    font: var(--text-label-md);
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.checkout-shipping-free {
    color: var(--accent);
}

.checkout-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-md);
    border-top: 1px solid var(--outline-variant);
    margin-top: var(--space-sm);
}

.checkout-summary-total span:first-child {
    font: var(--text-label-lg);
    color: var(--text-primary);
    letter-spacing: 2px;
}

.checkout-total-price {
    font: var(--text-headline-lg);
    font-size: clamp(1rem, 3.5vw, 2.2rem);
    color: var(--accent);
}

/* ── Action Button ── */

.checkout-action-btn {
    width: 100%;
    padding: clamp(12px, 3vw, 16px);
    margin-top: var(--space-lg);
    background: var(--accent);
    border: none;
    border-radius: var(--shape-sm);
    color: var(--on-accent);
    font: var(--text-label-lg);
    font-size: clamp(0.7rem, 2.2vw, 0.85rem);
    letter-spacing: 2px;
    cursor: pointer;
    transition: all var(--duration-medium) var(--motion-standard);
}

.checkout-action-btn:hover:not(:disabled) {
    background: var(--accent-bright);
    box-shadow: 0 0 24px var(--glow-accent);
    transform: translateY(-1px);
}

.checkout-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.checkout-action-btn.confirmed {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    opacity: 1;
}

.checkout-back-btn {
    width: 100%;
    padding: 12px;
    margin-top: var(--space-sm);
    background: transparent;
    border: 1px solid var(--outline);
    border-radius: var(--shape-sm);
    color: var(--text-secondary);
    font: var(--text-label-md);
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all var(--duration-short) var(--motion-standard);
}

.checkout-back-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* ── Trust Badges ── */

.checkout-trust-badges {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    flex-wrap: wrap;
}

.checkout-trust-badge {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font: var(--text-label-sm);
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.checkout-trust-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: var(--shape-full);
}

/* ── Guest Checkout Banner ── */

.checkout-guest-banner {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: var(--shape-sm);
    font: var(--text-body-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}
.checkout-guest-banner svg { flex-shrink: 0; color: var(--accent); }
.checkout-guest-banner a { color: var(--accent); text-decoration: underline; }

/* ── Error States ── */

.checkout-error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px var(--space-xl);
    gap: var(--space-md);
    color: var(--text-muted);
}

.checkout-error-state svg {
    color: var(--text-muted);
    opacity: 0.5;
}

.checkout-error-state h2 {
    font: var(--text-headline-md);
    color: var(--text-primary);
}

.checkout-error-state p {
    font: var(--text-body-md);
}

.checkout-error-link {
    display: inline-block;
    margin-top: var(--space-md);
    padding: 12px var(--space-xl);
    background: var(--accent);
    color: var(--on-accent);
    font: var(--text-label-lg);
    letter-spacing: 1.5px;
    text-decoration: none;
    border-radius: var(--shape-sm);
    transition: all var(--duration-medium) var(--motion-standard);
}

.checkout-error-link:hover {
    background: var(--accent-bright);
    box-shadow: 0 0 16px var(--glow-accent);
}

/* ── Footer ── */

.checkout-footer {
    text-align: center;
    padding: var(--space-xl) 0 var(--space-lg);
    margin-top: var(--space-xl);
    font: var(--text-label-sm);
    color: var(--text-muted);
    letter-spacing: 2px;
}

/* ── Toast ── */

.checkout-toast {
    position: fixed;
    top: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    padding: 12px var(--space-xl);
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--shape-md);
    font: var(--text-body-md);
    color: var(--text-primary);
    z-index: 1000;
    box-shadow: var(--elevation-3);
    animation: toastSlide var(--duration-medium) var(--motion-spring);
}

.checkout-toast.hidden {
    display: none;
}

@keyframes toastSlide {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ── Empty message ── */

.checkout-empty-msg {
    font: var(--text-body-md);
    color: var(--text-muted);
    text-align: center;
    padding: var(--space-xl);
}

/* ── Mobile Responsive ── */

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

    .checkout-sidebar {
        position: static;
    }

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

    .checkout-top-bar {
        padding: var(--space-sm) var(--space-md);
    }

    .checkout-header {
        flex-direction: column;
        gap: var(--space-xs);
    }
}

@media (max-width: 480px) {
    .checkout-back-link span {
        display: none;
    }

    .checkout-back-link {
        font-size: 0;
        padding: var(--space-xs);
    }

    .checkout-back-link svg {
        width: 20px;
        height: 20px;
    }

    .checkout-trust-badges {
        flex-direction: column;
        align-items: center;
    }
}

/* Auth accessibility: disable animations for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .auth-scan-beam {
        animation: none;
        display: none;
    }
    .auth-submit::after {
        animation: none;
    }
    .particle {
        animation: none;
    }
    .auth-logo h1 {
        animation: none;
    }
}

/* ═══════════════════════════════════════════════════════════
   LEADERBOARD PAGE
   ═══════════════════════════════════════════════════════════ */

/* ── Leaderboard color tokens ── */
:root {
    --lb-gold: #ffd700;
    --lb-gold-glow: rgba(255, 215, 0, 0.3);
    --lb-gold-bg: rgba(255, 215, 0, 0.06);
    --lb-magenta: #ff00ff;
    --lb-magenta-glow: rgba(255, 0, 255, 0.25);
    --lb-magenta-bg: rgba(255, 0, 255, 0.05);
    --lb-cyan: #00d4ff;
    --lb-cyan-glow: rgba(0, 212, 255, 0.25);
    --lb-cyan-bg: rgba(0, 212, 255, 0.05);
    --lb-fire: #ffaa00;
}
:root[data-theme="light"] {
    --lb-gold: #cc9900;
    --lb-gold-glow: rgba(204, 153, 0, 0.2);
    --lb-gold-bg: rgba(204, 153, 0, 0.06);
    --lb-magenta: #cc00cc;
    --lb-magenta-glow: rgba(204, 0, 204, 0.15);
    --lb-magenta-bg: rgba(204, 0, 204, 0.04);
    --lb-cyan: #0099cc;
    --lb-cyan-glow: rgba(0, 153, 204, 0.15);
    --lb-cyan-bg: rgba(0, 153, 204, 0.04);
    --lb-fire: #cc8800;
}

/* ── Grid background ── */
.lb-grid-bg {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(var(--surface-tint), 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--surface-tint), 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* ── Scan beam ── */
.lb-scan-beam {
    position: fixed;
    left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--surface-tint), 0.25), transparent);
    z-index: 2;
    pointer-events: none;
    animation: lb-scanMove 8s linear infinite;
}
@keyframes lb-scanMove {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}

/* ── Scanline overlay ── */
.lb-scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image: repeating-linear-gradient(0deg, rgba(var(--surface-tint), 0.03) 0px, rgba(var(--surface-tint), 0.03) 1px, transparent 1px, transparent 3px);
    opacity: 0.6;
}

/* ── Container ── */
.lb-container {
    max-width: 960px;
    margin: 0 auto;
    padding: clamp(16px, 4vw, 40px) clamp(10px, 3vw, 20px);
    position: relative;
    z-index: 3;
}

/* ── Header ── */
.lb-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-xl);
}
.lb-header-label {
    font: var(--text-label-sm);
    color: var(--accent);
    letter-spacing: 0.2em;
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.lb-header-label .lb-line {
    display: inline-block;
    width: 20px;
    height: 1px;
    background: var(--accent);
}
.lb-header-title {
    font: var(--text-headline-lg);
    color: var(--text-primary);
    letter-spacing: 0.08em;
    position: relative;
    display: inline-block;
}
.lb-header-desc {
    font: var(--text-body-md);
    color: var(--text-secondary);
    margin-top: var(--space-sm);
    letter-spacing: 0.02em;
}

/* ── Glitch ── */
.lb-glitch { position: relative; }
.lb-glitch::before, .lb-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    font: var(--text-headline-lg);
    letter-spacing: 0.08em;
    opacity: 0;
    pointer-events: none;
}
.lb-glitch::before { color: var(--accent); clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%); }
.lb-glitch::after { color: var(--lb-magenta); clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%); }
.lb-glitch.active::before { opacity: 0.7; transform: translate(2px, -1px); }
.lb-glitch.active::after { opacity: 0.5; transform: translate(-2px, 1px); }

/* ── Back link ── */
.lb-back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: var(--space-xs) var(--space-md);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--shape-xs);
    transition: color var(--duration-medium) var(--motion-standard),
                background var(--duration-medium) var(--motion-standard),
                border-color var(--duration-medium) var(--motion-standard);
}
.lb-back-link:hover { color: var(--accent); background: rgba(0, 255, 100, 0.08); border-color: rgba(0, 255, 100, 0.25); }
.lb-back-link svg { width: 16px; height: 16px; }
:root[data-theme="light"] .lb-back-link { background: rgba(0, 0, 0, 0.05); border-color: rgba(0, 0, 0, 0.12); }
:root[data-theme="light"] .lb-back-link:hover { background: rgba(0, 168, 64, 0.08); border-color: rgba(0, 168, 64, 0.25); }

/* ── Stats bar ── */
.lb-stats-bar {
    display: flex;
    gap: 1px;
    margin-bottom: 28px;
}
.lb-stat-card {
    flex: 1;
    padding: 14px var(--space-md);
    background: var(--card-bg);
    border: 1px solid var(--outline);
    position: relative;
    overflow: hidden;
}
.lb-stat-label {
    font: var(--text-label-sm);
    color: var(--text-muted);
    letter-spacing: 0.15em;
    margin-bottom: var(--space-xs);
    position: relative;
    z-index: 2;
}
.lb-stat-value {
    font-family: var(--font-display);
    font-size: clamp(0.85rem, 2.8vw, 1.1rem);
    font-weight: 700;
    color: var(--accent);
    position: relative;
    z-index: 2;
}

/* ── Podium (Top 3) ── */
.lb-podium {
    display: flex;
    gap: var(--space-md);
    margin-bottom: 28px;
    align-items: flex-end;
}
.lb-podium-card {
    flex: 1;
    position: relative;
    padding: 22px var(--space-md);
    overflow: hidden;
    cursor: default;
    opacity: 0;
    transform: translateY(40px) scale(0.9);
    animation: lb-podiumIn 0.5s var(--motion-emphasized) forwards;
}
.lb-podium-card:nth-child(1) { animation-delay: 0.35s; order: -1; }
.lb-podium-card:nth-child(2) { animation-delay: 0.2s; flex: 1.2; padding: 28px 20px; }
.lb-podium-card:nth-child(3) { animation-delay: 0.5s; order: 1; }
@keyframes lb-podiumIn {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Podium color variants */
.lb-podium-card[data-rank="1"] {
    background: linear-gradient(160deg, var(--lb-gold-bg), var(--card-bg));
    border: 1px solid rgba(255, 215, 0, 0.2);
}
.lb-podium-card[data-rank="2"] {
    background: linear-gradient(160deg, var(--lb-magenta-bg), var(--card-bg));
    border: 1px solid rgba(255, 0, 255, 0.15);
}
.lb-podium-card[data-rank="3"] {
    background: linear-gradient(160deg, var(--lb-cyan-bg), var(--card-bg));
    border: 1px solid rgba(0, 212, 255, 0.15);
}
.lb-podium-card:hover { transform: translateY(-4px); transition: transform var(--duration-medium); }
.lb-podium-card[data-rank="1"]:hover { border-color: rgba(255, 215, 0, 0.5); }
.lb-podium-card[data-rank="2"]:hover { border-color: rgba(255, 0, 255, 0.4); }
.lb-podium-card[data-rank="3"]:hover { border-color: rgba(0, 212, 255, 0.4); }

/* Corner brackets */
.lb-cb { position: absolute; width: 16px; height: 16px; pointer-events: none; z-index: 3; }
.lb-cb--tl { top: -1px; left: -1px; border-top: 1.5px solid; border-left: 1.5px solid; }
.lb-cb--tr { top: -1px; right: -1px; border-top: 1.5px solid; border-right: 1.5px solid; }
.lb-cb--bl { bottom: -1px; left: -1px; border-bottom: 1.5px solid; border-left: 1.5px solid; }
.lb-cb--br { bottom: -1px; right: -1px; border-bottom: 1.5px solid; border-right: 1.5px solid; }
.lb-podium-card[data-rank="1"] .lb-cb { border-color: rgba(255, 215, 0, 0.4); }
.lb-podium-card[data-rank="2"] .lb-cb { border-color: rgba(255, 0, 255, 0.35); }
.lb-podium-card[data-rank="3"] .lb-cb { border-color: rgba(0, 212, 255, 0.35); }

/* Shine sweep */
.lb-shine-sweep {
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    pointer-events: none;
    z-index: 1;
    animation: lb-shineSweep 7s ease-in-out infinite;
}
.lb-podium-card[data-rank="1"] .lb-shine-sweep { background: linear-gradient(90deg, transparent, rgba(255,215,0,0.04), rgba(255,215,0,0.08), transparent); }
.lb-podium-card[data-rank="2"] .lb-shine-sweep { background: linear-gradient(90deg, transparent, rgba(255,0,255,0.03), rgba(255,0,255,0.06), transparent); }
.lb-podium-card[data-rank="3"] .lb-shine-sweep { background: linear-gradient(90deg, transparent, rgba(0,212,255,0.03), rgba(0,212,255,0.06), transparent); }
@keyframes lb-shineSweep {
    0%, 60% { left: -100%; }
    100% { left: 200%; }
}

/* Rank badge (hex) */
.lb-rank-badge {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: lb-badgePulse 2s ease-in-out infinite;
}
.lb-rank-badge span {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 800;
}
[data-rank="1"] .lb-rank-badge { background: linear-gradient(135deg, rgba(255,215,0,0.2), rgba(255,215,0,0.07)); }
[data-rank="1"] .lb-rank-badge span { color: var(--lb-gold); }
[data-rank="2"] .lb-rank-badge { background: linear-gradient(135deg, rgba(255,0,255,0.2), rgba(255,0,255,0.07)); }
[data-rank="2"] .lb-rank-badge span { color: var(--lb-magenta); }
[data-rank="3"] .lb-rank-badge { background: linear-gradient(135deg, rgba(0,212,255,0.2), rgba(0,212,255,0.07)); }
[data-rank="3"] .lb-rank-badge span { color: var(--lb-cyan); }
@keyframes lb-badgePulse {
    0%, 100% { box-shadow: 0 0 8px var(--lb-pulse-color); }
    50% { box-shadow: 0 0 20px var(--lb-pulse-color); }
}

/* Podium inner */
.lb-podium-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    position: relative;
    z-index: 2;
}
.lb-podium-rank-label {
    font: var(--text-label-sm);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.lb-podium-username {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.04em;
    margin-top: 2px;
}
.lb-podium-card[data-rank="1"] .lb-podium-username { font-size: 1rem; }
[data-rank="1"] .lb-podium-rank-label { color: var(--lb-gold); }
[data-rank="2"] .lb-podium-rank-label { color: var(--lb-magenta); }
[data-rank="3"] .lb-podium-rank-label { color: var(--lb-cyan); }

/* Avatar hex */
.lb-avatar-hex {
    margin: 0 auto 14px;
    position: relative;
    z-index: 2;
}
.lb-avatar-hex-inner {
    width: 64px;
    height: 64px;
    border-radius: var(--shape-full);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg-secondary);
}
.lb-podium-card[data-rank="1"] .lb-avatar-hex-inner { width: 80px; height: 80px; }
.lb-avatar-hex svg { width: 28px; height: 28px; color: var(--text-muted); }
.lb-podium-card[data-rank="1"] .lb-avatar-hex svg { width: 34px; height: 34px; }
.lb-avatar-hex img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--shape-full);
}
.lb-avatar-ring { display: none; }
.lb-avatar-fallback {
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

/* Podium stats */
.lb-podium-stats {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    position: relative;
    z-index: 2;
}
.lb-podium-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.lb-podium-stat-label {
    font: var(--text-label-sm);
    color: var(--text-secondary);
    letter-spacing: 0.1em;
}
.lb-podium-stat-label.muted { color: var(--text-muted); font-size: 0.6rem; }
.lb-podium-orders {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 800;
}
[data-rank="1"] .lb-podium-orders { color: var(--lb-gold); font-size: 1.3rem; }
[data-rank="2"] .lb-podium-orders { color: var(--lb-magenta); }
[data-rank="3"] .lb-podium-orders { color: var(--lb-cyan); }
.lb-podium-spent {
    font: var(--text-body-sm);
    font-weight: 600;
    color: var(--text-secondary);
}

/* Progress bar */
.lb-progress-bar {
    width: 100%;
    height: 3px;
    background: var(--outline-variant);
    position: relative;
}
.lb-progress-fill {
    height: 100%;
    width: 0;
    transition: width var(--duration-xl) var(--motion-standard);
}
[data-rank="1"] .lb-progress-fill { background: var(--lb-gold); box-shadow: 0 0 8px var(--lb-gold-glow); }
[data-rank="2"] .lb-progress-fill { background: var(--lb-magenta); box-shadow: 0 0 8px var(--lb-magenta-glow); }
[data-rank="3"] .lb-progress-fill { background: var(--lb-cyan); box-shadow: 0 0 8px var(--lb-cyan-glow); }

/* Rank tag */
.lb-rank-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.lb-rank-tag svg { width: 14px; height: 14px; }
.lb-rank-tag span {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Status badge */
.lb-status-badge {
    margin-top: var(--space-xs);
    padding: 4px 10px;
    text-align: center;
    font: var(--text-label-sm);
    letter-spacing: 0.15em;
}
[data-rank="1"] .lb-status-badge { background: rgba(255,215,0,0.07); border: 1px solid rgba(255,215,0,0.2); color: var(--lb-gold); }
[data-rank="2"] .lb-status-badge { background: rgba(255,0,255,0.05); border: 1px solid rgba(255,0,255,0.15); color: var(--lb-magenta); }
[data-rank="3"] .lb-status-badge { background: rgba(0,212,255,0.05); border: 1px solid rgba(0,212,255,0.15); color: var(--lb-cyan); }

/* ── Table ── */
.lb-table-wrapper {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--outline);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    animation: lb-fadeUp 0.5s 0.5s ease-out forwards;
}
@keyframes lb-fadeUp {
    to { opacity: 1; transform: translateY(0); }
}
.lb-table-header {
    display: grid;
    grid-template-columns: 50px 1.5fr 1fr 1fr 100px;
    padding: var(--space-md) 18px;
    border-bottom: 1px solid var(--outline-variant);
    position: relative;
    z-index: 2;
}
.lb-table-header span {
    font: var(--text-label-sm);
    color: var(--text-muted);
    letter-spacing: 0.15em;
}
.lb-row {
    display: grid;
    grid-template-columns: 50px 1.5fr 1fr 1fr 100px;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--outline-variant);
    cursor: default;
    transition: background var(--duration-short) var(--motion-standard);
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateX(-20px);
    animation: lb-rowIn 0.4s var(--motion-emphasized) forwards;
}
.lb-row:hover { background: var(--surface-1); }
.lb-row.lb-row--you {
    background: var(--surface-2);
    border-left: 2px solid var(--accent);
}
@keyframes lb-rowIn {
    to { opacity: 1; transform: translateX(0); }
}

.lb-rank-num {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}
.lb-user {
    display: flex;
    align-items: center;
    gap: 10px;
}
.lb-avatar-small {
    width: 32px;
    height: 32px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.lb-avatar-small svg { width: 14px; height: 14px; color: var(--accent); }
.lb-avatar-small img { width: 100%; height: 100%; object-fit: cover; }
.lb-name {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.03em;
    transition: color var(--duration-short) var(--motion-standard);
}
.lb-row:hover .lb-name { color: var(--accent); }
.lb-handle {
    font: var(--text-label-sm);
    color: var(--text-muted);
}
.lb-orders-cell {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.lb-orders-num {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
}
.lb-bar {
    flex: 1;
    max-width: 80px;
    height: 3px;
    background: var(--outline-variant);
}
.lb-bar-fill {
    height: 100%;
    background: var(--accent);
    box-shadow: 0 0 6px var(--glow-accent);
    width: 0;
    transition: width var(--duration-long) var(--motion-standard);
}
.lb-spent {
    font: var(--text-body-sm);
    font-weight: 600;
    color: var(--text-secondary);
}
.lb-badge {
    padding: 3px 8px;
    background: var(--surface-1);
    border: 1px solid var(--outline-accent);
    text-align: center;
    font: var(--text-label-sm);
    color: var(--accent);
    letter-spacing: 0.12em;
}

/* ── Desktop: hide top 3 from table (podium shows them) ── */
.lb-row--podium { display: none; }

/* ── Your Rank Section ── */
.lb-your-rank {
    margin-top: var(--space-lg);
    padding: var(--space-lg);
    background: var(--card-bg);
    border: 1px solid var(--outline-accent);
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: lb-fadeUp 0.5s 0.8s ease-out forwards;
}
.lb-your-rank-label {
    font: var(--text-label-md);
    color: var(--accent);
    letter-spacing: 0.15em;
    margin-bottom: var(--space-md);
}
.lb-your-rank-content {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}
.lb-your-rank-pos {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
}
.lb-your-rank-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}
.lb-your-rank-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}
.lb-your-rank-stats {
    font: var(--text-body-sm);
    color: var(--text-secondary);
}
.lb-your-rank-badge {
    margin-left: auto;
    padding: 6px 14px;
    border: 1px solid;
    font: var(--text-label-md);
    letter-spacing: 0.12em;
}
.lb-your-rank .lb-scanlines { opacity: 0.4; }

/* ── Empty state ── */
.lb-empty {
    text-align: center;
    padding: 60px var(--space-lg);
}
.lb-empty svg {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}
.lb-empty p {
    font: var(--text-headline-md);
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}
.lb-empty span {
    font: var(--text-body-sm);
    color: var(--text-muted);
}

/* ── Footer ── */
.lb-footer {
    margin-top: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0;
    animation: lb-fadeUp 0.5s 1s ease-out forwards;
}
.lb-footer span {
    font: var(--text-label-sm);
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

/* ── Loading skeleton ── */
.lb-skeleton {
    padding: 40px 20px;
    max-width: 960px;
    margin: 0 auto;
}
.lb-skeleton-bar {
    height: 16px;
    background: var(--surface-2);
    border-radius: var(--shape-xs);
    margin-bottom: var(--space-md);
    animation: lb-shimmer 1.5s ease-in-out infinite;
}
.lb-skeleton-bar:nth-child(1) { width: 40%; }
.lb-skeleton-bar:nth-child(2) { width: 60%; height: 28px; }
.lb-skeleton-bar:nth-child(3) { width: 30%; height: 12px; }
.lb-skeleton-podium {
    display: flex;
    gap: var(--space-md);
    margin: var(--space-xl) 0;
}
.lb-skeleton-card {
    flex: 1;
    height: 220px;
    background: var(--surface-1);
    border: 1px solid var(--outline-variant);
    animation: lb-shimmer 1.5s ease-in-out infinite;
}
.lb-skeleton-card:nth-child(2) { height: 260px; animation-delay: 0.15s; }
.lb-skeleton-card:nth-child(3) { animation-delay: 0.3s; }
.lb-skeleton-rows { margin-top: var(--space-lg); }
.lb-skeleton-row {
    height: 52px;
    background: var(--surface-1);
    border-bottom: 1px solid var(--outline-variant);
    animation: lb-shimmer 1.5s ease-in-out infinite;
}
.lb-skeleton-row:nth-child(n) { animation-delay: calc(0.1s * var(--i, 0)); }
@keyframes lb-shimmer {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}
@keyframes lb-row-shimmer {
    0% { left: -100%; }
    40%, 100% { left: 200%; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .lb-header { flex-direction: column; gap: var(--space-sm); }
    .lb-header-desc { margin-top: 2px; }
    .lb-back-link { margin-top: var(--space-xs); }
    .lb-stats-bar { gap: 1px; }
    .lb-stat-card { padding: 10px var(--space-sm); }
    .lb-stat-label { font-size: 0.55rem; letter-spacing: 0.1em; }
    /* Hide podium, show top 3 in table instead */
    .lb-podium { display: none; }
    .lb-row--podium { display: grid; }
    /* Top 3 row color effects */
    .lb-row[data-rank="1"] {
        background: linear-gradient(90deg, var(--lb-gold-bg), transparent);
        border-left: 2px solid var(--lb-gold);
    }
    .lb-row[data-rank="1"] .lb-rank-num { color: var(--lb-gold); font-weight: 800; }
    .lb-row[data-rank="1"] .lb-name { color: var(--lb-gold); }
    .lb-row[data-rank="1"]:hover { background: linear-gradient(90deg, rgba(255, 215, 0, 0.1), transparent); }
    .lb-row[data-rank="2"] {
        background: linear-gradient(90deg, var(--lb-magenta-bg), transparent);
        border-left: 2px solid var(--lb-magenta);
    }
    .lb-row[data-rank="2"] .lb-rank-num { color: var(--lb-magenta); font-weight: 800; }
    .lb-row[data-rank="2"] .lb-name { color: var(--lb-magenta); }
    .lb-row[data-rank="2"]:hover { background: linear-gradient(90deg, rgba(255, 0, 255, 0.08), transparent); }
    .lb-row[data-rank="3"] {
        background: linear-gradient(90deg, var(--lb-cyan-bg), transparent);
        border-left: 2px solid var(--lb-cyan);
    }
    .lb-row[data-rank="3"] .lb-rank-num { color: var(--lb-cyan); font-weight: 800; }
    .lb-row[data-rank="3"] .lb-name { color: var(--lb-cyan); }
    .lb-row[data-rank="3"]:hover { background: linear-gradient(90deg, rgba(0, 212, 255, 0.08), transparent); }
    /* Shimmer sweep on top 3 rows */
    .lb-row[data-rank="1"],
    .lb-row[data-rank="2"],
    .lb-row[data-rank="3"] {
        overflow: hidden;
    }
    .lb-row[data-rank="1"]::after,
    .lb-row[data-rank="2"]::after,
    .lb-row[data-rank="3"]::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 60%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
        animation: lb-row-shimmer 4s ease-in-out infinite;
        pointer-events: none;
        z-index: 3;
    }
    .lb-row[data-rank="1"]::after {
        background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.12), transparent);
    }
    .lb-row[data-rank="2"]::after {
        background: linear-gradient(90deg, transparent, rgba(255, 0, 255, 0.12), transparent);
        animation-delay: 1.3s;
    }
    .lb-row[data-rank="3"]::after {
        background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.12), transparent);
        animation-delay: 2.6s;
    }
    .lb-table-header, .lb-row {
        grid-template-columns: 36px 1.2fr 0.7fr 0.7fr auto;
        padding: 10px 12px;
        font-size: 0.85em;
    }
    .lb-badge { white-space: nowrap; }
    .lb-bar { max-width: 50px; }
    .lb-your-rank { padding: var(--space-md); }
    .lb-your-rank-content { flex-direction: column; align-items: flex-start; gap: var(--space-md); }
    .lb-your-rank-badge { margin-left: 0; }
    .lb-your-rank-pos { font-size: 1.5rem; }
    .lb-footer { flex-direction: column; gap: var(--space-xs); align-items: flex-start; }
}
@media (max-width: 480px) {
    .lb-header-desc { font-size: 0.75rem; }
    .lb-stat-label { font-size: 0.5rem; }
    .lb-table-header, .lb-row {
        grid-template-columns: 30px 1fr auto;
        padding: 10px;
    }
    /* Hide ORDERS and SPENT columns on small screens */
    .lb-table-header span:nth-child(3),
    .lb-table-header span:nth-child(4),
    .lb-row > :nth-child(3),
    .lb-row > :nth-child(4) {
        display: none;
    }
    .lb-badge { padding: 3px 6px; font-size: 0.55rem; }
    .lb-avatar-small { width: 28px; height: 28px; }
    .lb-avatar-small svg { width: 12px; height: 12px; }
    .lb-name { font-size: 0.7rem; }
    .lb-rank-num { font-size: 0.75rem; }
    .lb-your-rank-stats { font-size: 0.75rem; }
}
@media (max-width: 360px) {
    .lb-stat-card { padding: 10px 12px; }
    .lb-stat-label { font-size: 0.55rem; }
    .lb-table-header, .lb-row { padding: 8px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .lb-scan-beam { animation: none; display: none; }
    .lb-podium-card { animation: none; opacity: 1; transform: none; }
    .lb-table-wrapper { animation: none; opacity: 1; transform: none; }
    .lb-row { animation: none; opacity: 1; transform: none; }
    .lb-shine-sweep { animation: none; }
    .lb-rank-badge { animation: none; }
    .lb-avatar-ring { animation: none; }
    .lb-your-rank { animation: none; opacity: 1; }
    .lb-footer { animation: none; opacity: 1; }
    .lb-skeleton-bar, .lb-skeleton-card, .lb-skeleton-row { animation: none; }
    .lb-row[data-rank]::after { animation: none; display: none; }
}

/* Global reduced motion — catch-all for animations not covered above */
@media (prefers-reduced-motion: reduce) {
    /* Cart drawer & badge */
    .cart-drawer-item { animation: none !important; }
    .cart-drawer-item.removing { animation: none !important; opacity: 0; }
    .cart-badge.pulse { animation: none !important; }
    .cart-stock-toast { transition: none !important; }
    .shake { animation: none !important; }

    /* Checkout step transitions */
    .checkout-step-content { animation: none !important; }
    .step-exit { animation: none !important; }
    .checkout-confirm-icon svg { animation: none !important; }
    .checkout-confirm-text,
    .checkout-order-id,
    .checkout-next-steps,
    .checkout-confirm-note { animation: none !important; opacity: 1; transform: none; }

    /* Store product cards */
    .product-card { transition: none !important; }
    .add-to-cart-btn.added-flash { animation: none !important; }
    .card-size-picker { transition: none !important; }

    /* General transitions */
    .mobile-menu { transition: none !important; }
    .cart-drawer { transition: none !important; }
}

/* ═══ PRODUCT REVIEWS ═══════════════════════════════════════ */

.rv-section {
    width: 100%;
    max-width: 900px;
    margin: 2rem auto 0;
    padding: 0 1rem 3rem;
}

.rv-section.hidden {
    display: none;
}

/* ── Header ── */
.rv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--outline);
    margin-bottom: 1.5rem;
}

.rv-header-left {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
}

.rv-title {
    font: var(--text-headline-md);
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 2px;
}

.rv-count {
    font: var(--text-label-sm);
    color: var(--text-muted);
    letter-spacing: 1px;
}

.rv-header-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.rv-avg {
    font: var(--text-headline-lg);
    font-size: 1.8rem;
    color: var(--accent);
    text-shadow: 0 0 15px var(--glow-accent);
    line-height: 1;
}

.rv-stars {
    display: flex;
    align-items: center;
    gap: 2px;
}

/* ── Stars ── */
.rv-star {
    flex-shrink: 0;
}

.rv-star-full {
    color: var(--accent);
    filter: drop-shadow(0 0 4px var(--glow-accent));
}

.rv-star-half {
    color: var(--accent);
    filter: drop-shadow(0 0 4px var(--glow-accent));
}

.rv-star-empty {
    color: var(--text-muted);
    opacity: 0.4;
}

/* ── Rating distribution ── */
.rv-summary {
    display: flex;
    gap: var(--space-xl);
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--surface-1);
    border: 1px solid var(--outline-variant);
    border-radius: var(--shape-md);
}

.rv-distribution {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rv-dist-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.rv-dist-label {
    font: var(--text-label-sm);
    color: var(--text-secondary);
    width: 24px;
    text-align: right;
    flex-shrink: 0;
}

.rv-dist-bar {
    flex: 1;
    height: 8px;
    background: var(--outline-variant);
    border-radius: var(--shape-full);
    overflow: hidden;
}

.rv-dist-fill {
    height: 100%;
    background: var(--accent);
    border-radius: var(--shape-full);
    transition: width var(--duration-long) var(--motion-emphasized);
    box-shadow: 0 0 8px var(--glow-accent);
}

.rv-dist-count {
    font: var(--text-label-sm);
    color: var(--text-muted);
    width: 28px;
    flex-shrink: 0;
}

/* ── Fit summary pills ── */
.rv-fit-summary {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    justify-content: center;
    min-width: 140px;
}

.rv-fit-pill {
    font: var(--text-label-sm);
    letter-spacing: 0.5px;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--outline);
    border-radius: var(--shape-full);
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
}

.rv-fit-pill.rv-fit-dominant {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--surface-2);
    box-shadow: 0 0 10px var(--glow-accent);
}

/* ── Write review button ── */
.rv-form-wrapper {
    margin-bottom: 1.5rem;
}

.rv-write-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font: var(--text-label-md);
    letter-spacing: 1.5px;
    color: var(--accent);
    background: transparent;
    border: 1.5px solid var(--outline-accent);
    border-radius: var(--shape-sm);
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    transition: all var(--duration-medium) var(--motion-standard);
}

.rv-write-btn:hover {
    background: var(--surface-2);
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--glow-accent);
}

/* ── Review form ── */
.rv-form {
    margin-top: 1rem;
    padding: 1.25rem;
    background: var(--surface-1);
    border: 1px solid var(--outline-variant);
    border-radius: var(--shape-md);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: rv-form-in var(--duration-medium) var(--motion-emphasized);
}

.rv-form.hidden {
    display: none;
}

@keyframes rv-form-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.rv-form-label {
    font: var(--text-label-sm);
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: var(--space-sm);
}

/* Star input */
.rv-star-input {
    display: flex;
    gap: 4px;
}

.rv-star-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: var(--text-muted);
    opacity: 0.35;
    transition: all var(--duration-short) var(--motion-standard);
}

.rv-star-btn svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    transition: all var(--duration-short) var(--motion-standard);
}

.rv-star-btn.hover svg,
.rv-star-btn.active svg {
    fill: currentColor;
    stroke: currentColor;
}

.rv-star-btn.hover,
.rv-star-btn.active {
    color: var(--accent);
    opacity: 1;
    filter: drop-shadow(0 0 6px var(--glow-accent));
    transform: scale(1.15);
}

.rv-star-btn:hover {
    transform: scale(1.25);
}

/* Fit input */
.rv-fit-input {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.rv-fit-btn {
    font: var(--text-label-sm);
    letter-spacing: 0.5px;
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--outline);
    border-radius: var(--shape-full);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--duration-medium) var(--motion-standard);
}

.rv-fit-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.rv-fit-btn.active {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--on-accent);
    box-shadow: 0 0 10px var(--glow-accent);
}

/* Textarea */
.rv-textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--outline);
    border-radius: var(--shape-sm);
    color: var(--text-primary);
    font: var(--text-body-md);
    resize: vertical;
    transition: border-color var(--duration-medium) var(--motion-standard);
}

.rv-textarea::placeholder {
    color: var(--text-muted);
}

.rv-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 8px var(--glow-accent);
}

.rv-form-body {
    position: relative;
}

.rv-char-count {
    position: absolute;
    bottom: 8px;
    right: 10px;
    font: var(--text-label-sm);
    color: var(--text-muted);
}

/* Submit / Delete buttons */
.rv-form-actions {
    display: flex;
    gap: var(--space-sm);
}

.rv-submit-btn {
    flex: 1;
    padding: 0.65rem 1.5rem;
    font: var(--text-label-md);
    letter-spacing: 1.5px;
    background: var(--accent);
    color: var(--on-accent);
    border: none;
    border-radius: var(--shape-sm);
    cursor: pointer;
    transition: all var(--duration-medium) var(--motion-standard);
}

.rv-submit-btn:hover:not(:disabled) {
    box-shadow: 0 0 20px var(--glow-accent);
    transform: translateY(-1px);
}

.rv-submit-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.rv-delete-btn {
    padding: 0.65rem 1.2rem;
    font: var(--text-label-sm);
    letter-spacing: 1px;
    background: transparent;
    color: var(--error);
    border: 1px solid var(--error);
    border-radius: var(--shape-sm);
    cursor: pointer;
    transition: all var(--duration-medium) var(--motion-standard);
}

.rv-delete-btn:hover {
    background: var(--error-container);
}

/* ── Review cards ── */
.rv-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rv-card {
    padding: 1.25rem;
    background: var(--surface-1);
    border: 1px solid var(--outline-variant);
    border-radius: var(--shape-md);
    animation: rv-card-in var(--duration-medium) var(--motion-emphasized) both;
    transition: border-color var(--duration-medium) var(--motion-standard);
}

.rv-card:hover {
    border-color: var(--outline-accent);
}

@keyframes rv-card-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.rv-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.rv-card-user {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.rv-username {
    font: var(--text-label-md);
    letter-spacing: 1px;
    color: var(--text-primary);
    text-transform: uppercase;
}

.rv-verified {
    font: var(--text-label-sm);
    color: var(--accent);
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.rv-card-stars {
    display: flex;
    gap: 1px;
}

.rv-card-body {
    font: var(--text-body-md);
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 0.75rem;
}

.rv-card-footer {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.rv-fit-tag {
    font: var(--text-label-sm);
    letter-spacing: 0.5px;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--outline-accent);
    border-radius: var(--shape-full);
    color: var(--accent);
}

.rv-card-date {
    font: var(--text-label-sm);
    color: var(--text-muted);
    margin-left: auto;
}

/* ── Empty state ── */
.rv-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: 2.5rem 1rem;
    color: var(--text-muted);
}

.rv-empty p {
    font: var(--text-body-md);
    margin: 0;
}

/* ── Card ratings (store page) ── */
.card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 0 2px;
}

.card-rating .rv-star-full {
    color: var(--accent);
    filter: drop-shadow(0 0 3px var(--glow-accent));
}

.card-rating-avg {
    font: var(--text-label-sm);
    color: var(--accent);
    font-weight: 700;
}

.card-rating-count {
    font: var(--text-label-sm);
    color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .rv-section {
        padding: 0 0.75rem 2rem;
        margin-top: 1.5rem;
    }

    .rv-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .rv-avg {
        font-size: 1.5rem;
    }

    .rv-summary {
        flex-direction: column;
        gap: var(--space-md);
        padding: 1rem;
    }

    .rv-fit-summary {
        flex-direction: row;
        flex-wrap: wrap;
        min-width: unset;
    }

    .rv-card {
        padding: 1rem;
    }

    .rv-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }

    .rv-form {
        padding: 1rem;
    }

    .rv-star-btn svg {
        width: 24px;
        height: 24px;
    }

    .rv-fit-input {
        gap: 6px;
    }

    .rv-fit-btn {
        font-size: 0.6rem;
        padding: 0.35rem 0.65rem;
    }
}

/* Reduced motion for reviews */
@media (prefers-reduced-motion: reduce) {
    .rv-card { animation: none; opacity: 1; transform: none; }
    .rv-form { animation: none; }
    .rv-dist-fill { transition: none; }
}