/* ==========================================================================
   Robaku Design System v2
   A living marketplace. Warm, trustworthy, unmistakable.
   Etsy's soul + Apple's bones. Teal used BOLDLY.
   ========================================================================== */

/* --- Fonts: Satoshi for UI clarity, Fraunces for warmth --- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;0,9..144,800;0,9..144,900;1,9..144,300;1,9..144,400;1,9..144,500&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@300,400,500,700,900&display=swap');

/* --- Variables --- */
:root {
  /* Surface */
  --bg: #f8f7f4;
  --bg-warm: #f2f0eb;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-inset: #efeee9;

  /* Flat shadows (no neumorphism) */
  --shadow-out: none;
  --shadow-out-sm: none;
  --shadow-in: none;
  --shadow-hover: none;
  --shadow-card: none;

  /* Borders replace shadows */
  --card-border: 1px solid #e5e3dc;
  --card-border-hover: 1px solid #d4d2cb;

  /* Accent -- teal, used BOLDLY */
  --accent: #0d9488;
  --accent-light: #f0fdfa;
  --accent-mid: #14b8a6;
  --accent-dark: #0a7a70;
  --accent-glow: rgba(13,148,136,0.08);
  --accent-vivid: #10b981;

  /* Text -- warm monochrome hierarchy */
  --text: #1a1a18;
  --text-secondary: #52524e;
  --text-muted: #9e9e96;
  --text-inverse: #ffffff;

  /* Misc */
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --radius-pill: 100px;
  --border: 1px solid #e5e3dc;
  --transition: 0.18s ease;
  --max-w: 1240px;

  /* Typography scale */
  --font-body: 'Satoshi', -apple-system, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.75rem;
  --text-5xl: 3.75rem;
  --text-6xl: 4.5rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-6xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

/* --- Layout --- */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }
.section { padding: 96px 0; position: relative; }
.section--tight { padding: 56px 0; }

/* Teal horizontal rules between major sections */
.section + .section::before {
  content: '';
  display: block;
  width: 100%;
  max-width: var(--max-w);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 0 auto;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  .section { padding: 56px 0; }
  .container { padding: 0 20px; }
}

/* --- Card --- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: var(--card-border);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}
.card:hover {
  border-color: #d4d2cb;
  transform: translateY(-2px);
}

.card--flat {
  border: var(--card-border);
}
.card--flat:hover {
  border-color: #d4d2cb;
}

.card--inset {
  background: var(--bg);
  border: var(--card-border);
}

.card__image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--surface-inset);
}

.card__body { padding: 20px; }
.card__body--compact { padding: 16px; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
  letter-spacing: 0.01em;
}

.btn--primary {
  background: var(--accent);
  color: var(--text-inverse);
  box-shadow: 0 2px 12px rgba(13,148,136,0.25);
}
.btn--primary:hover {
  background: var(--accent-dark);
  color: var(--text-inverse);
  box-shadow: 0 4px 20px rgba(13,148,136,0.35);
  transform: translateY(-1px);
}

.btn--secondary {
  background: var(--text);
  color: var(--text-inverse);
}
.btn--secondary:hover {
  background: #333;
  color: var(--text-inverse);
}
.btn--secondary.active {
  background: var(--accent);
  color: var(--text-inverse);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid #e5e3dc;
}
.btn--ghost:hover { color: var(--text-inverse); border-color: var(--accent); background: var(--accent); }

.btn--lg { padding: 18px 40px; font-size: var(--text-base); }
.btn--sm { padding: 8px 18px; font-size: var(--text-xs); }

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248,247,244,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 2px solid var(--accent);
  padding: 0 32px;
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}
.nav__logo span { color: var(--accent); }
.nav__logo:hover { color: var(--text); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}
.nav__links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  letter-spacing: 0.01em;
}
.nav__links a:hover,
.nav__links a.active { color: var(--accent); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav__cart {
  position: relative;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  border: var(--card-border);
  transition: all var(--transition);
}
.nav__cart:hover { border-color: var(--accent); color: var(--accent); }

.nav__cart-count {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 19px;
  height: 19px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
}
.nav__cart-count.visible { display: flex; }

/* Mobile nav */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  position: relative;
}
.nav__toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  position: absolute;
  left: 6px;
  transition: all 0.3s;
}
.nav__toggle span:nth-child(1) { top: 10px; }
.nav__toggle span:nth-child(2) { top: 16px; }
.nav__toggle span:nth-child(3) { top: 22px; }

