/* ===== DESIGN TOKENS ===== */
:root {
  /* Type Scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 8rem);

  /* Spacing */
  --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;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* Fonts */
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Switzer', 'Helvetica Neue', sans-serif;
}

/* ===== KHOISAN EARTH PALETTE — LIGHT ===== */
:root,
[data-theme='light'] {
  /* Surfaces — warm sand / parchment */
  --color-bg: #f5f0e8;
  --color-surface: #faf6ef;
  --color-surface-2: #fdfaf5;
  --color-surface-offset: #ede7db;
  --color-surface-offset-2: #e5ddd0;
  --color-surface-dynamic: #d9d0c2;
  --color-divider: #cfc5b5;
  --color-border: #c4b9a7;

  /* Text */
  --color-text: #2a2218;
  --color-text-muted: #6e6355;
  --color-text-faint: #a89e90;
  --color-text-inverse: #faf6ef;

  /* Primary — Ochre Red / Terracotta */
  --color-primary: #a0522d;
  --color-primary-hover: #8b4726;
  --color-primary-active: #723a1f;
  --color-primary-highlight: #e8d5c7;

  /* Accent — Deep Umber */
  --color-accent: #5c3a21;
  --color-accent-light: #d4a574;

  /* Warning / Gold */
  --color-warning: #b8860b;
  --color-warning-hover: #9a7109;
  --color-warning-highlight: #ebe0c4;

  /* Error */
  --color-error: #a12c3a;
  --color-error-hover: #8b2432;

  /* Success */
  --color-success: #5a7a3a;

  /* Shadows */
  --shadow-sm: 0 1px 2px oklch(0.2 0.02 60 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.02 60 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.02 60 / 0.12);
}

/* ===== DARK MODE ===== */
[data-theme='dark'] {
  --color-bg: #1a1612;
  --color-surface: #211c17;
  --color-surface-2: #27211a;
  --color-surface-offset: #1e1914;
  --color-surface-offset-2: #2a241d;
  --color-surface-dynamic: #332c24;
  --color-divider: #2e2820;
  --color-border: #3d352b;

  --color-text: #d4cbbf;
  --color-text-muted: #8a8076;
  --color-text-faint: #5e564e;
  --color-text-inverse: #1a1612;

  --color-primary: #c9845a;
  --color-primary-hover: #b5723f;
  --color-primary-active: #a06030;
  --color-primary-highlight: #3a2e24;

  --color-accent: #d4a574;
  --color-accent-light: #5c3a21;

  --color-warning: #d4a030;
  --color-error: #d46070;
  --color-success: #7aaa55;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #1a1612;
    --color-surface: #211c17;
    --color-surface-2: #27211a;
    --color-surface-offset: #1e1914;
    --color-surface-offset-2: #2a241d;
    --color-surface-dynamic: #332c24;
    --color-divider: #2e2820;
    --color-border: #3d352b;
    --color-text: #d4cbbf;
    --color-text-muted: #8a8076;
    --color-text-faint: #5e564e;
    --color-text-inverse: #1a1612;
    --color-primary: #c9845a;
    --color-primary-hover: #b5723f;
    --color-primary-active: #a06030;
    --color-primary-highlight: #3a2e24;
    --color-accent: #d4a574;
    --color-accent-light: #5c3a21;
    --color-warning: #d4a030;
    --color-error: #d46070;
    --color-success: #7aaa55;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  }
}

/* ===== HEADER / NAV ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
  transition: box-shadow 0.3s var(--ease-out);
}
.header--scrolled {
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}
.logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
/* Persistent tab bar — always visible */
.nav-tabs {
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.06);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav-tabs::-webkit-scrollbar {
  display: none;
}
.nav-tabs-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  padding: 0 var(--space-6);
  white-space: nowrap;
}
@media (min-width: 768px) {
  .nav-tabs-inner {
    gap: var(--space-8);
  }
}
.nav-link {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  padding: var(--space-3) 0;
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .nav-link {
    font-size: var(--text-sm);
    padding: var(--space-3) 0;
  }
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s var(--ease-out);
}
.nav-link:hover {
  color: var(--color-text);
}
.nav-link:hover::after {
  width: 100%;
}
.nav-link.active {
  color: var(--color-primary);
}
.nav-link.active::after {
  width: 100%;
}

/* Theme toggle */
.theme-toggle {
  padding: var(--space-2);
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: color var(--transition-interactive), background var(--transition-interactive);
}
.theme-toggle:hover {
  color: var(--color-text);
  background: oklch(from var(--color-text) l c h / 0.06);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    oklch(from var(--color-bg) l c h / 0.85) 0%,
    oklch(from var(--color-bg) l c h / 0.5) 50%,
    oklch(from var(--color-bg) l c h / 0.1) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: var(--space-16) var(--space-6);
}
.hero-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}
.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-style: italic;
  color: var(--color-text);
  max-width: 10ch;
  margin-bottom: var(--space-6);
}
.hero-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 38ch;
  margin-bottom: var(--space-8);
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0;
  cursor: pointer;
  transition:
    background var(--transition-interactive),
    color var(--transition-interactive),
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border: 1px solid var(--color-primary);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid oklch(from var(--color-text) l c h / 0.2);
}
.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

