/* ==========================================================================
   MobForge Store — Design Tokens
   ========================================================================== */
:root {
  color-scheme: light;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: ui-monospace, 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;

  --bg: #f4f3ef;
  --bg-glow: radial-gradient(1200px 520px at 85% -120px, rgba(234, 88, 12, 0.07), transparent 70%);
  --surface: #ffffff;
  --surface-alt: #f1f0eb;
  --surface-hover: #e8e7e1;
  --surface-glass: rgba(255, 255, 255, 0.78);
  --surface-stage: radial-gradient(circle at 50% 38%, #ffffff 0%, #efeee9 62%, #e3e2dc 100%);
  --border: #e5e4de;
  --border-strong: #d2d1ca;
  --text: #131316;
  --text-2: #3b3b42;
  --text-muted: #6b6b73;
  --accent: #ea580c;
  --accent-2: #f59e0b;
  --accent-hover: #c2410c;
  --accent-soft: rgba(234, 88, 12, 0.10);
  --accent-ring: rgba(234, 88, 12, 0.32);
  --accent-fg: #c2410c;
  --accent-grad: linear-gradient(135deg, #f97316 0%, #ea580c 55%, #dc4a07 100%);
  --on-accent: #ffffff;
  --success: #16a34a;
  --success-soft: rgba(22, 163, 74, 0.11);
  --success-fg: #15803d;
  --teal: #0d9488;
  --teal-soft: rgba(13, 148, 136, 0.11);
  --teal-fg: #0f766e;
  --gold: #d97706;
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.10);
  --heart: #e11d48;

  /* Hero follows the theme: warm paper in light mode, ink in dark mode */
  --hero-bg: linear-gradient(135deg, #ffffff 0%, #fffaf4 55%, #fff1e4 100%);
  --hero-text: var(--text);
  --hero-muted: var(--text-muted);
  --hero-line: rgba(20, 20, 22, 0.055);
  --hero-glow: radial-gradient(circle, rgba(249, 115, 22, 0.20) 0%, rgba(249, 115, 22, 0.06) 40%, transparent 68%);
  --hero-divider: var(--border);
  --hero-eyebrow-fg: var(--accent-fg);
  --hero-eyebrow-bg: var(--accent-soft);
  --hero-eyebrow-border: rgba(234, 88, 12, 0.22);
  --hero-btn-bg: var(--surface);
  --hero-btn-border: var(--border-strong);
  --hero-btn-hover: var(--surface-alt);
  --hero-accent-text: linear-gradient(100deg, #ea580c 0%, #f97316 50%, #f59e0b 100%);
  --spot-border: var(--border);
  --spot-shadow: 0 24px 50px -22px rgba(120, 53, 15, 0.35), 0 2px 8px rgba(20, 20, 22, 0.05);

  --shadow-xs: 0 1px 2px rgba(20, 20, 22, 0.05);
  --shadow-sm: 0 6px 18px -8px rgba(20, 20, 22, 0.12), 0 1px 3px rgba(20, 20, 22, 0.05);
  --shadow-md: 0 14px 34px -14px rgba(20, 20, 22, 0.22), 0 2px 6px rgba(20, 20, 22, 0.05);
  --shadow-lg: 0 26px 56px -16px rgba(20, 20, 22, 0.26), 0 4px 14px rgba(20, 20, 22, 0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0f11;
  --bg-glow: radial-gradient(1200px 520px at 85% -120px, rgba(249, 115, 22, 0.10), transparent 70%);
  --surface: #16171a;
  --surface-alt: #1f2025;
  --surface-hover: #292b31;
  --surface-glass: rgba(22, 23, 26, 0.78);
  --surface-stage: radial-gradient(circle at 50% 38%, #2a2c32 0%, #1b1c20 64%, #131417 100%);
  --border: #26282d;
  --border-strong: #383b42;
  --text: #ededef;
  --text-2: #c7c8cd;
  --text-muted: #8f929b;
  --accent: #f97316;
  --accent-2: #fbbf24;
  --accent-hover: #ea580c;
  --accent-soft: rgba(249, 115, 22, 0.15);
  --accent-ring: rgba(249, 115, 22, 0.38);
  --accent-fg: #fb923c;
  --accent-grad: linear-gradient(135deg, #fb923c 0%, #f97316 55%, #ea580c 100%);
  --on-accent: #1a0a02;
  --success: #22b07d;
  --success-soft: rgba(34, 176, 125, 0.15);
  --success-fg: #4fd19f;
  --teal: #14b8a6;
  --teal-soft: rgba(20, 184, 166, 0.15);
  --teal-fg: #2dd4bf;
  --gold: #f59e0b;
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.15);
  --heart: #fb7185;

  --hero-bg: #0a0a0c;
  --hero-text: #f6f5f2;
  --hero-muted: #a8a8b0;
  --hero-line: rgba(255, 255, 255, 0.07);
  --hero-glow: radial-gradient(circle, rgba(249, 115, 22, 0.30) 0%, rgba(234, 88, 12, 0.10) 38%, transparent 68%);
  --hero-divider: rgba(255, 255, 255, 0.10);
  --hero-eyebrow-fg: #fdba74;
  --hero-eyebrow-bg: rgba(249, 115, 22, 0.13);
  --hero-eyebrow-border: rgba(249, 115, 22, 0.28);
  --hero-btn-bg: rgba(255, 255, 255, 0.06);
  --hero-btn-border: rgba(255, 255, 255, 0.16);
  --hero-btn-hover: rgba(255, 255, 255, 0.12);
  --hero-accent-text: linear-gradient(100deg, #fdba74 0%, #f97316 45%, #fbbf24 100%);
  --spot-border: rgba(255, 255, 255, 0.10);
  --spot-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.7), 0 0 0 6px rgba(255, 255, 255, 0.03);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 8px 20px -8px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 16px 36px -14px rgba(0, 0, 0, 0.65);
  --shadow-lg: 0 28px 60px -12px rgba(0, 0, 0, 0.75);
}

/* Category accent colours (used by card labels, pills, icons) */
[data-cat="Real Animals"] { --cat: #15803d; }
[data-cat="Prehistoric"] { --cat: #b45309; }
[data-cat="Fantasy"] { --cat: #c2410c; }
[data-cat="Bosses"] { --cat: #dc2626; }
[data-cat="Constructs"] { --cat: #64748b; }
[data-cat="Monsters"] { --cat: #4d7c0f; }
[data-cat="Companions"] { --cat: #db2777; }
[data-cat="Mounts"] { --cat: #d97706; }
[data-cat="Aquatic"] { --cat: #0891b2; }
[data-cat="Flying"] { --cat: #2563eb; }
[data-cat="Other"] { --cat: #6b7280; }
[data-cat="All"] { --cat: var(--accent); }
:root[data-theme="dark"] [data-cat="Real Animals"] { --cat: #4ade80; }
:root[data-theme="dark"] [data-cat="Prehistoric"] { --cat: #f59e0b; }
:root[data-theme="dark"] [data-cat="Fantasy"] { --cat: #fb923c; }
:root[data-theme="dark"] [data-cat="Bosses"] { --cat: #f87171; }
:root[data-theme="dark"] [data-cat="Constructs"] { --cat: #94a3b8; }
:root[data-theme="dark"] [data-cat="Monsters"] { --cat: #a3e635; }
:root[data-theme="dark"] [data-cat="Companions"] { --cat: #f472b6; }
:root[data-theme="dark"] [data-cat="Mounts"] { --cat: #fbbf24; }
:root[data-theme="dark"] [data-cat="Aquatic"] { --cat: #22d3ee; }
:root[data-theme="dark"] [data-cat="Flying"] { --cat: #60a5fa; }
:root[data-theme="dark"] [data-cat="Other"] { --cat: #9ca3af; }

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

html, body {
  margin: 0;
  padding: 0;
}

html {
  scroll-padding-top: 84px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-glow), var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  min-height: 100vh;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  font-feature-settings: 'cv11', 'ss01';
}

::selection {
  background: var(--accent-ring);
}

a {
  color: var(--accent-fg);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button, input, select, textarea {
  font-family: inherit;
}

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

h1, h2, h3, .display {
  font-family: var(--font-display);
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 5px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hidden {
  display: none !important;
}

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

/* ==========================================================================
   Header / Storefront Navigation
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface-glass);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 12px -4px rgba(234, 88, 12, 0.45);
  border: 1px solid var(--border);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge {
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--accent-grad);
  color: #fff;
  text-transform: uppercase;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-tab {
  position: relative;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text);
  background: var(--surface-alt);
}

.nav-tab.active {
  color: var(--text);
}

.nav-tab.active::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -13px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-grad);
}

.header-search {
  position: relative;
  flex: 1 1 220px;
  max-width: 340px;
}

.header-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}

.header-search input {
  width: 100%;
  padding: 9px 40px 9px 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.header-search input::-webkit-search-cancel-button {
  display: none;
}

.header-search input:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  background: var(--surface);
  color: var(--text-muted);
}

.header-search .kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.header-search input:focus ~ .kbd {
  opacity: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.1s;
}

.icon-btn:hover {
  background: var(--surface-alt);
  border-color: var(--border-strong);
  color: var(--text);
}

.icon-btn:active {
  transform: scale(0.96);
}

.icon-btn.has-items {
  color: var(--heart);
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent-grad);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface);
  animation: pop-in 0.25s var(--ease);
}

.cart-badge.heart-badge {
  background: var(--heart);
}

.auth-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.account-trigger:hover {
  background: var(--surface-alt);
  border-color: var(--border-strong);
}

.avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 60;
  animation: menu-in 0.16s var(--ease);
  transform-origin: top right;
}

.account-menu-head {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.account-menu-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.account-menu-email {
  font-size: 11.5px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
}

.account-menu-item:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.account-menu-item.danger {
  color: var(--danger);
}

/* ==========================================================================
   Buttons & Inputs
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  padding: 8px 15px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s, color 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  background: var(--surface-alt);
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent-grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px -8px rgba(234, 88, 12, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(234, 88, 12, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-success {
  background: var(--success);
  color: #ffffff;
  border-color: var(--success);
  box-shadow: 0 6px 16px -8px rgba(22, 163, 74, 0.7);
}

.btn-success:hover {
  filter: brightness(0.94);
  background: var(--success);
  color: #ffffff;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}

.btn-ghost:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.25);
}

.btn-danger:hover {
  background: var(--danger);
  color: #ffffff;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 12.5px;
  border-radius: 7px;
}

.btn-lg {
  padding: 12px 22px;
  font-size: 14.5px;
  border-radius: var(--radius-md);
}

.btn-icon {
  padding: 0;
  width: 38px;
  height: 38px;
}

.btn-lg.btn-icon {
  width: 46px;
  height: 46px;
}

.btn-google {
  background: #ffffff;
  color: #1f2937;
  border-color: #d4d4d8;
}

.btn-google:hover {
  background: #f4f4f5;
}

.btn.is-saved,
.btn.is-saved:hover {
  color: var(--heart);
  border-color: color-mix(in srgb, var(--heart) 40%, transparent);
  background: color-mix(in srgb, var(--heart) 9%, var(--surface));
}

.input, .select, .textarea {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input:hover, .select:hover, .textarea:hover {
  border-color: color-mix(in srgb, var(--border-strong) 60%, var(--text-muted));
}

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b73' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

.textarea {
  resize: vertical;
  line-height: 1.55;
}

/* ==========================================================================
   Main Container
   ========================================================================== */
.container {
  width: 100%;
  min-width: 0;
  max-width: 1340px;
  margin: 0 auto;
  padding: 28px 24px 64px;
  flex: 1;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.page-head h1 {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.page-head p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* ==========================================================================
   Storefront Hero Showcase
   ========================================================================== */
.store-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--hero-bg);
  color: var(--hero-text);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 36px;
  align-items: center;
}

/* voxel grid + warm glow */
.store-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--hero-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-line) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 30% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 90% at 30% 40%, #000 20%, transparent 75%);
}

.store-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 720px;
  height: 720px;
  right: -180px;
  top: -320px;
  background: var(--hero-glow);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--hero-eyebrow-fg);
  background: var(--hero-eyebrow-bg);
  border: 1px solid var(--hero-eyebrow-border);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero-eyebrow .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: pulse 2s infinite;
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.045em;
  color: var(--hero-text);
}

.hero-title .accent-text {
  background: var(--hero-accent-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin: 0 0 26px;
  font-size: 15.5px;
  color: var(--hero-muted);
  max-width: 540px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.store-hero .btn:not(.btn-primary) {
  background: var(--hero-btn-bg);
  border-color: var(--hero-btn-border);
  color: var(--hero-text);
}

.store-hero .btn:not(.btn-primary):hover {
  background: var(--hero-btn-hover);
}

.store-hero .spotlight-card .btn:not(.btn-primary) {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--hero-divider);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stat strong {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--hero-text);
}

.hero-stat span {
  font-size: 12.5px;
  color: var(--hero-muted);
}

.spotlight-card {
  background: var(--surface-stage);
  border: 1px solid var(--spot-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--spot-shadow);
  color: var(--text);
}

.spotlight-stage {
  height: 300px;
  width: 100%;
  position: relative;
}

.spotlight-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: var(--shadow-xs);
}

.spotlight-hint {
  position: absolute;
  bottom: 10px;
  right: 12px;
  z-index: 4;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0.92;
}

.spotlight-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transition: opacity 0.2s, transform 0.15s;
}

.spotlight-nav.prev { left: 12px; }
.spotlight-nav.next { right: 12px; }

.spotlight-card:hover .spotlight-nav,
.spotlight-nav:focus-visible {
  opacity: 1;
}

.spotlight-nav:hover {
  transform: translateY(-50%) scale(1.06);
}

.spotlight-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.spotlight-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.spotlight-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.spotlight-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.spotlight-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: var(--border-strong);
  cursor: pointer;
  transition: width 0.2s var(--ease), background 0.2s;
}

.spotlight-dot.active {
  width: 22px;
  background: var(--accent);
}

/* ==========================================================================
   Category Strip & Filter Toolbar
   ========================================================================== */
.category-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 2px 2px 8px;
  margin-bottom: 16px;
  scrollbar-width: thin;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.12s, box-shadow 0.15s;
}

.cat-pill:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
  transform: translateY(-1px);
}

.cat-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cat, var(--accent));
  background: color-mix(in srgb, var(--cat, var(--accent)) 13%, transparent);
  flex-shrink: 0;
}

.cat-pill.active {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
  box-shadow: var(--shadow-sm);
}

.cat-pill.active .cat-icon {
  background: rgba(255, 255, 255, 0.16);
  color: var(--surface);
}

:root[data-theme="dark"] .cat-pill.active .cat-icon {
  background: rgba(0, 0, 0, 0.12);
}

.cat-count {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text-muted);
}

.cat-pill.active .cat-count {
  background: rgba(255, 255, 255, 0.18);
  color: var(--surface);
}

:root[data-theme="dark"] .cat-pill.active .cat-count {
  background: rgba(0, 0, 0, 0.18);
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-right .input {
  width: 210px;
}

.segmented {
  display: inline-flex;
  background: var(--surface-alt);
  padding: 3px;
  border-radius: 9px;
  border: 1px solid var(--border);
  gap: 1px;
}

.seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.seg-btn:hover {
  color: var(--text);
}

.seg-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs), 0 0 0 1px var(--border);
}

.seg-btn .seg-count {
  font-size: 10.5px;
  font-weight: 700;
  min-width: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--heart);
  color: #fff;
  line-height: 16px;
  text-align: center;
}

.results-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  margin: -6px 0 16px;
}

.results-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  padding: 0 4px;
}

/* ==========================================================================
   Product Grid & Cards
   ========================================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 20px;
}

.grid.grid-short {
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 14px;
}

.grid.grid-short .card-preview {
  height: 150px;
}

.grid.grid-short .price-pill {
  top: 8px;
  right: 8px;
  font-size: 11px;
  padding: 3px 8px;
}

.grid.grid-short .wish-btn {
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
}

.grid.grid-short .card-body {
  padding: 10px 12px 12px;
  gap: 4px;
}

.grid.grid-short .card-title {
  font-size: 14px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s;
  cursor: pointer;
  animation: card-in 0.35s var(--ease) both;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

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

.card-preview {
  height: 200px;
  background: var(--surface-stage);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

/* soft floor shadow under the model */
.card-preview::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 14%;
  width: 52%;
  height: 12%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.16) 0%, transparent 70%);
  pointer-events: none;
}

.card-preview img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s var(--ease);
  user-select: none;
  -webkit-user-drag: none;
}

.card:hover .card-preview img {
  transform: scale(1.06) translateY(-2px);
}

.card-quick {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translate(-50%, 8px);
  opacity: 0;
  z-index: 3;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--text);
  color: var(--surface);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s var(--ease);
  white-space: nowrap;
}

.card:hover .card-quick {
  opacity: 0.94;
  transform: translate(-50%, 0);
}

.grid.grid-short .card-quick {
  display: none;
}

.wish-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 4;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.18s, transform 0.18s var(--ease), color 0.15s, background 0.15s;
}

.card:hover .wish-btn,
.wish-btn:focus-visible,
.wish-btn.active {
  opacity: 1;
  transform: scale(1);
}

.wish-btn:hover {
  color: var(--heart);
}

.wish-btn.active {
  color: var(--heart);
  background: color-mix(in srgb, var(--heart) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--heart) 35%, transparent);
}

.wish-btn.active svg {
  fill: currentColor;
  animation: heart-pop 0.35s var(--ease);
}

@media (hover: none) {
  .wish-btn {
    opacity: 1;
    transform: none;
  }
}

.detail-3d-box canvas,
.spotlight-stage canvas {
  user-select: none;
  -webkit-user-select: none;
  display: block;
}

.preview-state-bar {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 6;
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  box-shadow: var(--shadow-sm);
}

.state-pill {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.state-pill:hover {
  color: var(--text);
}

.state-pill.active {
  background: var(--accent-grad);
  color: #fff;
}

.viewer-subbar {
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}

.clip-pill {
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.clip-pill:hover {
  border-color: var(--accent);
  color: var(--text);
}

.clip-pill.active {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

.price-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  letter-spacing: -0.01em;
}

.price-pill.free {
  background: var(--success);
  color: #ffffff;
  border-color: var(--success);
}

.price-pill.owned {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

.price-pill.sale {
  background: var(--accent-grad);
  color: #fff;
  border-color: transparent;
}

.price-strike {
  text-decoration: line-through;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.85em;
  margin-right: 5px;
}

/* Skeleton loading */
.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.skeleton-card .sk-media {
  height: 200px;
}

.skeleton-card .sk-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sk {
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-alt) 0%, var(--surface-hover) 50%, var(--surface-alt) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}

.grid.grid-short .skeleton-card .sk-media {
  height: 150px;
}

/* ==========================================================================
   Storefront Shelves (Recently viewed / Related)
   ========================================================================== */
.shelf {
  margin: 0 0 28px;
}

.shelf-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.shelf-row > * {
  scroll-snap-align: start;
}

.mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s, transform 0.15s var(--ease), box-shadow 0.15s;
  min-width: 0;
}

.mini-card:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.mini-card img {
  width: 58px;
  height: 58px;
  border-radius: 9px;
  background: var(--surface-stage);
  border: 1px solid var(--border);
  object-fit: contain;
  flex-shrink: 0;
}

.mini-card-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.mini-card-title {
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-card-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.mini-card-meta strong {
  color: var(--text);
}

.related-section {
  margin-top: 36px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 18px;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr));
  gap: 14px;
}

.lib-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
}

.lib-thumb {
  display: block;
  height: 130px;
  width: 100%;
  padding: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  background: var(--surface-stage);
  cursor: pointer;
}

.lib-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s var(--ease);
}

.lib-thumb:hover img {
  transform: scale(1.06);
}

.lib-body {
  padding: 12px;
  min-width: 0;
}

.lib-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Bundles Showcase & Bundle Page
   ========================================================================== */
.bundles-section {
  position: relative;
  margin: 44px 0 0;
  padding: 28px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(600px 240px at 0% 0%, rgba(22, 163, 74, 0.08), transparent 70%),
    var(--surface-alt);
  border: 1px solid var(--border);
}

.bundles-section > .section-head {
  align-items: flex-start;
  margin-bottom: 20px;
}

.section-kicker {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--success-fg);
  margin-bottom: 4px;
}

.section-sub {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

.bundle-count-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  white-space: nowrap;
}

.bundles-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(22, 163, 74, 0.25);
  background: var(--success-soft);
  color: var(--success-fg);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
}

.bundles-link:hover {
  background: color-mix(in srgb, var(--success) 18%, transparent);
  transform: translateY(-1px);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-head h2 .section-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-fg);
}

.bundles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}

