@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ═══════════════════════════════════════════════════════
   DESIGN SYSTEM — TemuFinds Premium v3
   Dark mode · Glassmorphism · Micro-animations
   ═══════════════════════════════════════════════════════ */

:root {
    /* ── Core Background ── */
    --bg-base:        #080B14;
    --bg-surface:     #0D1120;
    --bg-card:        #111827;
    --bg-card-hover:  #161e30;
    --bg-input:       #0D1120;
    --bg-muted:       #1a2235;

    /* ── Brand Palette ── */
    --primary:        #6366F1;
    --primary-light:  #818CF8;
    --primary-dark:   #4F46E5;
    --primary-glow:   rgba(99, 102, 241, 0.35);
    --primary-subtle: rgba(99, 102, 241, 0.12);

    --accent:         #F59E0B;
    --accent-light:   #FCD34D;
    --accent-glow:    rgba(245, 158, 11, 0.25);

    --success:        #10B981;
    --success-glow:   rgba(16, 185, 129, 0.25);
    --error:          #EF4444;
    --error-glow:     rgba(239, 68, 68, 0.25);
    --warning:        #F59E0B;

    /* ── Gradients ── */
    --grad-brand:     linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #A78BFA 100%);
    --grad-gold:      linear-gradient(135deg, #F59E0B 0%, #FCD34D 100%);
    --grad-card:      linear-gradient(145deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
    --grad-hero:      radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99,102,241,0.18) 0%, transparent 70%);
    --grad-glow-orb1: radial-gradient(circle, rgba(99,102,241,0.25) 0%, transparent 70%);
    --grad-glow-orb2: radial-gradient(circle, rgba(139,92,246,0.2) 0%, transparent 70%);

    /* ── Text ── */
    --text-primary:   #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted:     #64748B;
    --text-dim:       #334155;

    /* ── Borders ── */
    --border:         rgba(255, 255, 255, 0.07);
    --border-hover:   rgba(99, 102, 241, 0.4);
    --border-focus:   rgba(99, 102, 241, 0.7);
    --border-card:    rgba(255, 255, 255, 0.06);

    /* ── Typography ── */
    --font:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* ── Spacing ── */
    --sp-2xs: 0.125rem;
    --sp-xs:  0.25rem;
    --sp-sm:  0.5rem;
    --sp-md:  1rem;
    --sp-lg:  1.5rem;
    --sp-xl:  2rem;
    --sp-2xl: 3rem;
    --sp-3xl: 4rem;
    --sp-4xl: 6rem;

    /* ── Radius ── */
    --r-xs:   6px;
    --r-sm:   8px;
    --r-md:   12px;
    --r-lg:   16px;
    --r-xl:   20px;
    --r-2xl:  24px;
    --r-full: 9999px;

    /* ── Shadows ── */
    --shadow-sm:    0 1px 3px rgba(0,0,0,0.3);
    --shadow-md:    0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg:    0 16px 48px rgba(0,0,0,0.5);
    --shadow-brand: 0 8px 32px rgba(99,102,241,0.3), 0 2px 8px rgba(99,102,241,0.2);
    --shadow-card:  0 4px 24px rgba(0,0,0,0.35);
    --shadow-glow:  0 0 40px rgba(99,102,241,0.2);

    /* ── Transitions ── */
    --t-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-base:   250ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-slow:   400ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* ── Compat aliases for admin.css (old var names → new) ── */
    --color-bg-primary:   var(--bg-base);
    --color-bg-secondary: var(--bg-surface);
    --color-bg-card:      var(--bg-card);
    --color-bg-card-hover: var(--bg-card-hover);
    --color-bg-input:     var(--bg-input);
    --color-text-primary: var(--text-primary);
    --color-text-secondary: var(--text-secondary);
    --color-text-muted:   var(--text-muted);
    --color-text-dim:     var(--text-dim);
    --color-border:       var(--border);
    --color-primary:      var(--primary);
    --color-primary-light: var(--primary-light);
    --color-primary-muted: var(--primary-subtle);
    --color-success:      var(--success);
    --color-error:        var(--error);
    --color-warning:      var(--warning);
    --gradient-primary:   var(--grad-brand);
    --gradient-surface:   var(--bg-card);
    --font-family:        var(--font);
    --transition-fast:    var(--t-fast);
    --transition-base:    var(--t-base);
    --shadow-glow-sm:     var(--shadow-glow);
    --radius-sm:          var(--r-sm);
    --radius-md:          var(--r-md);
    --radius-lg:          var(--r-lg);
    --radius-full:        var(--r-full);
    --space-sm:           var(--sp-sm);
    --space-md:           var(--sp-md);
    --space-lg:           var(--sp-lg);
    --space-xl:           var(--sp-xl);
}

