/* style.css — Psychedelic Gallery
   Design tokens, component styles, layout.
   Dark-first palette: emerald green primary, amethyst purple secondary.
   Fonts: Cormorant (display) + Manrope (body/UI) */

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  /* --- Type Scale (fluid) --- */
  --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.9rem  + 0.5vw,  1.125rem);
  --text-lg:   clamp(1.125rem, 0.95rem + 0.85vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1rem    + 1.5vw,  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);
  --text-4xl:  clamp(3rem,     1.5rem  + 5vw,    6rem);

  /* --- Spacing (4px grid) --- */
  --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;

  /* --- Fonts --- */
  --font-display: 'Cormorant', 'Georgia', serif;
  --font-body: 'Manrope', 'Helvetica Neue', sans-serif;

  /* --- 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);

  /* --- Content widths --- */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
}

/* ============================================
   DARK MODE (DEFAULT) — Emerald Green + Amethyst Purple
   ============================================ */
:root, [data-theme="dark"] {
  /* Surfaces — deep, cool-tinted dark */
  --color-bg:             #0d0f0e;
  --color-surface:        #131715;
  --color-surface-2:      #171b19;
  --color-surface-offset: #151a17;
  --color-surface-offset-2: #1a1f1c;
  --color-surface-dynamic: #232a27;
  --color-divider:        #1f2622;
  --color-border:         #2a332e;

  /* Text — cool-shifted light */
  --color-text:           #d4ddd7;
  --color-text-muted:     #7e8b83;
  --color-text-faint:     #4a5550;
  --color-text-inverse:   #131715;

  /* Primary — Emerald Green */
  --color-primary:        #3ecf7a;
  --color-primary-hover:  #2fb866;
  --color-primary-active: #1f9a50;
  --color-primary-highlight: #1c3329;

  /* Secondary — Amethyst Purple */
  --color-secondary:      #a86fdf;
  --color-secondary-hover: #9250d0;
  --color-secondary-highlight: #2d2436;

  /* Semantic */
  --color-warning:        #d4883a;
  --color-error:          #e05c8c;
  --color-success:        #3ecf7a;
  --color-success-highlight: #1c3329;
  --color-blue:           #5591c7;

  /* Shadows (deep, cool) */
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.45);
}

/* ============================================
   LIGHT MODE (alternate)
   ============================================ */
[data-theme="light"] {
  /* Surfaces — warm off-white with green undertone */
  --color-bg:             #f3f6f4;
  --color-surface:        #f7faf8;
  --color-surface-2:      #fafcfb;
  --color-surface-offset: #edf2ef;
  --color-surface-offset-2: #e5ebe8;
  --color-surface-dynamic: #dce3df;
  --color-divider:        #d0d8d3;
  --color-border:         #c4cfc8;

  /* Text */
  --color-text:           #1a2420;
  --color-text-muted:     #5e706a;
  --color-text-faint:     #a3b1aa;
  --color-text-inverse:   #f7faf8;

  /* Primary — Emerald Green (darker for light bg) */
  --color-primary:        #1d8f4e;
  --color-primary-hover:  #147a3e;
  --color-primary-active: #0d6130;
  --color-primary-highlight: #c5e2d2;

  /* Secondary — Amethyst Purple */
  --color-secondary:      #7a39bb;
  --color-secondary-hover: #5f2699;
  --color-secondary-highlight: #dacfde;

  /* Semantic */
  --color-warning:        #964219;
  --color-error:          #a12c7b;
  --color-success:        #1d8f4e;
  --color-success-highlight: #c5e2d2;
  --color-blue:           #006494;

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

/* System preference fallback — dark is already :root default,
   this handles the edge case of :root:not([data-theme]) */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --color-bg:             #f3f6f4;
    --color-surface:        #f7faf8;
    --color-surface-2:      #fafcfb;
    --color-surface-offset: #edf2ef;
    --color-surface-offset-2: #e5ebe8;
    --color-surface-dynamic: #dce3df;
    --color-divider:        #d0d8d3;
    --color-border:         #c4cfc8;
    --color-text:           #1a2420;
    --color-text-muted:     #5e706a;
    --color-text-faint:     #a3b1aa;
    --color-text-inverse:   #f7faf8;
    --color-primary:        #1d8f4e;
    --color-primary-hover:  #147a3e;
    --color-primary-active: #0d6130;
    --color-primary-highlight: #c5e2d2;
    --color-secondary:      #7a39bb;
    --color-secondary-hover: #5f2699;
    --color-secondary-highlight: #dacfde;
    --color-warning:        #964219;
    --color-error:          #a12c7b;
    --color-success:        #1d8f4e;
    --color-success-highlight: #c5e2d2;
    --color-blue:           #006494;
    --shadow-sm: 0 1px 2px oklch(0.2 0.02 155 / 0.06);
    --shadow-md: 0 4px 12px oklch(0.2 0.02 155 / 0.08);
    --shadow-lg: 0 12px 32px oklch(0.2 0.02 155 / 0.12);
  }
}