.bundle-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s;
  cursor: pointer;
}

.bundle-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.bundle-collage {
  height: 156px;
  background:
    radial-gradient(circle at 20% 0%, rgba(249, 115, 22, 0.10), transparent 55%),
    var(--surface-stage);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 6px;
  padding: 12px;
  position: relative;
  align-items: center;
}

.bundle-collage img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.3s var(--ease);
}

.bundle-card:hover .bundle-collage img {
  transform: translateY(-3px);
}

.bundle-save-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--success);
  color: #ffffff;
  box-shadow: var(--shadow-xs);
}

.bundle-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 14px;
}

/* ==========================================================================
   Creator Hub Tabs, Payout Banner & Analytics Charts
   ========================================================================== */
.hub-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding: 4px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  width: fit-content;
  max-width: 100%;
}

.hub-tab {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.hub-tab:hover {
  color: var(--text);
}

.hub-tab.active {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.bar-chart {
  height: 170px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding-top: 18px;
  border-bottom: 1px solid var(--border);
}

.bar-col {
  flex: 1;
  min-width: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  position: relative;
}

.bar-fill {
  width: 100%;
  max-width: 28px;
  background: var(--accent-grad);
  border-radius: 5px 5px 0 0;
  min-height: 3px;
  transition: opacity 0.15s;
}

.bar-fill.zero {
  background: var(--border);
  opacity: 0.65;
}

.bar-col:hover .bar-fill {
  opacity: 0.82;
}

.bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

.h-bar-row {
  margin-bottom: 10px;
}

.h-bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  margin-bottom: 4px;
}

.h-bar-track {
  height: 7px;
  border-radius: 999px;
  background: var(--surface-alt);
  overflow: hidden;
}

.h-bar-fill {
  height: 100%;
  background: var(--accent-grad);
  border-radius: 999px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: capitalize;
}

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.completed,
.status-pill.active {
  background: var(--success-soft);
  color: var(--success-fg);
}

.status-pill.refunded,
.status-pill.revoked {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-pill.pending,
.status-pill.archived {
  background: var(--surface-alt);
  color: var(--text-muted);
}

.cart-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 14px;
  background: var(--surface-alt);
}

.cart-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 10px;
}