/* ═══════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    color-scheme: dark;
}

body {
    font-family: var(--font);
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color-scheme: dark;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ═══════════════════════════════════════════════════════
   BACKGROUND EFFECTS
   ═══════════════════════════════════════════════════════ */

/* Hero background gradient mesh */
.hero-bg-blue {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 70% at 20% -10%, rgba(99,102,241,0.22) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 120%, rgba(139,92,246,0.18) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(99,102,241,0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    border-radius: 0;
    height: 100vh;
}

/* Animated glow orbs */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
    animation: driftOrb 18s ease-in-out infinite;
}

.bg-glow--purple {
    width: 600px; height: 600px;
    background: rgba(99, 102, 241, 0.12);
    top: -20%; right: -10%;
    animation-duration: 22s;
}

.bg-glow--cyan {
    width: 500px; height: 500px;
    background: rgba(139, 92, 246, 0.10);
    bottom: -15%; left: -8%;
    animation-duration: 28s;
    animation-direction: reverse;
}

.bg-glow--center {
    width: 400px; height: 400px;
    background: rgba(99, 102, 241, 0.06);
    top: 40%; left: 45%;
    transform: translate(-50%, -50%);
    animation: pulseOrb 14s ease-in-out infinite;
}

@keyframes driftOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%       { transform: translate(30px, -20px) scale(1.04); }
    50%       { transform: translate(-20px, 15px) scale(0.96); }
    75%       { transform: translate(15px, 20px) scale(1.02); }
}

@keyframes pulseOrb {
    0%, 100% { opacity: 0.5; transform: translate(-50%,-50%) scale(1); }
    50%       { opacity: 1; transform: translate(-50%,-50%) scale(1.2); }
}

/* Split bg for browse page */
.split-bg-blue {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 50% -5%, rgba(99,102,241,0.20) 0%, transparent 60%),
        radial-gradient(ellipse 40% 30% at 80% 100%, rgba(139,92,246,0.12) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    height: 100vh;
}

#particles-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

/* ═══════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════ */

.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 0 var(--sp-xl);
    transition: all var(--t-base);
    background: rgba(8, 11, 20, 0.6);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid var(--border);
}

.navbar__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.navbar__brand {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    text-decoration: none;
}

.navbar__logo {
    width: 36px; height: 36px;
    background: var(--grad-brand);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(99,102,241,0.4);
    transition: transform var(--t-spring);
}

.navbar__brand:hover .navbar__logo {
    transform: scale(1.08) rotate(-3deg);
}

.navbar__logo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 55%);
}

.navbar__logo svg {
    width: 18px; height: 18px;
    color: white;
    position: relative;
    z-index: 1;
}

.navbar__name {
    font-size: 1.1rem;
    font-weight: 800;
    background: var(--grad-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.025em;
}

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

.navbar__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.45rem 1rem;
    border-radius: var(--r-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--t-fast);
    border: 1px solid transparent;
}

.navbar__link svg {
    width: 15px; height: 15px;
    opacity: 0.7;
}

.navbar__link:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.06);
    border-color: var(--border);
}

.navbar__link--active {
    background: var(--primary-subtle);
    color: var(--primary-light);
    border-color: rgba(99,102,241,0.25);
}

.navbar__link--active svg { opacity: 1; }

/* ═══════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════ */

.main-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--sp-xl);
}

/* ═══════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════ */

.hero {
    text-align: center;
    margin-bottom: var(--sp-2xl);
    animation: fadeInUp 0.65s ease-out both;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-subtle);
    border: 1px solid rgba(99,102,241,0.3);
    color: var(--primary-light);
    padding: 6px 16px;
    border-radius: var(--r-full);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: var(--sp-lg);
}

.hero__eyebrow-dot {
    width: 6px; height: 6px;
    background: var(--primary-light);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 8px var(--primary);
}