/* ============================================
   SKIP LINK
   ============================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: 600;
  z-index: 9999;
  text-decoration: none;
}
.skip-link:focus {
  top: var(--space-4);
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-divider);
  padding: 0 var(--space-4);
}
.nav-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-brand {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color var(--transition-interactive);
}
.nav-brand:hover { color: var(--color-primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
}
.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-interactive);
  padding: var(--space-2) 0;
}
.nav-links a:hover,
.nav-links a.active { color: var(--color-text); }

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

/* Cart button */
.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  color: var(--color-text);
  transition: background var(--transition-interactive), color var(--transition-interactive);
}
.cart-btn:hover { background: var(--color-surface-dynamic); }
.cart-btn .badge-count {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity var(--transition-interactive), transform var(--transition-interactive);
}
.cart-btn .badge-count.visible {
  opacity: 1;
  transform: scale(1);
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: background var(--transition-interactive), color var(--transition-interactive);
}
.theme-toggle:hover {
  background: var(--color-surface-dynamic);
  color: var(--color-text);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  gap: 5px;
  border-radius: var(--radius-md);
  transition: background var(--transition-interactive);
}
.hamburger:hover { background: var(--color-surface-dynamic); }
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform var(--transition-interactive), opacity var(--transition-interactive);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  z-index: 99;
  padding: var(--space-8) var(--space-6);
  opacity: 0;
  transition: opacity 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-nav.open {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  opacity: 1;
}
.mobile-nav a {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-divider);
  transition: color var(--transition-interactive);
}
.mobile-nav a:hover { color: var(--color-primary); }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-24) var(--space-4);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      oklch(from var(--color-primary) l c h / 0.04) 0px,
      oklch(from var(--color-primary) l c h / 0.04) 1px,
      transparent 1px,
      transparent 28px
    ),
    repeating-linear-gradient(
      90deg,
      oklch(from var(--color-secondary) l c h / 0.03) 0px,
      oklch(from var(--color-secondary) l c h / 0.03) 1px,
      transparent 1px,
      transparent 28px
    );
  animation: grid-drift 30s linear infinite;
  pointer-events: none;
}
@keyframes grid-drift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(28px, 28px); }
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}
.hero-overline {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-secondary);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-6);
  line-height: 1.05;
}
.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  max-width: 50ch;
  margin-inline: auto;
  line-height: 1.5;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background var(--transition-interactive),
              color var(--transition-interactive),
              box-shadow var(--transition-interactive),
              transform var(--transition-interactive);
  min-height: 44px;
  min-width: 44px;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--color-surface-dynamic);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover { background: var(--color-border); }

.btn-ghost {
  background: transparent;
  color: var(--color-primary);
}
.btn-ghost:hover { background: var(--color-primary-highlight); }

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  min-height: 36px;
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

/* ============================================
   SECTION LAYOUT
   ============================================ */
.section {
  padding: clamp(var(--space-12), 6vw, var(--space-24)) var(--space-4);
}
.section-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
}
.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  margin-bottom: var(--space-3);
}
.section-header p {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  margin-inline: auto;
}

/* ============================================
   CATALOG FILTERS
   ============================================ */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  margin-bottom: var(--space-8);
}
.filter-btn {
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-border);
  transition: background var(--transition-interactive),
              color var(--transition-interactive),
              border-color var(--transition-interactive);
  min-height: 44px;
}
.filter-btn:hover {
  background: var(--color-surface-dynamic);
  color: var(--color-text);
}
.filter-btn.active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}

/* ============================================
   PRODUCT GRID
   ============================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* ============================================
   PRODUCT CARD
   ============================================ */
.product-card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition-interactive),
              border-color var(--transition-interactive);
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  border-color: oklch(from var(--color-text) l c h / 0.1);
}

.product-card-image {
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* CSS-generated blotter art patterns — green + purple */
.pattern-lattice {
  background:
    repeating-conic-gradient(
      oklch(from var(--color-primary) l c h / 0.15) 0% 25%,
      transparent 0% 50%
    ) 0 0 / 20px 20px,
    linear-gradient(135deg,
      oklch(from var(--color-primary) l c h / 0.1),
      oklch(from var(--color-secondary) l c h / 0.1)
    ),
    var(--color-surface-offset);
}
.pattern-bicycle {
  background:
    repeating-linear-gradient(45deg,
      oklch(from var(--color-secondary) l c h / 0.08) 0px,
      oklch(from var(--color-secondary) l c h / 0.08) 2px,
      transparent 2px,
      transparent 12px
    ),
    repeating-linear-gradient(-45deg,
      oklch(from var(--color-primary) l c h / 0.08) 0px,
      oklch(from var(--color-primary) l c h / 0.08) 2px,
      transparent 2px,
      transparent 12px
    ),
    radial-gradient(circle at 50% 50%,
      oklch(from var(--color-secondary) l c h / 0.12),
      transparent 70%
    ),
    var(--color-surface-offset);
}
.pattern-molecular {
  background:
    radial-gradient(circle at 20% 30%,
      oklch(from var(--color-primary) l c h / 0.15) 0%,
      transparent 30%
    ),
    radial-gradient(circle at 70% 60%,
      oklch(from var(--color-secondary) l c h / 0.15) 0%,
      transparent 30%
    ),
    radial-gradient(circle at 50% 80%,
      oklch(from var(--color-primary) l c h / 0.1) 0%,
      transparent 25%
    ),
    repeating-conic-gradient(
      transparent 0deg 8deg,
      oklch(from var(--color-text) l c h / 0.03) 8deg 10deg
    ) 50% 50% / 100% 100%,
    var(--color-surface-offset);
}
.pattern-fractal {
  background:
    conic-gradient(from 0deg at 50% 50%,
      oklch(from var(--color-primary) l c h / 0.12),
      oklch(from var(--color-secondary) l c h / 0.12),
      oklch(from var(--color-primary) l c h / 0.08),
      oklch(from var(--color-secondary) l c h / 0.12)
    ),
    repeating-linear-gradient(
      0deg,
      oklch(from var(--color-text) l c h / 0.03) 0px,
      oklch(from var(--color-text) l c h / 0.03) 1px,
      transparent 1px,
      transparent 16px
    ),
    repeating-linear-gradient(
      90deg,
      oklch(from var(--color-text) l c h / 0.03) 0px,
      oklch(from var(--color-text) l c h / 0.03) 1px,
      transparent 1px,
      transparent 16px
    ),
    var(--color-surface-offset);
}
.pattern-grid {
  background:
    repeating-linear-gradient(
      0deg,
      oklch(from var(--color-primary) l c h / 0.06) 0px,
      oklch(from var(--color-primary) l c h / 0.06) 1px,
      transparent 1px,
      transparent 20px
    ),
    repeating-linear-gradient(
      90deg,
      oklch(from var(--color-primary) l c h / 0.06) 0px,
      oklch(from var(--color-primary) l c h / 0.06) 1px,
      transparent 1px,
      transparent 20px
    ),
    var(--color-surface-offset);
}
.pattern-consciousness {
  background:
    radial-gradient(
      ellipse at center,
      oklch(from var(--color-secondary) l c h / 0.2) 0%,
      oklch(from var(--color-primary) l c h / 0.1) 30%,
      oklch(from var(--color-secondary) l c h / 0.05) 50%,
      transparent 70%
    ),
    repeating-conic-gradient(
      oklch(from var(--color-text) l c h / 0.04) 0% 25%,
      transparent 0% 50%
    ) 0 0 / 24px 24px,
    linear-gradient(
      180deg,
      oklch(from var(--color-primary) l c h / 0.08),
      oklch(from var(--color-secondary) l c h / 0.08)
    ),
    var(--color-surface-offset);
}

/* Perforated grid overlay on all product images */
.product-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      oklch(from var(--color-text) l c h / 0.04) 0px,
      oklch(from var(--color-text) l c h / 0.04) 1px,
      transparent 1px,
      transparent 28px
    ),
    repeating-linear-gradient(
      90deg,
      oklch(from var(--color-text) l c h / 0.04) 0px,
      oklch(from var(--color-text) l c h / 0.04) 1px,
      transparent 1px,
      transparent 28px
    );
  pointer-events: none;
}

