/* ══════════════════════════════════════════════════════════════════
   SS JEWELLERY CREATORS — 3D Asset Marketplace
   styles.css — Design System, Dark Theme, Component Styles
   ══════════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ───────────────────────────────────────────────── */
:root {
  /* Colors — Base */
  --bg-deep:        #090c12;
  --bg-surface:     #0e1420;
  --bg-card:        #111827;
  --bg-card-hover:  #151e2e;
  --bg-glass:       rgba(14, 20, 32, 0.7);
  --bg-overlay:     rgba(9, 12, 18, 0.92);

  /* Colors — Blue Accent Spectrum */
  --blue-vivid:     #0ea5ff;
  --blue-bright:    #38bdf8;
  --blue-soft:      #7dd3fc;
  --blue-dim:       #0369a1;
  --blue-glow:      rgba(14, 165, 255, 0.35);
  --blue-glow-sm:   rgba(14, 165, 255, 0.15);

  /* Colors — Purple / Violet Accent */
  --violet:         #7c3aed;
  --violet-glow:    rgba(124, 58, 237, 0.35);

  /* Colors — Semantic */
  --success:        #22c55e;
  --success-glow:   rgba(34, 197, 94, 0.3);
  --warning:        #f59e0b;
  --danger:         #ef4444;
  --danger-glow:    rgba(239, 68, 68, 0.3);
  --star:           #fbbf24;

  /* Colors — Text */
  --text-primary:   #f0f4ff;
  --text-secondary: #94a3b8;
  --text-muted:     #4b5563;
  --text-accent:    #0ea5ff;

  /* Colors — Border */
  --border:         rgba(14, 165, 255, 0.12);
  --border-hover:   rgba(14, 165, 255, 0.35);
  --border-active:  rgba(14, 165, 255, 0.7);

  /* Typography */
  --font-display:  'Syne', sans-serif;
  --font-ui:       'IBM Plex Sans', sans-serif;
  --font-body:     'IBM Plex Sans', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;

  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Radii */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  /* Shadows / Glows */
  --shadow-card:    0 4px 24px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
  --shadow-hover:   0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px var(--border-hover);
  --glow-blue:      0 0 20px var(--blue-glow), 0 0 60px rgba(14,165,255,0.1);
  --glow-blue-sm:   0 0 8px var(--blue-glow-sm);
  --glow-btn:       0 0 20px rgba(14,165,255,0.4), 0 4px 16px rgba(14,165,255,0.2);

  /* Transitions */
  --trans-fast:   0.15s ease;
  --trans-normal: 0.25s ease;
  --trans-slow:   0.4s ease;

  /* Layout */
  --nav-height:   72px;
  --sidebar-w:    280px;
  --cart-w:       400px;
  --max-content:  1400px;
}