.hero__title {
    font-size: clamp(2rem, 5.5vw, 3.2rem);
    font-weight: 900;
    line-height: 1.12;
    margin-bottom: var(--sp-md);
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

.hero__title-gradient {
    background: var(--grad-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: shimmer 5s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% center; }
    50%       { background-position: 100% center; }
}

.hero__subtitle {
    font-size: clamp(0.9rem, 2.2vw, 1.05rem);
    color: var(--text-secondary);
    max-width: 440px;
    margin: 0 auto;
    line-height: 1.8;
    font-weight: 400;
}

/* ═══════════════════════════════════════════════════════
   SEARCH CARD
   ═══════════════════════════════════════════════════════ */

.search-card {
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    background: linear-gradient(145deg, rgba(17,24,39,0.95) 0%, rgba(13,17,32,0.98) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3); /* Permanently active border */
    border-radius: var(--r-2xl);
    padding: var(--sp-2xl) var(--sp-xl);
    position: relative;
    z-index: 10;
    box-shadow: var(--shadow-card), 0 0 60px rgba(99,102,241,0.15); /* Permanently active shadow glow */
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    transition: box-shadow var(--t-base), border-color var(--t-base);
    animation: scaleIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
    overflow: hidden;
}

.search-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.6;
}

.search-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--r-2xl);
    background: var(--grad-brand);
    z-index: -1;
    opacity: 0.15; /* Permanently active glow overlay */
    transition: opacity var(--t-base);
}

.search-card:focus-within::after {
    /* Kept for specificity, but matches default now */
    opacity: 0.15;
}

.search-card:focus-within {
    /* Kept for specificity, but matches default now */
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-card), 0 0 60px rgba(99,102,241,0.15);
}

/* Card label / badge */
.search-card__label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--sp-xl);
}

.search-card__label-dot {
    width: 7px; height: 7px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(16,185,129,0.6);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 10px rgba(16,185,129,0.6); }
    50%       { opacity: 0.5; transform: scale(0.85); box-shadow: 0 0 4px rgba(16,185,129,0.3); }
}

/* ═══════════════════════════════════════════════════════
   INPUT GROUP
   ═══════════════════════════════════════════════════════ */

.input-group {
    position: relative;
    margin-bottom: var(--sp-md);
}

.input-group__icon {
    position: absolute;
    left: var(--sp-lg);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    pointer-events: none;
    transition: color var(--t-base);
    z-index: 2;
}

.input-group__icon svg {
    width: 20px; height: 20px;
    display: block;
}

.input-group__input {
    width: 100%;
    padding: 1.1rem 1.2rem 1.1rem 3.5rem;
    background: rgba(13,17,32,0.8);
    border: 1.5px solid var(--primary);
    border-radius: var(--r-lg);
    font-family: var(--font);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    outline: none;
    transition: all var(--t-base);
    letter-spacing: 0.15em;
    text-align: center;
    caret-color: var(--primary-light);
    box-shadow: 0 0 0 4px var(--primary-subtle), 0 0 20px rgba(99,102,241,0.15);
}

.input-group__input::placeholder {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--text-dim);
}

.input-group__input:focus {
    /* Keep it the same or optionally increase glow on actual focus if desired, but we'll leave it identical per request */
}

.input-group__input.is-valid {
    border-color: var(--success);
    box-shadow: 0 0 0 4px rgba(16,185,129,0.1);
}

.input-group__input.is-invalid {
    border-color: var(--error);
    box-shadow: 0 0 0 4px rgba(239,68,68,0.1);
    animation: shake 0.4s ease;
}

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

/* ═══════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════ */

.btn-primary,
.btn-submit {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--grad-brand);
    border: none;
    border-radius: var(--r-lg);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--t-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 20px rgba(99,102,241,0.35);
}

.btn-primary::before,
.btn-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 55%);
    opacity: 0;
    transition: opacity var(--t-base);
}

.btn-primary:hover,
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(99,102,241,0.5), 0 2px 8px rgba(99,102,241,0.3);
}

.btn-primary:hover::before,
.btn-submit:hover::before {
    opacity: 1;
}

.btn-primary:active,
.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 12px rgba(99,102,241,0.3);
}

.btn-primary:disabled,
.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary svg,
.btn-submit svg {
    width: 18px; height: 18px;
}

.btn-submit__spinner {
    display: none;
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-submit.is-loading .btn-submit__text { display: none; }
.btn-submit.is-loading .btn-submit__spinner { display: block; }

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

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.7rem 1.5rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--t-base);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-1px);
}

