:root {
  --green: #0b332d;
  --green-2: #0d3932;
  --green-line: #2a5951;
  --cream: #f3ebdd;
  --cream-text: #f7efe3;
  --gold: #d5aa66;
  --ink: #132a24;
  --muted: #6d756f;
  --red: #a52220;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --brand: "Cinzel", Georgia, serif;
  --sans: "Inter", Arial, sans-serif;
  --arabic: "Noto Naskh Arabic", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { background: #061f1b; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #061f1b;
  color: var(--cream-text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, a { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.menu-app {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--green);
}

.topbar {
  height: 85px;
  padding: 28px 20px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
}

.language-switch {
  justify-self: start;
  width: 90px;
  height: 36px;
  padding: 3px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  border: 1px solid var(--green-line);
  border-radius: 999px;
  background: rgba(255,255,255,.025);
}
.lang-btn {
  min-width: 0;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #f0eee8;
  font-size: 11px;
  font-weight: 600;
  line-height: 28px;
  text-align: center;
  cursor: pointer;
}
.lang-btn:first-child {
  background: var(--gold);
  color: #263a34;
}

.brand {
  justify-self: center;
  margin-top: -1px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--gold);
  text-decoration: none;
  white-space: nowrap;
}
.brand strong {
  font: 600 20px/1.05 var(--brand);
  letter-spacing: .025em;
}
.brand span {
  margin-top: 7px;
  color: #e3ded3;
  font: 500 7px/1 var(--sans);
  letter-spacing: .015em;
}

.contact-button {
  justify-self: end;
  width: 37px;
  height: 37px;
  margin-top: -1px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--green-line);
  border-radius: 50%;
  background: rgba(255,255,255,.018);
  color: var(--gold);
  cursor: pointer;
}
.contact-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lang-btn:focus-visible,
.contact-button:focus-visible,
.filter-btn:focus-visible,
.menu-card-image:focus-visible,
.image-viewer-close:focus-visible {
  outline: 2px solid var(--cream-text);
  outline-offset: 2px;
}

.intro {
  padding: 28px 20px 0;
}
.intro h1 {
  margin: 0;
  color: var(--cream-text);
  font: 600 28px/1.08 var(--serif);
  letter-spacing: -.015em;
}
.intro p {
  max-width: 350px;
  margin: 8px 0 0;
  color: #d4d0c5;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.38;
  letter-spacing: -.01em;
}

.filters-shell {
  position: sticky;
  top: 0;
  z-index: 20;
  margin-top: 9px;
  padding: 0 0 8px;
  background: linear-gradient(180deg, rgba(11,51,45,.98) 0%, rgba(11,51,45,.98) 78%, rgba(11,51,45,0) 100%);
}
.filters {
  display: flex;
  gap: 8px;
  padding: 0 20px 7px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.filters::-webkit-scrollbar { display: none; }
.filter-btn {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 15px;
  border: 1px solid #315f57;
  border-radius: 999px;
  background: rgba(255,255,255,.018);
  color: #eee9df;
  font-size: 12px;
  font-weight: 500;
  line-height: 34px;
  white-space: nowrap;
  cursor: pointer;
  scroll-snap-align: start;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}
.filter-btn.is-active {
  background: rgba(255,255,255,.035);
  border-color: #38665e;
}
.filter-btn:active { transform: scale(.98); }

.menu-list {
  display: grid;
  gap: 0;
  padding: 8px 20px max(34px, env(safe-area-inset-bottom));
}
.menu-group {
  display: grid;
  gap: 17px;
  scroll-margin-top: 62px;
}
.menu-group + .menu-group {
  margin-top: 34px;
}
.menu-group-heading {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(22px, .55fr) auto minmax(22px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 1px 2px 0;
}
.menu-group-rule {
  height: 1px;
  background: linear-gradient(90deg, rgba(213,170,102,.16), rgba(213,170,102,.72));
}
.menu-group-rule:last-child {
  background: linear-gradient(90deg, rgba(213,170,102,.72), rgba(213,170,102,.16));
}
.menu-group-title {
  margin: 0;
  color: var(--gold);
  font: 600 21px/1.08 var(--serif);
  letter-spacing: -.01em;
  white-space: nowrap;
}
[dir="rtl"] .menu-group-title {
  font-family: var(--arabic);
  font-size: 18px;
  letter-spacing: 0;
}
.menu-card {
  height: 135px;
  min-width: 0;
  padding: 12px;
  display: grid;
  grid-template-columns: 110px minmax(0,1fr);
  gap: 16px;
  border-radius: 24px;
  background: var(--cream);
  color: var(--ink);
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: 135px;
}
.menu-card-image {
  width: 110px;
  height: 110px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #ddceb8;
  cursor: zoom-in;
}
.menu-card-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.menu-card-copy {
  min-width: 0;
  padding: 10px 2px 7px 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.menu-card h2 {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font: 700 18px/1.03 var(--serif);
  letter-spacing: -.018em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-card p {
  margin: 7px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.price {
  margin-top: auto;
  color: var(--red);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.price small {
  margin-left: 5px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .02em;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 18, 16, .88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, visibility .18s ease;
}
.image-viewer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.image-viewer-dialog {
  position: relative;
  width: min(100%, 560px);
  max-height: calc(100dvh - 40px);
  padding: 10px 10px 14px;
  border: 1px solid rgba(213,170,102,.28);
  border-radius: 24px;
  background: #0a2b26;
  box-shadow: 0 28px 80px rgba(0,0,0,.45);
  transform: scale(.96);
  transition: transform .18s ease;
}
.image-viewer.is-open .image-viewer-dialog { transform: scale(1); }
.image-viewer img {
  width: 100%;
  max-height: calc(100dvh - 112px);
  display: block;
  object-fit: contain;
  border-radius: 16px;
  background: #061f1b;
}
.image-viewer p {
  margin: 10px 44px 0 8px;
  color: var(--cream-text);
  font: 600 18px/1.2 var(--serif);
}
.image-viewer-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  background: rgba(6,31,27,.78);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,.24);
  cursor: pointer;
}
.image-viewer-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
body.modal-open { overflow: hidden; }

.toast {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 60;
  width: min(calc(100% - 32px), 360px);
  padding: 11px 14px;
  border-radius: 13px;
  background: #132d27;
  color: #fff;
  box-shadow: 0 14px 36px rgba(0,0,0,.24);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

html[dir="rtl"] body,
html[dir="rtl"] button { font-family: var(--arabic); }
html[dir="rtl"] .brand,
html[dir="rtl"] .price { font-family: var(--sans); }
html[dir="rtl"] .intro h1,
html[dir="rtl"] .menu-card h2,
html[dir="rtl"] .filter-btn { font-family: var(--arabic); }
html[dir="rtl"] .menu-card-copy { padding: 8px 0 7px 2px; }
html[dir="rtl"] .price small { margin-left: 0; margin-right: 5px; }

@media (max-width: 360px) {
  .topbar { padding-inline: 16px; }
  .intro { padding-inline: 16px; }
  .filters { padding-inline: 16px; }
  .menu-list { padding-inline: 16px; }
  .menu-card {
    grid-template-columns: 102px minmax(0,1fr);
    gap: 13px;
    height: 127px;
  }
  .menu-card-image { width: 102px; height: 102px; }
  .menu-card-copy { padding-top: 7px; }
  .menu-card h2 { font-size: 17px; }
}

@media (min-width: 431px) {
  .menu-app { box-shadow: 0 0 70px rgba(0,0,0,.18); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; }
}
