/* "Ember-lit street sign": matte black ground, cream lettering, one ember-orange accent. */
:root {
  --background: #0d0b0a;
  --foreground: #f4e8d4;
  --surface: #161311;
  --card: #1b1715;
  --muted: #231e1b;
  --muted-foreground: #ad9e8a;
  --primary: #f28a26;
  --primary-foreground: #1c0f03;
  --secondary: #2a2420;
  --accent-red: #a8321f;
  --error: #e5604c;
  --border: #322b26;
  --ember-glow: rgba(242, 138, 38, 0.28);
  --hairline: rgba(244, 232, 212, 0.14);
  --font-base: "Rubik", system-ui, sans-serif;
  --font-display: "Secular One", "Lalezar", "Rubik", sans-serif;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-base);
  -webkit-tap-highlight-color: transparent;
}

button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid rgba(242, 138, 38, 0.6); outline-offset: 2px; }

/* Buttons */
.pill, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 9999px;
  background: var(--secondary);
  color: var(--foreground);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 120ms, color 120ms;
}
.btn { border-radius: var(--radius); font-weight: 500; }
.pill.active, .btn.primary { background: var(--primary); color: var(--primary-foreground); }
.btn.ghost { background: transparent; }
.btn.outline { background: transparent; border-color: var(--border); }
.btn.danger { background: var(--error); color: #1f0a06; }
.btn.icon { width: 40px; padding: 0; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Hero */
.hero {
  position: relative;
  min-height: min(80vh, 660px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}
.hero-photo, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-photo { object-fit: cover; object-position: center 40%; }
.hero-shade {
  background:
    radial-gradient(ellipse 90% 35% at 50% 100%, var(--ember-glow), transparent 70%),
    linear-gradient(to bottom, rgba(13, 11, 10, 0.3) 0%, rgba(13, 11, 10, 0.55) 40%, var(--background) 94%);
}
.lang-switch {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 9999px;
  background: rgba(13, 11, 10, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid var(--hairline);
}
.lang-switch .pill { background: transparent; font-family: var(--font-display); font-size: 1rem; }
.lang-switch .pill.active { background: var(--primary); }
.hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 80px 16px 32px;
  text-align: center;
}
.logo {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--hairline), 0 0 48px var(--ember-glow), var(--shadow-lg);
}
.title {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 12vw, 4.25rem);
  line-height: 1.05;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.65);
}
.tagline { margin: 0; font-family: var(--font-display); font-size: 1.2rem; color: var(--primary); }
.hours-chip {
  margin: 12px 0 0;
  padding: 8px 16px;
  border-radius: 9999px;
  border: 1px solid var(--hairline);
  background: rgba(13, 11, 10, 0.6);
  font-size: 0.95rem;
}

/* Sticky category tabs */
.tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(13, 11, 10, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.tabs-inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px;
  scrollbar-width: none;
}
.tab { flex: none; min-height: 44px; padding: 0 18px; font-family: var(--font-display); font-size: 1.05rem; }

/* Menu sections */
.main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }
.status { text-align: center; color: var(--muted-foreground); }
.status.error { color: var(--error); }
.section { scroll-margin-top: 80px; margin-bottom: 48px; }
.section-title {
  position: relative;
  margin: 0 0 16px;
  padding-bottom: 8px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2rem;
  line-height: 1.1;
}
.section-title::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: var(--primary);
}
.section-note { margin: -8px 0 16px; color: var(--muted-foreground); font-size: 0.95rem; line-height: 1.5; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.image-wrap { aspect-ratio: 1; display: grid; place-items: center; background: var(--muted); }
.image { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-placeholder { width: 45%; border-radius: 50%; opacity: 0.3; }
.card-body { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 12px; }
.dish-name { margin: 0; font-size: 1.05rem; font-weight: 600; line-height: 1.3; }
.dish-description {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.85rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.price-solo {
  margin: auto 0 0;
  padding-top: 8px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.options { list-style: none; margin: auto 0 0; padding: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}
.option-label { font-size: 0.85rem; }
.option-price { font-family: var(--font-display); font-size: 1.15rem; color: var(--primary); white-space: nowrap; }

/* Footer */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 16px 32px;
  text-align: center;
  border-top: 1px solid var(--border);
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(242, 138, 38, 0.1), transparent 70%), var(--surface);
}
.footer-logo { width: 76px; height: 76px; border-radius: 50%; box-shadow: 0 0 0 1px var(--hairline); }
.footer-name { margin: 0; font-family: var(--font-display); font-size: 1.6rem; }
.footer-actions { display: grid; gap: 12px; width: 100%; max-width: 420px; }
.big-button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 0 20px;
  border-radius: var(--radius);
  background: var(--secondary);
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
}
.big-button.primary { background: var(--primary); color: var(--primary-foreground); }
.footer-phone { margin-inline-start: auto; font-family: var(--font-display); }
.footer-hours { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted-foreground); }
.footer-hours strong { color: var(--foreground); font-size: 1.1rem; font-weight: 600; }
.footer-small { margin: 0; font-size: 0.8rem; color: var(--muted-foreground); }

