/* Shared design system — clean, monochrome, app-like base (Figtree, black buttons, white cards).
   Each restaurant adds its own logo and a small accent colour for highlights.
   The accent, text-on-accent colour and display font are set per restaurant by lib/theme.js. */

@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400; font-display: swap; src: url('../vendor/fonts/figtree-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 500; font-display: swap; src: url('../vendor/fonts/figtree-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 600; font-display: swap; src: url('../vendor/fonts/figtree-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 700; font-display: swap; src: url('../vendor/fonts/figtree-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 800; font-display: swap; src: url('../vendor/fonts/figtree-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 600; font-display: swap; src: url('../vendor/fonts/playfair-display-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 700; font-display: swap; src: url('../vendor/fonts/playfair-display-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: italic; font-weight: 600; font-display: swap; src: url('../vendor/fonts/playfair-display-latin-600-italic.woff2') format('woff2'); }

:root {
  /* Brand (overridden per restaurant at runtime) */
  --accent: #111111;
  --on-accent: #FFFFFF;
  --font-display: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Derived accent shades */
  --primary: var(--accent);
  --primary-hover: color-mix(in srgb, var(--accent) 86%, #000);
  --primary-soft: color-mix(in srgb, var(--accent) 9%, #fff);
  --primary-ink: color-mix(in srgb, var(--accent) 72%, #000);
  --primary-ring: color-mix(in srgb, var(--accent) 22%, transparent);

  /* Neutrals */
  --ink: #000000;
  --ink-2: #33373D;
  --muted: #6A6A6A;
  --muted-2: #9A9A9A;
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F5F5F5;
  --surface-3: #EDEDED;
  --line: #E7ECED;
  --line-2: #F1F3F4;

  /* Semantic */
  --leaf: #1E8E3E;
  --gold: #D99A2B;
  --success: #1F7A46;
  --success-soft: #E6F4EA;
  --warning: #9A5B00;
  --warning-soft: #FFF4DE;
  --danger: #C0392B;
  --danger-soft: #FBE9E7;
  --info: #2563A8;
  --info-soft: #E8F0FA;

  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 12px;
  --r-full: 999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .12);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, .14);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --container: 1240px;
  --btn-radius: 6px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); font-size: 15px; line-height: 1.55; color: var(--ink-2); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: -.01em; color: var(--ink); }
h1, h2, .display { font-family: var(--font-display); font-weight: 700; }
h3, h4 { font-weight: 700; }
html[data-font="editorial"] h1, html[data-font="editorial"] h2 { letter-spacing: -.015em; }
html[data-font="modern"] h1, html[data-font="modern"] h2, html[data-font="modern"] .display { letter-spacing: -.025em; font-weight: 800; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--primary-ring); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--primary-soft); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); font-weight: 700; }
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stack { display: grid; gap: 16px; }
.grow { flex: 1; }
.hidden { display: none !important; }
.kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
.divider { height: 1px; background: var(--line); border: 0; margin: 20px 0; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

/* ---------- Brand mark ---------- */
.brand-img { object-fit: contain; border-radius: 4px; border: 1px solid var(--line); background: #fff; padding: 2px; }
.brand-mono { display: inline-grid; place-items: center; border-radius: 6px; background: var(--primary); color: var(--on-accent); font-family: var(--font-display); font-weight: 700; line-height: 1; flex: none; }
.brand-mono.light { background: #fff; color: var(--ink); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 22px; border-radius: var(--btn-radius); border: 1px solid transparent; font-weight: 700; font-size: 14px; line-height: 1.2; letter-spacing: .02em; white-space: nowrap; transition: background .18s var(--ease), color .18s, border-color .18s, transform .18s var(--ease), box-shadow .18s; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary, .btn-dark { background: #000; color: #fff; text-transform: uppercase; }
.btn-primary:hover:not([disabled]), .btn-dark:hover:not([disabled]) { background: #262626; }
.btn-outline { background: #fff; border-color: var(--line); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-outline:hover:not([disabled]) { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover:not([disabled]) { background: var(--surface-2); }
.btn-soft { background: #fff; color: #000; border-color: var(--line); box-shadow: var(--shadow-sm); text-transform: uppercase; }
.btn-soft:hover:not([disabled]) { border-color: #000; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { min-height: 36px; padding: 6px 16px; font-size: 13px; }
.btn-lg { min-height: 50px; padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; min-height: 44px; padding: 0; border-radius: 50%; }
.btn-icon.btn-sm { width: 36px; min-height: 36px; }
.link { color: var(--ink); font-weight: 700; background: none; border: 0; padding: 0; }
.link:hover { text-decoration: underline; }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; align-content: start; }
.field > span, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field small, .hint { font-size: 12.5px; color: var(--muted); }
.input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea, .select {
  width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 90px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus, .select:focus { outline: none; border-color: #000; box-shadow: 0 0 0 3px rgba(0, 0, 0, .08); }
.field input[disabled] { background: var(--surface-2); color: var(--muted); }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.input-group { position: relative; }
.input-group > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.input-group > input { padding-left: 42px !important; }
.input-group > .input-action { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 14px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch i { width: 44px; height: 26px; border-radius: 99px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease); }
.switch input:checked + i { background: #000; }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 3px solid var(--primary-ring); outline-offset: 2px; }

.choice-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice > span { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); transition: border-color .15s, background .15s; height: 100%; }
.choice > span i { font-size: 22px; color: var(--ink); }
.choice b { display: block; font-size: 15px; }
.choice small { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; }
.choice input:checked + span { border-color: #000; background: #fff; box-shadow: inset 0 0 0 1px #000; }
.choice input:focus-visible + span { outline: 3px solid var(--primary-ring); }
.choice input:disabled + span { opacity: .5; cursor: not-allowed; }

/* ---------- Cards, badges, misc ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.card-tight { padding: 16px; }
.card h2, .card h3 { margin-top: 0; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--r-full); font-size: 12.5px; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-primary { background: var(--primary-soft); color: var(--primary-ink); }
.badge-muted { background: var(--surface-2); color: var(--muted); }
.badge-dark { background: var(--ink); color: #fff; }
.veg-mark { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1.5px solid var(--leaf); border-radius: 3px; flex: none; }
.veg-mark::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--leaf); }
.veg-mark.non-veg { border-color: #9B2C1F; }
.veg-mark.non-veg::after { background: #9B2C1F; border-radius: 0; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 7px solid #9B2C1F; background: none; }
.spice { color: #D6361C; font-size: 12px; letter-spacing: -1px; white-space: nowrap; }
.spice-0 { color: var(--muted); letter-spacing: 0; font-weight: 600; }
.stars { color: var(--gold); letter-spacing: 1px; white-space: nowrap; }
.empty { text-align: center; padding: 56px 20px; }
.empty .empty-icon { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; background: var(--surface-2); color: var(--ink); }
.empty h2, .empty h3 { margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto 20px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--line-2) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-md); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); font-size: 14px; }
.alert > i { font-size: 18px; margin-top: 1px; }
.alert-info { background: var(--info-soft); color: #134471; }
.alert-warning { background: var(--warning-soft); color: #7A4800; }
.alert-danger { background: var(--danger-soft); color: #8A1C27; }
.alert-success { background: var(--success-soft); color: #175233; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td small { display: block; color: var(--muted); font-size: 12.5px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--primary); color: var(--on-accent); font-weight: 700; font-size: 15px; flex: none; }
.avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--btn-radius); background: var(--surface); }
.qty button { width: 36px; height: 36px; border: 0; background: none; font-size: 18px; font-weight: 700; color: var(--ink-2); border-radius: 10px; display: grid; place-items: center; }
.qty button:hover { background: var(--surface-2); }
.qty output, .qty span { min-width: 28px; text-align: center; font-weight: 700; }

/* ---------- Colour swatches ---------- */
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches label { cursor: pointer; position: relative; }
.swatches input { position: absolute; opacity: 0; }
.swatches span:not(.sr-only) { display: block; width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.swatches input:checked + span { box-shadow: 0 0 0 3px var(--ink); }
.swatches input:focus-visible + span { outline: 3px solid var(--primary-ring); }

/* ---------- Toasts & dialogs ---------- */
#toasts { position: fixed; z-index: 2000; top: 16px; right: 16px; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 14px 14px 14px 16px; border-radius: var(--r-md); background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 600; opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s var(--ease); }
.toast.show { opacity: 1; transform: none; }
.toast span { flex: 1; }
.toast i { font-size: 18px; margin-top: 1px; }
.toast-success i { color: #7EE2A8; }
.toast-error { background: #7F1D1D; }
.toast-error i { color: #FCA5A5; }
.toast-info i { color: #93C5FD; }
.toast button { background: none; border: 0; color: rgba(255,255,255,.7); font-size: 20px; line-height: 1; padding: 0 2px; }
dialog.modal { border: 0; padding: 0; background: transparent; max-width: min(460px, calc(100vw - 32px)); width: 100%; }
dialog.modal::backdrop { background: rgba(23, 20, 15, .5); backdrop-filter: blur(2px); }
.modal-card { background: var(--surface); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-lg); display: grid; gap: 14px; }
.modal-card h2 { font-size: 22px; margin: 0; }
.modal-card p { margin: 0; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 6px; }

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