/* Falcon Menu QR — premium guest-facing menu */
:root {
  --accent: #0f766e;
  --accent-soft: #14b8a6;
  --bg: #faf8f5;
  --bg-alt: #f5f0e8;
  --card: #ffffff;
  --card-hover: #fefefe;
  --ink: #1c1917;
  --ink-soft: #44403c;
  --muted: #78716c;
  --muted-light: #a8a29e;
  --line: #e7e5e4;
  --line-soft: #f0ebe3;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.04);
  --shadow: 0 4px 12px -2px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.04);
  --shadow-lg: 0 20px 40px -12px rgb(0 0 0 / 0.15), 0 8px 16px -8px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 24px 48px -16px rgb(0 0 0 / 0.2), 0 12px 24px -12px rgb(0 0 0 / 0.15);
  --radius: 16px;
  --radius-lg: 24px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}
:root:is([data-theme="dark"], [data-theme="charcoal-gold"], [data-theme="navy-cyan"], [data-theme="forest-lime"], [data-theme="burgundy-coral"], [data-theme="plum-lavender"]) {
  color-scheme: dark;
  --accent: #5eead4;
  --bg: #101418;
  --card: #1a2027;
  --bg-alt: color-mix(in srgb, var(--bg) 75%, var(--card));
  --card-hover: color-mix(in srgb, var(--card) 94%, var(--accent));
  --ink: #fff9ef;
  --ink-soft: #e4dce1;
  --muted: #bfb7c0;
  --muted-light: #aaa2ad;
  --line: color-mix(in srgb, var(--card) 78%, var(--ink));
  --line-soft: color-mix(in srgb, var(--card) 91%, var(--ink));
}
:root[data-theme="charcoal-gold"] { --bg: #17140f; --card: #272119; --accent: #f9cb63; }
:root[data-theme="navy-cyan"] { --bg: #0b1729; --card: #13243b; --accent: #67e8f9; }
:root[data-theme="forest-lime"] { --bg: #101e17; --card: #1b2e22; --accent: #bef264; }
:root[data-theme="burgundy-coral"] { --bg: #240f19; --card: #381a28; --accent: #ff9b8d; }
:root[data-theme="plum-lavender"] { --bg: #1c112b; --card: #2b1c3e; --accent: #d8b4fe; }
:root:is([data-theme="charcoal-gold"], [data-theme="navy-cyan"], [data-theme="forest-lime"], [data-theme="burgundy-coral"], [data-theme="plum-lavender"]) {
  --accent-soft: color-mix(in srgb, var(--accent) 82%, white);
}
:root:is([data-theme="charcoal-gold"], [data-theme="navy-cyan"], [data-theme="forest-lime"], [data-theme="burgundy-coral"], [data-theme="plum-lavender"]) :is(.chip.active, .error a:hover) { color: var(--bg); }
html[lang="ar"] { --font-display: 'Cairo', var(--font-body); --font-body: 'Cairo', system-ui, sans-serif; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { margin: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  padding-bottom: env(safe-area-inset-bottom);
  scroll-behavior: smooth;
}
html[dir="rtl"] .hero-meta { text-align: right; }
html[dir="rtl"] .chips { direction: rtl; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 65%, white); outline-offset: 3px; }

/* ---- loading ---- */
.loading {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- error ---- */
.error {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 20px;
  text-align: center;
}
.error h2 { font-family: var(--font-display); font-size: 28px; font-weight: 600; color: var(--ink); }
.error p { color: var(--muted); font-size: 15px; max-width: 400px; }
.error a { color: var(--accent); font-weight: 600; text-decoration: none; font-size: 14px; padding: 10px 20px; border: 1.5px solid var(--accent); border-radius: 999px; transition: all 0.2s; }
.error a:hover { background: var(--accent); color: white; }

/* ---- hero ---- */
.hero {
  position: relative;
  background: color-mix(in srgb, var(--accent) 48%, #211936);
  color: #fff;
  padding: 45px 20px 36px;
  overflow: hidden;
  isolation: isolate;
}
.hero-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero:has(.hero-cover:not([hidden]))::before {
  background: linear-gradient(90deg, rgb(15 10 22 / 82%), rgb(15 10 22 / 62%));
  opacity: 1;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.4;
  z-index: 0;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -40%;
  right: -20%;
  width: 60%;
  height: 120%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }
.brand { display: flex; gap: 18px; align-items: center; margin-bottom: 24px; }
.logo {
  width: 72px; height: 72px; flex: 0 0 72px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.3);
}
.logo img { width: 100%; height: 100%; object-fit: contain; }
.logo .mono {
  font-family: var(--font-display); font-size: 32px; font-weight: 700;
  letter-spacing: 0.5px; color: white;
}
.brand-text h1 {
  font-family: var(--font-display); font-size: 32px; line-height: 1.15;
  margin: 0 0 6px; font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.tagline { margin: 0; opacity: 0.92; font-size: 15px; font-weight: 500; line-height: 1.5; }
.hero-meta { margin-top: 24px; display: grid; gap: 8px; font-size: 14px; opacity: 0.94; font-weight: 500; }
.meta-row { display: flex; gap: 10px; align-items: center; }
.meta-row svg { flex: 0 0 auto; opacity: 0.9; }
.meta-row a { color: white; text-decoration: none; opacity: 0.9; font-weight: 600; }
.meta-row a:hover { opacity: 1; text-decoration: underline; }

/* ---- toolbar ---- */
.toolbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  padding: 14px max(20px, calc((100% - 600px) / 2));
  display: flex; gap: 12px; align-items: center;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.toolbar .search { flex: 1; position: relative; }
.toolbar .search::before {
  content: '🔍';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.4;
  pointer-events: none;
}
html[dir="rtl"] .toolbar .search::before { left: auto; right: 14px; }
.toolbar input {
  width: 100%;
  border: 1.5px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 11px 18px 11px 40px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}
html[dir="rtl"] .toolbar input { padding: 11px 40px 11px 18px; }
.toolbar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent), var(--shadow-sm);
}
.lang { display: flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); box-shadow: var(--shadow-sm); }
.lang button {
  border: 0; background: transparent;
  padding: 9px 16px; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--muted); cursor: pointer; transition: all 0.2s;
}
.lang button:hover { color: var(--ink); background: var(--bg-alt); }
.lang button.on {
  background: var(--accent); color: #fff;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* ---- chips ---- */
.chips {
  display: flex; gap: 8px;
  overflow-x: auto; overflow-y: hidden;
  padding: 16px 20px;
  max-width: 640px;
  margin-inline: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border: 1.5px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 9px 18px;
  font: inherit; font-size: 13.5px; font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.chip:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); }
.chip.on {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--accent) 60%, transparent);
}

/* ---- sections & items ---- */
.sections { max-width: 640px; margin: 0 auto; padding: 6px 20px 48px; }
.menu-section { scroll-margin-top: 140px; animation: fadeInUp 0.5s ease; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.menu-section h2 {
  font-family: var(--font-display); font-size: 24px;
  margin: 28px 0 14px; display: flex; align-items: center; gap: 12px;
  color: var(--ink); font-weight: 700;
  position: sticky; top: 110px; z-index: 5;
  background: linear-gradient(to bottom, var(--bg) 60%, transparent);
  padding: 8px 0;
}
.menu-section h2 .count {
  font-family: var(--font-body); font-size: 11px; font-weight: 700;
  color: var(--muted); background: var(--card);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 12px; box-shadow: var(--shadow-sm);
}
html[dir="rtl"] .menu-section h2 { direction: rtl; }
.items { display: grid; gap: 10px; }
.item {
  display: flex; gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, color-mix(in srgb, var(--accent) 5%, transparent));
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}
.item:hover::before { opacity: 1; }
.item .thumb {
  width: 80px; height: 80px; flex: 0 0 80px;
  border-radius: 14px; overflow: hidden;
  background: linear-gradient(135deg, var(--bg-alt) 0%, var(--line-soft) 100%);
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
}
.item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.item .thumb .ph {
  font-size: 28px; font-weight: 700; opacity: 0.5;
  font-family: var(--font-display);
}
.item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.item-line { display: flex; gap: 10px; align-items: baseline; }
.item-line .name { font-weight: 600; font-size: 15.5px; line-height: 1.35; }
.item-line .dots { flex: 1; border-bottom: 1px dotted var(--line); transform: translateY(-3px); min-width: 8px; }
.item-line .price {
  font-weight: 700; font-size: 15px; white-space: nowrap;
  color: var(--accent);
}
.item-line .price small { font-weight: 500; color: var(--muted); font-size: 11px; margin-left: 4px; }
.item .desc { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin-top: 2px; }
.item .note { color: var(--accent); font-size: 12px; font-weight: 600; margin-top: 2px; }
.badges { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.3px;
  padding: 4px 10px; border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.badge.veg { background: #dcfce7; color: #166534; }
.badge.nv { background: #fee2e2; color: #991b1b; }
.badge.spice { background: #ffedd5; color: #9a3412; }
.badge.spice-2 { background: #fee2e2; color: #991b1b; }
.badge.popular { background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%); color: #78350f; }
.item.unavailable { opacity: 0.55; }
.item.unavailable .name { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.item.unavailable::after {
  content: 'SOLD OUT';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  background: #991b1b; color: white;
  padding: 6px 18px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 1px;
  box-shadow: var(--shadow-lg);
  z-index: 2;
}
.none {
  color: var(--muted); font-size: 14px; padding: 28px 4px;
  text-align: center; font-style: italic;
}

/* ---- footer ---- */
.foot {
  position: sticky; bottom: 0;
  background: rgba(250, 248, 245, 0.9);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--line);
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: 0 -4px 20px -8px rgba(0,0,0,0.08);
}
.foot-note { margin: 0; font-size: 12px; color: var(--muted); font-weight: 500; }
.wa {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 14.5px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #fff; padding: 13px 24px; border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 8px 20px -6px rgba(37, 211, 102, 0.6);
  transition: all 0.2s;
}
.wa:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -6px rgba(37, 211, 102, 0.7); }
.wa:active { transform: scale(0.98); }
.wa svg { flex: 0 0 auto; }

/* ---- draft banner ---- */
.draft-banner {
  text-align: center; padding: 10px 16px;
  font-size: 13px; font-weight: 600;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border-bottom: 1px solid #fcd34d;
}

/* ---- responsive ---- */
@media (max-width: 640px) {
  .hero { padding: 40px 16px 36px; }
  .hero::after { display: none; }
  .brand { gap: 14px; }
  .logo { width: 60px; height: 60px; flex: 0 0 60px; border-radius: 16px; }
  .logo .mono { font-size: 26px; }
  .brand-text h1 { font-size: 26px; }
  .tagline { font-size: 14px; }
  .toolbar { padding: 10px 14px; gap: 10px; }
  .chips { padding: 12px 14px; gap: 6px; }
  .chip { padding: 8px 14px; font-size: 13px; }
  .sections { padding: 4px 14px 40px; }
  .menu-section h2 { font-size: 21px; margin: 22px 0 12px; }
  .item { padding: 12px; gap: 12px; border-radius: var(--radius); }
  .item .thumb { width: 68px; height: 68px; flex: 0 0 68px; border-radius: 12px; }
  .item-line .name { font-size: 14.5px; }
  .item-line .price { font-size: 14px; }
  .item .desc { font-size: 12.5px; }
}

/* ---- mobile: two-column product grid (image on top of each card) ---- */
@media (max-width: 640px) {
  .items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .item { flex-direction: column; align-items: stretch; }
  .item .thumb {
    width: 100%; height: auto; flex: none;
    aspect-ratio: 16 / 10; border-radius: 12px;
  }
  .item .thumb .ph { font-size: 24px; }
  .item-body { gap: 5px; }
  .item-line { gap: 4px 8px; }
  .badges { margin-top: 5px; }
  .item.unavailable::after { top: 30%; }
}

@media (min-width: 768px) {
  .menu-section h2 { font-size: 26px; }
  .item .thumb { width: 88px; height: 88px; flex: 0 0 88px; border-radius: 16px; }
  .item-line .name { font-size: 16px; }
}

/* ---- print QR hint ---- */
@media print {
  .toolbar, .chips, .foot { display: none; }
  .menu-section h2 { position: static; background: none; padding: 0; }
  .item { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
}

/* Ordering controls */
.cart-btn, .add-btn, .cart-drawer button, .modal button, .confirm-card button {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}
.cart-btn { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.cart-count { min-width: 1ch; }
.item-line { flex-wrap: wrap; }
.item-line .name { flex: 1 1 90px; overflow-wrap: anywhere; }
.item-line .dots { display: none; }
.item-line .price { margin-inline-start: auto; }
.add-btn { min-width: 44px; flex: none; padding: 0; color: var(--accent); font-size: 22px; }
.cart-drawer, .modal-card, .confirm-card { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); }
.cart-drawer { position: fixed; z-index: 20; inset-block-end: 12px; inset-inline-end: 12px; width: min(420px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 16px; }
.cart-head, .cart-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cart-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); padding-block: 10px; }
.cart-line, .cart-qty { display: flex; align-items: center; gap: 6px; }
.cart-row .cart-line { grid-column: 1 / -1; justify-content: space-between; }
.cart-foot { margin-top: 12px; }
.cart-foot .bold { font-weight: 700; }
.cart-checkout { width: 100%; margin-top: 10px; }
.cart-drawer .primary, .modal .primary, .confirm-card .primary { background: color-mix(in srgb, var(--accent) 65%, #211936); color: #fff; border-color: transparent; }
.modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 14px; background: #21193690; }
.modal-card { width: min(100%, 420px); max-height: 100%; overflow: auto; padding: 18px; }
.modal form { display: grid; gap: 10px; margin-top: 10px; }
.modal label { display: grid; gap: 3px; font-size: .875rem; }
.modal input, .modal select { width: 100%; min-height: 44px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font: inherit; font-size: 1rem; }
.modal button:disabled { opacity: .65; cursor: wait; }
.modal .form-actions { display: flex; gap: 8px; justify-content: flex-end; }
.confirm-card { margin: 16px auto; padding: 18px; width: min(400px, calc(100% - 24px)); text-align: center; overflow-wrap: anywhere; }
.confirm-card button { margin-top: 12px; }
.guest-toast { position: fixed; z-index: 40; inset-inline: 16px; inset-block-end: 16px; width: fit-content; max-width: calc(100% - 32px); margin-inline: auto; padding: 10px 16px; background: #211936; color: #fff; border-radius: 10px; box-shadow: var(--shadow-lg); }
#cart-close { min-width: 44px; }
@media (max-width: 420px) {
  .toolbar { gap: 6px; padding-inline: 10px; }
  .lang button { min-height: 44px; padding-inline: 9px; }
  .cart-btn { padding-inline: 8px; }
  .item-line .price { margin-inline-start: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.photo-credits { margin: 1rem auto 0; color: var(--muted); font-size: .8125rem; }
.photo-credits summary { cursor: pointer; width: fit-content; margin-inline: auto; }
.photo-credits ul { list-style: none; margin: .5rem 0; }
.photo-credits a { color: inherit; text-decoration: underline; }