/* ─── Reset & Base ────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* ─── Typography ──────────────────────────────────────────────────── */
.font-display   { font-family: var(--font-display); }
.font-ui        { font-family: var(--font-ui); }
.font-mono      { font-family: var(--font-mono); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
h4, h5, h6 { font-family: var(--font-ui); font-weight: 600; line-height: 1.3; }

/* ─── Scrollbar ───────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--blue-dim); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--blue-vivid); }

/* ─── Utility Classes ─────────────────────────────────────────────── */
.hidden  { display: none !important; }
.visible { display: block !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.text-accent  { color: var(--blue-vivid); }
.text-muted   { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-star    { color: var(--star); }

.glow-text {
  color: var(--blue-vivid);
  text-shadow: 0 0 20px var(--blue-glow), 0 0 40px rgba(14,165,255,0.2);
}

.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-blue   { background: rgba(14,165,255,0.15); color: var(--blue-vivid); border: 1px solid rgba(14,165,255,0.3); }
.badge-violet { background: rgba(124,58,237,0.15); color: #a78bfa; border: 1px solid rgba(124,58,237,0.3); }
.badge-green  { background: rgba(34,197,94,0.12); color: var(--success); border: 1px solid rgba(34,197,94,0.25); }
.badge-amber  { background: rgba(245,158,11,0.12); color: var(--warning); border: 1px solid rgba(245,158,11,0.25); }

/* ─── Layout ──────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-6); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap-2 { display: flex; align-items: center; gap: var(--space-2); }
.flex-gap-4 { display: flex; align-items: center; gap: var(--space-4); }
.flex-col  { display: flex; flex-direction: column; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }

/* ─── Navigation ──────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 900;
  background: rgba(9, 12, 18, 0.88);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  transition: background var(--trans-normal), border-color var(--trans-normal);
}

.navbar.scrolled {
  background: rgba(9, 12, 18, 0.96);
  border-bottom-color: var(--border-hover);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.nav-logo-mark {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--blue-vivid), var(--violet));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  box-shadow: var(--glow-blue);
  flex-shrink: 0;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.nav-logo-text span { display: block; font-size: 0.6rem; font-weight: 400; color: var(--text-secondary); letter-spacing: 0.12em; text-transform: uppercase; font-family: var(--font-ui); }

.nav-search-wrap {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.nav-search {
  width: 100%;
  height: 42px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0 var(--space-4) 0 var(--space-10);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
  outline: none;
}
.nav-search::placeholder { color: var(--text-muted); }
.nav-search:focus {
  border-color: var(--blue-vivid);
  box-shadow: var(--glow-blue-sm);
}

.nav-search-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-autocomplete {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  z-index: 950;
  display: none;
}

.search-autocomplete.open { display: block; }

.autocomplete-item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  transition: background var(--trans-fast);
  font-size: 0.875rem;
}
.autocomplete-item:hover { background: var(--bg-card-hover); }
.autocomplete-item svg { color: var(--blue-dim); flex-shrink: 0; }
.autocomplete-item-cat { font-size: 0.7rem; color: var(--text-muted); margin-left: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-link {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-family: var(--font-ui);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--trans-fast), background var(--trans-fast);
  white-space: nowrap;
}
.nav-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--blue-vivid); background: var(--blue-glow-sm); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
  flex-shrink: 0;
}

.nav-icon-btn {
  position: relative;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: color var(--trans-fast), background var(--trans-fast);
}
.nav-icon-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.07); }
.nav-icon-btn.active { color: var(--blue-vivid); }

.icon-btn-badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 16px; height: 16px;
  background: var(--blue-vivid);
  border-radius: var(--radius-full);
  font-size: 0.6rem;
  font-weight: 700;
  font-family: var(--font-ui);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  box-shadow: 0 0 8px var(--blue-glow);
  transition: transform var(--trans-fast);
}
.icon-btn-badge.bump { animation: badge-bump 0.3s ease; }
@keyframes badge-bump {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* ─── Currency Switcher ───────────────────────────────────────────── */
.currency-select {
  height: 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 var(--space-3);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-family: var(--font-ui);
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: border-color var(--trans-fast);
}
.currency-select:focus { border-color: var(--blue-vivid); }

/* ─── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 0 var(--space-6);
  height: 44px;
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  transition: all var(--trans-fast);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-vivid), #0077cc);
  color: #fff;
  border: 1px solid rgba(14,165,255,0.5);
  box-shadow: var(--glow-btn);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #30b5ff, #0088ee);
  box-shadow: 0 0 30px rgba(14,165,255,0.6), 0 4px 20px rgba(14,165,255,0.3);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--blue-vivid);
  border: 1px solid var(--border-hover);
}
.btn-outline:hover {
  background: var(--blue-glow-sm);
  border-color: var(--blue-vivid);
  box-shadow: var(--glow-blue-sm);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); box-shadow: var(--danger-glow) 0 0 12px; }

.btn-success {
  background: linear-gradient(135deg, #15803d, #16a34a);
  color: #fff;
  border: none;
}
.btn-success:hover { background: linear-gradient(135deg, #16a34a, #22c55e); box-shadow: 0 0 20px var(--success-glow); }

.btn-sm { height: 34px; padding: 0 var(--space-4); font-size: 0.8rem; }
.btn-lg { height: 52px; padding: 0 var(--space-8); font-size: 1rem; }
.btn-full { width: 100%; }

.btn-icon { padding: 0; width: 44px; }
.btn-icon.btn-sm { width: 34px; }

/* ─── Hero Section ────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  padding-top: var(--nav-height);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(14,165,255,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 10% 60%, rgba(124,58,237,0.05) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-deep) 0%, #080b11 100%);
}

.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(14,165,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14,165,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 80%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--blue-vivid);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 24px; height: 1px;
  background: var(--blue-vivid);
  box-shadow: var(--glow-blue-sm);
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-6);
}
.hero-title .highlight {
  background: linear-gradient(135deg, var(--blue-vivid) 0%, var(--blue-soft) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: var(--space-8);
  line-height: 1.7;
}

.hero-ctas {
  display: flex; flex-wrap: wrap; gap: var(--space-3);
  margin-bottom: var(--space-10);
}

.hero-stats {
  display: flex; gap: var(--space-8);
}
.hero-stat-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--blue-vivid);
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-canvas-wrap {
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  width: 55%;
  max-width: 760px;
  aspect-ratio: 1;
  z-index: 1;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.85;
  pointer-events: none;
}

/* ─── Section Styles ──────────────────────────────────────────────── */
.section {
  padding: var(--space-16) 0;
}

.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: var(--space-8);
  gap: var(--space-4);
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
}
.section-subtitle {
  font-size: 0.925rem;
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

/* ─── Category Filter Bar ─────────────────────────────────────────── */
.filter-bar {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--nav-height);
  z-index: 800;
}

.filter-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-inner::-webkit-scrollbar { display: none; }

.filter-tab {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  transition: all var(--trans-fast);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}
.filter-tab:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.filter-tab.active {
  color: var(--blue-vivid);
  background: var(--blue-glow-sm);
  border-color: rgba(14,165,255,0.3);
  box-shadow: 0 0 12px rgba(14,165,255,0.1);
}

.filter-tab-count {
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  padding: 1px 6px;
  font-size: 0.65rem;
  font-weight: 700;
}
.filter-tab.active .filter-tab-count {
  background: rgba(14,165,255,0.2);
}

.filter-divider {
  width: 1px; height: 20px;
  background: var(--border);
  flex-shrink: 0;
}

.filter-sort-wrap {
  margin-left: auto;
  display: flex; align-items: center; gap: var(--space-3);
  flex-shrink: 0;
}

.filter-select {
  height: 34px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 var(--space-3);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-family: var(--font-ui);
  font-weight: 500;
  cursor: pointer;
  outline: none;
}
.filter-select:focus { border-color: var(--blue-vivid); }

/* Price Slider */
.price-range-wrap {
  display: flex; align-items: center; gap: var(--space-3);
  flex-shrink: 0;
}
.price-range-label { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.price-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  width: 120px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--blue-vivid) 0%, var(--blue-vivid) var(--slider-pct, 100%), rgba(255,255,255,0.1) var(--slider-pct, 100%));
  outline: none;
  cursor: pointer;
}
.price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--blue-vivid);
  box-shadow: 0 0 8px var(--blue-glow);
  border: 2px solid #fff;
}