.check-list-scroll {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px;
  background: var(--surface);
}

.check-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

.check-list-row:hover {
  background: var(--surface-alt);
}

@media (max-width: 1040px) {
  .analytics-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.settings-card {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (max-width: 860px) {
  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.pagination-bar {
  margin: 26px 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.page-info {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.page-info strong {
  color: var(--text);
}

.page-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.page-btn:hover:not(:disabled) {
  background: var(--surface-alt);
  border-color: var(--border-strong);
}

.page-btn.active {
  background: var(--accent-grad);
  color: #fff;
  border-color: transparent;
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-ellipsis {
  padding: 0 4px;
  color: var(--text-muted);
  font-size: 13px;
  user-select: none;
}

.card-body {
  padding: 15px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-collapsible {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.card.card-collapsed .card-collapsible,
.card.card-collapsed .card-rating {
  display: none;
}

.card.card-collapsed .card-body {
  padding: 11px 14px 13px;
  gap: 3px;
}

.grid.grid-short .card.card-collapsed .card-body {
  padding: 9px 12px 11px;
  gap: 2px;
}

.card-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.card-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.card-collapse-btn {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s, color 0.15s, transform 0.16s;
}

.card:hover .card-collapse-btn,
.card-collapse-btn:focus-visible {
  opacity: 1;
}

.card-collapse-btn:hover {
  background: var(--surface-alt);
  border-color: var(--border);
  color: var(--text);
}

.card.card-collapsed .card-collapse-btn svg {
  transform: rotate(-90deg);
}

.card-collapse-btn svg {
  transition: transform 0.16s ease;
}

.card-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--cat, var(--accent-fg));
}

.card-category::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: currentColor;
}

.card-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--text-2);
}

.star-icon {
  color: var(--gold);
}

.card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.card-summary {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-2);
}

.chip-teal {
  background: var(--teal-soft);
  color: var(--teal-fg);
  border-color: rgba(13, 148, 136, 0.22);
}

.chip-success {
  background: var(--success-soft);
  color: var(--success-fg);
  border-color: rgba(22, 163, 74, 0.22);
}

.chip-muted {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
  border-style: dashed;
  opacity: 0.85;
}

.chip-warn {
  background: var(--accent-soft);
  color: var(--accent-fg);
  border-color: rgba(234, 88, 12, 0.24);
}

.card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-seller {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.card-seller .avatar-circle {
  width: 20px;
  height: 20px;
  font-size: 8.5px;
}

.card-seller strong {
  color: var(--text-2);
}

/* ==========================================================================
   Storefront info sections: How it works, Trust band, FAQ
   ========================================================================== */
.info-section {
  margin-top: 56px;
}

.info-section > .section-head {
  margin-bottom: 18px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  counter-reset: step;
}

.step-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 22px 20px;
  overflow: hidden;
}

.step-card::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  right: 16px;
  top: 8px;
  font-family: var(--font-display);
  font-size: 54px;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--surface-alt);
  line-height: 1;
}