.product-card-body {
  padding: var(--space-5);
}
.product-card-category {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-secondary);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.product-card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.product-card-artist {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.product-card-price {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
}

/* ============================================
   PRODUCT DETAIL MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: oklch(from var(--color-bg) l c h / 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms cubic-bezier(0.16, 1, 0.3, 1),
              visibility 300ms;
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.open .modal {
  transform: scale(1);
}
.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: oklch(from var(--color-bg) l c h / 0.8);
  color: var(--color-text);
  z-index: 1;
  transition: background var(--transition-interactive);
}
.modal-close:hover { background: var(--color-surface-dynamic); }

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0;
  max-height: 90vh;
}
.modal-image {
  position: relative;
  min-height: 400px;
  height: 100%;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.modal-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, oklch(from var(--color-text) l c h / 0.04) 0px, oklch(from var(--color-text) l c h / 0.04) 1px, transparent 1px, transparent 28px),
    repeating-linear-gradient(90deg, oklch(from var(--color-text) l c h / 0.04) 0px, oklch(from var(--color-text) l c h / 0.04) 1px, transparent 1px, transparent 28px);
  pointer-events: none;
}
.modal-details {
  padding: var(--space-8) var(--space-8) var(--space-8) var(--space-7);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
  max-height: 90vh;
  position: relative;
}
.modal-details h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
}
.modal-details .artist {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.modal-details .description {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.7;
}
.modal-details .price {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
}

/* Magic Ink availability hint in modal */
.modal-magic-ink-hint {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-secondary);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: oklch(from var(--color-secondary) l c h / 0.06);
  border: 1px solid oklch(from var(--color-secondary) l c h / 0.15);
  width: fit-content;
}
.modal-magic-ink-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-secondary);
  box-shadow: 0 0 6px oklch(from var(--color-secondary) l c h / 0.4);
  flex-shrink: 0;
}
.provenance-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-secondary-highlight);
  color: var(--color-secondary);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
}
.qty-control {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.qty-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--text-lg);
  font-weight: 600;
  transition: background var(--transition-interactive);
}
.qty-btn:hover { background: var(--color-surface-dynamic); }
.qty-value {
  font-size: var(--text-lg);
  font-weight: 600;
  min-width: 32px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ============================================
   CART PANEL (slide-out)
   ============================================ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: oklch(from var(--color-bg) l c h / 0.6);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms cubic-bezier(0.16, 1, 0.3, 1), visibility 300ms;
}
.cart-overlay.open { opacity: 1; visibility: visible; }

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 90vw);
  height: 100dvh;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  z-index: 301;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