/* ─── Product Grid & Cards ────────────────────────────────────────── */
.products-section {
  padding: var(--space-10) 0 var(--space-16);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform var(--trans-normal), border-color var(--trans-normal), box-shadow var(--trans-normal);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover), 0 0 20px rgba(14,165,255,0.06);
}

.product-card-image {
  aspect-ratio: 4/3;
  background: var(--bg-surface);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-card-image svg {
  width: 80px; height: 80px;
  opacity: 0.7;
  transition: transform var(--trans-normal), opacity var(--trans-normal);
}
.product-card-visual,
.product-image-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 12, 18, 0.7);
}

.product-image-fallback svg {
  width: 80px; height: 80px;
  opacity: 0.7;
  transition: transform var(--trans-normal), opacity var(--trans-normal);
}
.product-card:hover .product-card-image svg,
.product-card:hover .product-image-fallback svg {
  transform: scale(1.08);
  opacity: 1;
}

.product-image-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(14,165,255,0.06) 0%, transparent 70%);
  transition: opacity var(--trans-normal);
}
.product-card:hover .product-image-bg {
  opacity: 1.5;
}

.product-badges {
  position: absolute;
  top: var(--space-3); left: var(--space-3);
  display: flex; gap: var(--space-1);
}

.product-actions {
  position: absolute;
  top: var(--space-3); right: var(--space-3);
  display: flex; flex-direction: column; gap: var(--space-2);
  opacity: 0;
  transition: opacity var(--trans-normal);
}
.product-card:hover .product-actions { opacity: 1; }

.product-action-btn {
  width: 34px; height: 34px;
  background: rgba(9,12,18,0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--trans-fast);
}
.product-action-btn:hover { color: var(--blue-vivid); border-color: var(--blue-vivid); background: var(--blue-glow-sm); }
.product-action-btn.favorited { color: var(--danger); border-color: var(--danger); }

.product-format-chips {
  position: absolute;
  bottom: var(--space-3); left: var(--space-3);
  display: flex; gap: 4px; flex-wrap: wrap;
}
.format-chip {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  background: rgba(9,12,18,0.9);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 5px;
  color: var(--text-secondary);
}

.product-card-body {
  padding: var(--space-4) var(--space-5) var(--space-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-2);
}
.product-creator {
  font-size: 0.75rem;
  color: var(--blue-soft);
  font-family: var(--font-ui);
  font-weight: 500;
}
.product-subcategory {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.product-name {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: var(--space-2);
  line-height: 1.35;
}

.product-specs {
  display: flex; gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.spec-item {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}
.spec-item svg { opacity: 0.6; }

.product-rating {
  display: flex; align-items: center; gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.stars { display: flex; gap: 2px; }
.star { font-size: 0.75rem; }
.rating-value { font-size: 0.8rem; font-weight: 600; font-family: var(--font-ui); }
.rating-count { font-size: 0.75rem; color: var(--text-muted); }

.product-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto;
}
.product-price-wrap { display: flex; align-items: baseline; gap: var(--space-2); }
.product-price {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--blue-vivid);
  text-shadow: 0 0 12px rgba(14,165,255,0.3);
}
.product-price-original {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: line-through;
}
.product-sale-pct {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--success);
  background: rgba(34,197,94,0.1);
  padding: 1px 5px;
  border-radius: 4px;
}