.step-icon {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-grad);
  color: #fff;
  margin-bottom: 14px;
  box-shadow: 0 8px 18px -8px rgba(234, 88, 12, 0.7);
}

.step-card h3 {
  position: relative;
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.step-card p {
  position: relative;
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

.trust-band {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.trust-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.trust-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent-fg);
}

.trust-item h3 {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}

.trust-item p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

.faq-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  align-items: start;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.faq-item[open] {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 15px 18px;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 18px;
  font-weight: 500;
  color: var(--text-muted);
  transition: transform 0.2s var(--ease);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
  color: var(--accent);
}

.faq-item p {
  margin: 0;
  padding: 0 18px 16px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.65;
}

.cta-band {
  margin-top: 56px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  background: var(--accent-grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.10) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
}

.cta-band h2 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.cta-band p {
  margin: 0;
  font-size: 14.5px;
  opacity: 0.9;
  max-width: 560px;
}

.cta-band .btn {
  background: #fff;
  color: #9a3412;
  border-color: #fff;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.4);
}

.cta-band .btn:hover {
  background: #fff7ed;
}

/* ==========================================================================
   Product Detail Page
   ========================================================================== */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.product-layout > *,
.sell-layout > *,
.store-hero > *,
.analytics-grid > *,
.settings-grid > *,
.page-head > * {
  min-width: 0;
  max-width: 100%;
}

.viewer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  min-width: 0;
  max-width: 100%;
}