.btn-secondary svg { width: 18px; height: 18px; }

/* ═══════════════════════════════════════════════════════
   STATUS MESSAGE
   ═══════════════════════════════════════════════════════ */

.status-message {
    margin-top: 0;
    padding: 0 var(--sp-md);
    border-radius: var(--r-sm);
    font-size: 0.82rem;
    font-weight: 500;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(-6px);
    transition: all var(--t-base);
}

.status-message.is-visible {
    opacity: 1;
    max-height: 100px;
    margin-top: var(--sp-md);
    padding: var(--sp-sm) var(--sp-md);
    transform: translateY(0);
}

.status-message.is-error {
    background: rgba(239,68,68,0.08);
    color: #FCA5A5;
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: var(--r-md);
}

.status-message.is-success {
    background: rgba(16,185,129,0.08);
    color: #6EE7B7;
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: var(--r-md);
}

/* ═══════════════════════════════════════════════════════
   HOW IT WORKS STEPS
   ═══════════════════════════════════════════════════════ */

.steps {
    display: flex;
    gap: var(--sp-md);
    margin-top: var(--sp-3xl);
    max-width: 680px;
    width: 100%;
    animation: fadeInUp 0.65s ease-out 0.5s both;
    padding-top: 14px; /* give space for overflowing step__number badges */
}

.step {
    flex: 1;
    text-align: center;
    padding: var(--sp-lg) var(--sp-md);
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--r-xl);
    transition: all var(--t-base);
    position: relative;
    overflow: visible; /* allow step__number badge to overflow */
}

.step::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.5), transparent);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    opacity: 0;
    transition: opacity var(--t-base);
    z-index: 1;
}

.step:hover {
    border-color: rgba(99,102,241,0.25);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 20px rgba(99,102,241,0.1);
    background: var(--bg-card-hover);
}

.step:hover::before { opacity: 1; }

.step__icon-wrap {
    width: 46px; height: 46px;
    margin: 0 auto var(--sp-sm);
    background: var(--primary-subtle);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t-base);
}

.step:hover .step__icon-wrap {
    background: rgba(99,102,241,0.2);
    border-color: rgba(99,102,241,0.4);
    box-shadow: 0 0 20px rgba(99,102,241,0.2);
}

.step__icon-wrap svg {
    width: 20px; height: 20px;
    color: var(--primary-light);
}

.step__number {
    position: absolute;
    top: -10px; right: -10px;
    width: 26px; height: 26px;
    background: var(--grad-brand);
    border-radius: var(--r-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 800;
    color: white;
    border: 2.5px solid var(--bg-base);
    box-shadow: 0 2px 10px rgba(99,102,241,0.5);
    z-index: 2;
}

.step__title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--sp-2xs);
}

.step__desc {
    font-size: 0.73rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */

.footer {
    margin-top: var(--sp-3xl);
    text-align: center;
    color: var(--text-dim);
    font-size: 0.78rem;
    animation: fadeInUp 0.65s ease-out 0.7s both;
}

.footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--t-fast);
}

.footer a:hover { color: var(--primary-light); }

/* ═══════════════════════════════════════════════════════
   REDIRECT PAGE
   ═══════════════════════════════════════════════════════ */

.redirect-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--sp-xl);
    text-align: center;
}

.redirect-card {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(145deg, rgba(17,24,39,0.98), rgba(13,17,32,0.99));
    border: 1px solid var(--border-card);
    border-radius: var(--r-2xl);
    padding: var(--sp-2xl) var(--sp-xl);
    position: relative;
    overflow: hidden;
    animation: scaleIn 0.45s ease-out;
    box-shadow: var(--shadow-card), var(--shadow-glow);
    backdrop-filter: blur(24px);
}

.redirect-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.7;
}