.product-card-colors {
  display: flex; gap: 4px;
}

/* ─── 3D Viewer Modal ─────────────────────────────────────────────── */
.viewer-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: var(--bg-overlay);
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}
.viewer-modal.open { display: flex; }

.viewer-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-2xl);
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  display: grid;
  grid-template-columns: 1fr 380px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.8);
  animation: modal-in 0.3s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.94) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.viewer-canvas-area {
  background: var(--bg-surface);
  position: relative;
  min-height: 480px;
}
.viewer-load-status {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  max-width: calc(100% - 5rem);
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--bg-deep);
  font-size: 0.8rem;
  line-height: 1.5;
}
#product-viewer-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.viewer-controls {
  position: absolute;
  bottom: var(--space-4); left: 50%; transform: translateX(-50%);
  display: flex; gap: var(--space-2);
  background: rgba(9,12,18,0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
}

.viewer-sidebar {
  overflow-y: auto;
  padding: var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-5);
}
.viewer-close {
  position: absolute;
  top: var(--space-4); right: var(--space-4);
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.07);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  z-index: 2;
}
.viewer-close:hover { color: var(--text-primary); background: rgba(255,255,255,0.12); }

.viewer-spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.viewer-spec-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}
.viewer-spec-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px; }
.viewer-spec-value { font-size: 0.85rem; font-weight: 600; font-family: var(--font-ui); }

.download-options { display: flex; flex-direction: column; gap: var(--space-2); }
.download-option {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  transition: border-color var(--trans-fast);
}
.download-option:hover { border-color: var(--border-hover); }
.download-option-format { color: var(--blue-vivid); font-weight: 500; }
.download-option-size { color: var(--text-muted); font-size: 0.7rem; }

/* ─── Cart Drawer ─────────────────────────────────────────────────── */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
}
.cart-overlay.open { display: block; }

.cart-drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(var(--cart-w), 100vw);
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-drawer.open { transform: translateX(0); }

.cart-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.cart-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }
.cart-count { color: var(--text-muted); font-size: 0.875rem; }

.cart-free-shipping {
  padding: var(--space-3) var(--space-6);
  background: rgba(34,197,94,0.06);
  border-bottom: 1px solid rgba(34,197,94,0.12);
}
.shipping-progress-label { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: var(--space-2); }
.shipping-progress-label span { color: var(--success); font-weight: 600; }
.shipping-progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.shipping-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success), #4ade80);
  border-radius: 2px;
  transition: width 0.5s ease;
  box-shadow: 0 0 8px rgba(34,197,94,0.4);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.cart-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: var(--space-3);
  align-items: start;
  padding: var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--trans-fast);
}
.cart-item:hover { border-color: var(--border-hover); }

.cart-item-img {
  width: 56px; height: 56px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.cart-item-img svg { width: 36px; height: 36px; }

.cart-item-name { font-size: 0.85rem; font-weight: 600; font-family: var(--font-ui); line-height: 1.3; }
.cart-item-creator { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.cart-item-format {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--blue-soft);
  margin-top: var(--space-1);
}

.cart-item-qty {
  display: flex; align-items: center; gap: var(--space-1);
  margin-top: var(--space-2);
}
.qty-btn {
  width: 24px; height: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--trans-fast);
}
.qty-btn:hover { border-color: var(--blue-vivid); color: var(--blue-vivid); }
.qty-value { font-size: 0.8rem; font-weight: 600; min-width: 20px; text-align: center; }

.cart-item-price { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--blue-vivid); white-space: nowrap; }
.cart-item-remove {
  display: block;
  margin-top: var(--space-2);
  color: var(--text-muted);
  font-size: 0.7rem;
  text-align: right;
  cursor: pointer;
  transition: color var(--trans-fast);
}
.cart-item-remove:hover { color: var(--danger); }

.cart-empty {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: var(--space-4);
  color: var(--text-muted);
  text-align: center;
  padding: var(--space-8);
}
.cart-empty svg { opacity: 0.3; }