.detail-3d-box {
  height: 440px;
  background: var(--surface-stage);
  position: relative;
  overflow: hidden;
}

.example-stage-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
}

.example-stage-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity 0.16s ease;
}

.example-stage-img.loading {
  opacity: 0.45;
}

.example-loading-pill {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
}

.viewer-toolbar {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.viewer-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.viewer-btn {
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text-2);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.viewer-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.viewer-btn.active {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

.product-tabs-bar {
  display: flex;
  gap: 4px;
  box-shadow: inset 0 -1px 0 var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.product-tabs-bar::-webkit-scrollbar {
  display: none;
}

.product-tab-btn {
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

.product-tab-btn:hover {
  color: var(--text);
}

.product-tab-btn.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.purchase-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 86px;
}

.purchase-card h1 {
  font-family: var(--font-display);
  letter-spacing: -0.03em !important;
}

.purchase-price {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  margin: 10px 0 4px;
}

.purchase-price.free {
  color: var(--success-fg);
}

.purchase-secondary {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.purchase-secondary .btn {
  flex: 1;
}

.checklist {
  list-style: none;
  padding: 16px 0;
  margin: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13px;
  color: var(--text-2);
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.check-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
  color: var(--success-fg);
  background: var(--success-soft);
  font-weight: 800;
}

.check-dot.off {
  color: var(--text-muted);
  background: var(--surface-alt);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.spec-cell {
  padding: 11px 13px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.spec-cell span {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 2px;
}

.spec-cell strong {
  font-size: 13.5px;
  color: var(--text);
}

.install-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: inst;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.install-steps li {
  counter-increment: inst;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}

.install-steps li::before {
  content: counter(inst);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 800;
  background: var(--accent-soft);
  color: var(--accent-fg);
}

.cmd-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  padding: 8px 8px 8px 12px;
  background: #121215;
  color: #e7e7ea;
  border-radius: 9px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.cmd-line code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  overflow-x: auto;
  white-space: nowrap;
}

.cmd-line code {
  color: #fdba74;
}

.copy-btn {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #e7e7ea;
  cursor: pointer;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.review-card {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  background: var(--surface);
}

.rating-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  border: 1px solid var(--border);
}

.rating-summary-score {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

/* ==========================================================================
   Panels, Forms, Tables, KPI Grid
   ========================================================================== */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}

.panel h3 {
  letter-spacing: -0.02em;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.kpi-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
}

.kpi-card::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-grad);
  opacity: 0.85;
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.035em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.sell-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}

.hint {
  font-size: 12px;
  color: var(--text-muted);
}

.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 30px 18px;
  text-align: center;
  cursor: pointer;
  background: var(--surface-alt);
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.dropzone-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent-fg);
  box-shadow: var(--shadow-xs);
}

.dropzone:hover, .dropzone.drag {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone.drag {
  transform: scale(1.01);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table th, .table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table th {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--surface-alt);
}

.table th:first-child { border-top-left-radius: 8px; }
.table th:last-child { border-top-right-radius: 8px; }

.table tbody tr {
  transition: background 0.12s;
}

.table tbody tr:hover {
  background: color-mix(in srgb, var(--surface-alt) 55%, transparent);
}

/* ==========================================================================
   Cart Slide-Over Drawer & Modals
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(10, 10, 12, 0.5);
  backdrop-filter: blur(3px);
  display: none;
  justify-content: flex-end;
}

.drawer-backdrop.open {
  display: flex;
  animation: fade-in 0.2s ease;
}

.drawer {
  width: 100%;
  max-width: 430px;
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.drawer-backdrop.open .drawer {
  animation: drawer-in 0.32s var(--ease);
}

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

.drawer-header h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  background: var(--surface);
}

.cart-thumb {
  width: 68px;
  height: 54px;
  border-radius: 8px;
  background: var(--surface-stage);
  border: 1px solid var(--border);
  object-fit: contain;
  flex-shrink: 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 10, 12, 0.58);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
  animation: fade-in 0.18s ease;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.modal-backdrop.open .modal {
  animation: modal-in 0.26s var(--ease);
}

.modal-sm {
  max-width: 430px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.alert-inline {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 12px;
}

.alert-error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.alert-success {
  background: var(--success-soft);
  color: var(--success-fg);
  border: 1px solid rgba(22, 163, 74, 0.25);
}

/* ==========================================================================
   Storefront Footer
   ========================================================================== */
.store-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-inner {
  max-width: 1340px;
  margin: 0 auto;
  padding: 44px 24px 32px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-col h4 {
  margin: 0 0 12px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.footer-col a, .footer-col button {
  display: block;
  margin-bottom: 8px;
  font-size: 13.5px;
  color: var(--text-2);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  transition: color 0.15s;
}

.footer-col a:hover, .footer-col button:hover {
  color: var(--accent-fg);
  text-decoration: none;
}

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

.footer-compat span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
}

.footer-compat span::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--success);
}

.footer-bottom {
  max-width: 1340px;
  margin: 0 auto;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   Toast Notifications & Floating Buttons
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  background: var(--text);
  color: var(--surface);
  padding: 11px 16px 11px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: none;
  align-items: center;
  gap: 10px;
  max-width: min(440px, calc(100vw - 32px));
}

.toast::before {
  content: '✓';
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  background: var(--success);
  color: #fff;
}

.toast.show {
  display: flex;
  animation: toast-in 0.3s var(--ease);
}

.toast.err {
  background: var(--danger);
  color: #ffffff;
}

.toast.err::before {
  content: '!';
  background: rgba(255, 255, 255, 0.22);
}

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s var(--ease), background 0.15s;
}