.cart-panel.open { transform: translateX(0); }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-divider);
}
.cart-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
}
.cart-close {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: background var(--transition-interactive), color var(--transition-interactive);
}
.cart-close:hover {
  background: var(--color-surface-dynamic);
  color: var(--color-text);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-4) var(--space-6);
}
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-16) var(--space-4);
  color: var(--color-text-muted);
}
.cart-empty svg {
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
}
.cart-empty h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.cart-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-divider);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-image {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.cart-item-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, oklch(from var(--color-text) l c h / 0.04) 0px, oklch(from var(--color-text) l c h / 0.04) 1px, transparent 1px, transparent 12px),
    repeating-linear-gradient(90deg, oklch(from var(--color-text) l c h / 0.04) 0px, oklch(from var(--color-text) l c h / 0.04) 1px, transparent 1px, transparent 12px);
  pointer-events: none;
}
.cart-item-info { flex: 1; }
.cart-item-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.cart-item-meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.cart-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.cart-item-qty button {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: background var(--transition-interactive);
}
.cart-item-qty button:hover { background: var(--color-surface-dynamic); }
.cart-item-qty span {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}
.cart-item-price {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cart-item-remove {
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  text-decoration: underline;
  transition: color var(--transition-interactive);
  padding: var(--space-1);
}
.cart-item-remove:hover { color: var(--color-error); }

.cart-footer {
  padding: var(--space-6);
  border-top: 1px solid var(--color-divider);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-subtotal .label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.cart-subtotal .amount {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
}
.cart-checkout-btns {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-content {
  max-width: var(--content-narrow);
  margin-inline: auto;
}
.about-content p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  line-height: 1.8;
}
.about-content blockquote {
  border-left: 3px solid var(--color-secondary);
  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;
}

.legal-disclaimer {
  margin-top: var(--space-8);
  padding: var(--space-4) var(--space-6);
  background: var(--color-surface-dynamic);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ============================================
   CRYPTO CHECKOUT MODAL
   ============================================ */
.crypto-modal-content {
  padding: var(--space-8);
  text-align: center;
}
.crypto-modal-content h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-6);
}
.crypto-tabs {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  margin-bottom: var(--space-6);
}
.crypto-tab {
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  transition: background var(--transition-interactive), color var(--transition-interactive);
}
.crypto-tab.active {
  background: var(--color-secondary);
  color: var(--color-text-inverse);
  border-color: var(--color-secondary);
}
.crypto-tab:hover:not(.active) { background: var(--color-surface-dynamic); }

.crypto-amount {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.crypto-usd-equiv {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

/* QR Code placeholder (CSS-drawn) */
.qr-placeholder {
  width: 160px;
  height: 160px;
  margin: 0 auto var(--space-4);
  background:
    repeating-conic-gradient(
      var(--color-text) 0% 25%,
      var(--color-surface) 0% 50%
    ) 0 0 / 16px 16px;
  border-radius: var(--radius-md);
  border: 3px solid var(--color-text);
  position: relative;
}
.qr-placeholder::after {
  content: 'QR';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: oklch(from var(--color-surface) l c h / 0.85);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.wallet-address {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-4) auto;
  max-width: 400px;
}
.wallet-address code {
  flex: 1;
  font-size: var(--text-xs);
  word-break: break-all;
  text-align: left;
  font-family: 'Courier New', monospace;
}
.wallet-address button {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--transition-interactive);
}
.wallet-address button:hover { background: var(--color-primary-hover); }

/* ============================================
   STRIPE DEMO MODAL
   ============================================ */
.stripe-demo {
  padding: var(--space-8);
  text-align: center;
}
.stripe-demo h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.stripe-demo p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-inline: auto;
  margin-bottom: var(--space-6);
}
.stripe-demo .info-box {
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: left;
}
.stripe-demo .info-box code {
  font-family: 'Courier New', monospace;
  background: var(--color-surface-dynamic);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
}

/* ============================================
   ANALYTICS DASHBOARD
   ============================================ */
.analytics-login {
  max-width: 360px;
  margin: var(--space-16) auto;
  text-align: center;
}
.analytics-login h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.analytics-login p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  margin-inline: auto;
}
.analytics-login input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  margin-bottom: var(--space-4);
  min-height: 44px;
}
.analytics-login input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.15);
}

.dashboard {
  display: grid;
  gap: var(--space-6);
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
@media (max-width: 768px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
.kpi-card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.kpi-card .label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.kpi-card .value {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
}
.kpi-card .delta {
  font-size: var(--text-xs);
  font-weight: 600;
  margin-top: var(--space-1);
}
.kpi-card .delta.up { color: var(--color-success); }
.kpi-card .delta.down { color: var(--color-error); }

.chart-card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.chart-card h3 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 768px) {
  .chart-grid { grid-template-columns: 1fr; }
}

.top-products-list {
  list-style: none;
}
.top-products-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-divider);
  font-size: var(--text-sm);
}
.top-products-list li:last-child { border-bottom: none; }
.top-products-list .rank {
  font-weight: 700;
  color: var(--color-primary);
  margin-right: var(--space-3);
  font-variant-numeric: tabular-nums;
}
.top-products-list .count {
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--color-surface-offset);
  border-top: 1px solid var(--color-divider);
  padding: var(--space-12) var(--space-4);
}
.footer-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
}
@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}
.footer-brand {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-3);
}
.footer-tagline {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.footer h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-interactive);
}
.footer-links a:hover { color: var(--color-text); }

.footer-bottom {
  max-width: var(--content-wide);
  margin-inline: auto;
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.social-icons {
  display: flex;
  gap: var(--space-3);
}
.social-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: background var(--transition-interactive), color var(--transition-interactive);
}
.social-icon:hover {
  background: var(--color-surface-dynamic);
  color: var(--color-text);
}

/* ============================================
   SCROLL REVEAL ANIMATION
   ============================================ */
