/* ═══════════════════════════════════════════════════════════════
   MOBILEX PRO — Master Design System
   iPhone-first | Liquid Glass | Professional Mobile Shop UI
   ═══════════════════════════════════════════════════════════════ */

/* ── Google Fonts ─────────────────────────────────────────────── */
@import url("https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap");

/* ═══════════════════════════════════════════════════════════════
   1. CSS CUSTOM PROPERTIES (DESIGN TOKENS) — FIXED LIGHT/DARK
   ═══════════════════════════════════════════════════════════════ */
:root,
[data-theme="light"] {
  /* Brand Palette */
  --brand-primary: #0a84ff;
  --brand-secondary: #30d158;
  --brand-accent: #ff375f;
  --brand-gold: #ffd60a;
  --brand-purple: #bf5af2;
  --brand-teal: #5ac8fa;

  /* Neutral Scale - Light Theme */
  --gray-50: #f9f9fb;
  --gray-100: #f2f2f7;
  --gray-200: #e5e5ea;
  --gray-300: #d1d1d6;
  --gray-400: #aeaeb2;
  --gray-500: #8e8e93;
  --gray-600: #636366;
  --gray-700: #48484a;
  --gray-800: #3a3a3c;
  --gray-900: #2c2c2e;
  --gray-950: #1c1c1e;

  /* Surface System - Light Theme */
  --surface-bg: #f2f2f7;
  --surface-card: rgba(255, 255, 255, 0.82);
  --surface-elevated: rgba(255, 255, 255, 0.95);
  --surface-overlay: rgba(0, 0, 0, 0.45);
  --surface-sheet: rgba(242, 242, 247, 0.95);

  /* Liquid Glass - Light Theme */
  --glass-bg: rgba(255, 255, 255, 0.18);
  --glass-bg-dark: rgba(28, 28, 30, 0.72);
  --glass-border: rgba(255, 255, 255, 0.35);
  --glass-border-dark: rgba(255, 255, 255, 0.1);
  --glass-blur: 20px;
  --glass-blur-heavy: 40px;
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  --glass-shadow-heavy:
    0 24px 64px rgba(0, 0, 0, 0.18), 0 8px 24px rgba(0, 0, 0, 0.12);

  /* Text Colors - Light Theme */
  --text-primary: #1c1c1e;
  --text-secondary: #48484a;
  --text-tertiary: #8e8e93;
  --text-inverse: #ffffff;

  /* Typography */
  --font-display: "Sora", -apple-system, sans-serif;
  --font-body: "DM Sans", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Font Sizes (fluid) */
  --text-xs: 0.7rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-md: 1.0625rem;
  --text-lg: 1.1875rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.625rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-hero: clamp(2rem, 8vw, 3.5rem);

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Layout */
  --nav-h: 60px;
  --bottom-nav-h: 83px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --max-content: 480px;
  --max-wide: 768px;
  --max-desktop: 1200px;
  --sidebar-w: 280px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.14), 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.18), 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-brand: 0 8px 24px rgba(10, 132, 255, 0.35);
  --shadow-green: 0 8px 24px rgba(48, 209, 88, 0.35);
  --shadow-red: 0 8px 24px rgba(255, 55, 95, 0.35);

  /* Transitions */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --dur-fast: 150ms;
  --dur-normal: 280ms;
  --dur-slow: 450ms;
  --dur-page: 600ms;

  /* Z-index layers */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-navbar: 300;
  --z-overlay: 400;
  --z-modal: 500;
  --z-toast: 600;
  --z-tooltip: 700;
}

/* Dark Mode Tokens */
[data-theme="dark"] {
  /* Brand Palette (slightly adjusted for dark) */
  --brand-primary: #0a84ff;
  --brand-secondary: #30d158;
  --brand-accent: #ff375f;
  --brand-gold: #ffd60a;
  --brand-purple: #bf5af2;
  --brand-teal: #5ac8fa;

  /* Neutral Scale - Dark Theme */
  --gray-50: #1c1c1e;
  --gray-100: #2c2c2e;
  --gray-200: #3a3a3c;
  --gray-300: #48484a;
  --gray-400: #636366;
  --gray-500: #8e8e93;
  --gray-600: #aeaeb2;
  --gray-700: #d1d1d6;
  --gray-800: #e5e5ea;
  --gray-900: #f2f2f7;
  --gray-950: #f9f9fb;

  /* Surface System - Dark Theme */
  --surface-bg: #000000;
  --surface-card: rgba(28, 28, 30, 0.82);
  --surface-elevated: rgba(44, 44, 46, 0.95);
  --surface-overlay: rgba(0, 0, 0, 0.8);
  --surface-sheet: rgba(28, 28, 30, 0.95);

  /* Liquid Glass - Dark Theme */
  --glass-bg: rgba(28, 28, 30, 0.55);
  --glass-bg-dark: rgba(28, 28, 30, 0.85);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-dark: rgba(255, 255, 255, 0.05);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --glass-shadow-heavy: 0 24px 64px rgba(0, 0, 0, 0.5);

  /* Text Colors - Dark Theme */
  --text-primary: #ffffff;
  --text-secondary: #d1d1d6;
  --text-tertiary: #8e8e93;
  --text-inverse: #1c1c1e;

  /* Shadows - Dark Theme (darker) */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.5);
  --shadow-brand: 0 8px 24px rgba(10, 132, 255, 0.25);
  --shadow-green: 0 8px 24px rgba(48, 209, 88, 0.25);
  --shadow-red: 0 8px 24px rgba(255, 55, 95, 0.25);
}

/* ═══════════════════════════════════════════════════════════════
   2. RESET & BASE
   ═══════════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  height: 100%;
  overscroll-behavior: none;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-primary);
  background-color: var(--surface-bg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* Theme transition */
body,
.app-wrapper,
.top-nav,
.bottom-nav,
.sidebar,
.surface-card {
  transition:
    background-color 0.3s var(--ease-out),
    color 0.2s var(--ease-out);
}

img,
video {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}
input,
textarea,
select {
  font-family: inherit;
}
ul,
ol {
  list-style: none;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

/* Page wrapper - Responsive container */
.app-wrapper {
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  background: var(--surface-bg);
  overflow-x: hidden;
}

/* Content area with nav offsets */
.page-content {
  padding-top: calc(var(--nav-h) + var(--safe-top) + var(--space-4));
  padding-bottom: calc(
    var(--bottom-nav-h) + var(--safe-bottom) + var(--space-4)
  );
  padding-left: calc(var(--space-4) + var(--safe-left));
  padding-right: calc(var(--space-4) + var(--safe-right));
}

/* ═══════════════════════════════════════════════════════════════
   3. LIQUID GLASS COMPONENTS
   ═══════════════════════════════════════════════════════════════ */

/* Base glass */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* Heavy glass (modals, drawers) */
.glass-heavy {
  background: var(--glass-bg-dark);
  backdrop-filter: blur(var(--glass-blur-heavy)) saturate(200%);
  -webkit-backdrop-filter: blur(var(--glass-blur-heavy)) saturate(200%);
  border: 1px solid var(--glass-border-dark);
  box-shadow: var(--glass-shadow-heavy);
}

/* Frostd card */
.glass-card {
  background: var(--surface-card);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
}

/* Specular highlight (iPhone liquid glass effect) */
.glass-specular {
  position: relative;
  overflow: hidden;
}
.glass-specular::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
}
.glass-specular::after {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 40%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 2;
  border-radius: inherit;
}

/* ═══════════════════════════════════════════════════════════════
   4. TOP NAVIGATION BAR
   ═══════════════════════════════════════════════════════════════ */
.top-nav {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-content);
  height: calc(var(--nav-h) + var(--safe-top));
  padding-top: var(--safe-top);
  padding-left: calc(var(--space-4) + var(--safe-left));
  padding-right: calc(var(--space-4) + var(--safe-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  z-index: var(--z-navbar);
  background: var(--surface-card);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 0.5px solid var(--border-light, rgba(0, 0, 0, 0.1));
  transition:
    background var(--dur-normal) var(--ease-out),
    box-shadow var(--dur-normal) var(--ease-out);
}
[data-theme="dark"] .top-nav {
  border-bottom-color: var(--border-medium, rgba(255, 255, 255, 0.08));
}
.top-nav.scrolled {
  box-shadow: var(--shadow-sm);
}

/* Burger / Hamburger Button */
.burger-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  transition:
    background var(--dur-fast),
    transform var(--dur-fast) var(--ease-spring);
  flex-shrink: 0;
}
.burger-btn:active {
  transform: scale(0.9);
}
.burger-btn .bar {
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition:
    transform var(--dur-normal) var(--ease-spring),
    opacity var(--dur-fast),
    width var(--dur-normal) var(--ease-spring);
  transform-origin: center;
}
.burger-btn.open .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.burger-btn.open .bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.burger-btn.open .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Nav brand */
.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  letter-spacing: -0.5px;
  color: var(--text-primary);
}
.nav-brand-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--brand-primary);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: var(--shadow-brand);
}