@keyframes scaleIn {
    from { transform: scale(0.92); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.redirect__product-image {
    width: 100px; height: 100px;
    border-radius: var(--r-lg);
    object-fit: cover;
    margin: 0 auto var(--sp-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.redirect__product-image-placeholder {
    width: 100px; height: 100px;
    border-radius: var(--r-lg);
    margin: 0 auto var(--sp-lg);
    background: var(--bg-muted);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.redirect__product-image-placeholder svg {
    width: 36px; height: 36px;
    color: var(--text-dim);
}

.redirect__product-number {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary-subtle);
    color: var(--primary-light);
    padding: 4px 14px;
    border-radius: var(--r-full);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: var(--sp-md);
    letter-spacing: 0.06em;
    border: 1px solid rgba(99,102,241,0.2);
}

.redirect__product-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: var(--sp-lg);
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.redirect__status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: var(--sp-lg);
}

.redirect__spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(99,102,241,0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.redirect__progress {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--r-full);
    overflow: hidden;
    margin-bottom: var(--sp-lg);
}

.redirect__progress-bar {
    height: 100%;
    background: var(--grad-brand);
    border-radius: var(--r-full);
    animation: progressFill 3s ease-in-out forwards;
}

@keyframes progressFill {
    from { width: 0%; }
    to   { width: 100%; }
}

.redirect__manual-link {
    font-size: 0.78rem;
    color: var(--text-dim);
}

.redirect__manual-link a {
    color: var(--primary-light);
    font-weight: 500;
    transition: color var(--t-fast);
}

.redirect__manual-link a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════
   ERROR PAGES
   ═══════════════════════════════════════════════════════ */

.error-page-card {
    width: 100%;
    max-width: 460px;
    background: linear-gradient(145deg, rgba(17,24,39,0.98), rgba(13,17,32,0.99));
    border: 1px solid var(--border-card);
    border-radius: var(--r-2xl);
    padding: var(--sp-2xl);
    text-align: center;
    animation: scaleIn 0.45s ease-out;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(24px);
}

.error-page-icon {
    width: 72px; height: 72px;
    margin: 0 auto var(--sp-lg);
    border-radius: var(--r-xl);
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-page-icon--404 {
    background: rgba(245,158,11,0.08);
    border: 1px solid rgba(245,158,11,0.2);
}
.error-page-icon--404 svg { color: #FCD34D; }

.error-page-icon--error {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.2);
}
.error-page-icon--error svg { color: #F87171; }

.error-page-code {
    font-size: 3rem;
    font-weight: 900;
    background: var(--grad-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: var(--sp-xs);
}

.error-page-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: var(--sp-sm);
    letter-spacing: -0.02em;
}

.error-page-message {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--sp-xl);
    line-height: 1.7;
}

.error-page-actions {
    display: flex;
    gap: var(--sp-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.error-card {
    width: 100%;
    max-width: 440px;
    background: linear-gradient(145deg, rgba(17,24,39,0.98), rgba(13,17,32,0.99));
    border: 1px solid rgba(239,68,68,0.12);
    border-radius: var(--r-2xl);
    padding: var(--sp-2xl);
    text-align: center;
    animation: scaleIn 0.45s ease-out;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(24px);
}

.error-card__icon {
    width: 72px; height: 72px;
    margin: 0 auto var(--sp-lg);
    background: rgba(245,158,11,0.08);
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: var(--r-xl);
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-card__icon svg { width: 32px; height: 32px; color: #FCD34D; }
.error-card__title { font-size: 1.2rem; font-weight: 700; margin-bottom: var(--sp-sm); }

.error-card__message {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--sp-xl);
    line-height: 1.7;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    background: var(--grad-brand);
    border: none;
    border-radius: var(--r-md);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--t-base);
    box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}

.btn-back svg { width: 18px; height: 18px; }

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(99,102,241,0.45);
}

/* ═══════════════════════════════════════════════════════
   BROWSE PAGE
   ═══════════════════════════════════════════════════════ */

.browse-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding-top: 88px;
    padding-bottom: var(--sp-3xl);
}

.browse-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--sp-xl);
}

.browse-header {
    text-align: center;
    margin-bottom: var(--sp-2xl);
    animation: fadeInDown 0.6s ease-out;
}

.browse-header__title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    margin-bottom: var(--sp-sm);
    background: var(--grad-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.browse-header__subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Search & Filter Bar */
.browse-filters {
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
    margin-bottom: var(--sp-xl);
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

/* Category chips row — horizontal scroll */
.browse-categories {
    display: flex;
    gap: var(--sp-xs);
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.browse-categories::-webkit-scrollbar { display: none; }

.browse-filters form {
    width: 100%;
}

.browse-search {
    width: 100%;
    position: relative;
}

.browse-search__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    pointer-events: none;
}

.browse-search__icon svg { width: 17px; height: 17px; }

.browse-search__input {
    width: 100%;
    padding: 0.72rem 1rem 0.72rem 2.6rem;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--r-lg);
    font-family: var(--font);
    font-size: 0.88rem;
    color: var(--text-primary);
    outline: none;
    transition: all var(--t-fast);
}

.browse-search__input:focus {
    border-color: rgba(99,102,241,0.4);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
    background: var(--bg-card-hover);
}

.browse-search__input::placeholder { color: var(--text-dim); }

.browse-category-btn {
    padding: 0.5rem 1.1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--r-full);
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--t-fast);
    white-space: nowrap;
    flex-shrink: 0;
    scroll-snap-align: start;
}

.browse-category-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.12);
}

