/* ---------- Tokens ---------- */
:root {
  --bg: #f3f1ec;
  --surface: #ffffff;
  --surface-2: #ebe8e1;
  --ink: #151413;
  --ink-2: #3b3935;
  --muted: #75716a;
  --line: #e0dcd3;
  --line-strong: #cfcac0;
  --accent: #ff4f00;
  --accent-soft: #ffe3d4;
  --cobalt: #3a5bd9;
  --cobalt-soft: #e2e8fb;
  --sage: #7f9a79;
  --sage-soft: #e1eadc;
  --sun: #ffc53d;
  --sun-soft: #fff0c4;
  --accent-ink: #ffffff;
  --ok: #2f7d4f;
  --warn: #b7791f;
  --danger: #c8372d;

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --shadow: 0 1px 2px rgba(20, 18, 15, .04), 0 8px 24px -8px rgba(20, 18, 15, .12);
  --shadow-lg: 0 24px 60px -12px rgba(20, 18, 15, .28);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1320px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; }
.eyebrow { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px;
  font-weight: 500; font-size: 14.5px; white-space: nowrap;
  background: var(--ink); color: var(--bg);
  transition: transform .15s var(--ease), background .2s, box-shadow .2s, opacity .2s;
}
.btn:hover { background: #000; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: #ea4800; }
.btn--cobalt { background: var(--cobalt); color: #fff; }
.btn--cobalt:hover { background: #2f4cc0; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--ghost:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--ink); }
.btn--sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn--block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
  transition: background .2s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; align-content: start; }
.field > label, .label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.hint { font-size: 12.5px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 120px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2375716a' stroke-width='1.6'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(21, 20, 19, .08); }

/* ---------- Placeholder when a product has no image ---------- */
.ph {
  background:
    repeating-linear-gradient(0deg, rgba(21, 20, 19, .07) 0 1px, transparent 1px 7px),
    var(--surface-2);
}

/* ---------- Toast ---------- */
.toast-stack { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 200; pointer-events: none; }
.toast {
  background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 999px;
  font-size: 14px; box-shadow: var(--shadow-lg); animation: toast-in .35s var(--ease);
}
.toast--error { background: var(--danger); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