/* Nav right actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.nav-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: grid;
  place-items: center;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 18px;
  transition:
    transform var(--dur-fast) var(--ease-spring),
    background var(--dur-fast);
  position: relative;
}
.nav-icon-btn:active {
  transform: scale(0.88);
}
.nav-icon-btn .badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: var(--brand-accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid var(--surface-bg);
  animation: badge-pop 0.4s var(--ease-spring);
}
@keyframes badge-pop {
  0% {
    transform: scale(0);
  }
  70% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

/* ═══════════════════════════════════════════════════════════════
   5. SIDEBAR / DRAWER NAV
   ═══════════════════════════════════════════════════════════════ */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: var(--surface-overlay);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: calc(var(--z-modal) - 1);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-normal) var(--ease-out);
}
.sidebar-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100dvh;
  background: var(--surface-elevated);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-right: 0.5px solid var(--border-light, rgba(0, 0, 0, 0.08));
  z-index: var(--z-modal);
  transform: translateX(-100%);
  transition: transform var(--dur-slow) var(--ease-out);
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--space-6) + var(--safe-top));
  padding-bottom: calc(var(--space-6) + var(--safe-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
[data-theme="dark"] .sidebar {
  border-right-color: var(--border-light, rgba(255, 255, 255, 0.08));
}
.sidebar.open {
  transform: translateX(0);
}

.sidebar-header {
  padding: var(--space-4) var(--space-5) var(--space-6);
  border-bottom: 0.5px solid var(--gray-200);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.sidebar-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: linear-gradient(
    135deg,
    var(--brand-primary),
    var(--brand-purple)
  );
  display: grid;
  place-items: center;
  color: #fff;
  font-size: var(--text-lg);
  font-weight: 700;
  flex-shrink: 0;
}
.sidebar-user-info p:first-child {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-md);
  color: var(--text-primary);
}
.sidebar-user-info p:last-child {
  font-size: var(--text-xs);
  color: var(--gray-500);
}

.sidebar-nav {
  flex: 1;
  padding: var(--space-4) var(--space-3);
}
.sidebar-section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  padding: var(--space-3) var(--space-3) var(--space-2);
}
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-secondary);
  transition:
    background var(--dur-fast),
    color var(--dur-fast),
    transform var(--dur-fast);
  cursor: pointer;
  position: relative;
}
.sidebar-nav-item:active {
  transform: scale(0.97);
}
.sidebar-nav-item:hover,
.sidebar-nav-item.active {
  background: rgba(10, 132, 255, 0.1);
  color: var(--brand-primary);
}
.sidebar-nav-item .nav-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 16px;
  background: var(--gray-100);
  flex-shrink: 0;
}
.sidebar-nav-item.active .nav-icon {
  background: var(--brand-primary);
  color: #fff;
}
.sidebar-nav-badge {
  margin-left: auto;
  background: var(--brand-accent);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-full);
}

/* ═══════════════════════════════════════════════════════════════
   6. BOTTOM NAVIGATION BAR
   ═══════════════════════════════════════════════════════════════ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-content);
  height: calc(var(--bottom-nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding-top: var(--space-2);
  background: var(--surface-card);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 0.5px solid var(--border-light, rgba(0, 0, 0, 0.1));
  z-index: var(--z-navbar);
}
[data-theme="dark"] .bottom-nav {
  border-top-color: var(--border-light, rgba(255, 255, 255, 0.08));
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: var(--space-1) 0;
  color: var(--gray-500);
  font-size: var(--text-xs);
  font-weight: 500;
  transition:
    color var(--dur-fast),
    transform var(--dur-fast) var(--ease-spring);
  cursor: pointer;
  position: relative;
  min-height: 48px;
}
.bottom-nav-item:active {
  transform: scale(0.9);
}
.bottom-nav-item.active {
  color: var(--brand-primary);
}
.bottom-nav-item .tab-icon {
  font-size: 22px;
  transition: transform var(--dur-normal) var(--ease-spring);
}
.bottom-nav-item.active .tab-icon {
  transform: scale(1.1);
}
.bottom-nav-item .tab-label {
  line-height: 1;
}
.bottom-nav-item .tab-badge {
  position: absolute;
  top: -2px;
  right: 50%;
  transform: translateX(8px);
  width: 15px;
  height: 15px;
  border-radius: var(--radius-full);
  background: var(--brand-accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid var(--surface-bg);
}
/* Active indicator pill */
.bottom-nav-item.active::before {
  content: "";
  position: absolute;
  top: -2px;
  width: 32px;
  height: 3px;
  background: var(--brand-primary);
  border-radius: var(--radius-full);
  animation: tab-indicator 0.3s var(--ease-spring);
}
@keyframes tab-indicator {
  from {
    transform: scaleX(0);
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

/* ═══════════════════════════════════════════════════════════════
   7. SEARCH BAR
   ═══════════════════════════════════════════════════════════════ */
.search-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--gray-100);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  border: 1.5px solid transparent;
  transition:
    border-color var(--dur-fast),
    background var(--dur-fast),
    box-shadow var(--dur-fast);
}
.search-bar:focus-within {
  border-color: var(--brand-primary);
  background: var(--surface-elevated);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.12);
}
.search-bar-icon {
  color: var(--gray-500);
  font-size: 17px;
  flex-shrink: 0;
}
.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: var(--text-base);
  color: var(--text-primary);
  font-weight: 400;
}
.search-bar input::placeholder {
  color: var(--gray-400);
}
.search-bar-clear {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: var(--gray-400);
  display: none;
  place-items: center;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    background var(--dur-fast),
    transform var(--dur-fast);
}
.search-bar-clear:active {
  transform: scale(0.88);
}
.search-bar:focus-within .search-bar-clear {
  display: grid;
}

/* Search overlay / suggestions */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: none;
  flex-direction: column;
}
.search-overlay.active {
  display: flex;
}
.search-overlay-bg {
  position: absolute;
  inset: 0;
  background: var(--surface-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade-in var(--dur-fast);
}
.search-overlay-panel {
  position: relative;
  background: var(--surface-elevated);
  border-radius: 0 0 var(--radius-3xl) var(--radius-3xl);
  padding: calc(var(--nav-h) + var(--safe-top) + var(--space-2)) var(--space-4)
    var(--space-6);
  max-height: 80dvh;
  overflow-y: auto;
  animation: slide-down var(--dur-normal) var(--ease-out);
}
.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-2);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background var(--dur-fast);
  color: var(--text-primary);
}
.search-suggestion-item:active {
  background: var(--gray-100);
}
.search-suggestion-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--gray-100);
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  font-size: 16px;
  flex-shrink: 0;
}
.search-tag {
  font-size: var(--text-sm);
  color: var(--gray-500);
}

/* ═══════════════════════════════════════════════════════════════
   8. HERO / BANNER COMPONENTS
   ═══════════════════════════════════════════════════════════════ */
.hero-banner {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-6);
  background: linear-gradient(135deg, #0a84ff 0%, #bf5af2 100%);
}
.hero-banner-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.35;
}
.hero-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.55) 100%
  );
}
.hero-banner-content {
  position: relative;
  z-index: 1;
  color: #fff;
}
.hero-banner-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-full);
  padding: 3px var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  margin-bottom: var(--space-2);
  width: fit-content;
}
.hero-banner h2 {
  font-size: var(--text-2xl);
  line-height: 1.1;
  margin-bottom: var(--space-2);
}
.hero-banner p {
  font-size: var(--text-sm);
  opacity: 0.85;
  margin-bottom: var(--space-4);
}

