:root {
  --navy: #101b38;
  --navy-2: #1b2b57;
  --gold: #d9a441;
  --gold-soft: #f3e2b8;
  --red: #c0392b;
  --bg: #f8f3ea;
  --card: #ffffff;
  --ink: #1d1a16;
  --muted: #7a7266;
  --line: #ece4d6;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(16, 27, 56, .05), 0 6px 20px rgba(16, 27, 56, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Cairo', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
button, input { font: inherit; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  color: #fff;
  padding: 18px 16px 30px;
  background:
    radial-gradient(900px 300px at 85% -10%, rgba(217, 164, 65, .28), transparent 60%),
    radial-gradient(600px 260px at 0% 120%, rgba(192, 57, 43, .22), transparent 60%),
    linear-gradient(160deg, var(--navy-2), var(--navy));
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 4px;
  background: linear-gradient(90deg, var(--red), var(--gold), #1f4aa8);
}
.hero-top, .hero-main { max-width: 1100px; margin: 0 auto; position: relative; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lang-btn, .call-top {
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .06);
  color: #fff; border-radius: 999px;
  padding: 5px 14px; font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.lang-btn:hover, .call-top:hover { background: rgba(255, 255, 255, .14); }
.call-top span { direction: ltr; }
.hero-main { display: flex; align-items: center; gap: 18px; margin-top: 22px; }
.logo {
  width: 104px; height: 104px; flex: none;
  border-radius: 24px; object-fit: contain;
  background: radial-gradient(circle at 50% 40%, #22346a, #0b1330);
  padding: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(217, 164, 65, .45);
}
.hero-text h1 { margin: 0; font-size: 30px; font-weight: 800; line-height: 1.25; }
.tagline { margin: 2px 0 10px; color: #d6dcee; font-size: 14px; }
.status {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15);
  padding: 5px 12px; border-radius: 10px; font-size: 13px;
}
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: #e05a4f; box-shadow: 0 0 0 3px rgba(224, 90, 79, .25); }
.status.open .dot { background: #3ecf7a; box-shadow: 0 0 0 3px rgba(62, 207, 122, .25); }
.status:empty, .status.hidden { display: none; }

/* ---------- sticky bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(248, 243, 234, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.search {
  flex: none; display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; color: var(--muted); width: 220px;
}
.search input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 14px; color: var(--ink); }
.search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 164, 65, .18); }
.chips {
  flex: 1; min-width: 0; position: relative;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 2px 22px; scroll-padding-inline: 22px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 22px, #000 calc(100% - 22px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 22px, #000 calc(100% - 22px), transparent);
}
.chips::-webkit-scrollbar { display: none; }
/* On wider screens show every category (wrap to a second line if needed) instead of cutting one off. */
@media (min-width: 641px) {
  .bar-inner { align-items: flex-start; }
  .chips { flex-wrap: wrap; overflow: visible; padding: 2px; -webkit-mask-image: none; mask-image: none; }
}
.chip {
  flex: none; border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 7px 16px; font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: .15s;
}
.chip:hover { border-color: var(--gold); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip:focus { outline: none; }
.chip:focus-visible { box-shadow: 0 0 0 3px rgba(217, 164, 65, .35); }

/* ---------- menu ---------- */
.menu { max-width: 1100px; margin: 0 auto; padding: 8px 16px 40px; min-height: 50vh; }
.section { padding-top: 26px; scroll-margin-top: 70px; }
.section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 23px; font-weight: 800; position: relative; }
.section-head h2::after {
  content: ""; display: block; width: 36px; height: 3px; border-radius: 3px;
  background: var(--gold); margin-top: 2px;
}
.section-head .count { color: var(--muted); font-size: 13px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.grid.compact { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }

.card {
  display: flex; gap: 14px; align-items: stretch;
  background: var(--card); border-radius: var(--radius); padding: 12px;
  box-shadow: var(--shadow); border: 1px solid transparent;
  cursor: pointer; text-align: start; width: 100%;
  transition: transform .15s, border-color .15s;
}
.card:hover { transform: translateY(-2px); border-color: var(--gold-soft); }
.card .thumb {
  width: 108px; height: 108px; flex: none; border-radius: 14px; overflow: hidden;
  background: linear-gradient(135deg, #f3ead8, #e9dcc2);
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.card h3 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.4; }
.card .desc {
  margin: 4px 0 8px; color: var(--muted); font-size: 13px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .meta { margin-top: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.price { font-weight: 800; font-size: 17px; color: var(--navy); white-space: nowrap; }
.price small { font-size: 12px; font-weight: 600; color: var(--muted); margin-inline-start: 3px; }
.old-price { color: var(--muted); text-decoration: line-through; font-size: 13px; }

.card.plain { padding: 12px 16px; align-items: center; }
.card.plain .info { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
.card.plain h3 { font-size: 15px; }
.card.plain .meta { margin: 0; flex-wrap: nowrap; }

.card.off { opacity: .55; }
.card.off .thumb img { filter: grayscale(1); }

.badge { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 9px; line-height: 1.7; white-space: nowrap; }
.badge.new { background: #e5f5ec; color: #1d7a45; }
.badge.popular { background: #fdeceb; color: var(--red); }
.badge.chef { background: #fbf1da; color: #9a6a12; }
.badge.spicy { background: #fde6dd; color: #c2410c; }
.badge.off { background: #eee; color: #555; }

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

.loading { display: flex; justify-content: center; gap: 6px; padding: 80px 0; }
.loading span { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); animation: b 1s infinite ease-in-out; }
.loading span:nth-child(2) { animation-delay: .15s; }
.loading span:nth-child(3) { animation-delay: .3s; }
@keyframes b { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

/* ---------- footer ---------- */
.footer { background: var(--navy); color: #cfd6ea; text-align: center; padding: 30px 16px 40px; font-size: 14px; }
.footer .f-name { color: #fff; font-weight: 800; font-size: 18px; }
.footer .f-note { margin: 6px 0 14px; }
.footer .f-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.footer a {
  color: #fff; text-decoration: none; border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px; padding: 6px 14px; display: inline-flex; gap: 6px; align-items: center;
}
.footer a:hover { border-color: var(--gold); color: var(--gold); }
.footer .ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- bottom sheet ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(10, 14, 30, .55);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .2s;
}
.sheet-backdrop[hidden] { display: none; }
.sheet {
  position: relative; background: #fff; width: 100%; max-width: 560px;
  border-radius: 24px 24px 0 0; max-height: 92vh; overflow: auto;
  animation: up .25s ease-out;
}
@media (min-width: 700px) {
  .sheet-backdrop { align-items: center; }
  .sheet { border-radius: 24px; }
}
.sheet-close {
  position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .92); font-size: 24px; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}
.sheet .s-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #f3ead8; }
.sheet .s-body { padding: 18px 20px 26px; }
.sheet h3 { margin: 0 0 6px; font-size: 22px; }
.sheet .s-desc { color: var(--muted); margin: 0 0 14px; }
.sheet .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sheet .price { font-size: 22px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  .hero { padding-bottom: 24px; }
  .hero-main { gap: 14px; margin-top: 16px; }
  .logo { width: 84px; height: 84px; border-radius: 20px; }
  .hero-text h1 { font-size: 24px; }
  .bar-inner { flex-direction: column; align-items: stretch; gap: 8px; padding: 8px 16px; }
  .search { width: 100%; }
  .chips { margin: 0 -16px; padding: 2px 16px; scroll-padding-inline: 16px;
    -webkit-mask-image: none; mask-image: none; }
  .grid, .grid.compact { grid-template-columns: 1fr; gap: 10px; }
  .card .thumb { width: 92px; height: 92px; }
  .section { scroll-margin-top: 110px; }
}
