/* Cursed Store — shared design tokens & primitives (menu + admin). */
:root {
  --bg: #0b0b0c;
  --surface: #131314;
  --surface-2: #1a1a1c;
  --surface-3: #232326;
  --line: #262629;
  --line-strong: #37373c;
  --ink: #f2efe9;
  --ink-2: #c4c0b8;
  --muted: #8b8780;
  --faint: #5d5a55;
  --accent: #d9472c;
  --accent-hover: #ea5636;
  --gold: #d3bb84;
  --gold-soft: rgba(211, 187, 132, 0.14);
  --accent-soft: rgba(217, 71, 44, 0.14);
  --ok: #3fbf86;
  --ok-soft: rgba(63, 191, 134, 0.14);
  --warn: #e7a83c;

  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', var(--font-body);
  --font-gothic: 'Grenze Gotisch', 'Old English Text MT', serif;

  --r-lg: 20px;
  --r: 14px;
  --r-sm: 10px;
  --gutter: 16px;
  --maxw: 1200px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent); color: #fff; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.eyebrow {
  margin: 0;
  font: 600 11px/1.2 var(--font-display);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}
.gothic { font-family: var(--font-gothic); font-weight: 400; letter-spacing: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface-2); color: var(--ink);
  font: 600 14px/1 var(--font-display); letter-spacing: .01em;
  text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s, opacity .15s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--ghost { background: transparent; border-color: transparent; }
.btn--ghost:hover { background: var(--surface-2); }
.btn--danger { color: #ff6b63; }
.btn--sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn svg { width: 18px; height: 18px; flex: none; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; flex: none;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  transition: background .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line-strong); }
.icon-btn svg { width: 18px; height: 18px; }

/* Switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track {
  position: relative; width: 40px; height: 24px; flex: none;
  border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-strong);
  transition: background .2s, border-color .2s;
}
.switch__track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--ink-2); transition: transform .2s var(--ease), background .2s;
}
.switch input:checked + .switch__track { background: var(--ok); border-color: var(--ok); }
.switch input:checked + .switch__track::after { transform: translateX(16px); background: #fff; }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch__label { font-size: 13px; color: var(--ink-2); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
  border-radius: 999px;
  font: 700 10px/1 var(--font-display); letter-spacing: .12em; text-transform: uppercase;
  background: var(--ink); color: var(--bg);
}
.badge--new { background: var(--accent); color: #fff; }
.badge--limited { background: var(--gold); color: #0b0b0c; }
.badge--bestseller { background: #1c1c1e; color: var(--ink); border: 1px solid #3a3a3f; }
.badge--soldout { background: rgba(11, 11, 12, .82); color: var(--ink); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(6px); }

/* Toast */
.toasts {
  position: fixed; left: 50%; bottom: calc(20px + var(--safe-b)); transform: translateX(-50%);
  display: grid; gap: 8px; z-index: 100; width: min(92vw, 420px); pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: var(--r);
  background: #f2efe9; color: #0b0b0c;
  font: 500 14px/1.35 var(--font-body);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
  animation: toast-in .3s var(--ease);
  pointer-events: auto;
}
.toast--error { background: var(--accent); color: #fff; }
.toast__action { margin-left: auto; background: none; border: 0; font-weight: 700; color: inherit; text-decoration: underline; padding: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }

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