.nav__toggle.open span:nth-child(1) { top: 16px; transform: rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { top: 16px; transform: rotate(-45deg); }

@media (max-width: 768px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid #e5e3dc;
    transform: translateY(-110%);
    transition: transform 0.3s ease;
    z-index: 99;
  }
  .nav__links.open { transform: translateY(0); }
  .nav__links a { font-size: var(--text-lg); }
}

/* =========================================================================
   HERO -- The first thing you see. Make it COUNT.
   Subtle noise texture, massive typography, teal glow.
   ========================================================================= */
.hero {
  padding: 100px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(170deg, #f8f7f4 0%, #f0fdf9 35%, #f8f7f4 70%);
}

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

/* Floating teal orb in background */
.hero::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13,148,136,0.08) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  pointer-events: none;
  z-index: 0;
}

.hero > .container { position: relative; z-index: 1; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3.5rem, 11vw, 7.5rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  margin-bottom: 32px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  font-style: italic;
}

.hero h1 br + span,
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 44px;
  line-height: 1.7;
  font-weight: 400;
}
.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Trust bar below hero */
.hero__trust {
  display: flex;
  justify-content: center;
  gap: 56px;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 2px solid var(--accent);
}
.hero__trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.hero__trust-item svg { color: var(--accent); flex-shrink: 0; width: 22px; height: 22px; }

@media (max-width: 768px) {
  .hero { padding: 80px 0 60px; }
  .hero h1 { font-size: clamp(2.5rem, 10vw, 3.5rem); }
  .hero__trust { flex-wrap: wrap; gap: 24px; }
}

/* =========================================================================
   PLATFORM SELECTOR -- Bold chips, not shy little buttons
   ========================================================================= */
.platforms { text-align: center; }
.platforms__grid {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

.platform-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 32px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 2px solid #e5e3dc;
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: var(--text-base);
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text);
  letter-spacing: -0.01em;
}
.platform-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(13,148,136,0.12);
  background: var(--accent-light);
}
.platform-chip.active {
  border-color: var(--accent);
  color: var(--text-inverse);
  background: var(--accent);
  box-shadow: 0 6px 24px rgba(13,148,136,0.35);
}
.platform-chip__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-inset);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.platform-chip.active .platform-chip__icon {
  background: rgba(255,255,255,0.2);
}

/* =========================================================================
   CATEGORIES -- Big, bold, icon-forward. Not a boring grid of boxes.
   ========================================================================= */
.categories__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.category-card {
  text-align: center;
  padding: 32px 12px 28px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  color: var(--text);
  position: relative;
  overflow: hidden;
}
.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(13,148,136,0.04) 100%);
  opacity: 0;
  transition: opacity 0.3s;
}
.category-card:hover::before { opacity: 1; }
.category-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(13,148,136,0.08);
  color: var(--text);
}
.category-card__icon {
  font-size: 40px;
  margin-bottom: 14px;
  display: block;
  position: relative;
  z-index: 1;
}
.category-card__name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  position: relative;
  z-index: 1;
  letter-spacing: -0.02em;
}
.category-card__count {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 400;
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .categories__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .categories__grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================================
   PRODUCT CARDS -- Full-bleed image, overlay info. No chrome.
   ========================================================================= */
.product-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--text-inverse);
  display: flex;
  flex-direction: column;
  aspect-ratio: 3/4;
  background: var(--surface-inset);
}
.product-card:hover {
  color: var(--text-inverse);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.15);
}

.product-card__image-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-card__image { transform: scale(1.08); }

/* Dark gradient overlay for text legibility */
.product-card__image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.35) 40%, transparent 65%);
  pointer-events: none;
  transition: opacity 0.3s;
}
.product-card:hover .product-card__image-wrap::after {
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.4) 45%, transparent 70%);
}