.to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.to-top:hover {
  background: var(--surface-alt);
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

@keyframes drawer-in {
  from { transform: translateX(40px); opacity: 0.4; }
  to { transform: none; opacity: 1; }
}

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

@keyframes pop-in {
  0% { transform: scale(0.4); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

@keyframes heart-pop {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

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

.extra-cats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.extra-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.14s, background 0.14s, color 0.14s;
}

.extra-cat-pill:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.extra-cat-pill input {
  accent-color: var(--accent);
  margin: 0;
}

.extra-cat-pill:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-fg);
}

.cat-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--cat, var(--text-2));
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s;
}

.cat-badge-btn:hover {
  border-color: var(--cat, var(--border-strong));
  background: var(--surface);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1180px) {
  .header-search .kbd {
    display: none;
  }
}

@media (max-width: 1040px) {
  .store-hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 32px;
  }
  .product-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .purchase-card {
    position: static;
  }
  .sell-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .footer-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .steps-grid,
  .trust-band {
    grid-template-columns: minmax(0, 1fr);
  }
  .faq-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .topbar-inner {
    gap: 12px;
  }
}

@media (max-width: 900px) {
  .topbar-inner {
    flex-wrap: wrap;
    padding: 10px 16px;
  }
  .header-search {
    order: 4;
    max-width: none;
    flex-basis: 100%;
  }
  .nav-tabs {
    order: 3;
    overflow-x: auto;
    max-width: 100%;
    flex-basis: 100%;
    scrollbar-width: none;
    padding-right: 12px;
  }
  .nav-tab {
    flex-shrink: 0;
  }
  .nav-tab.active::after {
    bottom: 0;
  }
}

