/* Smart Menu v6 — الأساس من v5 (مقاسات v4) + متغيرات الهوية + طرق العرض + تحسينات الجوال */
:root {
  --bg: #f2f5f1;
  --ink: #1f2b26;
  --muted: color-mix(in srgb, var(--ink) 62%, var(--bg));
  --teal: #0d4a52;
  --teal-2: #167c83;
  --price: #9a6530;
  --sig-bg: color-mix(in srgb, var(--teal-2) 14%, var(--bg));
  --sig: color-mix(in srgb, var(--teal) 80%, #3d6b4f);
  --line: color-mix(in srgb, var(--ink) 13%, var(--bg));
  --card: color-mix(in srgb, #fff 88%, var(--bg));
  --dark: #18302b;
  --star: #c9a14a;
  --r: 18px;
  --gap: 16px;
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --head: "Reem Kufi", "Noto Kufi Arabic", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
.corners-sharp { --r: 4px; }
.density-compact { --gap: 10px; }
.dark-bg { --card: color-mix(in srgb, #fff 7%, var(--bg)); --muted: color-mix(in srgb, var(--ink) 70%, var(--bg)); }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.55 var(--font); }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--teal-2); outline-offset: 2px; }
.wrap { max-width: 1040px; margin-inline: auto; padding-inline: 16px; }
.small { font-size: .85rem; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
.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; }
.sr-focus:focus { position: fixed !important; z-index: 200; top: 8px; inset-inline: 8px; width: auto; height: auto; margin: 0; clip: auto; white-space: normal;
  background: #111; color: #fff; padding: 14px 16px; border-radius: 12px; font-size: 1.05rem; text-decoration: underline; }

#preview-bar { position: sticky; top: 0; z-index: 60; background: #8a5a00; color: #fff; text-align: center; padding: 6px; font-size: .9rem; }

/* ───── الهيرو ───── */
.hero { position: relative; height: 540px; overflow: hidden; color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--teal) 55%, #000) 0%, color-mix(in srgb, var(--teal) 80%, #000) 38%, var(--teal) 72%, color-mix(in srgb, var(--teal) 80%, var(--teal-2)) 100%); }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 4s ease; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-veil { position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(38% 34% at 50% 44%, rgba(2,22,26,.6), rgba(2,22,26,0) 100%), linear-gradient(rgba(2,24,28,.45), rgba(2,24,28,0) 55%); }
.hero-image .hero-veil { background: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.15) 40%, rgba(0,0,0,.5)); }
.hero-image canvas, .hero-none canvas { display: none; }
.brand { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; padding: 0 20px 70px; color: #fff; text-align: center;
  filter: drop-shadow(0 4px 24px rgba(0,25,30,.45)); }
.brand .mark { width: auto; max-width: min(260px, 60vw); max-height: 190px; object-fit: contain; }
.brand .mark.legacy { width: 270px; filter: invert(1) brightness(1.94); }
.brand .word { font: 600 34px/1.15 var(--head); letter-spacing: .02em; margin: 14px 0 0; }
.brand .slogan { margin: 6px 0 0; font-size: 15px; letter-spacing: .12em; opacity: .9; text-transform: uppercase; }
.brand .mark:not([hidden]) + .word { font-size: 24px; }
.wave { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 90px; z-index: 3; }
.search { position: absolute; z-index: 4; top: 472px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 32px)); height: 50px;
  display: flex; align-items: center; gap: 10px; padding: 0 16px; background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 14px 30px -18px rgba(5,40,45,.6); color: var(--muted); }
.search svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; flex: none; }
.search input { border: 0; outline: 0; flex: 1; font: inherit; background: transparent; color: var(--ink); min-width: 0; min-height: 44px; }
.hero-none .hero { height: auto; min-height: 220px; padding-bottom: 80px; }
.hero-none .hero .brand { position: relative; padding: 40px 20px 20px; }
.hero-none .search { top: auto; bottom: 24px; }

/* ───── الفلاتر وشريط الأقسام ───── */
.filters { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 34px 16px 10px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 9px 16px; min-height: 40px; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; color: var(--ink); }
.chip.on { background: var(--teal); color: var(--bg); border-color: var(--teal); }
.chip svg { width: 14px; height: 14px; }
.bar { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.bar-row { max-width: 1040px; margin-inline: auto; min-height: 60px; display: flex; align-items: center; gap: 4px; padding-inline: 12px 0; }
.lang-btn { flex: none; display: inline-flex; gap: 8px; align-items: center; background: var(--teal); color: #fff; border-radius: 999px; padding: 10px 14px; min-height: 44px; font-size: 14px; }
.lang-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 8px 6px 8px 16px; flex: 1; scroll-padding-inline: 40px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 10px 16px; min-height: 44px; border-radius: 999px; font-size: 15px; color: var(--ink); opacity: .85; white-space: nowrap; }
.tab.on { background: var(--dark); color: var(--bg); opacity: 1; }
.tab.group-head { color: var(--muted); font-size: 12px; pointer-events: none; padding-inline: 8px 2px; min-height: 0; }
.lang-list { position: fixed; z-index: 70; top: 60px; inset-inline-start: max(16px, calc((100% - 1040px) / 2 + 16px)); background: var(--card); list-style: none; margin: 0; padding: 6px;
  border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.18); min-width: 180px; max-height: 70vh; overflow: auto; }
.lang-list li button { width: 100%; text-align: start; padding: 11px 12px; border-radius: 10px; }
.lang-list li button.on, .lang-list li button:hover { background: var(--bg); }

/* ───── متوفر اليوم ───── */
.today { margin-top: 22px; padding: 16px; border-radius: var(--r); background: linear-gradient(135deg, color-mix(in srgb, var(--teal-2) 18%, var(--bg)), var(--card)); border: 1px solid var(--line); }
.today h2 { display: flex; align-items: center; gap: 10px; font: 600 24px/1.4 var(--head); color: var(--teal); margin: 0 0 12px; }
.today .dot { width: 10px; height: 10px; border-radius: 50%; background: #e0533d; box-shadow: 0 0 0 0 rgba(224,83,61,.5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(224,83,61,0); } 100% { box-shadow: 0 0 0 0 rgba(224,83,61,0); } }
.today-row { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }
.today-row::-webkit-scrollbar { display: none; }
.today-card { flex: none; width: min(300px, 78vw); display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; text-align: start; padding: 10px;
  background: var(--card); border-radius: calc(var(--r) - 4px); scroll-snap-align: start; }
.today-card .pic { width: 96px; height: 96px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; }
.today-card .pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.today-card .pic img.cut { object-fit: contain; }
.today-card .txt { display: grid; gap: 2px; }
.today-card b { font: 500 17px/1.3 var(--head); }
.today-card small { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ───── الأكثر طلباً ───── */
.popular { padding: 22px 0 6px; }
.popular h2 { font: 600 28px/1.55 var(--head); color: var(--teal); margin: 0 0 10px; }
.pop-row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.pop-row::-webkit-scrollbar { display: none; }
.pop { position: relative; flex: none; width: 190px; display: grid; gap: 4px; padding: 10px 10px 12px; background: var(--card); border-radius: var(--r); border: 1px solid var(--line); cursor: pointer; text-align: start; }
.pop .pic { position: relative; display: grid; place-items: center; height: 168px; }
.pop .pic img { width: 168px; height: 168px; object-fit: contain; filter: drop-shadow(0 10px 10px rgba(18,52,50,.2)); }
.pop .pic img.box { object-position: 50% 70%; }
.pop b { font: 500 16px/1.3 var(--head); min-height: 41px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pop .foot-row { display: flex; gap: 6px; align-items: center; justify-content: space-between; }

/* ───── الأقسام ───── */
.amb { margin: 8px calc(50% - 50vw) 0; height: 440px; overflow: hidden; position: relative; }
.amb img { width: 100%; height: 100%; object-fit: cover; }
.amb::before, .amb::after { content: ""; position: absolute; left: 0; right: 0; height: 70px; z-index: 1; }
.amb::before { top: 0; background: linear-gradient(var(--bg), transparent); }
.amb::after { bottom: 0; background: linear-gradient(transparent, var(--bg)); }
.cat { padding-top: 36px; scroll-margin-top: 66px; }
.cat:focus { outline: none; }
.cat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.cat-head h2 { font: 600 34px/1.2 var(--head); color: var(--teal); margin: 0; }
.cat-head .alt { color: var(--muted); font-size: 15px; }
.cat-img { width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--r); margin-bottom: 14px; }
.run { margin: 0 0 14px; padding: 0; list-style: none; }
.it { position: relative; cursor: pointer; }
.it:focus-visible { border-radius: 12px; }

/* السعر والشارات والنجوم */
.price { color: var(--price); font-weight: 600; font-size: 16px; letter-spacing: .01em; white-space: nowrap; }
.price small { font-size: 12px; margin-inline-end: 3px; color: var(--muted); font-weight: 400; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 500; background: var(--sig-bg); color: var(--sig); white-space: nowrap; }
.badge svg { width: 13px; height: 13px; }
.badge.veg { background: #e9f1df; color: #4d6b22; }
.badge.hl { background: #e1eff1; color: #24606e; }
.badge.cal { background: #f3ede4; color: #7a5a35; }
.badges { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 4px; }
.stars { display: inline-flex; gap: 1px; color: #cbd3cd; }
.stars svg { width: 14px; height: 14px; fill: currentColor; display: block; }
.stars .on { color: var(--star); }
.stars small { color: var(--muted); font-size: 12px; margin-inline-start: 5px; }
.ph-empty { width: 78px; height: 78px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--teal-2);
  background: radial-gradient(circle at 50% 40%, var(--card), var(--line)); }
.ph-empty svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.meta { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.add { margin-inline-start: auto; width: 40px; height: 40px; border-radius: 50%; background: var(--teal); color: #fff; font-size: 22px; line-height: 1; display: grid; place-items: center; }

/* ختم «جديدنا» */
.stamp-new { position: absolute; top: 6px; inset-inline-start: 6px; z-index: 2; padding: 4px 10px; border-radius: 999px; font: 700 12px/1.2 var(--font);
  background: #e0533d; color: #fff; transform: rotate(-6deg); box-shadow: 0 4px 10px rgba(0,0,0,.18); letter-spacing: .02em; }
.it-text .stamp-new, .it-prices .stamp-new, .it-chip .stamp-new { position: static; display: inline-block; transform: none; margin: 4px 0; }

/* مميز */
.it.ft { --ft: color-mix(in srgb, var(--price) 70%, var(--teal)); }
.it.ft:not(.it-row):not(.it-text):not(.it-chip) { box-shadow: 0 0 0 2px var(--ft), 0 14px 30px -18px rgba(0,0,0,.4); }
.it-row.ft, .it-text.ft { background: color-mix(in srgb, var(--price) 8%, transparent); border-radius: 14px; padding-inline: 10px; }
.it.ft h3::before { content: "★ "; color: var(--ft); }

/* ① صف بصورة صغيرة (الافتراضي، شكل v4) */
.items { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.it-row { display: grid; grid-template-columns: minmax(0, 1fr) 128px; gap: 16px; align-items: center; padding: var(--gap) 0;
  background: linear-gradient(90deg, transparent, var(--line) 15%, var(--line) 85%, transparent) bottom / 100% 1px no-repeat; }
.it-row .pic { position: relative; width: 128px; height: 112px; display: grid; place-items: center; }
.it-row .pic img { width: 128px; height: 112px; object-fit: contain; filter: drop-shadow(0 10px 10px rgba(18,52,50,.2)); }
.it-row .pic img.box, .pop .pic img.box { object-fit: cover; object-position: 50% 70%; border-radius: 14px; filter: none; box-shadow: 0 6px 14px rgba(0,0,0,.12); }
.it-row h3 { font: 500 19px/1.35 var(--head); margin: 0; }
.it-row .desc { color: var(--muted); font-size: 14px; line-height: 1.5; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.it-row.sz-large, .it-row.sz-full { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) 200px; }
.it-row.sz-large .pic, .it-row.sz-large .pic img, .it-row.sz-full .pic, .it-row.sz-full .pic img { width: 200px; height: 170px; }
.it-row.sz-large h3, .it-row.sz-full h3 { font-size: 23px; }

/* ② بطاقات بصورة كبيرة */
.run-card { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--gap); }
.it-card { display: grid; grid-template-rows: auto 1fr; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.it-card .pic { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; background: color-mix(in srgb, var(--line) 50%, var(--card)); overflow: hidden; }
.it-card .pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 72%; }
.it-card .pic img.cut { object-fit: contain; padding: 10px; filter: drop-shadow(0 12px 12px rgba(0,0,0,.18)); }
.it-card .txt { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; }
.it-card h3 { font: 600 18px/1.35 var(--head); margin: 0; }
.it-card .desc { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.it-card .meta { margin-top: auto; padding-top: 8px; }
.it-card.sz-large { grid-column: span 2; }
.it-card.sz-full { grid-column: 1 / -1; grid-template-columns: 55% 45%; grid-template-rows: none; }
.it-card.sz-full .pic { aspect-ratio: auto; min-height: 260px; }

/* ③ شبكة مضغوطة */
.run-compact { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.it-compact { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-align: center; }
.it-compact .pic { position: relative; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.it-compact .pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 65%; }
.it-compact .pic img.cut { object-fit: contain; padding: 8px; }
.it-compact .txt { padding: 8px 8px 10px; }
.it-compact h3 { font: 500 15px/1.3 var(--head); margin: 0; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.it-compact .meta { justify-content: center; margin-top: 4px; }
.it-compact.sz-large { grid-column: span 2; }
.it-compact.sz-full { grid-column: 1 / -1; }

/* ④ قائمة نصية بنقاط */
.run-text { columns: 2; column-gap: 40px; }
.it-text { break-inside: avoid; padding: 9px 0; }
.it-text .line { display: flex; align-items: baseline; gap: 8px; }
.it-text h3 { font: 500 17px/1.35 var(--head); margin: 0; }
.it-text .dots { flex: 1; border-bottom: 2px dotted var(--line); transform: translateY(-4px); min-width: 20px; }
.it-text .desc { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.it-text.sz-large h3, .it-text.sz-full h3 { font-size: 21px; }

/* ⑤ نص فوق الصورة */
.run-overlay { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--gap); }
.it-overlay { border-radius: var(--r); overflow: hidden; min-height: 240px; color: #fff; isolation: isolate; }
.it-overlay .pic { position: absolute; inset: 0; z-index: -2; }
.it-overlay .pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.it-overlay .pic img.cut { object-fit: contain; background: color-mix(in srgb, var(--teal) 70%, #000); padding: 16px; }
.it-overlay .shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(transparent 35%, rgba(0,0,0,.78)); }
.it-overlay .txt { position: absolute; inset-inline: 0; bottom: 0; padding: 16px; }
.it-overlay h3 { font: 600 22px/1.3 var(--head); margin: 0; }
.it-overlay .price { color: #ffe3b5; }
.it-overlay.sz-large { grid-column: span 2; min-height: 320px; }
.it-overlay.sz-full { grid-column: 1 / -1; min-height: 380px; }

/* ⑥ بطاقة منقسمة (صورة وبجانبها النص) */
.run-split { display: grid; gap: var(--gap); }
.it-split { display: grid; grid-template-columns: 44% 56%; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; min-height: 220px; }
.it-split .pic { position: relative; display: grid; place-items: center; overflow: hidden; background: color-mix(in srgb, var(--line) 45%, var(--card)); }
.it-split .pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.it-split .pic img.cut { object-fit: contain; padding: 14px; }
.it-split .txt { padding: 18px; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.it-split h3 { font: 600 24px/1.3 var(--head); margin: 0; }
.it-split .desc { color: var(--muted); }

/* ⑦ صورة كبيرة بعرض الصفحة */
.it-hero { border-radius: var(--r); overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.it-hero .pic { position: relative; aspect-ratio: 16 / 9; overflow: hidden; display: grid; place-items: center; }
.it-hero .pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.it-hero .pic img.cut { object-fit: contain; padding: 16px; }
.it-hero .txt { padding: 16px 18px 18px; }
.it-hero h3 { font: 600 28px/1.25 var(--head); margin: 0; }
.it-hero .desc { color: var(--muted); margin-top: 4px; }

/* ⑧ صحن عائم (صورة مفرغة كبيرة — الطبق المميز في v4) */
.it-plate { display: grid; grid-template-columns: 56.5% 43.5%; align-items: center; margin-bottom: 18px; }
.it-plate .pic { position: relative; height: 427px; display: grid; place-items: center; }
.it-plate .pic img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 22px 24px rgba(18,52,50,.22)); }
.it-plate .pic img.box { object-fit: cover; border-radius: var(--r); filter: none; }
.it-plate .txt { display: grid; gap: 6px; margin-inline-start: -28px; position: relative; justify-items: start; }
.it-plate h3 { font: 600 28px/1.25 var(--head); margin: 0; }
.it-plate .desc { color: var(--muted); font-size: 15px; }
.it-plate .foot-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; width: 100%; }
.it-plate .price { font-size: 26px; }

/* ⑨ جدول أسعار حسب الخيار */
.run-prices { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap) 40px; }
.it-prices { padding: 12px 0; border-bottom: 1px solid var(--line); }
.it-prices h3 { font: 500 19px/1.35 var(--head); margin: 0; }
.it-prices .desc { color: var(--muted); font-size: 14px; }
.ptable { width: 100%; border-collapse: collapse; margin-top: 8px; }
.ptable th { text-align: start; font-weight: 400; padding: 6px 0; border-top: 1px dashed var(--line); }
.ptable td { text-align: end; padding: 6px 0; border-top: 1px dashed var(--line); }

/* ⑩ رقائق صغيرة (إضافات وصلصات ومشروبات بسيطة) */
.run-chip { display: flex; flex-wrap: wrap; gap: 8px; }
.it-chip { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; min-height: 44px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.it-chip .cn { font-weight: 500; }

.none { text-align: center; color: var(--muted); padding: 40px 16px; }

/* ───── التذييل ───── */
.foot { position: relative; overflow: hidden; margin-top: 48px; padding: 320px 16px calc(40px + var(--safe-b)); text-align: center; color: #e8f1ee; font-size: 14px; background: color-mix(in srgb, var(--teal) 75%, #000); }
.foot img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.foot::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(var(--bg), rgba(4,30,34,.25) 25%, rgba(4,30,34,.86) 55%); }
.foot p, .foot-in { position: relative; z-index: 2; margin: 4px 0; }
.foot-in { max-width: 720px; margin: 0 auto 18px; display: grid; gap: 18px; }
.foot-in h2 { font: 600 20px/1.3 var(--head); margin: 0 0 6px; color: #fff; }
.f-about p { margin: 0; opacity: .92; line-height: 1.8; }
.f-hours table { margin: 0 auto; border-collapse: collapse; }
.f-hours th, .f-hours td { padding: 4px 12px; font-weight: 400; }
.f-hours th { text-align: start; }
.f-hours tr.now { font-weight: 700; color: #fff; }
.f-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.f-links a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.14); text-decoration: none; }
.f-links svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.f-notice { opacity: .85; font-size: 13px; }
.f-a11y { display: inline-block; padding: 8px 12px; min-height: 44px; }

.to-top { position: fixed; z-index: 40; bottom: calc(22px + var(--safe-b)); inset-inline-start: 22px; width: 48px; height: 48px; border-radius: 50%; background: var(--teal); color: #fff;
  box-shadow: 0 10px 24px -10px rgba(5,40,45,.6); display: grid; place-items: center; }
.to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.order-fab { position: fixed; z-index: 40; bottom: calc(22px + var(--safe-b)); inset-inline-end: 22px; background: var(--dark); color: #fff; border-radius: 999px; padding: 12px 18px; min-height: 48px; box-shadow: 0 10px 24px -10px rgba(0,0,0,.6); }
.order-fab span:first-child { background: #fff; color: var(--dark); border-radius: 999px; padding: 0 7px; font-weight: 600; margin-inline-end: 4px; }

/* ───── نافذة التفاصيل ───── */
.sheet-back { position: fixed; inset: 0; z-index: 80; background: rgba(4, 26, 30, .55); animation: fade .2s; }
.sheet { position: fixed; z-index: 90; left: 50%; bottom: 0; transform: translateX(-50%); width: min(520px, 100%); max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); color: var(--ink); border-radius: 24px 24px 0 0; animation: up .28s cubic-bezier(.2,.8,.2,1); padding-bottom: var(--safe-b); transition: transform .2s ease; }
@media (min-width: 700px) { .sheet { bottom: 50%; transform: translate(-50%, 50%); border-radius: 24px; animation: pop .22s; } }
@keyframes up { from { transform: translate(-50%, 100%); } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, 48%); } }
@keyframes fade { from { opacity: 0; } }
.sheet .grab { position: sticky; top: 0; height: 22px; margin-bottom: -22px; z-index: 3; display: flex; justify-content: center; align-items: center; }
.sheet .grab::before { content: ""; width: 44px; height: 5px; border-radius: 5px; background: rgba(0,0,0,.22); }
.sheet .x { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 4; width: 44px; height: 44px; border-radius: 50%; background: var(--card); box-shadow: 0 2px 8px rgba(0,0,0,.18); font-size: 18px; }
/* الصورة تبقى داخل إطارها: لا تتداخل مع الاسم ولا تُقص عند التمرير */
.sheet .hero-img { position: relative; height: 320px; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, #fff 92%, var(--bg)), color-mix(in srgb, var(--line) 70%, var(--card))); }
.sheet .hero-img.is-cut { padding: 28px 24px 18px; }
.sheet .hero-img img.cut { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 18px 22px rgba(0,0,0,.2)); }
.sheet .hero-img img.box { width: 100%; height: 100%; object-fit: cover; }
.sheet .hero-img .stamp-new { top: 18px; inset-inline-start: auto; inset-inline-end: 16px; font-size: 14px; }
.sheet .hero-img .ph { width: 160px; height: 160px; display: grid; place-items: center; }
.sheet .body { padding: 14px 18px 22px; }
.sheet .body.pad { padding-top: 60px; }
.sheet h3 { font: 600 28px/1.3 var(--head); margin: 8px 0 0; }
.sheet .alt { color: var(--muted); font-size: 14px; margin-top: 2px; }
.sheet .desc { color: color-mix(in srgb, var(--ink) 78%, var(--card)); margin: 10px 0; }
.sheet .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.sheet .price { font-size: 26px; }
.opts { margin: 12px 0; }
.opts h4 { margin: 0 0 6px; font-size: 14px; color: var(--muted); font-weight: 500; }
.opt { display: flex; justify-content: space-between; padding: 11px 14px; min-height: 44px; align-items: center; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; }
.opt b { color: var(--price); font-weight: 600; }
.rate-box { background: color-mix(in srgb, var(--line) 55%, var(--card)); border-radius: 14px; padding: 12px; text-align: center; margin-top: 12px; }
.rate-box .pick { display: flex; justify-content: center; gap: 6px; margin-top: 6px; direction: ltr; }
.rate-box .pick button { padding: 6px; color: #c4cdc8; min-width: 44px; min-height: 44px; }
.rate-box .pick button svg { width: 30px; height: 30px; fill: currentColor; }
.rate-box .pick button.on { color: var(--star); }
.rate-box textarea { width: 100%; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; font: inherit; resize: vertical; background: var(--card); color: var(--ink); }
.btn { border-radius: 999px; padding: 11px 20px; min-height: 44px; background: var(--teal); color: #fff; }
.btn.ghost { background: color-mix(in srgb, var(--line) 60%, var(--card)); color: var(--ink); }
.btn.small { padding: 8px 14px; min-height: 40px; }
.order-list { list-style: none; margin: 0; padding: 0; }
.order-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.order-list li .n { flex: 1; }
.order-list .qty { display: inline-flex; align-items: center; gap: 6px; }
.order-list .qty button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); }
.waiter li { font-size: 1.25rem; }

/* ───── ثيمات جاهزة (لمسات فوق الألوان) ───── */
.preset-dark .hero, .preset-dark .foot { background: #0b0c0d; }
.preset-dark .badge { background: rgba(201,162,74,.16); color: #e2c47d; }
.preset-dark .it-card, .preset-dark .it-compact, .preset-dark .it-split, .preset-dark .it-hero, .preset-dark .pop { border-color: rgba(255,255,255,.08); }
.preset-chalk body, body.preset-chalk { background-image: radial-gradient(rgba(255,255,255,.04) 1px, transparent 1px); background-size: 6px 6px; }
.preset-chalk .cat-head h2, .preset-chalk .it h3 { letter-spacing: .02em; }
.preset-chalk .it-row, .preset-chalk .it-text .dots { border-color: rgba(244,239,225,.35); }
.preset-polaroid .it-card, .preset-polaroid .it-compact { background: #fff; padding: 10px 10px 0; border-radius: 4px; box-shadow: 0 10px 22px -12px rgba(60,40,20,.45); border: 0; }
.preset-polaroid .it-card:nth-child(odd), .preset-polaroid .it-compact:nth-child(odd) { transform: rotate(-1.2deg); }
.preset-polaroid .it-card:nth-child(even), .preset-polaroid .it-compact:nth-child(even) { transform: rotate(1deg); }
.preset-light .hero-veil { background: linear-gradient(rgba(0,0,0,.25), rgba(0,0,0,.05) 50%, rgba(0,0,0,.35)); }

/* ───── الجوال ───── */
@media (max-width: 760px) {
  .hero { height: 380px; }
  .search { top: 316px; }
  .brand { padding-bottom: 80px; }
  .brand .mark { max-width: min(190px, 55vw); max-height: 140px; }
  .brand .word { font-size: 28px; }
  .cat-head h2 { font-size: 26px; }
  .items, .run-prices { grid-template-columns: 1fr; }
  .run-text { columns: 1; }
  .it-plate { grid-template-columns: 1fr; }
  .it-plate .pic { height: 280px; }
  .it-plate .txt { margin-inline-start: 0; }
  .amb { height: 220px; }
  .it-row { grid-template-columns: minmax(0, 1fr) 108px; gap: 12px; }
  .it-row .pic, .it-row .pic img { width: 108px; height: 96px; }
  .it-row.sz-large, .it-row.sz-full { grid-template-columns: 1fr; }
  .it-row.sz-large .pic, .it-row.sz-large .pic img, .it-row.sz-full .pic, .it-row.sz-full .pic img { width: 100%; height: 220px; order: -1; }
  .run-card { grid-template-columns: 1fr 1fr; gap: 10px; }
  .it-card .txt { padding: 10px; }
  .it-card h3 { font-size: 16px; }
  .it-card .desc { -webkit-line-clamp: 2; font-size: 13px; }
  .it-card.sz-large, .it-card.sz-full { grid-column: 1 / -1; grid-template-columns: none; }
  .run-compact { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .run-overlay { grid-template-columns: 1fr; }
  .it-overlay.sz-large, .it-overlay.sz-full { grid-column: auto; }
  .it-split { grid-template-columns: 1fr; }
  .it-split .pic { height: 220px; }
  .it-split h3 { font-size: 21px; }
  .it-hero h3 { font-size: 23px; }
  .pop { width: 156px; }
  .pop .pic, .pop .pic img { width: 132px; height: 132px; }
  .foot { padding-top: 180px; }
  .sheet .hero-img { height: min(42vh, 300px); }
  .sheet h3 { font-size: 24px; }
  .filters { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding: 28px 16px 6px; }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
}
@media (max-width: 380px) {
  .run-compact { grid-template-columns: 1fr 1fr; }
  .it-row { grid-template-columns: minmax(0, 1fr) 92px; }
  .it-row .pic, .it-row .pic img { width: 92px; height: 84px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .hero { height: 300px; }
  .search { top: 236px; }
  .sheet { max-height: 96dvh; }
  .sheet .hero-img { height: 46vh; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .preset-polaroid .it-card, .preset-polaroid .it-compact { transform: none !important; }
}