.product-card__badges {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  z-index: 2;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
}
.badge--physical { background: rgba(219,234,254,0.9); color: #1e40af; }
.badge--digital { background: rgba(250,232,255,0.9); color: #86198f; }
.badge--featured { background: rgba(254,243,199,0.9); color: #92400e; }
.badge--new { background: rgba(240,253,250,0.9); color: var(--accent-dark); }

.product-card__info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  z-index: 2;
  display: flex;
  flex-direction: column;
}
.product-card__category {
  font-size: 0.6rem;
  color: var(--accent-mid);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  margin-bottom: 6px;
}
.product-card__name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #fff;
}
.product-card__seller {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.5);
  margin-bottom: 12px;
}
.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0;
  border-top: none;
}
.product-card__price {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-mid);
}
.product-card__rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
}
.product-card__rating .star { color: #f59e0b; }
.product-card__platforms {
  display: flex;
  gap: 4px;
  margin-top: 10px;
}
.product-card__platform-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
}

/* =========================================================================
   HOW IT WORKS -- Bold numbered steps with teal accent line
   ========================================================================= */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  counter-reset: step;
  position: relative;
}
/* Connecting line between steps */
.steps::before {
  content: '';
  position: absolute;
  top: 44px;
  left: 16.67%;
  right: 16.67%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-light), var(--accent), var(--accent-light));
  z-index: 0;
}
.step {
  text-align: center;
  padding: 0 24px;
  counter-increment: step;
  position: relative;
  z-index: 1;
  background: transparent;
  border: none;
  border-radius: 0;
}
.step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--accent);
  color: var(--text-inverse);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  border-radius: 50%;
  margin: 0 auto 24px;
  box-shadow: 0 4px 20px rgba(13,148,136,0.3);
}
.step h4 {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}
.step p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.65;
}

@media (max-width: 768px) {
  .steps { grid-template-columns: 1fr; gap: 40px; }
  .steps::before { display: none; }
}

/* =========================================================================
   STATS -- HUGE numbers, tiny labels. Extreme contrast.
   ========================================================================= */
.stats {
  display: flex;
  justify-content: center;
  gap: 72px;
  flex-wrap: wrap;
  padding: 64px 0;
  border-top: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
}
.stat {
  text-align: center;
}
.stat__number {
  font-family: var(--font-display);
  font-size: clamp(4rem, 9vw, 7rem);
  font-weight: 900;
  color: var(--accent);
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-style: italic;
}
.stat__label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
}

/* =========================================================================
   SIGNUP / EARLY ACCESS -- Teal background panel. Unmissable.
   ========================================================================= */
.signup-section {
  background: var(--accent);
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.signup-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.06'/%3E%3C/svg%3E");
  pointer-events: none;
}
.signup-section h2 {
  color: var(--text-inverse);
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  position: relative;
}
.signup-section p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 32px;
  position: relative;
}

.form-row {
  display: flex;
  gap: 0;
  max-width: 440px;
  margin: 0 auto;
  position: relative;
}
.form-row input {
  flex: 1;
  padding: 16px 22px;
  border-radius: var(--radius-pill) 0 0 var(--radius-pill);
  border: 2px solid rgba(255,255,255,0.3);
  border-right: none;
  background: rgba(255,255,255,0.12);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-inverse);
  outline: none;
  transition: border-color var(--transition);
  backdrop-filter: blur(4px);
}
.form-row input:focus {
  border-color: rgba(255,255,255,0.6);
}
.form-row input::placeholder { color: rgba(255,255,255,0.5); }
.form-row .btn {
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
  background: var(--text);
  color: var(--text-inverse);
  font-weight: 700;
  border: 2px solid var(--text);
  white-space: nowrap;
}
.form-row .btn:hover {
  background: #222;
}

@media (max-width: 640px) {
  .signup-section { padding: 40px 24px; }
  .form-row { flex-direction: column; gap: 12px; }
  .form-row input { border-radius: var(--radius-pill); border-right: 2px solid rgba(255,255,255,0.3); }
  .form-row .btn { border-radius: var(--radius-pill); }
}

/* =========================================================================
   FILTER SIDEBAR (browse page)
   ========================================================================= */
.browse-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .browse-layout { grid-template-columns: 1fr; }
}

.filters {
  position: sticky;
  top: 92px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: var(--card-border);
  padding: 24px;
}
.filters h3 { font-size: var(--text-lg); margin-bottom: 20px; }

.filter-group { margin-bottom: 24px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-group__title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: color var(--transition);
}
.filter-option:hover { color: var(--accent); }
.filter-option input[type="checkbox"] { display: none; }
.filter-option__check {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--surface);
  border: 1.5px solid #d4d2cb;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}
