:root {
  --sea: #0e3b46;
  --sea-2: #155a68;
  --sand: #f7f1e7;
  --card: #ffffff;
  --ink: #1d2a2e;
  --muted: #66757a;
  --line: #e7dfd2;
  --sun: #d9822b;
  --chip: #efe6d8;
  --radius: 16px;
  --font: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Marcellus", Georgia, serif;
}
html[lang="ar"] {
  --font: "Tajawal", system-ui, "Segoe UI", Tahoma, sans-serif;
  --display: "Tajawal", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

/* Hero */
.hero { position: relative; min-height: 300px; display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,59,70,.15) 0%, rgba(14,59,70,.35) 45%, rgba(10,40,48,.92) 100%); }
.hero-body { position: relative; width: 100%; max-width: 760px; margin: 0 auto; padding: 72px 16px 22px; text-align: center; }
.logo { width: 96px; height: 96px; object-fit: contain; margin: 0 auto 8px; filter: drop-shadow(0 4px 14px rgba(0,0,0,.45)); }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(26px, 6vw, 38px); margin: 0; letter-spacing: .3px; }
html[lang="ar"] .hero h1 { font-weight: 700; }
.hero p { margin: 4px 0 0; opacity: .9; font-size: 15px; }
.lang {
  position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2;
  border: 1px solid rgba(255,255,255,.6); background: rgba(14,59,70,.45); color: #fff;
  padding: 7px 14px; border-radius: 999px; backdrop-filter: blur(6px); font-size: 14px;
}
html[lang="en"] .lang { font-family: "Tajawal", sans-serif; }
html[lang="ar"] .lang { font-family: "Nunito Sans", sans-serif; }

/* Category bar */
.cats {
  position: sticky; top: 0; z-index: 10;
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px;
  background: rgba(247,241,231,.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }
.cats a {
  flex: none; padding: 7px 14px; border-radius: 999px; text-decoration: none;
  background: var(--chip); color: var(--sea); font-weight: 600; font-size: 14px; white-space: nowrap;
}
.cats a.on { background: var(--sea); color: #fff; }

.search-wrap { max-width: 760px; margin: 14px auto 0; padding: 0 16px; }
#search {
  width: 100%; padding: 11px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font: inherit; color: var(--ink); outline: none;
}
#search:focus { border-color: var(--sea-2); box-shadow: 0 0 0 3px rgba(21,90,104,.15); }

/* Sections */
main { max-width: 760px; margin: 0 auto; padding: 4px 16px 24px; }
section { padding-top: 22px; }
section h2 { font-family: var(--display); font-weight: 400; color: var(--sea); font-size: 26px; margin: 0 0 4px; }
html[lang="ar"] section h2 { font-weight: 700; font-size: 24px; }
.cat-desc { color: var(--muted); font-size: 14px; margin: 0 0 12px; }

.items { display: grid; gap: 12px; }
.item {
  display: flex; gap: 12px; width: 100%; text-align: start; padding: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: inherit;
  box-shadow: 0 1px 2px rgba(14,59,70,.04); transition: transform .12s ease, box-shadow .12s ease;
}
.item:active { transform: scale(.99); }
.item:hover { box-shadow: 0 6px 18px rgba(14,59,70,.08); }
.item .thumb { flex: none; width: 112px; height: 96px; border-radius: 12px; object-fit: cover; background: var(--chip); }
.item .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.item h3 { font-size: 16px; margin: 0; font-weight: 700; line-height: 1.25; }
.item .desc {
  color: var(--muted); font-size: 13.5px; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item .row { margin-top: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.price { font-weight: 700; color: var(--sea); white-space: nowrap; }
.badge { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #fdebd6; color: #9a5413; }
.badge.vegetarian, .badge.vegan { background: #e3f1e4; color: #2f6b36; }
.badge.spicy { background: #fde3df; color: #a1311f; }

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

/* Footer */
.foot { background: var(--sea); color: #e9f1f2; padding: 28px 16px 40px; margin-top: 16px; }
.foot-in { max-width: 760px; margin: 0 auto; display: grid; gap: 14px; text-align: center; }
.foot h4 { font-family: var(--display); font-weight: 400; font-size: 22px; margin: 0; color: #fff; }
.foot p { margin: 0; font-size: 14px; opacity: .9; }
.links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.links a {
  color: #fff; text-decoration: none; font-size: 14px; font-weight: 600;
  border: 1px solid rgba(255,255,255,.35); padding: 8px 14px; border-radius: 999px;
}
.notes { font-size: 12.5px !important; opacity: .7 !important; }

/* Item sheet */
.sheet {
  width: min(560px, 100%); max-height: 92vh; margin: auto auto 0; padding: 0; border: 0;
  border-radius: 22px 22px 0 0; background: #fff; color: var(--ink); overflow: auto;
}
@media (min-width: 620px) { .sheet { margin: auto; border-radius: 22px; } }
.sheet::backdrop { background: rgba(8,30,36,.55); }
.sheet[open] { animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-close {
  position: sticky; top: 10px; float: inline-end; margin: 10px 10px -46px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92);
  font-size: 24px; line-height: 1; color: var(--sea); box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.sheet-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--chip); }
.sheet-in { padding: 16px 18px 26px; }
.sheet h2 { font-family: var(--display); font-weight: 400; color: var(--sea); font-size: 26px; margin: 0 0 6px; line-height: 1.2; }
html[lang="ar"] .sheet h2 { font-weight: 700; }
.sheet .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.sheet .price { font-size: 19px; }
.sheet .cal { color: var(--muted); font-size: 13px; }
.sheet p { margin: 0 0 10px; }
.sheet .ingr { color: var(--muted); font-size: 14px; }
.sheet .ingr b { color: var(--ink); }
.opt { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.opt h3 { font-size: 15px; margin: 0 0 6px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.opt h3 small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.opt ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.opt li { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; padding: 4px 0; }
.opt li span:last-child { color: var(--sea); font-weight: 600; white-space: nowrap; }
.sheet .note { color: var(--muted); font-size: 12.5px; margin-top: 16px; }

@media (min-width: 620px) {
  .item .thumb { width: 150px; height: 112px; }
  .hero { min-height: 360px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sheet[open] { animation: none; }
}
.sheet-close:focus:not(:focus-visible) { outline: none; }