.cart-footer {
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.promo-row {
  display: flex; gap: var(--space-2);
}
.promo-input {
  flex: 1;
  height: 38px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 var(--space-3);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  outline: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: border-color var(--trans-fast);
}
.promo-input:focus { border-color: var(--blue-vivid); }
.promo-input.applied { border-color: var(--success); color: var(--success); }
.promo-msg { font-size: 0.72rem; color: var(--success); margin-top: -8px; }
.promo-msg.error { color: var(--danger); }

.cart-totals { display: flex; flex-direction: column; gap: var(--space-2); }
.cart-total-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; }
.cart-total-row.primary { font-weight: 700; font-size: 1rem; border-top: 1px solid var(--border); padding-top: var(--space-2); }
.cart-total-row .label { color: var(--text-secondary); }
.cart-total-row.primary .value { color: var(--blue-vivid); font-family: var(--font-display); font-size: 1.2rem; }

/* ─── Checkout Modal ──────────────────────────────────────────────── */
.checkout-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: var(--bg-overlay);
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}
.checkout-modal.open { display: flex; }

.checkout-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-2xl);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modal-in 0.3s ease;
}

.checkout-header {
  padding: var(--space-6) var(--space-6) var(--space-4);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: var(--space-4);
}
.checkout-header-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; }
.checkout-demo-label { color: var(--text-secondary); font-size: 0.75rem; margin-top: 2px; }

.checkout-steps {
  display: flex; align-items: center; gap: var(--space-1);
  margin-left: auto;
}
.checkout-step {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-ui);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--trans-normal);
}
.checkout-step.active {
  background: var(--blue-vivid);
  border-color: var(--blue-vivid);
  color: #fff;
  box-shadow: 0 0 12px var(--blue-glow);
}
.checkout-step.done {
  background: rgba(34,197,94,0.15);
  border-color: var(--success);
  color: var(--success);
}
.checkout-step-connector {
  width: 24px; height: 1px;
  background: var(--border);
}

.checkout-body { padding: var(--space-6); }

.checkout-step-panel { display: none; }
.checkout-step-panel.active { display: block; }

.form-group { margin-bottom: var(--space-5); }
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-ui);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
}
.form-input, .form-select {
  width: 100%;
  height: 44px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 var(--space-4);
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
}
.form-input:focus, .form-select:focus {
  border-color: var(--blue-vivid);
  box-shadow: 0 0 0 3px rgba(14,165,255,0.12);
}
.form-input.error { border-color: var(--danger); }
.form-error-msg { font-size: 0.72rem; color: var(--danger); margin-top: var(--space-1); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }

.payment-methods {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.payment-method {
  padding: var(--space-4);
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  cursor: pointer;
  color: var(--text-primary);
  font-family: var(--font-ui);
  width: 100%;
  transition: all var(--trans-fast);
}
.payment-method:hover { border-color: var(--border-hover); }
.payment-method:focus-visible { outline: 2px solid var(--blue-vivid); outline-offset: 2px; }
.payment-method.selected {
  border-color: var(--blue-vivid);
  background: var(--blue-glow-sm);
  box-shadow: 0 4px 12px rgba(14,165,255,0.12);
}
.payment-method-icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin: 0 auto var(--space-2);
  border-radius: 0.55rem;
  background: var(--bg-card);
  font-size: 1rem;
  font-weight: 800;
}
.payment-brand-phonepe { color: #a855f7; }
.payment-brand-google { color: #4285f4; }
.payment-brand-paypal { color: #38bdf8; }
.payment-brand-binance { color: #f0b90b; }
.payment-brand-card { color: var(--text-secondary); font-size: 0.7rem; letter-spacing: -0.06em; }
.payment-method-name { font-size: 0.75rem; font-weight: 600; font-family: var(--font-ui); }

.payment-setup-note {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.5;
}
.payment-setup-note strong { color: var(--text-primary); }
#step2-pay:disabled { cursor: not-allowed; opacity: 0.58; }

.order-confirmation {
  text-align: center;
  padding: var(--space-6) 0;
}
.order-checkmark {
  width: 72px; height: 72px;
  background: rgba(34,197,94,0.12);
  border: 2px solid var(--success);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-5);
  font-size: 2rem;
  box-shadow: 0 0 24px rgba(34,197,94,0.3);
  animation: pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pop-in {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.order-number {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--blue-vivid);
  background: var(--blue-glow-sm);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  display: inline-block;
  margin-top: var(--space-3);
}
.order-tracking {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ─── Download Pipeline ───────────────────────────────────────────── */
.download-progress {
  padding: var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: var(--space-3);
}
.download-filename {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--blue-soft);
  margin-bottom: var(--space-2);
}
.download-bar { height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.download-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-vivid), var(--blue-soft));
  border-radius: 3px;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px var(--blue-glow);
}
.download-meta {
  display: flex; justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: var(--space-2);
}

/* ─── Dashboard Tabs ──────────────────────────────────────────────── */
.dashboard-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: var(--bg-overlay);
  align-items: flex-start;
  justify-content: center;
  padding: var(--nav-height) var(--space-6) var(--space-6);
  overflow-y: auto;
}
.dashboard-overlay.open { display: flex; }

.dashboard-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-2xl);
  width: 100%;
  max-width: 1100px;
  min-height: 600px;
  display: grid;
  grid-template-columns: 220px 1fr;
  overflow: hidden;
  animation: modal-in 0.3s ease;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
}

