/* Order catalog design tokens. One source of truth: the real templates reuse this file.
   Contrast: text on surface >= 4.5:1 (WCAG AA) in both themes. 8 px spacing grid. */
:root {
  /* color: neutral warm base (as in the old web/ catalog), brown accent */
  --c-bg: #faf9f7;
  --c-surface: #ffffff;
  --c-surface-alt: #f3f0ec;
  --c-border: #ddd7d0;
  --c-border-strong: #a8a29d;
  --c-text: #2c2c2c;
  --c-text-muted: #66625d;
  --c-accent: #8b5e3c;
  --c-accent-hover: #6e4a2d;
  --c-on-accent: #ffffff;
  --c-accent-soft: #f4ede6;
  --c-ok: #266b44;      --c-ok-soft: #e7f4ec;
  --c-warn: #8a4f12;    --c-warn-soft: #fdf1e2;
  --c-err: #a8281c;     --c-err-soft: #fcebe9;
  --c-info: #2b5a86;    --c-info-soft: #e8f0f8;
  --c-focus: #1f5fbf;
  /* supplier badges: always text + color, never color alone */
  --c-youtop: #2b5a86;  --c-youtop-soft: #e8f0f8;
  --c-safilo: #6a3f86;  --c-safilo-soft: #f2eaf7;

  /* type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Consolas, monospace;
  --fs-xs: 0.8125rem;   /* 13 */
  --fs-sm: 0.875rem;    /* 14 */
  --fs-md: 1rem;        /* 16, base; never smaller in inputs (no iOS zoom) */
  --fs-lg: 1.25rem;     /* 20 */
  --fs-xl: 1.625rem;    /* 26 */
  --fs-2xl: 2rem;       /* 32 */
  --lh-tight: 1.25;
  --lh-base: 1.5;

  /* spacing: 8 px grid */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;

  /* shape */
  --r-sm: 4px; --r-md: 8px; --r-lg: 12px; --r-pill: 999px;
  --shadow-1: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-2: 0 6px 18px rgba(0,0,0,.12);

  /* layout and touch */
  --tap: 44px;           /* minimum touch target */
  --container: 1200px;
  --gutter: 16px;
  --photo-ratio: 4 / 3;  /* fixed proportion for every photo: no layout jump */
}
@media (min-width: 720px) { :root { --gutter: 24px; } }

@media (prefers-color-scheme: dark) {
  :root {
    --c-bg: #171513;
    --c-surface: #211f1c;
    --c-surface-alt: #2b2824;
    --c-border: #3d3934;
    --c-border-strong: #7b756d;
    --c-text: #ece8e3;
    --c-text-muted: #aaa49b;
    --c-accent: #d9a273;
    --c-accent-hover: #e8b78c;
    --c-on-accent: #1b1410;
    --c-accent-soft: #33291f;
    --c-ok: #6fcf97;   --c-ok-soft: #1c2d23;
    --c-warn: #f0b366; --c-warn-soft: #34281a;
    --c-err: #ff8c7e;  --c-err-soft: #3a1f1c;
    --c-info: #8fbbe8; --c-info-soft: #1b2a3a;
    --c-focus: #7fb2ff;
    --c-youtop: #8fbbe8; --c-youtop-soft: #1b2a3a;
    --c-safilo: #d2a8ec; --c-safilo-soft: #2d2036;
    --shadow-1: 0 1px 3px rgba(0,0,0,.5);
    --shadow-2: 0 6px 18px rgba(0,0,0,.6);
  }
}
