:root {
  --bg: #f5faf6;
  --bg-soft: #eef6f0;
  --surface: #ffffff;
  --surface-alt: #f7fbf8;
  --text: #18352d;
  --muted: #5e7d73;
  --accent: #0b6b57;
  --accent-soft: #dcefe8;
  --border: #d8e8e0;
  --shadow: 0 10px 30px rgba(11, 107, 87, 0.08);
  --radius-lg: 24px;
  --radius-md: 18px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(11, 107, 87, 0.08), transparent 24%),
    linear-gradient(180deg, #f8fcf9 0%, #f3f9f5 100%);
  font-family: "Inter", "IBM Plex Sans Arabic", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

.page-shell {
  width: min(calc(100% - 1rem), var(--max-width));
  margin: 0 auto;
  padding: 0.75rem 0 1.25rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand__logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.3rem;
}

.brand__title {
  margin: 0;
  font-size: clamp(1.15rem, 4vw, 1.7rem);
  line-height: 1.2;
}

.lang-switch {
  display: inline-flex;
  padding: 0.24rem;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.lang-switch__button {
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 0.9rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.lang-switch__button.is-active {
  background: var(--accent);
  color: #fff;
}

.lang-switch__button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.menu-groups {
  display: grid;
  gap: 1rem;
}

.menu-group {
  padding: 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.menu-group__title {
  margin: 0 0 0.9rem;
  color: var(--accent);
  font-size: clamp(1.1rem, 3vw, 1.4rem);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.menu-card {
  display: grid;
  align-content: start;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-alt);
}

.menu-card__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #e8f2ed;
}

.menu-card__name {
  margin: 0;
  padding: 0.85rem 0.9rem 0.95rem;
  font-size: 0.98rem;
  line-height: 1.45;
}

.menu-card--variants .menu-card__name {
  padding-bottom: 0.45rem;
}

.variant-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0 0.85rem 0.95rem;
  list-style: none;
}

.variant-list li {
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
}

[data-active-lang="ar"] [data-lang="en"],
[data-active-lang="en"] [data-lang="ar"] {
  display: none !important;
}

html[dir="rtl"] body,
html[dir="rtl"] button {
  font-family: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif;
}

html[dir="ltr"] body,
html[dir="ltr"] button {
  font-family: "Inter", "IBM Plex Sans Arabic", system-ui, sans-serif;
}

html[dir="rtl"] .topbar,
html[dir="rtl"] .menu-group {
  text-align: right;
}

@media (max-width: 719px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .lang-switch {
    align-self: flex-start;
  }

  html[dir="rtl"] .lang-switch {
    align-self: flex-end;
  }
}

@media (min-width: 720px) {
  .page-shell {
    width: min(calc(100% - 1.5rem), var(--max-width));
    padding-top: 1rem;
  }

  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