.dashboard-sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.dashboard-role-badge {
  font-size: 0.68rem;
  font-family: var(--font-ui);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0 0 var(--space-4);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-3);
}

.dashboard-nav-item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-family: var(--font-ui);
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--trans-fast);
  cursor: pointer;
}
.dashboard-nav-item:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.dashboard-nav-item.active { color: var(--blue-vivid); background: var(--blue-glow-sm); }
.dashboard-nav-item svg { flex-shrink: 0; }

.dashboard-content {
  padding: var(--space-8);
  overflow-y: auto;
}

.dashboard-section { display: none; }
.dashboard-section.active { display: block; }

.stat-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-4); margin-bottom: var(--space-8);
}
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: border-color var(--trans-fast);
}
.stat-card:hover { border-color: var(--border-hover); }
.stat-card-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-2); }
.stat-card-value { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; line-height: 1; color: var(--blue-vivid); }
.stat-card-delta { font-size: 0.72rem; color: var(--success); margin-top: var(--space-1); }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  font-size: 0.72rem;
  font-family: var(--font-ui);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: var(--space-3);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.85rem;
}
.data-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ─── Creator Cloud Upload ───────────────────────────────────────── */
.upload-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1400;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: var(--bg-overlay);
}
.upload-overlay.open { display: flex; }
.upload-panel {
  width: min(100%, 620px);
  max-height: min(90vh, 900px);
  overflow-y: auto;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 80px rgba(0,0,0,0.65);
}
.upload-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-6);
  border-bottom: 1px solid var(--border);
}
.upload-header h2 { font: 700 1.2rem var(--font-display); }
.upload-header p, .upload-help { margin-top: var(--space-2); color: var(--text-secondary); font-size: 0.8rem; line-height: 1.55; }
.upload-body { padding: var(--space-6); }
.upload-status, .upload-progress {
  padding: var(--space-4);
  margin-bottom: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.55;
}
.upload-status[data-kind="success"] { border-color: rgba(34,197,94,0.35); color: #86efac; }
.upload-status[data-kind="error"] { border-color: rgba(239,68,68,0.4); color: #fca5a5; }
.upload-status[data-kind="warning"] { border-color: rgba(245,158,11,0.35); color: #fcd34d; }
.upload-setup-link { display: inline-block; margin: calc(var(--space-3) * -1) 0 var(--space-5); color: var(--blue-soft); font-size: 0.82rem; text-decoration: underline; text-underline-offset: 3px; }
.upload-login-form h3, .creator-model-list h3 { font: 600 1rem var(--font-ui); }
.upload-login-form .form-label, #creator-upload-form .form-label { margin-top: var(--space-4); }
.upload-login-form .btn { margin-top: var(--space-5); }
.upload-login-form .form-input, #creator-upload-form .form-input { margin-top: var(--space-2); }
.upload-description { height: 100px; padding: var(--space-3) var(--space-4); resize: vertical; }
.upload-file-input { height: auto; min-height: 44px; padding: var(--space-2); }
.upload-file-input::file-selector-button {
  margin-right: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
}
.creator-account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  color: var(--text-secondary);
  font-size: 0.82rem;
}
.creator-model-list { margin-top: var(--space-8); }
.creator-model-list h3 { margin-bottom: var(--space-3); }
.community-sync-error { margin: 0 0 var(--space-4); color: #fca5a5; font-size: 0.82rem; }
.creator-model-item {
  display: grid;
  grid-template-columns: 64px minmax(0,1fr) auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border);
}
.creator-model-item > img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-md); background: var(--bg-surface); }
.creator-model-details { display: grid; gap: 3px; min-width: 0; font-size: 0.78rem; }
.creator-model-details strong { overflow-wrap: anywhere; color: var(--text-primary); }
.creator-model-details span { color: var(--text-secondary); overflow-wrap: anywhere; }
.creator-model-details .creator-model-status { color: var(--blue-soft); }
.creator-model-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: flex-end; }

