/* ishtari — design tokens and base components (spec §10, look of docs/superpowers/specs/2026-11-30-ishtari-preview.html).
   Red from the logo, ink text, warm page; yellow only for offers, WhatsApp green only for sending. */
:root {
  color-scheme: light;
  --red: #C90E2D;
  --red-d: #9E0B23;
  --red-t: #FBECEE;
  --ink: #1C1416;
  --ink-2: #3A3033;
  --muted: #6E6266;
  --bg: #FAF7F5;
  --card: #FFFFFF;
  --white: #FFFFFF;
  --line: #ECE6E3;
  --sand: #F3EDEA;
  --sun: #FFC93C;
  --sun-t: #FFF5D9;
  --wa: #25D366;
  --wa-d: #1DA851;
  --foot: #140E10;

  --font-head: 'Rubik', 'Noto Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --font: 'Noto Sans Arabic', 'Rubik', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --ring: 0 0 0 1px var(--line);
  --shadow: 0 18px 30px -18px rgba(120, 10, 30, .35), 0 0 0 1px var(--line);
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Names the admin stylesheet uses. */
  --navy: var(--ink);
  --navy-deep: var(--ink);
  --navy-soft: var(--sand);
  --red-soft: var(--red-t);
  --mist: var(--sand);
  --radius: var(--r-md);
  --radius-sm: var(--r-sm);
  --shadow-sm: var(--ring);
  --font-display: var(--font-head);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6;
  color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; margin: 0; }
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(201, 14, 45, .45); outline-offset: 2px; border-radius: 6px; }
.icon { flex: none; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

/* The logo's cart mark, drawn in any colour (currentColor). */
.mark { display: inline-block; aspect-ratio: 606 / 386; background: currentColor;
  -webkit-mask: url(/assets/img/mark.png) center / contain no-repeat; mask: url(/assets/img/mark.png) center / contain no-repeat; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--red); text-decoration: none; }
.logo .mark { width: 46px; }
.logo b { font-family: 'Rubik', sans-serif; font-weight: 800; font-size: 25px; letter-spacing: -.5px; color: var(--ink); direction: ltr; }
.logo b em { font-style: normal; color: var(--red); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 12px 22px; border: 0; border-radius: 999px;
  font-family: var(--font-head); font-weight: 600; font-size: 15.5px; text-decoration: none; white-space: nowrap;
  background: var(--card); color: var(--ink); box-shadow: var(--ring);
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), box-shadow .2s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary, .btn-red { background: var(--red); color: #fff; box-shadow: none; }
.btn-primary:hover:not(:disabled), .btn-red:hover:not(:disabled) { background: var(--red-d); }
.btn-ink { background: var(--ink); color: #fff; box-shadow: none; }
.btn-white { background: #fff; color: var(--red); box-shadow: none; }
.btn-ghost-light { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .75); }
.btn-outline { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-outline:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--red); color: var(--red); }
.btn-ghost { background: transparent; box-shadow: none; }
.btn-ghost:hover:not(:disabled) { background: var(--sand); }
.btn-danger { background: var(--red-t); color: var(--red); box-shadow: none; }
.btn-wa { background: var(--wa); color: #0B2E17; box-shadow: none; }
.btn-wa:hover:not(:disabled) { background: var(--wa-d); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { min-height: 52px; padding: 14px 26px; font-size: 16.5px; }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.btn .icon { width: 18px; height: 18px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--sand); color: var(--ink); text-decoration: none; position: relative;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.icon-btn:hover { background: var(--red-t); color: var(--red); }

/* Form fields */
.field { display: grid; gap: 6px; }
.label { font-size: 14px; font-weight: 600; color: var(--ink); }
.hint { font-size: 13px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 96px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #9C9295; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px var(--red-t); }
.input[aria-invalid="true"] { border-color: var(--red); }
.form-error { min-height: 1.2em; margin: 0; color: var(--red); font-size: 14px; font-weight: 500; }

.card { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--ring); }

/* Chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 16px;
  border: 0; border-radius: 999px; background: var(--card); color: var(--ink-2); box-shadow: var(--ring);
  font-size: 14px; font-weight: 600; transition: background .2s, color .2s;
}
.chip:hover { color: var(--red); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--red); color: #fff; box-shadow: none; }
.chip:disabled { opacity: .45; cursor: not-allowed; }

/* Switch */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 14px; min-height: 44px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 42px; height: 26px; border-radius: 999px; background: #D8CDC9; transition: background .2s var(--ease); flex: none; }
.switch-track::after {
  content: ''; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s var(--ease);
}
.switch input:checked + .switch-track { background: var(--red); }
.switch input:checked + .switch-track::after { transform: translateX(-16px); }
.switch input:focus-visible + .switch-track { outline: 3px solid rgba(201, 14, 45, .45); outline-offset: 2px; }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; font-family: var(--font-head); font-size: 12.5px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.badge-sale { background: var(--sun); color: var(--ink); }
.badge-new { background: var(--ink); color: #fff; }
.badge-out { background: #E9E3E0; color: var(--ink-2); }
.badge-muted { background: var(--sand); color: var(--muted); }
.badge-ok { background: #E7F0FF; color: #1F4FBF; }

.price-now { font-family: 'Rubik', sans-serif; font-weight: 800; color: var(--ink); }
.price-sale { color: var(--red); }
.price-old { color: var(--muted); text-decoration: line-through; font-size: .85em; font-weight: 400; font-family: 'Rubik', sans-serif; }

/* Toasts */
.toasts {
  position: fixed; inset-inline: 0; bottom: calc(88px + env(safe-area-inset-bottom));
  display: grid; justify-items: center; gap: 8px; padding: 0 16px; pointer-events: none; z-index: 100;
}
.toast { max-width: 420px; padding: 12px 18px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 15px; box-shadow: 0 12px 24px -10px rgba(0, 0, 0, .4); animation: toast-in .25s var(--ease); }
.toast.is-error { background: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.spinner { width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--red); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot { display: grid; place-items: center; min-height: 40vh; }

.empty { padding: 40px 16px; text-align: center; color: var(--muted); display: grid; justify-items: center; gap: 10px; }
.empty h1, .empty h2 { color: var(--ink); font-size: 22px; }

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