@media (max-width: 780px) {
  .container {
    padding: 18px 16px 44px;
  }
  .store-hero {
    padding: 24px 20px;
    border-radius: var(--radius-lg);
  }
  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
  .hero-stat strong {
    font-size: 17px;
  }
  .spotlight-stage {
    height: 250px;
  }
  .catalog-toolbar,
  .toolbar-left,
  .toolbar-right {
    width: 100%;
  }
  .toolbar-right .input {
    flex: 1;
    width: auto;
    min-width: 0;
  }
  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .grid.grid-short {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
  .bundles-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .bundles-section {
    padding: 18px 14px;
    margin-top: 32px;
  }
  .detail-3d-box {
    height: 290px;
  }
  .viewer-toolbar {
    padding: 8px 10px;
    gap: 8px;
  }
  .viewer-btn {
    padding: 5px 9px;
    font-size: 11.5px;
  }
  .viewer-subbar {
    padding: 8px 12px;
  }
  .product-tab-btn {
    padding: 10px 11px;
    font-size: 13px;
  }
  .purchase-card {
    padding: 18px;
  }
  .panel {
    padding: 16px;
  }
  .hub-tabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .hub-tabs::-webkit-scrollbar {
    display: none;
  }
  .hub-tab {
    flex-shrink: 0;
    padding: 7px 11px;
    font-size: 12.5px;
  }
  .cta-band {
    padding: 28px 22px;
  }
  .brand-badge {
    display: none;
  }
  .page-head h1 {
    font-size: 25px;
  }
  .spec-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .section-head > .hint {
    display: none;
  }
  .category-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .category-strip::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 520px) {
  .topbar {
    position: relative;
  }
  .topbar-inner {
    gap: 10px;
  }
  .nav-tab {
    padding: 7px 9px;
    font-size: 12.5px;
  }
  .brand .brand-title {
    display: none;
  }
  .topbar-actions {
    gap: 6px;
  }
  .topbar-actions .icon-btn {
    width: 36px;
    height: 36px;
  }
  #btn-header-register {
    display: none;
  }
  .topbar-actions .account-trigger > span:not(.avatar-circle),
  .topbar-actions .account-trigger > svg {
    display: none;
  }
  .account-trigger {
    padding: 3px;
  }
  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .grid.grid-short {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .preview-state-bar {
    top: 8px;
    left: 8px;
    max-width: calc(100% - 16px);
  }
  .state-pill {
    padding: 4px 10px;
    font-size: 11.5px;
  }
  .modal-backdrop {
    padding: 12px;
  }
  .modal {
    padding: 18px 16px;
    border-radius: var(--radius-lg);
  }
}