/* ─── Toast Notifications ─────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  z-index: 2000;
  pointer-events: none;
}

.toast {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  font-size: 0.85rem;
  font-family: var(--font-ui);
  pointer-events: all;
  animation: toast-in 0.3s ease;
  max-width: 340px;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.toast.exiting {
  animation: toast-out 0.3s ease forwards;
}
@keyframes toast-out {
  to { opacity: 0; transform: translateX(20px); }
}
.toast-icon { font-size: 1rem; flex-shrink: 0; }
.toast.success { border-color: rgba(34,197,94,0.3); }
.toast.error   { border-color: rgba(239,68,68,0.3); }
.toast.info    { border-color: rgba(14,165,255,0.3); }

/* ─── Founder & Contact Section ───────────────────────────────────── */
.founder-section {
  padding: var(--space-16) 0;
  position: relative;
  background: linear-gradient(180deg, var(--bg-deep) 0%, #0d121c 50%, var(--bg-deep) 100%);
  border-top: 1px solid var(--border);
}
.founder-grid-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: var(--space-8);
  align-items: stretch;
}
.founder-profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-card), 0 0 30px rgba(14, 165, 255, 0.08);
  position: relative;
  overflow: hidden;
}
.founder-profile-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 90px;
  background: linear-gradient(135deg, rgba(14, 165, 255, 0.25), rgba(124, 58, 237, 0.25));
  z-index: 0;
}
.founder-avatar-wrap {
  position: relative;
  z-index: 1;
  width: 96px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-vivid), var(--violet));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.2rem;
  color: #fff;
  margin-top: var(--space-3);
  margin-bottom: var(--space-4);
  box-shadow: 0 0 25px var(--blue-glow);
  border: 3px solid var(--bg-card);
}
.founder-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.founder-role {
  font-size: 0.8rem;
  color: var(--blue-bright);
  font-family: var(--font-ui);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-4);
}
.founder-bio {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-6);
}
.founder-social-btns {
  display: flex;
  gap: var(--space-3);
  width: 100%;
  margin-top: auto;
}
.social-btn {
  flex: 1;
  height: 42px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-ui);
  transition: all var(--trans-fast);
  color: #fff;
  text-decoration: none;
}
.social-btn-instagram {
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
  box-shadow: 0 4px 15px rgba(253, 29, 29, 0.25);
}
.social-btn-instagram:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(253, 29, 29, 0.4);
}
.social-btn-facebook {
  background: linear-gradient(135deg, #1877f2, #0d5bbd);
  box-shadow: 0 4px 15px rgba(24, 119, 242, 0.25);
}
.social-btn-facebook:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(24, 119, 242, 0.4);
}
.social-btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.25);
}
.social-btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* Contact Cards Grid */
.contact-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: border-color var(--trans-fast), transform var(--trans-fast), box-shadow var(--trans-fast);
}
.contact-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.contact-card-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--blue-glow-sm);
  border: 1px solid rgba(14, 165, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-vivid);
  margin-bottom: var(--space-1);
}
.contact-card-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  font-family: var(--font-ui);
}
.contact-card-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-ui);
  word-break: break-word;
}
.contact-card-link {
  color: var(--blue-bright);
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-top: var(--space-2);
  transition: color var(--trans-fast);
}
.contact-card-link:hover {
  color: #fff;
}

/* Quick Inquiry Form */
.contact-form-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
}
.contact-form-header {
  margin-bottom: var(--space-4);
}
.contact-form-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.contact-form-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ─── Floating WhatsApp Button ────────────────────────────────────── */
.floating-whatsapp {
  position: fixed;
  bottom: var(--space-6);
  left: var(--space-6);
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 10px;
}
.floating-whatsapp-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  transition: transform var(--trans-normal), box-shadow var(--trans-normal);
  text-decoration: none;
  position: relative;
}
.floating-whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.6);
}
.whatsapp-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #25d366;
  opacity: 0.8;
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.9; }
  70% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}
.floating-whatsapp-label {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

/* ─── Footer ──────────────────────────────────────────────────────── */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: var(--space-16) 0 var(--space-8);
}
.footer-grid {
  display: grid;
  grid-template-columns: 280px repeat(3, 1fr);
  gap: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--border);
}
.footer-brand-desc { font-size: 0.875rem; color: var(--text-secondary); margin: var(--space-4) 0 var(--space-5); line-height: 1.7; }
.footer-col-title { font-family: var(--font-ui); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: var(--space-4); }
.footer-links { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-link { font-size: 0.875rem; color: var(--text-secondary); transition: color var(--trans-fast); }
.footer-link:hover { color: var(--blue-vivid); }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: var(--space-8);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── Loading Skeleton ────────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-card-hover) 50%, var(--bg-surface) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-md);
}