.filter-option input:checked + .filter-option__check {
  background: var(--accent);
  border-color: var(--accent);
}
.filter-option input:checked + .filter-option__check::after {
  content: '\2713';
  color: white;
  font-size: 12px;
  font-weight: 700;
}
.filter-option input:checked ~ .filter-option__label { color: var(--accent); font-weight: 600; }

/* Price range slider */
.price-range {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.price-range input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--surface-inset);
  border-radius: 2px;
  outline: none;
}
.price-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(13,148,136,0.35);
}

/* --- Sort bar --- */
.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.sort-bar__count {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.sort-bar__options {
  display: flex;
  gap: 8px;
}
.sort-bar select {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid #e5e3dc;
  background: var(--surface);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text);
  cursor: pointer;
  outline: none;
}

/* =========================================================================
   PRODUCT DETAIL
   ========================================================================= */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 768px) {
  .product-detail { grid-template-columns: 1fr; gap: 32px; }
}

.product-gallery {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: var(--card-border);
  overflow: hidden;
}
.product-gallery__main {
  aspect-ratio: 1;
  background: var(--surface-inset);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 120px;
  color: var(--text-muted);
}
.product-gallery__thumbs {
  display: flex;
  gap: 8px;
  padding: 12px;
}
.product-gallery__thumb {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background: var(--surface-inset);
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--transition);
}
.product-gallery__thumb.active,
.product-gallery__thumb:hover { border-color: var(--accent); }

.product-info h1 {
  font-size: var(--text-3xl);
  margin-bottom: 8px;
}
.product-info__seller {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 16px;
}
.product-info__price {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 20px;
}
.product-info__desc {
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.7;
}

.product-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
  padding: 20px;
  background: var(--bg);
  border-radius: var(--radius);
  border: var(--card-border);
}
.product-meta__row {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
}
.product-meta__label { color: var(--text-muted); }
.product-meta__value { font-weight: 600; }

.product-actions {
  display: flex;
  gap: 12px;
}

/* --- Reviews --- */
.reviews { margin-top: 48px; }
.review {
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: var(--card-border);
  margin-bottom: 16px;
}
.review__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.review__author { font-weight: 600; font-size: var(--text-sm); }
.review__date { font-size: var(--text-xs); color: var(--text-muted); }
.review__stars { color: #f59e0b; margin-bottom: 8px; font-size: var(--text-sm); }
.review__text { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.6; }

/* --- Seller Page --- */
.seller-hero {
  padding: 80px 0 60px;
  text-align: center;
  background: var(--bg);
  border-bottom: 1px solid #e5e3dc;
}
.seller-hero h1 { margin-bottom: 16px; }
.seller-hero p { color: var(--text-secondary); max-width: 540px; margin: 0 auto; font-size: var(--text-lg); }

.commission-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 700px;
  margin: 0 auto;
}
.commission-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: var(--card-border);
  padding: 36px;
  text-align: center;
}
.commission-card__rate {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 8px;
}
.commission-card__type {
  font-weight: 600;
  margin-bottom: 4px;
}
.commission-card__detail {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  .commission-cards { grid-template-columns: 1fr; }
}

/* --- Seller Form --- */
.seller-form {
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: var(--card-border);
  padding: 40px;
}
.form-field { margin-bottom: 20px; }
.form-field label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid #e5e3dc;
  background: var(--surface);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--accent);
}
.form-field textarea { resize: vertical; min-height: 100px; }

/* =========================================================================
   FOOTER -- Warm, structured, branded
   ========================================================================= */
.footer {
  background: var(--text);
  color: var(--text-inverse);
  margin-top: 0;
  padding: 64px 0 32px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer__brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 14px;
}
.footer__brand span { color: var(--accent-mid); }
.footer__about {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
}
.footer h4 {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 16px;
}
.footer__links { list-style: none; }
.footer__links li { margin-bottom: 10px; }
.footer__links a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}
.footer__links a:hover { color: var(--accent-mid); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.3);
}

@media (max-width: 900px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: 8px; }
}

/* =========================================================================
   SEARCH
   ========================================================================= */