/* Carousel Banner */
.banner-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-2xl);
}
.banner-carousel-track {
  display: flex;
  transition: transform var(--dur-slow) var(--ease-out);
  will-change: transform;
}
.banner-slide {
  flex: 0 0 100%;
}
.banner-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-3) 0 var(--space-1);
}
.banner-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--gray-300);
  transition:
    width var(--dur-normal) var(--ease-spring),
    background var(--dur-fast);
  border: none;
  cursor: pointer;
}
.banner-dot.active {
  width: 20px;
  background: var(--brand-primary);
}

/* Promo strip */
.promo-strip {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--brand-primary);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 500;
}
.promo-strip-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.promo-strip p {
  flex: 1;
}
.promo-strip strong {
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   9. CARDS — Product, Info, List
   ═══════════════════════════════════════════════════════════════ */

/* Product card — grid layout */
.product-card {
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--dur-normal) var(--ease-spring),
    box-shadow var(--dur-normal) var(--ease-out);
  cursor: pointer;
  position: relative;
}
.product-card:active {
  transform: scale(0.96);
  box-shadow: var(--shadow-sm);
}

.product-card-image {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--gray-100);
  overflow: hidden;
}
.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-3);
  transition: transform var(--dur-slow) var(--ease-out);
}
.product-card:hover .product-card-image img {
  transform: scale(1.05);
}

.product-card-badge {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  background: var(--brand-accent);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  z-index: 2;
}
.product-card-badge.new {
  background: var(--brand-secondary);
}
.product-card-badge.hot {
  background: var(--brand-accent);
}
.product-card-badge.refurb {
  background: var(--brand-purple);
}

.product-card-wishlist {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  display: grid;
  place-items: center;
  font-size: 15px;
  z-index: 2;
  color: var(--gray-500);
  transition:
    transform var(--dur-fast) var(--ease-spring),
    color var(--dur-fast);
}
.product-card-wishlist.liked {
  color: var(--brand-accent);
}
.product-card-wishlist:active {
  transform: scale(0.8);
}

.product-card-body {
  padding: var(--space-3);
}
.product-card-brand {
  font-size: var(--text-xs);
  color: var(--brand-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.product-card-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin: 2px 0 var(--space-2);
  line-height: 1.3;
}
.product-card-price-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.product-card-price {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
}
.product-card-old-price {
  font-size: var(--text-xs);
  color: var(--gray-400);
  text-decoration: line-through;
}
.product-card-rating {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: var(--text-xs);
  color: var(--gray-500);
  margin-top: var(--space-1);
}
.product-card-rating .star {
  color: var(--brand-gold);
  font-size: 11px;
}

/* Product card — horizontal/list layout */
.product-list-card {
  display: flex;
  gap: var(--space-3);
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-spring);
}
.product-list-card:active {
  transform: scale(0.97);
}
.product-list-card-img {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-lg);
  background: var(--gray-100);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-list-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-2);
}
.product-list-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

/* Info card */
.info-card {
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
}

/* Stat card */
.stat-card {
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.stat-card-label {
  font-size: var(--text-xs);
  color: var(--gray-500);
  font-weight: 500;
}
.stat-card-value {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
}
.stat-card-change {
  font-size: var(--text-xs);
  font-weight: 600;
}
.stat-card-change.up {
  color: var(--brand-secondary);
}
.stat-card-change.down {
  color: var(--brand-accent);
}

/* Feature card (icon + text) */
.feature-card {
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.feature-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  font-size: 22px;
}

/* ═══════════════════════════════════════════════════════════════
   10. SECTION HEADERS & GRIDS
   ═══════════════════════════════════════════════════════════════ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}
.section-link {
  font-size: var(--text-sm);
  color: var(--brand-primary);
  font-weight: 600;
}

/* 2-column grid */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
/* 3-column grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
/* Auto-fit grid */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-3);
}

/* Horizontal scroll list */
.h-scroll {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: var(--space-2);
}
.h-scroll::-webkit-scrollbar {
  display: none;
}
.h-scroll > * {
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* Category chips horizontal */
.category-scroll {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
}
.category-scroll::-webkit-scrollbar {
  display: none;
}
.category-chip {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  cursor: pointer;
}
.category-chip-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-xl);
  background: var(--gray-100);
  display: grid;
  place-items: center;
  font-size: 26px;
  border: 2px solid transparent;
  transition:
    border-color var(--dur-fast),
    transform var(--dur-fast) var(--ease-spring),
    background var(--dur-fast);
}
.category-chip.active .category-chip-icon {
  border-color: var(--brand-primary);
  background: rgba(10, 132, 255, 0.1);
}
.category-chip:active .category-chip-icon {
  transform: scale(0.9);
}
.category-chip-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
}
.category-chip.active .category-chip-label {
  color: var(--brand-primary);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   11. BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 13px var(--space-6);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition:
    transform var(--dur-fast) var(--ease-spring),
    box-shadow var(--dur-fast),
    opacity var(--dur-fast);
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  letter-spacing: -0.1px;
  min-height: 50px;
}
.btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}
.btn:active {
  transform: scale(0.95);
}

.btn-primary {
  background: var(--brand-primary);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover {
  box-shadow: 0 12px 32px rgba(10, 132, 255, 0.45);
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--brand-accent);
  color: #fff;
  box-shadow: var(--shadow-red);
}
.btn-success {
  background: var(--brand-secondary);
  color: #fff;
  box-shadow: var(--shadow-green);
}
.btn-outline {
  background: transparent;
  color: var(--brand-primary);
  border: 1.5px solid var(--brand-primary);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}
.btn-sm {
  padding: 9px var(--space-4);
  font-size: var(--text-sm);
  min-height: 38px;
}
.btn-lg {
  padding: 16px var(--space-8);
  font-size: var(--text-md);
  min-height: 56px;
}
.btn-full {
  width: 100%;
}
.btn-icon-only {
  padding: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
}

/* Loading spinner inside button */
.btn-loading {
  pointer-events: none;
  position: relative;
  color: transparent;
}
.btn-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: var(--radius-full);
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ═══════════════════════════════════════════════════════════════
   12. FORM COMPONENTS
   ═══════════════════════════════════════════════════════════════ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.form-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
}

.input {
  width: 100%;
  padding: 14px var(--space-4);
  background: var(--gray-100);
  border: 1.5px solid transparent;
  border-radius: var(--radius-xl);
  font-size: var(--text-base);
  color: var(--text-primary);
  outline: none;
  transition:
    border-color var(--dur-fast),
    box-shadow var(--dur-fast),
    background var(--dur-fast);
  min-height: 52px;
}
.input::placeholder {
  color: var(--gray-400);
}
.input:focus {
  border-color: var(--brand-primary);
  background: var(--surface-elevated);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.12);
}
.input.error {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 4px rgba(255, 55, 95, 0.1);
}
.input.success {
  border-color: var(--brand-secondary);
}

/* Input with icon */
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.input-group .input {
  padding-left: 44px;
}
.input-group .input-icon {
  position: absolute;
  left: var(--space-4);
  color: var(--gray-400);
  font-size: 18px;
  pointer-events: none;
  transition: color var(--dur-fast);
}
.input-group:focus-within .input-icon {
  color: var(--brand-primary);
}
.input-group .input-suffix {
  position: absolute;
  right: var(--space-4);
  color: var(--gray-500);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
}

/* Phone/OTP input */
.otp-inputs {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
}
.otp-input {
  width: 52px;
  height: 60px;
  text-align: center;
  font-size: var(--text-xl);
  font-family: var(--font-display);
  font-weight: 700;
  background: var(--gray-100);
  border: 1.5px solid transparent;
  border-color: var(--gray-300);
  border-radius: var(--radius-xl);
  outline: none;
  transition:
    border-color var(--dur-fast),
    box-shadow var(--dur-fast);
  caret-color: var(--brand-primary);
  color: var(--text-primary);
}
.otp-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.12);
}
.otp-input.filled {
  border-color: var(--brand-secondary);
}

/* Select */
.select {
  width: 100%;
  padding: 14px var(--space-4);
  padding-right: 36px;
  background: var(--gray-100);
  border: 1.5px solid transparent;
  border-radius: var(--radius-xl);
  font-size: var(--text-base);
  color: var(--text-primary);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%238E8E93' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition:
    border-color var(--dur-fast),
    box-shadow var(--dur-fast);
  min-height: 52px;
}
.select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.12);
}