.browse-category-btn--active {
    background: var(--primary-subtle);
    color: var(--primary-light);
    border-color: rgba(99,102,241,0.3);
    box-shadow: 0 0 12px rgba(99,102,241,0.15);
    font-weight: 700;
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--sp-lg);
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--r-xl);
    overflow: hidden;
    transition: all var(--t-base);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.4), transparent);
    opacity: 0;
    transition: opacity var(--t-base);
}

.product-card:hover {
    border-color: rgba(99,102,241,0.2);
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 30px rgba(99,102,241,0.12);
    background: var(--bg-card-hover);
}

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

.product-card__image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--bg-muted);
    position: relative;
    overflow: hidden;
    border-radius: var(--r-lg) var(--r-lg) 0 0; /* round only top corners */
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--t-slow);
    padding: 10px;
    border-radius: inherit;
}

.product-card:hover .product-card__image img {
    transform: scale(1.06);
}

.product-card__image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-muted);
}

.product-card__image-placeholder svg {
    width: 44px; height: 44px;
    color: var(--text-dim);
    opacity: 0.4;
}

.product-card__badge {
    position: absolute;
    top: 10px; left: 10px;
    background: rgba(8,11,20,0.8);
    backdrop-filter: blur(8px);
    color: var(--primary-light);
    padding: 4px 10px;
    border-radius: var(--r-full);
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid rgba(99,102,241,0.25);
    letter-spacing: 0.04em;
    display: inline-flex;
}

.product-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: var(--sp-md) var(--sp-lg) var(--sp-lg);
    gap: var(--sp-xs);
}

.product-card__category {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary-light);
    opacity: 0.8;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.product-card__title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.01em;
    margin-top: 2px;
}

.product-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-subtle);
    color: var(--primary-light);
    padding: 7px 14px;
    border-radius: var(--r-full);
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid rgba(99,102,241,0.2);
    transition: all var(--t-fast);
}

.product-card__share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--t-fast);
    z-index: 10;
}

.product-card__share-btn svg {
    width: 15px;
    height: 15px;
}

.product-card__share-btn:hover {
    background: var(--primary-subtle);
    color: var(--primary-light);
    border-color: rgba(99, 102, 241, 0.3);
}

.product-card:hover .product-card__btn {
    background: rgba(99,102,241,0.2);
    border-color: rgba(99,102,241,0.4);
    box-shadow: 0 0 12px rgba(99,102,241,0.2);
}

.product-card__desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-light);
    transition: gap var(--t-fast);
}

.product-card:hover .product-card__cta { gap: 10px; }

.product-card__cta svg {
    width: 16px; height: 16px;
    transition: transform var(--t-fast);
}

.product-card:hover .product-card__cta svg { transform: translateX(2px); }

.product-card__clicks {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--text-dim);
}

.product-card__clicks svg { width: 13px; height: 13px; }

/* ═══════════════════════════════════════════════════════
   SKELETON LOADERS
   ═══════════════════════════════════════════════════════ */

.skeleton-loading {
    background: linear-gradient(90deg, var(--bg-muted) 25%, var(--bg-card-hover) 50%, var(--bg-muted) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite linear;
    border-radius: inherit;
}

.skeleton-loading img { opacity: 0 !important; }

@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.reveal-image {
    animation: fade-in 0.5s ease-out forwards;
}

@keyframes fade-in {
    from { opacity: 0; filter: blur(4px); }
    to   { opacity: 1; filter: blur(0); }
}

/* Empty state */
.browse-empty {
    text-align: center;
    padding: var(--sp-4xl) var(--sp-xl);
    color: var(--text-muted);
    grid-column: 1 / -1;
}

.browse-empty__icon {
    width: 80px; height: 80px;
    margin: 0 auto var(--sp-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--r-xl);
    display: flex;
    align-items: center;
    justify-content: center;
}

.browse-empty__icon svg { width: 36px; height: 36px; color: var(--text-dim); opacity: 0.5; }

.browse-empty__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--sp-xs);
}

