/* "Modern" menu theme — mobile-first, light/dark, RTL, brand colour via --brand */
:root {
  --brand: #ea580c;
  --bg: #f6f5f3;
  --surface: #ffffff;
  --surface-2: #f0eeeb;
  --text: #16130f;
  --muted: #6b645c;
  --line: rgba(22, 19, 15, .08);
  --shadow: 0 10px 30px -18px rgba(22, 19, 15, .35);
  --radius: 18px;
  --gutter: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ar: "Cairo", "Plus Jakarta Sans", system-ui, sans-serif;
  --brand-soft: color-mix(in srgb, var(--brand) 12%, transparent);
  --brand-text: var(--brand);
  color-scheme: light;
}
:root[data-scheme="dark"] {
  --bg: #0f0e0d;
  --surface: #1a1816;
  --surface-2: #24211e;
  --text: #f5f1ec;
  --muted: #a59d93;
  --line: rgba(245, 241, 236, .09);
  --shadow: 0 12px 30px -16px rgba(0, 0, 0, .8);
  --brand-soft: color-mix(in srgb, var(--brand) 22%, transparent);
  /* dark brands (e.g. black logos) stay readable as text on dark backgrounds */
  --brand-text: color-mix(in srgb, var(--brand) 40%, #ffffff);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 128px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip; -webkit-tap-highlight-color: transparent; }
html[lang="ar"] body { font-family: var(--font-ar); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 22px; height: 22px; fill: currentColor; }
[hidden] { display: none !important; }

/* hero */
.om-hero { position: relative; padding: calc(env(safe-area-inset-top, 0px) + 14px) var(--gutter) 18px; background: var(--surface); isolation: isolate; }
.om-hero.has-cover { min-height: 300px; display: flex; flex-direction: column; color: #fff; background: #000; }
.om-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: omZoom 18s var(--ease) infinite alternate; }
.om-hero.has-cover::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.05) 40%, rgba(0,0,0,.75)); }
.om-top { display: flex; justify-content: space-between; align-items: center; }
.om-brand img { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; box-shadow: var(--shadow); background: var(--surface); }
.om-tools { display: flex; gap: 8px; }
.om-icon { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 80%, transparent); display: grid; place-items: center; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.has-cover .om-icon { border-color: rgba(255,255,255,.3); background: rgba(0,0,0,.35); color: #fff; }
.om-lang { position: relative; }
.om-menu { position: absolute; top: 52px; inset-inline-end: 0; z-index: 30; min-width: 160px; padding: 6px; border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); border: 1px solid var(--line); }
.om-menu button { width: 100%; text-align: start; padding: 10px 12px; border: 0; border-radius: 10px; background: none; font-weight: 600; }
.om-menu button.on, .om-menu button:hover { background: var(--brand-soft); color: var(--brand-text); }
.om-intro { margin-top: auto; padding-top: 22px; }
.om-intro h1 { margin: 0; font-size: clamp(28px, 8vw, 44px); line-height: 1.05; font-weight: 800; letter-spacing: -.02em; }
.om-type { margin: 4px 0 12px; color: var(--muted); font-weight: 600; }
.has-cover .om-type { color: rgba(255,255,255,.8); }
.om-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.om-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); }
.has-cover .om-pill { background: rgba(0,0,0,.4); border-color: rgba(255,255,255,.2); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.om-pill i { width: 8px; height: 8px; border-radius: 50%; background: #dc2626; }
.om-pill.is-open i { background: #16a34a; box-shadow: 0 0 0 0 rgba(22,163,74,.6); animation: omPing 2s infinite; }

/* sticky search + category chips */
.om-bar { position: sticky; top: 0; z-index: 20; padding: 10px 0 8px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--line); }
.om-search { display: flex; align-items: center; gap: 10px; margin: 0 var(--gutter) 10px; padding: 0 14px; height: 46px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.om-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 16px; }
.om-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.om-chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 var(--gutter) 2px; scrollbar-width: none; scroll-snap-type: x proximity; }
.om-chips::-webkit-scrollbar { display: none; }
.om-chips a { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 14px; white-space: nowrap; scroll-snap-align: start; transition: background .25s, color .25s, border-color .25s; }
[dir=rtl] .om-chips a { padding: 0 6px 0 14px; }
.om-chips a img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
:root[data-scheme="dark"] .om-chips a.on { box-shadow: inset 0 0 0 2px var(--brand-text); }
.om-chips a.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* content */
.om-main { padding: 6px 0 40px; }
.om-popular { padding: 18px 0 4px; }
.om-popular h2, .om-cat-head h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.om-popular h2 { padding: 0 var(--gutter) 10px; }
.om-rail { display: flex; gap: 12px; overflow-x: auto; padding: 4px var(--gutter) 10px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.om-rail::-webkit-scrollbar { display: none; }
.om-pop { flex: none; width: 150px; padding: 0; border: 0; background: none; text-align: start; scroll-snap-align: start; }
.om-pop img { width: 150px; height: 150px; border-radius: var(--radius); object-fit: cover; box-shadow: var(--shadow); }
.om-pop span { display: block; margin-top: 8px; font-weight: 700; font-size: 14.5px; line-height: 1.25; }
.om-pop b { color: var(--brand-text); font-size: 14px; }
.om-cat { padding: 18px 0 6px; }
.om-cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 var(--gutter) 12px; }
.om-cat-head span { color: var(--muted); font-size: 13px; font-weight: 600; }
.om-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 var(--gutter); }
.om-card { position: relative; display: flex; flex-direction: column; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s; }
.om-card:active { transform: scale(.98); }
.om-img { position: relative; aspect-ratio: 1; background: var(--surface-2); overflow: hidden; }
.om-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.om-badge { position: absolute; top: 8px; inset-inline-start: 8px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; }
.om-badge.feat { background: var(--brand); color: #fff; }
.om-badge.sold { background: #1f2937; color: #fff; }
.om-card.is-sold .om-img img { filter: grayscale(1); opacity: .6; }
.om-card.is-sold .om-price b { text-decoration: line-through; opacity: .55; }
.om-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.om-body h3 { margin: 0; font-size: 15px; line-height: 1.25; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.om-body p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.om-price { margin-top: auto; padding-top: 4px; display: flex; align-items: baseline; gap: 6px; }
[dir=rtl] .om-price { justify-content: flex-end; }
.om-price b { color: var(--brand-text); font-size: 16px; font-weight: 800; }
.om-price del { color: var(--muted); font-size: 12.5px; }
.om-empty { text-align: center; color: var(--muted); padding: 40px var(--gutter); }

/* sheets */
.om-sheet { position: fixed; inset: 0; z-index: 50; }
.om-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); animation: omFade .25s; }
.om-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 90vh; overflow: auto; background: var(--surface); color: var(--text); border-radius: 24px 24px 0 0; padding: 18px var(--gutter) calc(18px + env(safe-area-inset-bottom, 0px)); animation: omUp .35s var(--ease); }
.om-panel h3 { margin: 0 0 10px; font-size: 20px; font-weight: 800; }
.om-panel select { width: 100%; height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); padding: 0 12px; font: inherit; }
.om-primary { width: 100%; margin-top: 12px; height: 50px; border: 0; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 800; font-size: 16px; }
.om-item { padding: 0 0 calc(18px + env(safe-area-inset-bottom, 0px)); }
.om-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.om-item-body { padding: 16px var(--gutter) 0; }
.om-item-body h3 { font-size: 24px; margin: 0 0 4px; }
.om-item-body .om-price b { font-size: 22px; }
.om-item-body p { color: var(--muted); margin: 10px 0; }
.om-item-body dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 10px 0; font-size: 14px; }
.om-item-body dt { color: var(--muted); font-weight: 600; }
.om-item-body dd { margin: 0; font-weight: 600; }
.om-extras h4 { margin: 14px 0 8px; font-size: 15px; }
.om-extras li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.om-extras ul { list-style: none; margin: 0; padding: 0; }
.om-extras b { color: var(--brand-text); }
.om-x { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 16px; }