/* Textarea */
.textarea {
  width: 100%;
  padding: var(--space-4);
  background: var(--gray-100);
  border: 1.5px solid transparent;
  border-radius: var(--radius-xl);
  font-size: var(--text-base);
  color: var(--text-primary);
  outline: none;
  resize: vertical;
  min-height: 100px;
  line-height: 1.55;
  transition:
    border-color var(--dur-fast),
    box-shadow var(--dur-fast);
}
.textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.12);
}

/* Checkbox & Radio */
.check-group,
.radio-group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  color: var(--text-primary);
}
.check-group input[type="checkbox"],
.radio-group input[type="radio"] {
  display: none;
}
.check-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--gray-300);
  background: var(--surface-elevated);
  display: grid;
  place-items: center;
  transition:
    border-color var(--dur-fast),
    background var(--dur-fast);
  flex-shrink: 0;
}
input:checked ~ .check-box {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}
input:checked ~ .check-box::after {
  content: "✓";
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.radio-circle {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  border: 2px solid var(--gray-300);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: border-color var(--dur-fast);
}
input:checked ~ .radio-circle {
  border-color: var(--brand-primary);
}
input:checked ~ .radio-circle::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--brand-primary);
  animation: radio-pop 0.25s var(--ease-spring);
}
@keyframes radio-pop {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

/* Toggle switch */
.toggle {
  position: relative;
  width: 51px;
  height: 31px;
  cursor: pointer;
  flex-shrink: 0;
}
.toggle input {
  display: none;
}
.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--gray-300);
  border-radius: var(--radius-full);
  transition: background var(--dur-normal) var(--ease-out);
}
input:checked ~ .toggle-track {
  background: var(--brand-secondary);
}
.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: var(--radius-full);
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform var(--dur-normal) var(--ease-spring);
}
input:checked ~ .toggle-thumb {
  transform: translateX(20px);
}

/* Range slider */
.range-slider {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  outline: none;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--brand-primary);
  box-shadow: 0 2px 8px rgba(10, 132, 255, 0.4);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-spring);
}
.range-slider::-webkit-slider-thumb:active {
  transform: scale(1.25);
}

/* Form hint / error text */
.form-hint {
  font-size: var(--text-xs);
  color: var(--gray-500);
}
.form-error {
  font-size: var(--text-xs);
  color: var(--brand-accent);
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   13. AUTH PAGES — Login, Signup, OTP, Reset
   ═══════════════════════════════════════════════════════════════ */
.auth-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--surface-bg);
  position: relative;
  overflow: hidden;
}

/* Decorative background blobs */
.auth-blob {
  position: absolute;
  border-radius: var(--radius-full);
  filter: blur(60px);
  opacity: 0.25;
  pointer-events: none;
}
.auth-blob-1 {
  width: 280px;
  height: 280px;
  background: var(--brand-primary);
  top: -80px;
  right: -60px;
}
.auth-blob-2 {
  width: 200px;
  height: 200px;
  background: var(--brand-purple);
  bottom: 100px;
  left: -50px;
}

.auth-header {
  padding: calc(var(--safe-top) + var(--space-6)) var(--space-6) var(--space-4);
  position: relative;
  z-index: 1;
}
.auth-back-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  font-size: 20px;
  transition: transform var(--dur-fast) var(--ease-spring);
}
.auth-back-btn:active {
  transform: scale(0.88);
}

.auth-body {
  flex: 1;
  padding: var(--space-4) var(--space-6)
    calc(var(--safe-bottom) + var(--space-6));
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}
.auth-logo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-2xl);
  background: linear-gradient(
    135deg,
    var(--brand-primary),
    var(--brand-purple)
  );
  display: grid;
  place-items: center;
  font-size: 30px;
  color: #fff;
  box-shadow: var(--shadow-brand);
  margin-bottom: var(--space-5);
}
.auth-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: var(--space-1);
  color: var(--text-primary);
}
.auth-subtitle {
  font-size: var(--text-base);
  color: var(--gray-500);
  margin-bottom: var(--space-8);
  line-height: 1.5;
}
.auth-subtitle strong {
  color: var(--brand-primary);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--gray-400);
  font-size: var(--text-sm);
  margin: var(--space-2) 0;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.auth-social-btns {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: 13px;
  border-radius: var(--radius-full);
  background: var(--surface-elevated);
  border: 1.5px solid var(--gray-200);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition:
    transform var(--dur-fast) var(--ease-spring),
    box-shadow var(--dur-fast);
  min-height: 50px;
}
[data-theme="dark"] .auth-social-btn {
  border-color: var(--gray-700);
  background: var(--gray-800);
}
.auth-social-btn:active {
  transform: scale(0.96);
}
.auth-social-btn img {
  width: 20px;
  height: 20px;
}

.auth-footer {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--gray-500);
  margin-top: auto;
  padding-top: var(--space-6);
}
.auth-footer a {
  color: var(--brand-primary);
  font-weight: 600;
}

/* OTP verification */
.otp-phone-display {
  background: var(--gray-100);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  text-align: center;
  margin-bottom: var(--space-6);
  font-size: var(--text-lg);
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-primary);
}
.otp-resend {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--gray-500);
}
.otp-resend button {
  color: var(--brand-primary);
  font-weight: 600;
}
.otp-timer {
  font-weight: 700;
  color: var(--brand-primary);
  font-variant-numeric: tabular-nums;
}

/* Password strength */
.password-strength {
  display: flex;
  gap: 4px;
  margin-top: var(--space-1);
}
.strength-bar {
  flex: 1;
  height: 3px;
  border-radius: var(--radius-full);
  background: var(--gray-200);
  transition: background var(--dur-normal) var(--ease-out);
}
.strength-bar.filled-1 {
  background: var(--brand-accent);
}
.strength-bar.filled-2 {
  background: var(--brand-gold);
}
.strength-bar.filled-3 {
  background: var(--brand-secondary);
}
.strength-label {
  font-size: var(--text-xs);
  margin-top: 4px;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   14. FILTER / SORT COMPONENTS
   ═══════════════════════════════════════════════════════════════ */
.filter-bar {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: var(--space-1);
}
.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 7px var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  background: var(--gray-100);
  color: var(--text-secondary);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition:
    background var(--dur-fast),
    color var(--dur-fast),
    border-color var(--dur-fast),
    transform var(--dur-fast) var(--ease-spring);
  white-space: nowrap;
}
.filter-pill:active {
  transform: scale(0.94);
}
.filter-pill.active {
  background: rgba(10, 132, 255, 0.12);
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}
.filter-pill .filter-count {
  background: var(--brand-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-full);
}

/* Filter Sheet (bottom drawer) */
.filter-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: var(--max-content);
  background: var(--surface-elevated);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-radius: var(--radius-3xl) var(--radius-3xl) 0 0;
  padding: var(--space-3) var(--space-5)
    calc(var(--safe-bottom) + var(--space-6));
  z-index: var(--z-modal);
  transition: transform var(--dur-slow) var(--ease-out);
  max-height: 85dvh;
  overflow-y: auto;
}
[data-theme="dark"] .filter-sheet {
  background: var(--surface-sheet);
}
.filter-sheet.open {
  transform: translateX(-50%) translateY(0);
}
.filter-sheet-handle {
  width: 36px;
  height: 5px;
  border-radius: var(--radius-full);
  background: var(--gray-300);
  margin: 0 auto var(--space-4);
}
.filter-sheet-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-primary);
}
.filter-section {
  margin-bottom: var(--space-5);
}
.filter-section-label {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  margin-bottom: var(--space-3);
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.filter-price-row {
  display: flex;
  gap: var(--space-3);
}
.filter-price-row .input {
  flex: 1;
}
.filter-actions {
  display: flex;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--gray-200);
  position: sticky;
  bottom: 0;
  background: var(--surface-elevated);
  margin: 0 calc(-1 * var(--space-5));
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}
[data-theme="dark"] .filter-actions {
  background: var(--surface-sheet);
  border-top-color: var(--gray-800);
}