.search-bar {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}
.search-bar input {
  width: 100%;
  padding: 16px 24px 16px 48px;
  border-radius: var(--radius-pill);
  border: 1.5px solid #e5e3dc;
  background: var(--surface);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-bar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(13,148,136,0.08);
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar__icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* =========================================================================
   TOAST / NOTIFICATIONS
   ========================================================================= */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 28px;
  background: var(--text);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-inverse);
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.toast.visible { transform: translateY(0); opacity: 1; }

/* =========================================================================
   MISC HELPERS
   ========================================================================= */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-header h2 {
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.03em;
}
.section-header p { color: var(--text-muted); max-width: 480px; margin: 0 auto; font-size: var(--text-sm); }

.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mb-24 { margin-bottom: 24px; }
.mb-40 { margin-bottom: 40px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* --- Page-specific overrides --- */
.page-header {
  padding: 56px 0 36px;
  text-align: center;
}
.page-header h1 {
  font-size: var(--text-3xl);
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-weight: 800;
}
.page-header p { color: var(--text-secondary); }

.prose { max-width: 720px; margin: 0 auto; }
.prose h2 { margin: 36px 0 16px; font-size: var(--text-2xl); }
.prose h3 { margin: 28px 0 12px; font-size: var(--text-xl); }
.prose p { margin-bottom: 16px; color: var(--text-secondary); line-height: 1.7; }
.prose ul, .prose ol { margin-bottom: 16px; padding-left: 24px; color: var(--text-secondary); }
.prose li { margin-bottom: 6px; }
.prose a { text-decoration: underline; }

/* =========================================================================
   ANIMATIONS
   ========================================================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in {
  animation: fadeInUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
}
.animate-in:nth-child(1) { animation-delay: 0.05s; }
.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.15s; }
.animate-in:nth-child(4) { animation-delay: 0.2s; }
.animate-in:nth-child(5) { animation-delay: 0.25s; }
.animate-in:nth-child(6) { animation-delay: 0.3s; }

/* Scroll-triggered reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================================
   MOBILE FILTER TOGGLE
   ========================================================================= */
.filter-toggle {
  display: none;
  margin-bottom: 16px;
}
@media (max-width: 900px) {
  .filter-toggle { display: block; }
  .filters { display: none; position: relative; top: auto; }
  .filters.open { display: block; }
}

/* =========================================================================
   CART DRAWER
   ========================================================================= */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 92vw;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid #e5e3dc;
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }

.cart-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  border-bottom: 1px solid var(--surface-inset);
}
.cart-drawer__header h3 { font-size: var(--text-lg); font-family: var(--font-display); }
.cart-drawer__close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
}

.cart-drawer__items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 28px;
}
.cart-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--surface-inset);
}
.cart-item__image {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--surface-inset);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.cart-item__details { flex: 1; }
.cart-item__name { font-weight: 600; font-size: var(--text-sm); }
.cart-item__price { font-size: var(--text-sm); color: var(--text-secondary); }
.cart-item__remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: var(--text-xs);
  padding: 4px;
}
.cart-item__remove:hover { color: #ef4444; }

.cart-drawer__footer {
  padding: 22px 28px;
  border-top: 1px solid var(--surface-inset);
}
.cart-drawer__total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 16px;
  font-family: var(--font-display);
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  backdrop-filter: blur(2px);
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

/* Empty cart */
.cart-empty {
  text-align: center;
  padding: 48px 0;
  color: var(--text-muted);
}
.cart-empty__icon { font-size: 48px; margin-bottom: 12px; }
.cart-empty p { font-size: var(--text-sm); }

/* =========================================================================
   CERTIFIED PRE-OWNED SECTION OVERRIDE
   ========================================================================= */
[id="certified-preowned"] {
  background: var(--bg-warm) !important;
  box-shadow: none !important;
  border-top: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
}

/* =========================================================================
   EXTRA TEAL CONFIDENCE
   ========================================================================= */
/* Category card hover fills teal */
.category-card:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--text-inverse);
}
.category-card:hover .category-card__name { color: var(--text-inverse); }
.category-card:hover .category-card__count { color: rgba(255,255,255,0.7); }

/* Product price always teal */
.product-info__price,
.product-card__price { color: var(--accent) !important; }

/* Nav link active underline */
.nav__links a:hover {
  color: var(--accent);
}