.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; }
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.toast {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--color-text);
  color: var(--color-text-inverse);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  z-index: 500;
  box-shadow: var(--shadow-lg);
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.toast.visible {
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   BLOTTER GRID PATTERN (for accent sections)
   ============================================ */
.blotter-bg {
  background:
    repeating-linear-gradient(
      0deg,
      oklch(from var(--color-text) l c h / 0.03) 0px,
      oklch(from var(--color-text) l c h / 0.03) 1px,
      transparent 1px,
      transparent 28px
    ),
    repeating-linear-gradient(
      90deg,
      oklch(from var(--color-text) l c h / 0.03) 0px,
      oklch(from var(--color-text) l c h / 0.03) 1px,
      transparent 1px,
      transparent 28px
    );
}

/* ============================================
   UTILITY
   ============================================ */
.text-center { text-align: center; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-4 { margin-bottom: var(--space-4); }
.hidden { display: none !important; }

/* ============================================
   SPECIAL INK — VARIANT SYSTEM
   ============================================ */

/* --- Price "from" prefix --- */
.price-from {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  margin-right: 0.1em;
}

/* --- Strikethrough original price + Magic Ink price --- */
.price-original {
  text-decoration: line-through;
  color: var(--color-text-muted);
  font-size: 0.85em;
  font-weight: 500;
  margin-right: 0.3em;
}
.price-special {
  color: var(--color-secondary);
  font-weight: 700;
}
.price-range-sep {
  color: var(--color-text-muted);
  font-weight: 400;
  margin: 0 0.1em;
}

/* ============================================
   SPECIAL INK POPUP
   ============================================ */
.special-ink-popup-overlay {
  position: fixed;
  inset: 0;
  background: oklch(from var(--color-bg) l c h / 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  transition: opacity 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.special-ink-popup-overlay.active {
  opacity: 1;
}
.special-ink-popup {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  max-width: 440px;
  width: 100%;
  position: relative;
  transform: scale(0.95);
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.special-ink-popup-overlay.active .special-ink-popup {
  transform: scale(1);
}
.special-ink-popup-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: var(--text-xl);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color 180ms cubic-bezier(0.16, 1, 0.3, 1), background 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.special-ink-popup-close:hover {
  color: var(--color-text);
  background: oklch(from var(--color-text) l c h / 0.06);
}
.special-ink-popup-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 var(--space-1);
}
.special-ink-popup-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-6);
}

/* --- Slider section --- */
.si-slider-section {
  margin-bottom: var(--space-6);
}
.si-slider-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}
.si-slider-label {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.si-tab-count {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-secondary);
}
.si-tab-unit {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
}

/* --- Slider row: track + MAX button --- */
.si-slider-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.si-slider-track-wrap {
  flex: 1;
  position: relative;
}

/* --- Custom range slider with purple glow --- */
.si-slider {
  --fill: 0%;
  --track-h: 6px;
  --thumb-size: 22px;
  --purple: var(--color-secondary);
  --purple-glow: oklch(from var(--color-secondary) l c h / 0.35);
  --purple-glow-soft: oklch(from var(--color-secondary) l c h / 0.12);
  --track-bg: oklch(from var(--color-text) l c h / 0.08);

  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: var(--thumb-size);
  background: transparent;
  cursor: pointer;
  outline: none;
  margin: 0;
}

/* Track — Webkit */
.si-slider::-webkit-slider-runnable-track {
  height: var(--track-h);
  border-radius: calc(var(--track-h) / 2);
  background: linear-gradient(
    to right,
    var(--purple) 0%,
    var(--purple) var(--fill),
    var(--track-bg) var(--fill),
    var(--track-bg) 100%
  );
  box-shadow:
    0 0 8px var(--purple-glow-soft),
    inset 0 0 3px oklch(from var(--color-secondary) l c h / 0.08);
  transition: box-shadow 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Track — Firefox */
.si-slider::-moz-range-track {
  height: var(--track-h);
  border-radius: calc(var(--track-h) / 2);
  background: var(--track-bg);
  border: none;
}
.si-slider::-moz-range-progress {
  height: var(--track-h);
  border-radius: calc(var(--track-h) / 2);
  background: var(--purple);
  box-shadow: 0 0 8px var(--purple-glow-soft);
}

/* Thumb — Webkit */
.si-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: var(--thumb-size);
  height: var(--thumb-size);
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--purple);
  box-shadow:
    0 0 10px var(--purple-glow),
    0 0 24px var(--purple-glow-soft),
    0 1px 4px oklch(0 0 0 / 0.3);
  margin-top: calc((var(--track-h) - var(--thumb-size)) / 2);
  transition: box-shadow 180ms cubic-bezier(0.16, 1, 0.3, 1), transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.si-slider::-webkit-slider-thumb:hover {
  transform: scale(1.12);
  box-shadow:
    0 0 14px var(--purple-glow),
    0 0 32px oklch(from var(--color-secondary) l c h / 0.18),
    0 1px 4px oklch(0 0 0 / 0.3);
}
.si-slider:active::-webkit-slider-thumb {
  transform: scale(1.05);
  box-shadow:
    0 0 18px var(--purple-glow),
    0 0 40px oklch(from var(--color-secondary) l c h / 0.22),
    0 1px 4px oklch(0 0 0 / 0.3);
}

/* Thumb — Firefox */
.si-slider::-moz-range-thumb {
  width: var(--thumb-size);
  height: var(--thumb-size);
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--purple);
  box-shadow:
    0 0 10px var(--purple-glow),
    0 0 24px var(--purple-glow-soft),
    0 1px 4px oklch(0 0 0 / 0.3);
  transition: box-shadow 180ms cubic-bezier(0.16, 1, 0.3, 1), transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.si-slider::-moz-range-thumb:hover {
  transform: scale(1.12);
  box-shadow:
    0 0 14px var(--purple-glow),
    0 0 32px oklch(from var(--color-secondary) l c h / 0.18),
    0 1px 4px oklch(0 0 0 / 0.3);
}

/* Intensify glow as slider value increases */
.si-slider:focus-visible {
  outline: none;
}
.si-slider:focus-visible::-webkit-slider-thumb {
  box-shadow:
    0 0 0 3px oklch(from var(--color-secondary) l c h / 0.25),
    0 0 14px var(--purple-glow),
    0 0 32px var(--purple-glow-soft),
    0 1px 4px oklch(0 0 0 / 0.3);
}

/* --- MAX button --- */
.si-max-btn {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-secondary);
  background: oklch(from var(--color-secondary) l c h / 0.08);
  border: 1px solid oklch(from var(--color-secondary) l c h / 0.2);
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-3);
  cursor: pointer;
  white-space: nowrap;
  transition: background 180ms cubic-bezier(0.16, 1, 0.3, 1), border-color 180ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.si-max-btn:hover {
  background: oklch(from var(--color-secondary) l c h / 0.14);
  border-color: oklch(from var(--color-secondary) l c h / 0.35);
}
.si-max-btn.active {
  background: var(--color-secondary);
  color: #fff;
  border-color: var(--color-secondary);
  box-shadow: 0 0 12px oklch(from var(--color-secondary) l c h / 0.3);
}