/* Sort options */
.sort-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
  border-bottom: 0.5px solid var(--gray-200);
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary);
}
[data-theme="dark"] .sort-option {
  border-bottom-color: var(--gray-800);
}
.sort-option.active {
  color: var(--brand-primary);
}
.sort-option-check {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  border: 2px solid var(--gray-300);
  display: grid;
  place-items: center;
}
.sort-option.active .sort-option-check {
  border-color: var(--brand-primary);
  background: var(--brand-primary);
  color: #fff;
  font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   15. PAGINATION
   ═══════════════════════════════════════════════════════════════ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-4) 0;
}
.pagination-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  background: var(--gray-100);
  color: var(--text-secondary);
  border: none;
  transition:
    background var(--dur-fast),
    color var(--dur-fast),
    transform var(--dur-fast) var(--ease-spring);
}
.pagination-btn:active {
  transform: scale(0.88);
}
.pagination-btn.active {
  background: var(--brand-primary);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.pagination-btn.nav {
  background: var(--surface-card);
  border: 1px solid var(--gray-200);
}
.pagination-btn:disabled {
  opacity: 0.35;
  pointer-events: none;
}
.pagination-dots {
  display: flex;
  align-items: center;
  color: var(--gray-400);
  font-size: var(--text-sm);
  padding: 0 var(--space-1);
}

/* ═══════════════════════════════════════════════════════════════
   16. MODALS & POPUPS
   ═══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--surface-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-normal);
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--surface-elevated);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-radius: var(--radius-3xl);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 340px;
  padding: var(--space-6);
  transform: scale(0.88) translateY(20px);
  transition: transform var(--dur-normal) var(--ease-spring);
}
.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}
.modal-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  display: grid;
  place-items: center;
  font-size: 26px;
  margin: 0 auto var(--space-4);
}
.modal-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}
.modal-body {
  font-size: var(--text-sm);
  color: var(--gray-500);
  text-align: center;
  line-height: 1.6;
  margin-bottom: var(--space-6);
}
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.modal-actions.row {
  flex-direction: row;
}

/* Action Sheet (iOS-style) */
.action-sheet-overlay {
  position: fixed;
  inset: 0;
  background: var(--surface-overlay);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: var(--z-modal);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-normal);
}
.action-sheet-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.action-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: var(--max-content);
  padding: 0 var(--space-4) calc(var(--safe-bottom) + var(--space-4));
  z-index: calc(var(--z-modal) + 1);
  transition: transform var(--dur-slow) var(--ease-out);
}
.action-sheet-overlay.active .action-sheet {
  transform: translateX(-50%) translateY(0);
}

.action-sheet-group {
  background: var(--surface-elevated);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  margin-bottom: var(--space-3);
}
.action-sheet-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--brand-primary);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  transition: background var(--dur-fast);
  border-bottom: 0.5px solid var(--gray-200);
  text-align: center;
}
[data-theme="dark"] .action-sheet-item {
  border-bottom-color: var(--gray-800);
}
.action-sheet-item:last-child {
  border-bottom: none;
}
.action-sheet-item:active {
  background: var(--gray-100);
}
[data-theme="dark"] .action-sheet-item:active {
  background: var(--gray-800);
}
.action-sheet-item.danger {
  color: var(--brand-accent);
}
.action-sheet-item.title {
  font-size: var(--text-xs);
  color: var(--gray-500);
  font-weight: 500;
  padding: var(--space-3) var(--space-5);
  text-align: center;
}

/* Popup / Toast */
.toast-container {
  position: fixed;
  top: calc(var(--nav-h) + var(--safe-top) + var(--space-3));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - var(--space-8));
  max-width: calc(var(--max-content) - var(--space-8));
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  z-index: var(--z-toast);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-2xl);
  background: var(--surface-elevated);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border-dark);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: 500;
  pointer-events: all;
  animation: toast-in var(--dur-normal) var(--ease-spring) forwards;
}
.toast.leaving {
  animation: toast-out var(--dur-normal) var(--ease-in-out) forwards;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
  }
}
.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.toast-text {
  flex: 1;
  line-height: 1.3;
}
.toast.success .toast-icon::before {
  content: "✅";
}
.toast.error .toast-icon::before {
  content: "❌";
}
.toast.warning .toast-icon::before {
  content: "⚠️";
}
.toast.info .toast-icon::before {
  content: "ℹ️";
}

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
}
.tooltip-text {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-elevated);
  color: var(--text-primary);
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 5px var(--space-3);
  border-radius: var(--radius-lg);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-fast);
  z-index: var(--z-tooltip);
  box-shadow: var(--shadow-sm);
}
.tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--surface-elevated);
}
.tooltip:hover .tooltip-text {
  opacity: 1;
}

/* Popover */
.popover {
  position: absolute;
  background: var(--surface-elevated);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2);
  z-index: var(--z-dropdown);
  min-width: 180px;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92) translateY(-8px);
  transform-origin: top right;
  transition:
    opacity var(--dur-fast),
    transform var(--dur-normal) var(--ease-spring);
}
.popover.active {
  opacity: 1;
  pointer-events: all;
  transform: scale(1) translateY(0);
}
.popover-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background var(--dur-fast);
}
.popover-item:active {
  background: var(--gray-100);
}
.popover-item.danger {
  color: var(--brand-accent);
}
.popover-divider {
  height: 0.5px;
  background: var(--gray-200);
  margin: var(--space-1) 0;
}

/* ═══════════════════════════════════════════════════════════════
   17. SKELETON SCREEN
   ═══════════════════════════════════════════════════════════════ */
@keyframes skeleton-shimmer {
  0% {
    background-position: -400px 0;
  }
  100% {
    background-position: 400px 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--gray-200) 0%,
    var(--gray-100) 40%,
    var(--gray-200) 80%
  );
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.6s linear infinite;
  border-radius: var(--radius-md);
  display: block;
}
[data-theme="dark"] .skeleton {
  background: linear-gradient(
    90deg,
    var(--gray-800) 0%,
    var(--gray-700) 40%,
    var(--gray-800) 80%
  );
}

/* Skeleton shapes */
.sk-text {
  height: 14px;
  border-radius: var(--radius-full);
}
.sk-title {
  height: 20px;
  border-radius: var(--radius-full);
}
.sk-image {
  border-radius: var(--radius-xl);
  aspect-ratio: 1/1;
}
.sk-avatar {
  border-radius: var(--radius-full);
}
.sk-button {
  height: 50px;
  border-radius: var(--radius-full);
}
.sk-card {
  border-radius: var(--radius-2xl);
}

/* Skeleton card — product grid */
.skeleton-product-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.skeleton-product-card .sk-image {
  height: 160px;
}
.skeleton-product-card .sk-brand {
  height: 10px;
  width: 40%;
}
.skeleton-product-card .sk-name {
  height: 14px;
  width: 80%;
}
.skeleton-product-card .sk-price {
  height: 18px;
  width: 50%;
}

/* Skeleton list item */
.skeleton-list-item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}
.skeleton-list-item .sk-avatar {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
.skeleton-list-item .sk-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* ═══════════════════════════════════════════════════════════════
   18. TAGS, BADGES, STATUS INDICATORS
   ═══════════════════════════════════════════════════════════════ */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.tag-primary {
  background: rgba(10, 132, 255, 0.12);
  color: var(--brand-primary);
}
.tag-success {
  background: rgba(48, 209, 88, 0.12);
  color: var(--brand-secondary);
}
.tag-danger {
  background: rgba(255, 55, 95, 0.12);
  color: var(--brand-accent);
}
.tag-warning {
  background: rgba(255, 214, 10, 0.18);
  color: #b8860b;
}
.tag-purple {
  background: rgba(191, 90, 242, 0.12);
  color: var(--brand-purple);
}
.tag-gray {
  background: var(--gray-100);
  color: var(--text-secondary);
}
[data-theme="dark"] .tag-warning {
  color: var(--brand-gold);
}

/* Status dot */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  display: inline-block;
  background: var(--gray-400);
}
.status-dot.online {
  background: var(--brand-secondary);
  box-shadow: 0 0 0 2px rgba(48, 209, 88, 0.25);
  animation: pulse-green 2s infinite;
}
.status-dot.busy {
  background: var(--brand-accent);
}
.status-dot.offline {
  background: var(--gray-400);
}
@keyframes pulse-green {
  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(48, 209, 88, 0.25);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(48, 209, 88, 0.1);
  }
}

/* ═══════════════════════════════════════════════════════════════
   19. PRODUCT DETAIL PAGE
   ═══════════════════════════════════════════════════════════════ */