.browse-empty__message { font-size: 0.9rem; line-height: 1.6; }

/* Pagination */
.browse-pagination {
    display: flex;
    gap: var(--sp-xs);
    justify-content: center;
    margin-top: var(--sp-2xl);
}

.browse-pagination__link {
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border-card);
    transition: all var(--t-fast);
    background: var(--bg-card);
}

.browse-pagination__link:hover {
    border-color: rgba(99,102,241,0.35);
    color: var(--primary-light);
    background: var(--primary-subtle);
}

.browse-pagination__link--active {
    background: var(--grad-brand);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 14px rgba(99,102,241,0.4);
}

/* ═══════════════════════════════════════════════════════
   NUMPAD
   ═══════════════════════════════════════════════════════ */

.numpad {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-sm);
    margin-top: var(--sp-lg);
}

.numpad.is-visible { display: grid; }

.numpad__key {
    background: var(--bg-muted);
    border: 1px solid var(--border-card);
    border-radius: var(--r-md);
    padding: var(--sp-md);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.12s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font);
}

.numpad__key:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255,255,255,0.1);
}

.numpad__key:active {
    transform: scale(0.93);
    background: var(--bg-card-hover);
}

.numpad__key svg { width: 20px; height: 20px; }

.numpad__key--action {
    background: var(--grad-brand);
    border-color: transparent;
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}

.numpad__key--action:hover { opacity: 0.9; border-color: transparent; }

/* ═══════════════════════════════════════════════════════
   BRAND (centered hero version)
   ═══════════════════════════════════════════════════════ */

.brand {
    text-align: center;
    margin-bottom: var(--sp-xl);
    animation: fadeInDown 0.65s ease-out;
}

.brand__logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--sp-sm);
}

.brand__icon {
    width: 52px; height: 52px;
    background: var(--grad-brand);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-brand);
    position: relative;
    overflow: hidden;
}

.brand__icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 55%);
}

.brand__icon svg { width: 26px; height: 26px; color: white; position: relative; z-index: 1; }

.brand__name {
    font-size: 2rem;
    font-weight: 900;
    background: var(--grad-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.035em;
}

.brand__tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ═══════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════ */

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

/* ═══════════════════════════════════════════════════════
   BOTTOM NAVIGATION (Mobile)
   ═══════════════════════════════════════════════════════ */

.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(8, 11, 20, 0.85);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-top: 1px solid var(--border);
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav__inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 60px;
}

.bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 600;
    transition: color var(--t-fast);
    padding: 8px 20px;
    border-radius: var(--r-md);
}

.bottom-nav__item.is-active {
    color: var(--primary-light);
}

.bottom-nav__item.is-active svg {
    filter: drop-shadow(0 0 6px rgba(99,102,241,0.6));
}

.bottom-nav__item svg { width: 22px; height: 22px; }

/* ═══════════════════════════════════════════════════════
   TRUST BADGES / MISC
   ═══════════════════════════════════════════════════════ */

/* Divider line */
.divider {
    width: 100%;
    height: 1px;
    background: var(--border);
    margin: var(--sp-lg) 0;
}