/* --- Price breakdown --- */
.si-price-breakdown {
  background: oklch(from var(--color-bg) l c h / 0.5);
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-4);
}
.si-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: var(--space-1) 0;
}
.si-price-label {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.si-price-tabs {
  font-size: var(--text-xs);
  color: oklch(from var(--color-text) l c h / 0.35);
}
.si-price-value {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}
.si-price-row--ink .si-price-value {
  color: var(--color-secondary);
}
.si-price-divider {
  height: 1px;
  background: oklch(from var(--color-text) l c h / 0.08);
  margin: var(--space-2) 0;
}
.si-price-row--total .si-price-label {
  font-weight: 600;
  color: var(--color-text);
}
.si-price-row--total .si-price-value {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
}

/* --- NL notice --- */
.si-nl-notice {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: oklch(from var(--color-secondary) l c h / 0.7);
  margin-bottom: var(--space-4);
}
.si-nl-notice svg {
  flex-shrink: 0;
  stroke: oklch(from var(--color-secondary) l c h / 0.5);
}

/* --- Add to cart button --- */
.si-add-btn {
  width: 100%;
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-base);
  font-weight: 600;
}

/* Popup mobile adjustments */
@media (max-width: 480px) {
  .special-ink-popup {
    padding: var(--space-5);
    margin: var(--space-3);
  }
  .si-slider {
    --thumb-size: 26px;
    --track-h: 8px;
  }
}

/* --- Variant badge on product cards --- */
.variant-badge {
  position: absolute;
  bottom: var(--space-3);
  left: var(--space-3);
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  font-family: var(--font-body);
  background: oklch(from var(--color-secondary) l c h / 0.18);
  color: var(--color-secondary);
  border: 1px solid oklch(from var(--color-secondary) l c h / 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  letter-spacing: 0.03em;
  pointer-events: none;
  z-index: 1;
}
.variant-badge--special-only {
  background: oklch(from var(--color-secondary) l c h / 0.25);
  border-color: oklch(from var(--color-secondary) l c h / 0.5);
}
[data-theme="light"] .variant-badge {
  background: oklch(from var(--color-secondary) l c h / 0.12);
  border-color: oklch(from var(--color-secondary) l c h / 0.3);
}

/* --- Magic Ink filter button --- */
.filter-btn--special {
  border-color: oklch(from var(--color-secondary) l c h / 0.4);
  color: var(--color-secondary);
}
.filter-btn--special:hover {
  background: var(--color-secondary-highlight);
  color: var(--color-secondary);
  border-color: var(--color-secondary);
}
.filter-btn--special.active {
  background: var(--color-secondary);
  color: var(--color-text-inverse);
  border-color: var(--color-secondary);
}

/* --- Variant selector (pill toggle) in product modal --- */
.variant-selector {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}
.variant-pill {
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  background: transparent;
  transition: background var(--transition-interactive),
              color var(--transition-interactive),
              border-color var(--transition-interactive);
  min-height: 40px;
  cursor: pointer;
}
.variant-pill:hover:not(.active) {
  background: var(--color-surface-dynamic);
  color: var(--color-text);
}
.variant-pill.active--art {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}
.variant-pill.active--special {
  background: var(--color-secondary);
  color: var(--color-text-inverse);
  border-color: var(--color-secondary);
}

/* --- NL-only notice in modal --- */
.nl-only-notice {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  background: oklch(from var(--color-secondary) l c h / 0.12);
  border: 1px solid oklch(from var(--color-secondary) l c h / 0.3);
  color: var(--color-secondary);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-body);
}
[data-theme="light"] .nl-only-notice {
  background: oklch(from var(--color-secondary) l c h / 0.08);
}

/* --- Magic Ink info badge in modal --- */
.special-ink-info {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-secondary-highlight);
  color: var(--color-secondary);
  font-size: var(--text-xs);
  font-weight: 600;
  font-family: var(--font-body);
}

/* --- Magic Ink price breakdown --- */
.special-ink-breakdown {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-family: var(--font-body);
  margin-top: var(--space-2);
  padding: var(--space-2) 0;
  letter-spacing: 0.01em;
}

/* --- Cart item variant label --- */
.cart-item-variant {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: var(--space-1);
  font-family: var(--font-body);
}

/* --- NL only tag in cart --- */
.nl-only-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px var(--space-2);
  border-radius: var(--radius-full);
  background: oklch(from var(--color-secondary) l c h / 0.15);
  color: var(--color-secondary);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid oklch(from var(--color-secondary) l c h / 0.3);
}

/* --- Magic Ink checkout notice --- */
.special-ink-checkout-notice {
  margin-bottom: var(--space-5);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  background: oklch(from var(--color-secondary) l c h / 0.1);
  border: 1px solid oklch(from var(--color-secondary) l c h / 0.35);
  border-left: 4px solid var(--color-secondary);
  text-align: left;
}
.special-ink-checkout-notice strong {
  display: block;
  color: var(--color-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
  font-family: var(--font-body);
}
.special-ink-checkout-notice p {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  line-height: 1.6;
  margin: 0;
}
[data-theme="light"] .special-ink-checkout-notice {
  background: oklch(from var(--color-secondary) l c h / 0.06);
}

/* --- Magic Ink about card --- */
.special-ink-card {
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  margin-top: var(--space-8);
}
.special-ink-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-4);
  color: var(--color-secondary);
}
.special-ink-card p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
  line-height: 1.8;
}
.special-ink-card p:last-child {
  margin-bottom: 0;
}
[data-theme="light"] .special-ink-card {
  border-left-color: var(--color-secondary);
}