.product-image-gallery {
  position: relative;
  background: var(--gray-100);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  aspect-ratio: 1/1;
  margin-bottom: var(--space-4);
}
.gallery-main {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-8);
}
.gallery-thumbnails {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: var(--space-5);
}
.gallery-thumbnails::-webkit-scrollbar {
  display: none;
}
.gallery-thumb {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-lg);
  background: var(--gray-100);
  overflow: hidden;
  border: 2px solid transparent;
  flex-shrink: 0;
  cursor: pointer;
  transition:
    border-color var(--dur-fast),
    transform var(--dur-fast);
}
.gallery-thumb.active {
  border-color: var(--brand-primary);
}
.gallery-thumb:active {
  transform: scale(0.92);
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

/* Color / variant selector */
.variant-selector {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.variant-option {
  padding: 7px var(--space-3);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--gray-200);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition:
    border-color var(--dur-fast),
    background var(--dur-fast),
    transform var(--dur-fast) var(--ease-spring);
  color: var(--text-secondary);
}
[data-theme="dark"] .variant-option {
  border-color: var(--gray-700);
}
.variant-option.active {
  border-color: var(--brand-primary);
  background: rgba(10, 132, 255, 0.1);
  color: var(--brand-primary);
}
.variant-option:active {
  transform: scale(0.94);
}
.variant-option.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.color-dot-selector {
  display: flex;
  gap: var(--space-3);
}
.color-dot {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: 2.5px solid transparent;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  transition:
    transform var(--dur-fast) var(--ease-spring),
    border-color var(--dur-fast);
}
.color-dot.active {
  border-color: var(--brand-primary);
  transform: scale(1.15);
}
.color-dot:active {
  transform: scale(0.9);
}

/* Sticky add-to-cart bar */
.product-cart-bar {
  position: sticky;
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
  background: var(--surface-elevated);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 0.5px solid var(--gray-200);
  padding: var(--space-3) var(--space-4);
  display: flex;
  gap: var(--space-3);
  align-items: center;
  z-index: var(--z-sticky);
  margin: 0 calc(-1 * var(--space-4));
}
[data-theme="dark"] .product-cart-bar {
  border-top-color: var(--gray-800);
}

/* ═══════════════════════════════════════════════════════════════
   20. CART & CHECKOUT
   ═══════════════════════════════════════════════════════════════ */
.cart-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  border-bottom: 0.5px solid var(--gray-200);
  align-items: center;
}
[data-theme="dark"] .cart-item {
  border-bottom-color: var(--gray-800);
}
.cart-item-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-xl);
  background: var(--gray-100);
  overflow: hidden;
  flex-shrink: 0;
}
.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-2);
}
.cart-item-info {
  flex: 1;
  min-width: 0;
}
.cart-item-name {
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: 3px;
  line-height: 1.3;
  color: var(--text-primary);
}
.cart-item-variant {
  font-size: var(--text-xs);
  color: var(--gray-500);
}
.cart-item-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-md);
  color: var(--text-primary);
}
.cart-item-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

/* Quantity stepper */
.qty-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.qty-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    background var(--dur-fast),
    transform var(--dur-fast);
  border: none;
  background: transparent;
}
.qty-btn:active {
  transform: scale(0.85);
}
.qty-value {
  min-width: 28px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  padding: 0 var(--space-1);
  color: var(--text-primary);
}

/* Order summary */
.order-summary {
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  padding: var(--space-2) 0;
  color: var(--text-primary);
}
.order-row.total {
  font-size: var(--text-md);
  font-weight: 700;
  padding-top: var(--space-3);
  border-top: 1px solid var(--gray-200);
  margin-top: var(--space-1);
}
[data-theme="dark"] .order-row.total {
  border-top-color: var(--gray-800);
}

/* Coupon input */
.coupon-row {
  display: flex;
  gap: var(--space-2);
  background: var(--gray-100);
  border-radius: var(--radius-xl);
  padding: var(--space-1) var(--space-1) var(--space-1) var(--space-4);
  align-items: center;
}
.coupon-row input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════
   21. PROFILE & SETTINGS COMPONENTS
   ═══════════════════════════════════════════════════════════════ */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-8) var(--space-4) var(--space-6);
  text-align: center;
}
.profile-avatar-wrap {
  position: relative;
  margin-bottom: var(--space-4);
}
.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-full);
  background: linear-gradient(
    135deg,
    var(--brand-primary),
    var(--brand-purple)
  );
  display: grid;
  place-items: center;
  color: #fff;
  font-size: var(--text-3xl);
  font-weight: 700;
  overflow: hidden;
  border: 3px solid var(--surface-bg);
  box-shadow: var(--shadow-md);
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-avatar-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--brand-primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  border: 2px solid var(--surface-bg);
  cursor: pointer;
}
.profile-name {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
}
.profile-email {
  font-size: var(--text-sm);
  color: var(--gray-500);
  margin-top: 2px;
}

/* Settings list */
.settings-group {
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-4);
}
.settings-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-4);
  border-bottom: 0.5px solid var(--gray-200);
  cursor: pointer;
  transition: background var(--dur-fast);
}
[data-theme="dark"] .settings-item {
  border-bottom-color: var(--gray-800);
}
.settings-item:last-child {
  border-bottom: none;
}
.settings-item:active {
  background: var(--gray-100);
}
[data-theme="dark"] .settings-item:active {
  background: var(--gray-800);
}
.settings-item-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  font-size: 17px;
  flex-shrink: 0;
}
.settings-item-text {
  flex: 1;
}
.settings-item-label {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-primary);
}
.settings-item-sub {
  font-size: var(--text-xs);
  color: var(--gray-500);
  margin-top: 1px;
}
.settings-item-right {
  color: var(--gray-400);
  font-size: 14px;
}
.settings-section-title {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  padding: var(--space-4) var(--space-4) var(--space-2);
}

/* ═══════════════════════════════════════════════════════════════
   22. NOTIFICATIONS & ALERTS
   ═══════════════════════════════════════════════════════════════ */
.alert {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-xl);
  font-size: var(--text-sm);
  line-height: 1.5;
}
.alert-info {
  background: rgba(10, 132, 255, 0.1);
  border: 1px solid rgba(10, 132, 255, 0.2);
  color: var(--brand-primary);
}
.alert-success {
  background: rgba(48, 209, 88, 0.1);
  border: 1px solid rgba(48, 209, 88, 0.2);
  color: #1a7a33;
}
.alert-warning {
  background: rgba(255, 214, 10, 0.12);
  border: 1px solid rgba(255, 214, 10, 0.25);
  color: #8b6914;
}
.alert-danger {
  background: rgba(255, 55, 95, 0.1);
  border: 1px solid rgba(255, 55, 95, 0.2);
  color: var(--brand-accent);
}
[data-theme="dark"] .alert-success {
  color: var(--brand-secondary);
}
[data-theme="dark"] .alert-warning {
  color: var(--brand-gold);
}
.alert-icon {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
}

/* Notification item */
.notification-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  border-bottom: 0.5px solid var(--gray-200);
  cursor: pointer;
  transition: background var(--dur-fast);
  border-radius: var(--radius-lg);
}
[data-theme="dark"] .notification-item {
  border-bottom-color: var(--gray-800);
}
.notification-item.unread {
  background: rgba(10, 132, 255, 0.04);
}
.notif-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.notif-content {
  flex: 1;
  min-width: 0;
}
.notif-title {
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: 3px;
  color: var(--text-primary);
}
.notif-body {
  font-size: var(--text-xs);
  color: var(--gray-500);
  line-height: 1.4;
}
.notif-time {
  font-size: var(--text-xs);
  color: var(--gray-400);
  margin-top: 4px;
}
.notif-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--brand-primary);
  flex-shrink: 0;
  margin-top: var(--space-2);
}

/* ═══════════════════════════════════════════════════════════════
   23. TABS
   ═══════════════════════════════════════════════════════════════ */
.tabs {
  display: flex;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}