/* Tag pill */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--r-full);
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--primary-subtle);
    color: var(--primary-light);
    border: 1px solid rgba(99,102,241,0.2);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .navbar__links { display: none !important; }
    .bottom-nav { display: block; }  /* show bottom nav on mobile */

    /* Add bottom padding so content doesn't hide under bottom nav */
    .browse-container,
    .main-container { padding-bottom: 76px; }

    .main-container {
        padding: var(--sp-md);
        justify-content: flex-start;
        padding-top: 10vh;
    }

    .search-card {
        padding: var(--sp-xl) var(--sp-lg);
        border-radius: var(--r-xl);
    }

    .steps {
        flex-direction: column;
        gap: var(--sp-sm);
    }

    .step {
        display: flex;
        align-items: center;
        gap: var(--sp-md);
        text-align: left;
        padding: var(--sp-md) var(--sp-lg);
    }

    .step__icon-wrap { margin: 0; min-width: 46px; }
    .step__number { top: -6px; right: -6px; width: 22px; height: 22px; font-size: 0.62rem; }
    .step__content { flex: 1; }

    .hero__title { font-size: 1.6rem; }

    .products-grid {
        grid-template-columns: 1fr; /* single column list on mobile */
        gap: var(--sp-md);
    }

    .products-grid .product-card {
        flex-direction: row; /* horizontal layout on mobile list */
        align-items: stretch;
    }

    .products-grid .product-card__image {
        width: 110px;
        min-width: 110px;
        height: 110px;
        aspect-ratio: unset;          /* override the 1/1 ratio */
        border-radius: var(--r-lg) 0 0 var(--r-lg);
        flex-shrink: 0;
        align-self: stretch;
    }

    .products-grid .product-card__body {
        padding: var(--sp-md);
        justify-content: center;
        gap: var(--sp-xs);
    }

    /* Max 2 lines title in list view */
    .products-grid .product-card .product-card__title {
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 0.88rem;
    }

    .products-grid .product-card__btn {
        margin-top: var(--sp-sm);
        align-self: flex-start;
        padding: 5px 12px;
        font-size: 0.74rem;
    }

    .browse-container { padding: 0 var(--sp-md); }
    .browse-header__title { font-size: 1.5rem; }

    .bg-glow--purple { width: 300px; height: 300px; }
    .bg-glow--cyan   { width: 280px; height: 280px; }
}

@media (max-width: 480px) {
    .search-card {
        padding: var(--sp-lg) var(--sp-md);
        border-radius: var(--r-lg);
    }

    .products-grid { grid-template-columns: 1fr; }

    .error-page-actions { flex-direction: column; }
    .error-page-actions .btn-primary,
    .error-page-actions .btn-secondary { width: 100%; }

    .hero__title { font-size: 1.45rem; }
}

@media (hover: none) and (pointer: coarse) {
    .numpad { display: grid; }
}

/* ═══════════════════════════════════════════════════════
   HELP SECTION & TIKTOK MOCKUP
   ═══════════════════════════════════════════════════════ */
.help-section {
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.help-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0.5rem;
}
.help-toggle:hover { color: var(--primary-light); }
.help-toggle svg { color: var(--primary); }
.help-toggle .chevron { transition: transform 0.3s ease; color: var(--text-muted); }
.help-toggle.is-open .chevron { transform: rotate(180deg); }

.help-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, margin-top 0.4s ease;
    opacity: 0;
    margin-top: 0;
}
.help-content.is-open {
    max-height: 400px;
    opacity: 1;
    margin-top: 0.75rem;
}
.help-content__inner {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--r-md);
    border: 1px dashed var(--border);
}
.help-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 1rem;
    line-height: 1.5;
}
.help-text strong { color: var(--text-primary); font-weight: 600; }

.tiktok-mockup {
    position: relative;
    width: 200px;
    height: 280px;
    margin: 0 auto;
    background: #000;
    border-radius: 12px;
    border: 3px solid #222;
    overflow: visible; /* To allow pointer to escape */
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.1);
}
.tiktok-mockup__video {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    opacity: 0.8;
    border-radius: 9px;
}
.tiktok-mockup__overlay {
    position: absolute;
    inset: 0;
    border-radius: 9px;
    overflow: hidden;
}
.tiktok-mockup__sidebar {
    position: absolute;
    right: 8px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.mockup-icon {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
}
.mockup-icon svg { width: 14px; height: 14px; fill: #fff; }
.tiktok-mockup__bottom {
    position: absolute;
    left: 12px;
    bottom: 12px;
    right: 40px;
    color: #fff;
    font-size: 0.65rem;
    text-align: left;
}
.mockup-user { font-weight: 700; margin-bottom: 4px; }
.mockup-caption { opacity: 0.95; line-height: 1.4; }
.mockup-highlight {
    background: var(--primary);
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 0 10px var(--primary-glow);
    display: inline-block;
    position: relative;
    animation: pulseHighlight 2s infinite;
}
.mockup-pointer {
    position: absolute;
    top: -24px;
    right: -70px;
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 4px;
    transform: rotate(5deg);
    animation: bouncePointer 1.5s infinite;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}
.mockup-pointer svg { width: 16px; height: 16px; stroke: var(--accent); }

@keyframes pulseHighlight {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(99,102,241, 0); }
}
@keyframes bouncePointer {
    0%, 100% { transform: translate(0, 0) rotate(5deg); }
    50% { transform: translate(-5px, 5px) rotate(5deg); }
}