/* ===== SECTIONS ===== */
.section {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) var(--space-6);
}
.section-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
}
.section-eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-style: italic;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.section-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 55ch;
  margin-bottom: var(--space-10);
}

/* Alternating bg */
.section-alt {
  background: var(--color-surface);
}

/* ===== ABOUT SECTION ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: center;
}
@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }
}
.about-image {
  position: relative;
  overflow: hidden;
}
.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16/10;
}
.about-text p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.8;
}
.about-text p:last-child {
  margin-bottom: 0;
}

/* ===== FOUNDER SECTION ===== */
.founder-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: center;
}
@media (min-width: 768px) {
  .founder-grid {
    grid-template-columns: 2fr 3fr;
    gap: var(--space-16);
  }
}
.founder-image {
  overflow: hidden;
}
.founder-image img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: var(--space-2);
}
.founder-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.founder-role {
  font-size: var(--text-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-6);
}
.founder-bio p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.8;
}
.founder-quote {
  border-left: 2px solid var(--color-primary);
  padding-left: var(--space-6);
  margin: var(--space-8) 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-text);
  line-height: 1.6;
}

/* ===== COLLECTION GRID ===== */
.collection-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}
@media (min-width: 600px) {
  .collection-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }
}
.collection-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--color-surface);
}
.collection-card img {
  width: 100%;
  object-fit: contain;
  background: var(--color-surface-offset);
  transition: transform 0.6s var(--ease-out);
}
.collection-card:hover img {
  transform: scale(1.03);
}
.collection-card-info {
  padding: var(--space-5) var(--space-4);
}
.collection-card-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}
.collection-card-price {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}
.collection-card-tag {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-inverse);
  background: var(--color-primary);
  padding: var(--space-1) var(--space-3);
}

/* ===== FULL BLEED IMAGE ===== */
.full-bleed {
  width: 100%;
  position: relative;
  overflow: hidden;
}
.full-bleed img {
  width: 100%;
  height: 50vh;
  object-fit: cover;
}
.full-bleed-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: oklch(from var(--color-bg) l c h / 0.5);
}
.full-bleed-text {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-style: italic;
  color: var(--color-text);
  text-align: center;
  padding: var(--space-6);
}

/* ===== ORDER FORM ===== */
.order-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}
@media (min-width: 768px) {
  .order-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }
}
.order-info h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-style: italic;
  margin-bottom: var(--space-4);
}
.order-info p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.8;
}
.order-steps {
  list-style: none;
  counter-reset: step;
  margin-top: var(--space-6);
}
.order-steps li {
  counter-increment: step;
  padding: var(--space-4) 0;
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.06);
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}
.order-steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-primary);
  min-width: 2.5rem;
}
.form-group {
  margin-bottom: var(--space-5);
}
.form-label {
  display: block;
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.12);
  color: var(--color-text);
  font-size: var(--text-base);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.12);
}
.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* ===== TAB SELECTORS (replaces dropdowns) ===== */
.tab-selector {
  display: flex;
  gap: var(--space-2);
}
.tab-selector-wrap {
  flex-wrap: wrap;
}
.tab-selector + .form-select {
  margin-top: var(--space-3);
}
.tab-option {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.12);
  cursor: pointer;
  transition:
    background var(--transition-interactive),
    color var(--transition-interactive),
    border-color var(--transition-interactive);
}
.tab-option:hover {
  color: var(--color-text);
  border-color: oklch(from var(--color-text) l c h / 0.25);
}
.tab-option.active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}
@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }
}
.contact-detail {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  margin-bottom: var(--space-6);
}
.contact-detail-icon {
  color: var(--color-primary);
  min-width: 24px;
}
.contact-detail h4 {
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-1);
  color: var(--color-text);
}
.contact-detail p,
.contact-detail a {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  text-decoration: none;
}
.contact-detail a:hover {
  color: var(--color-primary);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--color-surface-offset);
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.06);
  padding: var(--space-16) var(--space-6) var(--space-8);
}
.footer-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-10);
  }
}
.footer-brand p {
  color: var(--color-text-muted);
  margin-top: var(--space-4);
  max-width: 30ch;
  line-height: 1.7;
}
.footer-heading {
  font-size: var(--text-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
}
.footer-links a:hover {
  color: var(--color-primary);
}
.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.footer-copy {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ===== GEOMETRIC DIVIDER ===== */
.geo-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  color: var(--color-primary);
  opacity: 0.5;
}
.geo-divider svg {
  width: 24px;
  height: 24px;
}

/* ===== LOGO IMAGE ===== */
.logo-img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}