/* ============================================
   MOBILE-FIRST RESPONSIVE OVERRIDES
   ============================================ */

/* --- Small screens (phones, up to 640px) --- */
@media (max-width: 640px) {

  /* Hero: reduce padding and font size */
  .hero {
    min-height: 60vh;
    padding: var(--space-12) var(--space-4);
  }
  .hero h1 {
    font-size: clamp(2rem, 8vw, var(--text-4xl));
  }
  .hero-subtitle {
    font-size: var(--text-sm);
  }
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
  }
  .hero-cta .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* Section padding: tighter */
  .section {
    padding: var(--space-10) var(--space-4);
  }
  .section-header {
    margin-bottom: var(--space-8);
  }
  .section-header h2 {
    font-size: var(--text-xl);
  }

  /* Filters: wrap into centered grid on mobile */
  .filters {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2);
    padding: 0 var(--space-4);
  }
  .filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: var(--text-xs);
    padding: var(--space-2) var(--space-4);
    min-height: 40px;
  }

  /* Product card footer: stack if cramped */
  .product-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
  .product-card-footer .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* ---- PRODUCT DETAIL MODAL — full-screen on mobile ---- */
  .modal-overlay {
    padding: 0;
    align-items: stretch;
  }
  .modal {
    max-width: 100%;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
  }
  .modal-grid {
    grid-template-columns: 1fr;
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .modal-grid .modal-image {
    aspect-ratio: 3/2;
    max-height: 40vh;
  }
  .modal-details {
    padding: var(--space-5) var(--space-4) var(--space-8);
    overflow-y: visible;
    gap: var(--space-3);
  }
  .modal-details h2 {
    font-size: var(--text-xl);
  }
  .modal-details .description {
    font-size: var(--text-xs);
    line-height: 1.6;
  }
  .modal-close {
    top: var(--space-3);
    right: var(--space-3);
  }

  /* Qty control: ensure touch-friendly */
  .qty-control {
    justify-content: flex-start;
  }
  .modal-details .btn-lg {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* ---- STRIPE MODAL — full-screen on mobile ---- */
  .stripe-demo {
    padding: var(--space-6) var(--space-4);
  }
  .stripe-demo .info-box {
    padding: var(--space-3) var(--space-4);
  }

  /* ---- CRYPTO MODAL — full-screen on mobile ---- */
  .crypto-modal-content {
    padding: var(--space-6) var(--space-4);
  }
  .wallet-address {
    flex-direction: column;
    text-align: center;
    gap: var(--space-3);
  }
  .wallet-address code {
    font-size: 0.65rem;
    text-align: center;
  }
  .wallet-address button {
    width: 100%;
    padding: var(--space-3);
  }
  .qr-placeholder {
    width: 120px;
    height: 120px;
  }

  /* ---- CART PANEL — full-width on mobile ---- */
  .cart-panel {
    width: 100vw;
  }
  .cart-items {
    padding: var(--space-4);
  }
  .cart-item {
    gap: var(--space-3);
  }
  .cart-item-image {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
  }
  .cart-footer {
    padding: var(--space-4);
  }

  /* ---- ANALYTICS DASHBOARD ---- */
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
  .kpi-card {
    padding: var(--space-4);
  }
  .kpi-card .value {
    font-size: var(--text-lg);
  }
  .chart-grid {
    grid-template-columns: 1fr;
  }
  .chart-card {
    padding: var(--space-4);
  }

  /* ---- ABOUT SECTION ---- */
  .about-content blockquote {
    font-size: var(--text-base);
    padding-left: var(--space-4);
    margin: var(--space-6) 0;
  }
  /* Magic Ink card on mobile */
  .special-ink-card {
    padding: var(--space-5);
  }
  /* Variant selector on mobile: stack pills full-width */
  .variant-selector {
    flex-wrap: wrap;
  }
  .variant-pill {
    flex: 1;
    min-width: 120px;
    text-align: center;
    justify-content: center;
  }
  /* Checkout notice on mobile */
  .special-ink-checkout-notice {
    padding: var(--space-3) var(--space-4);
  }

  /* ---- FOOTER ---- */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: var(--space-3);
  }
}

/* --- Medium screens (641px–1024px): stack modal vertically --- */
@media (min-width: 641px) and (max-width: 1024px) {
  .modal {
    max-width: 90vw;
  }
  .modal-grid {
    grid-template-columns: 1fr;
    max-height: 90vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .modal-grid .modal-image {
    min-height: 300px;
    height: 50vw;
    max-height: 45vh;
  }
  .modal-details {
    padding: var(--space-6);
    overflow-y: visible;
    max-height: none;
  }
}

/* --- Extra small screens (below 380px) --- */
@media (max-width: 380px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .kpi-card .value {
    font-size: var(--text-base);
  }
  .hero h1 {
    font-size: 1.75rem;
  }
  .product-card-body {
    padding: var(--space-3);
  }
}

/* ============================================
   ANALYTICS DASHBOARD — REAL TRACKING
   ============================================ */

/* --- User Flow Funnel --- */
.analytics-funnel {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.funnel-step {
  display: flex;
}
.funnel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--text-sm);
  font-weight: 600;
  min-width: 120px;
  transition: width 500ms cubic-bezier(0.16, 1, 0.3, 1);
}
.funnel-bar--2 {
  background: oklch(from var(--color-primary) calc(l * 0.9) c h);
}
.funnel-bar--3 {
  background: oklch(from var(--color-primary) calc(l * 0.8) c h / 0.9);
}
.funnel-bar--4 {
  background: var(--color-secondary);
}
.funnel-label {
  white-space: nowrap;
}
.funnel-value {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.funnel-arrow {
  color: var(--color-text-faint);
  text-align: center;
  font-size: var(--text-xs);
  line-height: 1;
  padding: var(--space-1) 0;
}

/* --- Analytics Table --- */
.analytics-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.analytics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.analytics-table th {
  text-align: left;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-divider);
  font-weight: 600;
  white-space: nowrap;
}
.analytics-table th:not(:first-child) {
  text-align: right;
}
.analytics-table td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-divider);
  color: var(--color-text);
}
.analytics-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--color-text-muted);
}
.analytics-table tbody tr:hover {
  background: var(--color-surface-offset);
}
.analytics-table tbody tr:last-child td {
  border-bottom: none;
}