.tab {
  flex: 1;
  text-align: center;
  padding: 8px var(--space-3);
  border-radius: calc(var(--radius-full) - 2px);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  color: var(--gray-500);
  transition:
    background var(--dur-fast),
    color var(--dur-fast),
    transform var(--dur-fast) var(--ease-spring),
    box-shadow var(--dur-fast);
  white-space: nowrap;
}
.tab.active {
  background: var(--surface-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}
.tab:active {
  transform: scale(0.95);
}

/* Underline tabs */
.tabs-underline {
  display: flex;
  border-bottom: 1px solid var(--gray-200);
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs-underline::-webkit-scrollbar {
  display: none;
}
[data-theme="dark"] .tabs-underline {
  border-bottom-color: var(--gray-800);
}
.tab-underline {
  flex-shrink: 0;
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  position: relative;
  transition: color var(--dur-fast);
}
.tab-underline.active {
  color: var(--brand-primary);
  font-weight: 600;
}
.tab-underline.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: var(--space-3);
  right: var(--space-3);
  height: 2.5px;
  background: var(--brand-primary);
  border-radius: var(--radius-full) var(--radius-full) 0 0;
  animation: tab-underline-in 0.25s var(--ease-spring);
}
@keyframes tab-underline-in {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* ═══════════════════════════════════════════════════════════════
   24. PROGRESS & LOADING
   ═══════════════════════════════════════════════════════════════ */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--brand-primary);
  transition: width 0.6s var(--ease-out);
}
.progress-fill.success {
  background: var(--brand-secondary);
}
.progress-fill.striped {
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(255, 255, 255, 0.25) 10px,
    rgba(255, 255, 255, 0.25) 20px
  );
  animation: progress-stripe 1s linear infinite;
}
@keyframes progress-stripe {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 30px 0;
  }
}

/* Step progress */
.step-progress {
  display: flex;
  align-items: center;
}
.step-dot {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--gray-200);
  display: grid;
  place-items: center;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--gray-500);
  flex-shrink: 0;
  transition:
    background var(--dur-normal),
    color var(--dur-normal);
  position: relative;
}
.step-dot.done {
  background: var(--brand-secondary);
  color: #fff;
}
.step-dot.active {
  background: var(--brand-primary);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.step-line {
  flex: 1;
  height: 2px;
  background: var(--gray-200);
  transition: background var(--dur-normal);
}
.step-line.done {
  background: var(--brand-secondary);
}

/* Full page loader */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--surface-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  z-index: 9999;
}
.loader-logo {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-2xl);
  background: linear-gradient(
    135deg,
    var(--brand-primary),
    var(--brand-purple)
  );
  display: grid;
  place-items: center;
  font-size: 34px;
  animation: loader-pulse 1.5s var(--ease-in-out) infinite;
  box-shadow: var(--shadow-brand);
}
@keyframes loader-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}
.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--brand-primary);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}
.loader-dots {
  display: flex;
  gap: var(--space-2);
}
.loader-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--brand-primary);
  animation: bounce-dot 1.2s ease-in-out infinite;
}
.loader-dot:nth-child(2) {
  animation-delay: 0.2s;
  background: var(--brand-purple);
}
.loader-dot:nth-child(3) {
  animation-delay: 0.4s;
  background: var(--brand-teal);
}
@keyframes bounce-dot {
  0%,
  60%,
  100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-10px);
  }
}

/* ═══════════════════════════════════════════════════════════════
   25. REVIEW / RATING COMPONENTS
   ═══════════════════════════════════════════════════════════════ */
.rating-stars {
  display: flex;
  gap: 3px;
}
.star-filled {
  color: var(--brand-gold);
  font-size: 18px;
}
.star-empty {
  color: var(--gray-300);
  font-size: 18px;
}
.star-half {
  position: relative;
  display: inline-block;
}

.rating-bar-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.rating-bar-label {
  font-size: var(--text-xs);
  color: var(--gray-500);
  width: 12px;
  flex-shrink: 0;
}
.rating-bar-track {
  flex: 1;
  height: 6px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.rating-bar-fill {
  height: 100%;
  background: var(--brand-gold);
  border-radius: var(--radius-full);
}
.rating-bar-count {
  font-size: var(--text-xs);
  color: var(--gray-500);
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}

.review-card {
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}
.review-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.review-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: linear-gradient(
    135deg,
    var(--brand-primary),
    var(--brand-purple)
  );
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: var(--text-sm);
  flex-shrink: 0;
}
.review-name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-primary);
}
.review-date {
  font-size: var(--text-xs);
  color: var(--gray-400);
}
.review-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════
   26. EMPTY STATES
   ═══════════════════════════════════════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-16) var(--space-6);
  gap: var(--space-3);
}
.empty-state-icon {
  font-size: 64px;
  margin-bottom: var(--space-2);
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
.empty-state-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
}
.empty-state-desc {
  font-size: var(--text-sm);
  color: var(--gray-500);
  max-width: 240px;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════
   27. CHIPS & QUICK ACTIONS
   ═══════════════════════════════════════════════════════════════ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 6px var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  background: var(--gray-100);
  color: var(--text-secondary);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--dur-fast);
  white-space: nowrap;
}
[data-theme="dark"] .chip {
  background: var(--gray-800);
}
.chip:active {
  transform: scale(0.94);
}
.chip.selected {
  background: rgba(10, 132, 255, 0.12);
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}
.chip-close {
  font-size: 13px;
  color: var(--gray-400);
  margin-left: 2px;
}
.chip.selected .chip-close {
  color: var(--brand-primary);
}

/* Quick action grid (4 or 5 cols) */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
.quick-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}
.quick-action-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-xl);
  display: grid;
  place-items: center;
  font-size: 26px;
  transition: transform var(--dur-fast) var(--ease-spring);
  box-shadow: var(--shadow-sm);
}
.quick-action-item:active .quick-action-icon {
  transform: scale(0.88);
}
.quick-action-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════════
   28. ORDER TRACKING TIMELINE
   ═══════════════════════════════════════════════════════════════ */
.order-timeline {
  display: flex;
  flex-direction: column;
}
.timeline-item {
  display: flex;
  gap: var(--space-4);
  position: relative;
  padding-bottom: var(--space-5);
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.timeline-dot {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--gray-200);
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--gray-500);
  flex-shrink: 0;
  z-index: 1;
  transition:
    background var(--dur-normal),
    color var(--dur-normal);
}
.timeline-dot.done {
  background: var(--brand-secondary);
  color: #fff;
}
.timeline-dot.active {
  background: var(--brand-primary);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.timeline-line {
  width: 2px;
  flex: 1;
  background: var(--gray-200);
  margin: 4px 0;
  transition: background var(--dur-normal);
}
.timeline-line.done {
  background: var(--brand-secondary);
}
.timeline-item:last-child .timeline-line {
  display: none;
}
.timeline-content {
  flex: 1;
  padding-top: 4px;
}
.timeline-title {
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: 2px;
  color: var(--text-primary);
}
.timeline-desc {
  font-size: var(--text-xs);
  color: var(--gray-500);
  line-height: 1.4;
}
.timeline-time {
  font-size: var(--text-xs);
  color: var(--gray-400);
  margin-top: 3px;
  font-family: var(--font-mono);
}

/* ═══════════════════════════════════════════════════════════════
   29. FLOATING ACTION BUTTON
   ═══════════════════════════════════════════════════════════════ */
.fab {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + var(--space-4));
  right: calc(var(--space-4) + var(--safe-right));
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--brand-primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 24px;
  box-shadow: var(--shadow-brand);
  z-index: var(--z-sticky);
  cursor: pointer;
  border: none;
  transition:
    transform var(--dur-fast) var(--ease-spring),
    box-shadow var(--dur-fast);
}
.fab:active {
  transform: scale(0.9);
}

/* ═══════════════════════════════════════════════════════════════
   30. PRICE COMPARISON / SPEC TABLE
   ═══════════════════════════════════════════════════════════════ */
.spec-table {
  width: 100%;
  border-collapse: collapse;
}
.spec-table tr {
  border-bottom: 0.5px solid var(--gray-200);
}
[data-theme="dark"] .spec-table tr {
  border-bottom-color: var(--gray-800);
}
.spec-table td {
  padding: var(--space-3) 0;
  font-size: var(--text-sm);
  vertical-align: top;
}
.spec-table td:first-child {
  color: var(--gray-500);
  font-weight: 500;
  width: 44%;
  padding-right: var(--space-3);
}
.spec-table td:last-child {
  font-weight: 500;
  color: var(--text-primary);
}