/* ===== FEATURES BAR ===== */
.features-bar {
  background: var(--color-surface);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.06);
  padding: var(--space-5) var(--space-6);
}
.features-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}
@media (min-width: 768px) {
  .features-inner {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
  }
}
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}
.feature-item svg {
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.feature-item strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text);
  margin-bottom: 1px;
}
.feature-item span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ===== ORDER CTA ===== */
.btn-sm {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-xs);
}
.order-cta {
  margin-top: var(--space-8);
}

/* ===== RESPONSIVE COLLECTION GRID ===== */
@media (min-width: 900px) {
  .collection-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 900px) {
  .collection-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1200px) {
  .collection-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== COLLECTION FILTER TABS ===== */
.collection-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}
.filter-btn {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid oklch(from var(--color-text) l c h / 0.12);
  cursor: pointer;
  transition:
    background var(--transition-interactive),
    color var(--transition-interactive),
    border-color var(--transition-interactive);
}
.filter-btn:hover {
  color: var(--color-text);
  border-color: oklch(from var(--color-text) l c h / 0.25);
}
.filter-btn.active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}

/* Filter hide/show */
.collection-card.filter-hidden {
  display: none;
}

/* ===== COLLECTION CARD DESCRIPTION ===== */
.collection-card-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in { opacity: 1; }
@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
  }
}
@keyframes reveal-fade {
  to { opacity: 1; }
}

/* ===== KV Pattern BG ===== */
.pattern-bg {
  position: relative;
}
.pattern-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: 
    repeating-linear-gradient(
      60deg,
      var(--color-primary) 0px,
      var(--color-primary) 1px,
      transparent 1px,
      transparent 30px
    ),
    repeating-linear-gradient(
      -60deg,
      var(--color-primary) 0px,
      var(--color-primary) 1px,
      transparent 1px,
      transparent 30px
    );
  pointer-events: none;
}

/* ===== SOCIAL LINKS ===== */
.social-links {
  display: flex;
  gap: var(--space-4);
}
.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  border: 1px solid oklch(from var(--color-text) l c h / 0.12);
  border-radius: var(--radius-full);
  transition: all var(--transition-interactive);
}
.social-link:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* ===== SUCCESS MESSAGE ===== */
.success-message {
  display: none;
  padding: var(--space-4) var(--space-6);
  background: oklch(from var(--color-success) l c h / 0.1);
  border: 1px solid oklch(from var(--color-success) l c h / 0.2);
  color: var(--color-success);
  margin-top: var(--space-4);
  text-align: center;
}
.success-message.show {
  display: block;
}

/* ===== ADD TO BASKET BUTTON ===== */
.btn-add-to-basket {
  width: 100%;
  margin-top: var(--space-3);
  background: var(--color-surface-offset);
  color: var(--color-text);
  border: 1px solid oklch(from var(--color-text) l c h / 0.12);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  transition:
    background var(--transition-interactive),
    color var(--transition-interactive),
    border-color var(--transition-interactive),
    transform var(--transition-interactive);
}
.btn-add-to-basket:hover {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}
.btn-add-to-basket:active {
  transform: translateY(0);
}
.btn-add-to-basket.added {
  background: var(--color-success);
  color: #fff;
  border-color: var(--color-success);
  pointer-events: none;
}

/* ===== BASKET FAB ===== */
.basket-fab {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 200;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition:
    background var(--transition-interactive),
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
}
.basket-fab:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px oklch(from var(--color-primary) l c h / 0.3);
}
.basket-fab:active {
  transform: translateY(0);
}
.basket-fab.has-items {
  animation: fab-pulse 0.4s var(--ease-out);
}
@keyframes fab-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Badge */
.basket-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--color-error);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  opacity: 0;
  transform: scale(0);
  transition:
    opacity 0.2s var(--ease-out),
    transform 0.2s var(--ease-out);
}
.basket-badge.visible {
  opacity: 1;
  transform: scale(1);
}

/* ===== BASKET OVERLAY ===== */
.basket-overlay {
  position: fixed;
  inset: 0;
  z-index: 299;
  background: oklch(0 0 0 / 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
}
.basket-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ===== BASKET DRAWER ===== */
.basket-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 300;
  width: min(400px, 90vw);
  height: 100vh;
  height: 100dvh;
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-out);
  box-shadow: var(--shadow-lg);
}
.basket-drawer.open {
  transform: translateX(0);
}
.basket-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
  flex-shrink: 0;
}
.basket-drawer-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-text);
}
.basket-drawer-close {
  padding: var(--space-2);
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: color var(--transition-interactive), background var(--transition-interactive);
}
.basket-drawer-close:hover {
  color: var(--color-text);
  background: oklch(from var(--color-text) l c h / 0.06);
}