/* ---------- Admin ---------- */
.admin-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  max-width: 860px;
  margin: 0 auto;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.admin-logo { width: 52px; height: 52px; border-radius: 50%; }
.admin-title { flex: 1; min-width: 140px; }
.admin-title p { margin: 0; font-size: 0.85rem; color: var(--muted-foreground); }
.admin-title h1 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; line-height: 1.1; }
.admin-links { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-main { max-width: 860px; margin: 0 auto; padding: 16px 16px 64px; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; }
.tip { margin: 0 0 16px; font-size: 0.85rem; color: var(--muted-foreground); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.toolbar .tip { margin: 0; }

.panel { max-width: 420px; margin: 48px auto; display: grid; gap: 16px; }
.panel h2 { margin: 0; font-family: var(--font-display); font-weight: 400; }

.category {
  margin-bottom: 24px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.category-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.category-header h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; }
.ar-name { margin: 0; font-size: 0.85rem; color: var(--muted-foreground); }
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.row.hidden-item { opacity: 0.5; }
.row.sortable-ghost { opacity: 0.3; outline: 2px dashed var(--primary); }
.grip { flex: none; width: 36px; height: 40px; border: 0; background: none; color: var(--muted-foreground); cursor: grab; touch-action: none; font-size: 1.2rem; }
.thumb { flex: none; width: 48px; height: 48px; border-radius: var(--radius-sm); background: var(--muted); object-fit: cover; }
.row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-prices { font-size: 0.85rem; color: var(--primary); }
.row-actions { flex: none; display: flex; align-items: center; gap: 4px; }

/* On/off switch built from a checkbox */
.switch { appearance: none; position: relative; width: 44px; height: 26px; margin: 0; border-radius: 9999px; background: var(--muted); cursor: pointer; transition: background 200ms; direction: ltr; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--foreground); transition: transform 200ms; }
.switch:checked { background: var(--primary); }
.switch:checked::after { transform: translateX(18px); background: var(--primary-foreground); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 0.9rem; font-weight: 600; }
.hint { font-size: 0.8rem; color: var(--muted-foreground); }
.input {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--background);
}
textarea.input { min-height: 64px; resize: vertical; }
.pair { display: grid; gap: 12px; }
@media (min-width: 560px) { .pair { grid-template-columns: 1fr 1fr; } }
.form-grid { display: grid; gap: 16px; max-width: 520px; }
.error-text { margin: 0; color: var(--error); font-size: 0.9rem; }

dialog.modal {
  width: min(640px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--foreground);
  box-shadow: var(--shadow-lg);
}
dialog.modal::backdrop { background: rgba(0, 0, 0, 0.65); }
dialog.modal h2 { margin: 0 0 16px; font-family: var(--font-display); font-weight: 400; }
.modal-body { display: grid; gap: 16px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.image-row { display: flex; align-items: center; gap: 16px; }
.image-box { width: 96px; height: 96px; flex: none; border-radius: var(--radius); background: var(--muted); object-fit: cover; border: 1px solid var(--border); }
.price-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.price-bottom { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.price-bottom .input { max-width: 140px; }
.check-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  padding: 12px 20px;
  border-radius: var(--radius);
  background: var(--foreground);
  color: var(--background);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
}
.toast.error { background: var(--error); }

/* ---------- Printable QR ---------- */
.qr-page { padding: 16px; }
.qr-toolbar, .qr-url { max-width: 560px; margin: 0 auto 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.qr-url { font-size: 0.85rem; color: var(--muted-foreground); word-break: break-all; }
.sheet {
  max-width: 560px;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #fffaf2;
  color: #15110e;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.sheet .logo { width: 140px; height: 140px; box-shadow: none; }
.sheet h1 { margin: 12px 0 0; font-family: var(--font-display); font-weight: 400; font-size: 2.6rem; line-height: 1.1; }
.sheet .name-ar { margin: 0; font-family: var(--font-display); font-size: 1.6rem; color: var(--accent-red); }
.qr-box { width: min(340px, 80vw); aspect-ratio: 1; margin: 24px 0 16px; padding: 8px; border: 3px solid var(--primary); border-radius: var(--radius-lg); background: #fff; }
.qr-box img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.scan { margin: 0; font-family: var(--font-display); font-size: 1.8rem; }
.scan-ar { margin: 0; font-family: var(--font-display); font-size: 1.5rem; }
@media print {
  .qr-page { padding: 0; }
  body { background: #fff; }
  .qr-toolbar, .qr-url { display: none; }
  .sheet { max-width: none; box-shadow: none; border-radius: 0; }
}
