:root {
  --olive: #4a5230;
  --olive-dark: #343b22;
  --cream: #f7f3ea;
  --cream-card: #fffcf7;
  --muted: #8a8272;
  --border: rgba(74, 82, 48, 0.1);
  --font: "Cairo", system-ui, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(74, 82, 48, 0.08), transparent 55%),
    radial-gradient(90% 60% at 0% 100%, rgba(52, 59, 34, 0.06), transparent 50%),
    var(--cream);
  font-family: var(--font);
  color: var(--olive-dark);
  -webkit-font-smoothing: antialiased;
}

.shell {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.top {
  padding: 20px 18px 8px;
  text-align: center;
}

.brand {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--olive);
  line-height: 1.1;
}

.title {
  margin: 4px 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--olive-dark);
}

.sub {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.lang {
  display: inline-flex;
  gap: 4px;
  margin-top: 12px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--cream-card);
}

.lang__btn {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.lang__btn.is-active {
  background: var(--olive);
  color: #fff;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 18px 12px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 243, 234, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.tabs__btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--cream-card);
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
}

.tabs__btn.is-active {
  background: var(--olive);
  border-color: var(--olive);
  color: #fff;
}

.panel {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.panel.is-active {
  display: flex;
}

.panel--image.is-active {
  height: calc(100dvh - 140px);
}

.cats {
  display: flex;
  gap: 8px;
  padding: 8px 18px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 58px;
  z-index: 40;
  background: rgba(247, 243, 234, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cats::-webkit-scrollbar {
  display: none;
}

.cats__chip {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--cream-card);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.main {
  padding: 4px 0 calc(24px + var(--safe-bottom));
}

.section {
  margin-bottom: 22px;
  scroll-margin-top: 120px;
}

.section__title {
  margin: 0 18px 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--olive-dark);
}

.grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 18px;
}

.card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--cream-card);
  box-shadow: 0 2px 8px rgba(43, 38, 30, 0.04);
}

.card__media {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: #f5efe3;
}

.card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card__placeholder {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(74, 82, 48, 0.12), rgba(74, 82, 48, 0.04));
}

.card__name {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

.card__en {
  margin: 0 0 4px;
  font-size: 11px;
  color: var(--muted);
}

.card__desc {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--olive-dark);
}

.card__desc[hidden] {
  display: none;
}

.card__cal {
  margin: 0 0 4px;
  font-size: 11px;
  color: var(--muted);
}

.card__price {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--olive);
}

.card__price span {
  font-size: 11px;
  font-weight: 600;
}

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

.menu-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #1a1c14;
  touch-action: none;
}

.menu-view__viewport {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.menu-view__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity 0.2s ease;
}

.menu-view__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px calc(10px + var(--safe-bottom));
  background: rgba(26, 28, 20, 0.96);
  color: #e8e2d4;
}

.menu-view__hint {
  margin: 0;
  font-size: 12px;
  opacity: 0.85;
}

.menu-view__reset {
  appearance: none;
  border: 1px solid rgba(232, 226, 212, 0.25);
  background: transparent;
  color: #e8e2d4;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.menu-view__reset.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

@media (min-width: 720px) {
  .shell {
    max-width: 720px;
  }

  .panel--image.is-active {
    height: calc(100dvh - 150px);
  }
}