/* ─── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .hero-canvas-wrap { width: 48%; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero-canvas-wrap { display: none; }
  .hero-content { max-width: 100%; }
  .viewer-panel { grid-template-columns: 1fr; }
  .viewer-canvas-area { min-height: 280px; }
  .dashboard-panel { grid-template-columns: 1fr; }
  .dashboard-sidebar { display: none; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --space-6: 1rem; }
  .hero-stats { gap: var(--space-5); }
  .hero-stat-value { font-size: 1.3rem; }
  .product-grid { grid-template-columns: 1fr; }
  .cart-drawer { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer-bottom { flex-direction: column; gap: var(--space-3); text-align: center; }
  .footer-policy-note { max-width: 36ch; }
  .payment-methods { grid-template-columns: 1fr 1fr; }
  .upload-overlay { padding: var(--space-3); align-items: flex-start; }
  .upload-panel { max-height: calc(100vh - 1.5rem); }
  .upload-header, .upload-body { padding: var(--space-4); }
  .creator-model-item { grid-template-columns: 52px minmax(0,1fr); }
  .creator-model-item > img { width: 52px; height: 52px; }
  .creator-model-actions { grid-column: 2; justify-content: flex-start; }
}

/* Keep the compact brand header, search and marketplace controls usable on phones. */
:root { --text-muted: #8290a5; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--blue-soft);
  outline-offset: 3px;
}

.preview-notice {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 58ch;
}

.footer-policy-note {
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.5;
}

@media (max-width: 640px) {
  :root { --nav-height: 112px; }

  .floating-whatsapp-label { display: none; }
  .floating-whatsapp-btn { width: 48px; height: 48px; }

  .navbar { height: var(--nav-height); }
  .nav-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px 44px 44px 44px;
    grid-template-rows: 44px 44px;
    gap: 8px 4px;
    align-content: center;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .nav-actions { display: contents; }
  .nav-logo { grid-column: 1; grid-row: 1; min-width: 0; gap: 8px; }
  .nav-logo-mark { width: 34px; height: 34px; }
  .nav-logo-text {
    min-width: 0;
    overflow: hidden;
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .nav-logo-text span { display: none; }
  #currency-select {
    grid-column: 2;
    grid-row: 1;
    width: 58px;
    min-width: 0;
    height: 44px;
    padding: 0 4px;
    font-size: 0.68rem;
  }
  #wishlist-btn { grid-column: 3; grid-row: 1; }
  #cart-btn { grid-column: 4; grid-row: 1; }
  #dashboard-btn {
    grid-column: 5;
    grid-row: 1;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    gap: 0;
    overflow: hidden;
    font-size: 0;
  }
  .nav-icon-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }
  .nav-search-wrap {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  .nav-search { height: 44px; }

  .filter-bar { position: relative; top: auto; }
  .filter-inner {
    flex-wrap: wrap;
    gap: 8px;
    overflow: visible;
    padding: 10px 0;
  }
  .filter-tab { min-height: 44px; }
  .filter-divider { display: none; }
  #subcategory-chips {
    flex: 1 1 0;
    width: calc(100vw - 32px);
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  #subcategory-chips::-webkit-scrollbar { display: none; }
  #subcategory-chips .filter-tab { flex-shrink: 0; }
  .filter-sort-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    min-width: 0;
    margin-left: 0;
  }
  .price-range-wrap {
    display: flex;
    min-width: 0;
    gap: 6px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
  }
  .price-range-label { font-size: 0.7rem; }
  .price-slider {
    width: 100%;
    min-width: 0;
    height: 44px;
    background: transparent;
  }
  .price-slider::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(to right, var(--blue-vivid) 0%, var(--blue-vivid) var(--slider-pct, 100%), rgba(255,255,255,0.1) var(--slider-pct, 100%));
  }
  .price-slider::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
    margin-top: -10px;
  }
  .price-slider::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.1); }
  .price-slider::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--blue-vivid); }
  .price-slider::-moz-range-thumb { width: 24px; height: 24px; }
  .filter-select { width: 100%; min-width: 0; height: 44px; }
  #products-section { scroll-margin-top: 16px; }

  .btn-sm { min-height: 44px; height: auto; }
  .product-action-btn { width: 44px; height: 44px; }
}

@media (max-width: 360px) {
  .nav-inner { grid-template-columns: minmax(0, 1fr) 54px 40px 40px 40px; }
  #currency-select { width: 54px; }
  .nav-icon-btn, #dashboard-btn { width: 40px; min-width: 40px; }
  .nav-logo-text { display: none; }
}

@media (hover: none) and (pointer: coarse) {
  .product-card .product-actions { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-canvas { display: none; }
  .icon-btn-badge.bump, .whatsapp-pulse, .skeleton { animation: none; }
  .product-card, .btn, .filter-tab, .nav-icon-btn { transition: none; }
  .product-card:hover { transform: none; }
}

.stat-cards > .preview-notice { grid-column: 1 / -1; }