/* Drawer body */
.basket-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-6);
}
.basket-empty {
  text-align: center;
  color: var(--color-text-faint);
  padding: var(--space-10) 0;
  font-size: var(--text-sm);
  line-height: 1.7;
}

/* Basket item */
.basket-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.06);
}
.basket-item:last-child {
  border-bottom: none;
}
.basket-item-info {
  flex: 1;
  min-width: 0;
}
.basket-item-name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-style: italic;
  color: var(--color-text);
  margin-bottom: 2px;
}
.basket-item-collection {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.basket-item-price {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
}
.basket-item-remove {
  padding: var(--space-1);
  color: var(--color-text-faint);
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: color var(--transition-interactive);
  flex-shrink: 0;
}
.basket-item-remove:hover {
  color: var(--color-error);
}

/* Drawer footer */
.basket-drawer-footer {
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.08);
  flex-shrink: 0;
}
.basket-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}
.basket-checkout-btn {
  width: 100%;
  text-align: center;
  font-size: var(--text-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}
.basket-checkout-btn.is-loading {
  opacity: 0.85;
  pointer-events: none;
}
.basket-checkout-btn .spin {
  animation: basket-spin 0.9s linear infinite;
}
@keyframes basket-spin {
  to { transform: rotate(360deg); }
}
.basket-pay-hint {
  margin: var(--space-2) 0 0;
  font-size: var(--text-xs, 0.75rem);
  color: var(--color-text-muted, #8a8a8a);
  text-align: center;
}
.basket-request-btn {
  margin-top: var(--space-3);
  width: 100%;
  text-align: center;
  font-size: var(--text-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.basket-checkout-error {
  display: none;
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: 8px;
  background: rgba(200, 60, 60, 0.08);
  color: #c83c3c;
  font-size: var(--text-xs, 0.8rem);
  line-height: 1.4;
}
.basket-checkout-error.visible {
  display: block;
}
.order-status-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  max-width: min(520px, calc(100vw - 32px));
  padding: 14px 20px;
  border-radius: 12px;
  font-size: var(--text-sm, 0.9rem);
  line-height: 1.4;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 10000;
}
.order-status-banner.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.order-status-banner.success {
  background: #1f7a3a;
  color: #fff;
}
.order-status-banner.cancelled {
  background: #7a3a1f;
  color: #fff;
}

/* ===== TOAST (inline popup) ===== */
.app-toast {
  position: fixed;
  left: 50%;
  top: 24px;
  transform: translate(-50%, -20px);
  max-width: min(520px, calc(100vw - 32px));
  padding: 14px 20px;
  border-radius: 12px;
  font-size: var(--text-sm, 0.9rem);
  line-height: 1.4;
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10001;
  pointer-events: none;
  background: #222;
  color: #fff;
}
.app-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.app-toast-warn {
  background: #c83c3c;
  color: #fff;
}
.app-toast-info {
  background: #1f3a7a;
  color: #fff;
}

/* ===== SIZE SELECTOR ===== */
.size-selector {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
  flex-wrap: wrap;
}
.size-selector-label {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 500;
}
.size-options {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.size-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 6px 10px;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.2);
  cursor: pointer;
  user-select: none;
  transition:
    background var(--transition-interactive),
    color var(--transition-interactive),
    border-color var(--transition-interactive);
}
.size-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.size-option:hover {
  border-color: var(--color-primary);
}
.size-option.checked {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}
.size-selector.error .size-option {
  border-color: oklch(from var(--color-text) l c h / 0.35);
  animation: size-shake 0.32s ease-in-out;
}
@keyframes size-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

/* ===== ALERT MODAL (blocking popup) ===== */
.app-alert-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10020;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.app-alert-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.app-alert-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}
.app-alert-panel {
  position: relative;
  width: min(440px, calc(100vw - 32px));
  padding: var(--space-6, 1.5rem) var(--space-8, 2rem);
  border-radius: 14px;
  background: var(--color-surface, #fff);
  color: var(--color-text, #111);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  text-align: center;
  transform: translateY(8px) scale(0.98);
  transition: transform 0.2s ease;
}
.app-alert-modal.open .app-alert-panel {
  transform: translateY(0) scale(1);
}
.app-alert-title {
  margin: 0 0 var(--space-3, 0.75rem);
  font-size: var(--text-lg, 1.2rem);
  letter-spacing: 0.02em;
}
.app-alert-body {
  margin: 0 0 var(--space-6, 1.5rem);
  line-height: 1.55;
  font-size: var(--text-sm, 0.95rem);
  color: var(--color-text-muted, inherit);
}
.app-alert-ok {
  min-width: 120px;
}
body.modal-open {
  overflow: hidden;
}