/* footer, waiter, toast */
.om-foot { padding: 24px var(--gutter) calc(110px + env(safe-area-inset-bottom, 0px)); text-align: center; color: var(--muted); font-size: 13.5px; border-top: 1px solid var(--line); }
.om-social { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.om-social a { padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; color: var(--text); }
.om-foot p a { color: var(--brand-text); font-weight: 700; }
.om-waiter { position: fixed; z-index: 40; inset-inline-start: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); height: 48px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 800; box-shadow: var(--shadow); }
.om-toast { position: fixed; z-index: 90; left: 50%; top: 16px; transform: translateX(-50%); padding: 12px 18px; border-radius: 999px; background: #16a34a; color: #fff; font-weight: 700; box-shadow: var(--shadow); animation: omFade .3s; }
.om-toast.err { background: #dc2626; }

/* reveal */
.om-card { opacity: 0; transform: translateY(14px); }
.om-card.in { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .5s var(--ease); }

@keyframes omZoom { from { transform: scale(1.02); } to { transform: scale(1.12); } }
@keyframes omPing { 80%, 100% { box-shadow: 0 0 0 8px rgba(22,163,74,0); } }
@keyframes omUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes omFade { from { opacity: 0; } to { opacity: 1; } }

@media (hover: hover) {
  .om-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
  .om-card:hover .om-img img { transform: scale(1.06); }
}
@media (min-width: 640px) { .om-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 960px) {
  :root { --gutter: 32px; }
  body > * { max-width: 1180px; margin-inline: auto; }
  .om-hero.has-cover { min-height: 380px; border-radius: 0 0 28px 28px; overflow: hidden; }
  .om-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .om-panel { left: 50%; right: auto; bottom: 50%; width: min(560px, 92vw); border-radius: 24px; transform: translate(-50%, 50%); animation: omFade .25s; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .om-card { opacity: 1; transform: none; }
}