/* --- Analytics Bar Charts --- */
.analytics-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.analytics-bar-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.analytics-bar-label {
  font-size: var(--text-sm);
  color: var(--color-text);
  white-space: nowrap;
  min-width: 100px;
  font-weight: 500;
}
.analytics-bar-track {
  flex: 1;
  height: 8px;
  background: var(--color-surface-offset);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.analytics-bar-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width 500ms cubic-bezier(0.16, 1, 0.3, 1);
}
.analytics-bar-fill--scroll {
  background: var(--color-secondary);
}
.analytics-bar-value {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 32px;
  text-align: right;
}

/* --- Magic Ink Stats Grid --- */
.mi-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.mi-stat {
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-align: center;
}
.mi-stat-value {
  display: block;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-secondary);
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--space-1);
}
.mi-stat-label {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Event Log --- */
.event-log {
  max-height: 400px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
}
.event-log-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-divider);
  font-size: var(--text-sm);
  transition: background var(--transition-interactive);
}
.event-log-item:last-child {
  border-bottom: none;
}
.event-log-item:hover {
  background: var(--color-surface-offset);
}
.event-icon {
  font-size: var(--text-base);
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}
.event-detail {
  flex: 1;
  color: var(--color-text);
}
.event-time {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ============================================
   ADMIN PRODUCT MANAGER
   ============================================ */
.admin-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: start;
}
@media (max-width: 960px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
}

/* --- Form Panel --- */
.admin-form-panel {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.admin-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}
.admin-form-header h3 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 700;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.admin-field--full {
  grid-column: 1 / -1;
}
.admin-field label {
  display: block;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.admin-field input,
.admin-field textarea,
.admin-field select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface-offset);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  min-height: 44px;
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.admin-field input:focus,
.admin-field textarea:focus,
.admin-field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.15);
}
.admin-field textarea {
  resize: vertical;
  min-height: 80px;
}
.admin-field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' fill='none' stroke='%237e8b83' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: var(--space-8);
}

.admin-checkbox-row {
  display: flex;
  gap: var(--space-6);
}
.admin-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text);
  cursor: pointer;
  font-weight: 500;
}
.admin-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.admin-form-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

/* --- List Panel --- */
.admin-list-panel {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.admin-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.admin-list-header h3 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 700;
}

.admin-product-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.admin-product-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  transition: background var(--transition-interactive), border-color var(--transition-interactive);
}
.admin-product-row:hover {
  background: var(--color-surface-offset);
  border-color: var(--color-border);
}

.admin-product-row-order {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-order-btn {
  width: 28px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-divider);
  background: transparent;
  color: var(--color-text-muted);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition-interactive), color var(--transition-interactive);
}
.admin-order-btn:hover:not(:disabled) {
  background: var(--color-surface-dynamic);
  color: var(--color-text);
}
.admin-order-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.admin-product-row-swatch {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.admin-product-row-swatch::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, oklch(from var(--color-text) l c h / 0.04) 0px, oklch(from var(--color-text) l c h / 0.04) 1px, transparent 1px, transparent 8px),
    repeating-linear-gradient(90deg, oklch(from var(--color-text) l c h / 0.04) 0px, oklch(from var(--color-text) l c h / 0.04) 1px, transparent 1px, transparent 8px);
  pointer-events: none;
}

.admin-product-row-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-product-row-info strong {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-product-row-info span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.admin-variants-label {
  font-size: var(--text-xs);
  color: var(--color-secondary);
  font-weight: 600;
}

.admin-product-row-actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* --- Admin Mobile --- */
@media (max-width: 640px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
  .admin-product-row {
    flex-wrap: wrap;
  }
  .admin-product-row-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .admin-product-row-order {
    flex-direction: row;
  }
}

/* ============================================
   ORDER SUCCESS PAGE
   ============================================ */
.success-page {
  max-width: 560px;
  margin: 0 auto;
  padding: var(--space-16) var(--space-6);
  text-align: center;
}

.success-icon {
  margin-bottom: var(--space-6);
  animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.success-page h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.success-subtitle {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  margin-bottom: var(--space-8);
}

.success-details {
  margin-bottom: var(--space-8);
}

.order-summary-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: left;
}

.order-summary-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

.order-line {
  display: flex;
  justify-content: space-between;
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}

.order-total {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) 0 0;
  font-size: var(--text-base);
  color: var(--color-text);
}

.order-email {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
}

.success-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
}

/* Checkout methods note */
.checkout-methods-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-align: center;
  margin-top: var(--space-2);
  letter-spacing: 0.03em;
}

/* Spinner animation for checkout button */
.spinner {
  display: inline-block;
  vertical-align: middle;
  margin-right: var(--space-2);
}