/* Compare cards */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.compare-card {
  background: var(--surface-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.compare-card.highlight {
  border-color: var(--brand-primary);
  box-shadow:
    0 0 0 2px rgba(10, 132, 255, 0.15),
    var(--shadow-md);
}

/* ═══════════════════════════════════════════════════════════════
   31. ADDRESS & PAYMENT CARDS
   ═══════════════════════════════════════════════════════════════ */
.address-card {
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition:
    border-color var(--dur-fast),
    box-shadow var(--dur-fast),
    transform var(--dur-fast);
}
.address-card:active {
  transform: scale(0.98);
}
.address-card.selected {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.1);
}
.address-type {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-primary);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.address-name {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--text-primary);
}
.address-text {
  font-size: var(--text-sm);
  color: var(--gray-500);
  line-height: 1.5;
  margin-top: 2px;
}

/* Payment card visual */
.payment-card-visual {
  width: 100%;
  aspect-ratio: 1.586 / 1;
  border-radius: var(--radius-2xl);
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.payment-card-visual::before {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  top: -60px;
  right: -60px;
}
.payment-card-visual::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  bottom: -40px;
  left: -40px;
}
.card-chip {
  font-size: 28px;
}
.card-number {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  letter-spacing: 0.15em;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
  z-index: 1;
}
.card-holder {
  font-size: var(--text-xs);
  opacity: 0.7;
}
.card-expiry {
  font-size: var(--text-sm);
  font-weight: 600;
}
.card-network {
  font-size: 28px;
}

/* ═══════════════════════════════════════════════════════════════
   32. DEAL TIMER / COUNTDOWN
   ═══════════════════════════════════════════════════════════════ */
.deal-timer {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}
.timer-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-md);
  padding: 4px var(--space-2);
  min-width: 38px;
}
.timer-value {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.timer-label {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
}
.timer-sep {
  font-size: var(--text-lg);
  font-weight: 700;
  opacity: 0.6;
  margin-bottom: var(--space-3);
}

/* ═══════════════════════════════════════════════════════════════
   33. CHAT / SUPPORT WIDGET
   ═══════════════════════════════════════════════════════════════ */
.chat-bubble {
  max-width: 78%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-2xl);
  font-size: var(--text-sm);
  line-height: 1.5;
  position: relative;
}
.chat-bubble-out {
  background: var(--brand-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
  margin-left: auto;
}
.chat-bubble-in {
  background: var(--gray-100);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}
[data-theme="dark"] .chat-bubble-in {
  background: var(--gray-800);
}
.chat-time {
  font-size: var(--text-xs);
  color: var(--gray-400);
  margin-top: 3px;
}

/* ═══════════════════════════════════════════════════════════════
   34. UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════ */

/* Spacing */
.mt-0 {
  margin-top: 0;
}
.mt-1 {
  margin-top: var(--space-1);
}
.mt-2 {
  margin-top: var(--space-2);
}
.mt-3 {
  margin-top: var(--space-3);
}
.mt-4 {
  margin-top: var(--space-4);
}
.mt-5 {
  margin-top: var(--space-5);
}
.mt-6 {
  margin-top: var(--space-6);
}
.mb-3 {
  margin-bottom: var(--space-3);
}
.mb-4 {
  margin-bottom: var(--space-4);
}
.mb-5 {
  margin-bottom: var(--space-5);
}
.mb-6 {
  margin-bottom: var(--space-6);
}

/* Flex */
.flex {
  display: flex;
}
.flex-col {
  display: flex;
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.justify-center {
  justify-content: center;
}
.gap-2 {
  gap: var(--space-2);
}
.gap-3 {
  gap: var(--space-3);
}
.gap-4 {
  gap: var(--space-4);
}
.flex-1 {
  flex: 1;
}

/* Text */
.text-xs {
  font-size: var(--text-xs);
}
.text-sm {
  font-size: var(--text-sm);
}
.text-base {
  font-size: var(--text-base);
}
.text-lg {
  font-size: var(--text-lg);
}
.text-xl {
  font-size: var(--text-xl);
}
.text-center {
  text-align: center;
}
.font-500 {
  font-weight: 500;
}
.font-600 {
  font-weight: 600;
}
.font-700 {
  font-weight: 700;
}
.font-800 {
  font-weight: 800;
}
.text-primary {
  color: var(--brand-primary);
}
.text-muted {
  color: var(--gray-500);
}
.text-danger {
  color: var(--brand-accent);
}
.text-success {
  color: var(--brand-secondary);
}

/* Divider */
.divider {
  height: 0.5px;
  background: var(--gray-200);
  margin: var(--space-4) 0;
}
[data-theme="dark"] .divider {
  background: var(--gray-800);
}
.divider-thick {
  height: 8px;
  background: var(--gray-100);
  margin: var(--space-4) calc(-1 * var(--space-4));
}
[data-theme="dark"] .divider-thick {
  background: var(--gray-900);
}

/* Truncate */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Visibility */
.hidden {
  display: none !important;
}
.visible {
  visibility: visible;
}
.invisible {
  visibility: hidden;
}

/* Width */
.w-full {
  width: 100%;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ═══════════════════════════════════════════════════════════════
   35. ANIMATIONS (shared keyframes)
   ═══════════════════════════════════════════════════════════════ */
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@keyframes slide-up {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes slide-down {
  from {
    transform: translateY(-16px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes scale-in {
  from {
    transform: scale(0.88);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes shimmer-text {
  0% {
    background-position: -400px 0;
  }
  100% {
    background-position: 400px 0;
  }
}

.animate-fade-in {
  animation: fade-in var(--dur-normal) var(--ease-out) both;
}
.animate-slide-up {
  animation: slide-up var(--dur-normal) var(--ease-out) both;
}
.animate-scale-in {
  animation: scale-in var(--dur-normal) var(--ease-spring) both;
}

/* Stagger delays */
.stagger-1 {
  animation-delay: 60ms;
}
.stagger-2 {
  animation-delay: 120ms;
}
.stagger-3 {
  animation-delay: 180ms;
}
.stagger-4 {
  animation-delay: 240ms;
}
.stagger-5 {
  animation-delay: 300ms;
}

/* ═══════════════════════════════════════════════════════════════
   36. PULL-TO-REFRESH
   ═══════════════════════════════════════════════════════════════ */
.ptr-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  color: var(--gray-500);
  font-size: var(--text-sm);
  gap: var(--space-2);
  overflow: hidden;
  transition: height var(--dur-fast) var(--ease-out);
}
.ptr-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-300);
  border-top-color: var(--brand-primary);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

/* ═══════════════════════════════════════════════════════════════
   37. RESPONSIVE — Tablet & Desktop (12-column grid concept)
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 480px) {
  .app-wrapper {
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.12);
  }
  .grid-auto {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

@media (min-width: 768px) {
  :root {
    --max-content: 720px;
  }
  body {
    background: var(--surface-bg);
    padding: 20px;
  }
  .app-wrapper {
    border-radius: var(--radius-3xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    max-width: var(--max-content);
  }
  .grid-2 {
    grid-template-columns: repeat(3, 1fr);
  }
  .quick-actions {
    grid-template-columns: repeat(5, 1fr);
  }
  .auth-page {
    max-width: 440px;
    margin: 0 auto;
    border-radius: var(--radius-3xl);
    min-height: auto;
  }
}

@media (min-width: 1024px) {
  :root {
    --max-content: 480px;
  }
  body {
    background: #eaeaf0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 24px;
  }
  [data-theme="dark"] body {
    background: #0a0a0f;
  }
  .app-wrapper {
    border-radius: var(--radius-3xl);
    overflow: hidden;
    min-height: calc(100vh - 48px);
    height: calc(100vh - 48px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 480px;
  }
}

@media (min-width: 1280px) {
  body {
    padding: 32px;
  }
  .app-wrapper {
    max-width: 480px;
    height: calc(100vh - 64px);
  }
}

/* ═══════════════════════════════════════════════════════════════
   38. SAFE AREA SUPPORT (notch, home indicator)
   ═══════════════════════════════════════════════════════════════ */
@supports (padding: max(0px)) {
  .top-nav {
    padding-top: max(var(--safe-top), 0px);
  }
  .bottom-nav {
    padding-bottom: max(var(--safe-bottom), 0px);
  }
  .auth-header {
    padding-top: max(calc(var(--safe-top) + var(--space-6)), var(--space-6));
  }
}

/* ═══════════════════════════════════════════════════════════════
   39. PRINT & REDUCED MOTION
   ═══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
@media print {
  .top-nav,
  .bottom-nav,
  .sidebar,
  .fab,
  .toast-container {
    display: none !important;
  }
  .page-content {
    padding: 0 !important;
  }
}
