body.menu-page {
  background: var(--paper);
  color: var(--olive-ink);
}

.m-head {
  position: relative;
  z-index: 1;
  background: var(--olive);
  color: var(--cream);
  padding: 16px 16px 26px;
  overflow: hidden;
}

.m-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 0%, rgba(246, 239, 214, 0.12), transparent 60%);
  pointer-events: none;
}

.m-head .inner,
.m-nav .inner,
.m-main {
  max-width: 1080px;
  margin: 0 auto;
}

.m-head .inner {
  position: relative;
  z-index: 1;
}

.m-brand {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}

.m-brand h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(30px, 7vw, 44px);
  font-weight: 600;
  line-height: 1.05;
}

html[lang="ar"] .m-brand h1 {
  font-family: var(--font);
  font-weight: 700;
}

.m-brand p {
  margin: 6px 0 0;
  font-size: 14px;
  color: rgba(246, 239, 214, 0.72);
}

.m-brand .logo {
  width: 112px;
  flex: none;
}

.search {
  position: relative;
  margin-top: 20px;
}

.search input {
  width: 100%;
  height: 50px;
  padding: 0 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(246, 239, 214, 0.1);
  color: var(--cream);
  font: inherit;
  font-size: 16px;
  outline: none;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.search input::placeholder {
  color: rgba(246, 239, 214, 0.55);
}

.search input:focus {
  background: rgba(246, 239, 214, 0.16);
  border-color: rgba(246, 239, 214, 0.4);
}

.search input::-webkit-search-cancel-button {
  display: none;
}

.search .s-ico,
.search .s-clear {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: rgba(246, 239, 214, 0.7);
}

.search .s-ico {
  inset-inline-start: 14px;
  pointer-events: none;
}

.search .s-clear {
  inset-inline-end: 8px;
  width: 36px;
  height: 36px;
  display: none;
  place-items: center;
  border-radius: 10px;
}

.search.has-value .s-clear {
  display: grid;
}

.search .s-clear svg {
  width: 18px;
  height: 18px;
}

/* sticky category nav */
.m-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 246, 233, 0.9);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line-ink);
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  scrollbar-width: none;
  scroll-padding-inline: 16px;
}

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

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px 0 6px;
  border-radius: 999px;
  border: 1px solid var(--line-ink);
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

html[dir="rtl"] .chip {
  padding: 0 6px 0 14px;
}

.chip img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--cream-2);
}

.chip.no-img {
  padding: 0 16px;
}

.chip[aria-current="true"] {
  background: var(--olive);
  border-color: var(--olive);
  color: var(--cream);
}

.chip .count {
  font-size: 12px;
  opacity: 0.55;
}

/* main */
.m-main {
  padding: 8px 16px 64px;
}

.cat {
  padding-top: 28px;
  scroll-margin-top: 64px;
}

.cat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.cat-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
}

html[lang="ar"] .cat-head h2 {
  font-family: var(--font);
  font-weight: 700;
}

.cat-head span {
  font-size: 13px;
  color: rgba(43, 51, 32, 0.55);
}

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

@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

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

.card {
  display: flex;
  flex-direction: column;
  text-align: start;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line-ink);
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -18px rgba(43, 51, 32, 0.35);
}

.card:active {
  transform: scale(0.98);
}

.card .ph {
  position: relative;
  aspect-ratio: 1;
  background: var(--cream-2);
  overflow: hidden;
}

.card .ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}

.card .ph img.loaded {
  opacity: 1;
}

.card .ph.noimg {
  display: grid;
  place-items: center;
  background: var(--olive);
}

.card .ph.noimg img {
  width: 62%;
  height: auto;
  object-fit: contain;
}

.card:hover .ph img {
  transform: scale(1.04);
}

.card .badge {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--olive);
  color: var(--cream);
  font-size: 11px;
  font-weight: 600;
}

.card .body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  padding: 10px 12px 12px;
}

.card .name {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
}

.card .desc {
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(43, 51, 32, 0.6);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card .price {
  margin-top: auto;
  padding-top: 6px;
  font-weight: 600;
  font-size: 15px;
  color: var(--olive);
}

/* compact list (extras) */
.list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line-ink);
  font-size: 14px;
}

.list-row .name {
  flex: 1;
  font-weight: 500;
}

.list-row .price {
  font-weight: 600;
  color: var(--olive);
  white-space: nowrap;
}

.price bdi {
  font-variant-numeric: tabular-nums;
}

/* states */
.skeleton .card .ph,
.skeleton .sk-line {
  background: linear-gradient(90deg, var(--cream-2), #f4edd6, var(--cream-2));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}

.sk-line {
  height: 12px;
  border-radius: 6px;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.empty {
  padding: 56px 16px;
  text-align: center;
  color: rgba(43, 51, 32, 0.6);
}

.empty strong {
  display: block;
  margin-bottom: 4px;
  font-size: 17px;
  color: var(--olive-ink);
}

.m-foot {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line-ink);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: rgba(43, 51, 32, 0.6);
}

.m-foot a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* item sheet */
.sheet {
  width: 100%;
  max-width: 520px;
  max-height: 92dvh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 24px 24px 0 0;
  background: var(--paper);
  color: var(--olive-ink);
  overflow: hidden;
}

@media (min-width: 640px) {
  .sheet {
    margin: auto;
    border-radius: 24px;
  }
}

.sheet::backdrop {
  background: rgba(20, 24, 14, 0.55);
  backdrop-filter: blur(3px);
}

.sheet[open] {
  animation: sheet-in 0.35s var(--ease);
}

.sheet[open]::backdrop {
  animation: fade-in 0.3s var(--ease);
}

@keyframes sheet-in {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.sheet .scroll {
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sheet .hero-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--cream-2);
}

.sheet .hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sheet .hero-img.noimg {
  display: grid;
  place-items: center;
  background: var(--olive);
}

.sheet .hero-img.noimg img {
  width: 55%;
  height: auto;
  object-fit: contain;
}

.sheet .close {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(250, 246, 233, 0.92);
  color: var(--olive-ink);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.sheet .close svg {
  width: 18px;
  height: 18px;
}

.sheet .content {
  padding: 20px 20px calc(24px + env(safe-area-inset-bottom));
}

.sheet .cat-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--olive);
}

.sheet h3 {
  margin: 4px 0 0;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
}

html[lang="ar"] .sheet h3 {
  font-family: var(--font);
  font-weight: 700;
}

.sheet .alt {
  margin-top: 2px;
  font-size: 14px;
  color: rgba(43, 51, 32, 0.55);
}

.sheet .desc {
  margin: 12px 0 0;
  font-size: 15px;
  color: rgba(43, 51, 32, 0.78);
}

.sheet .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.sheet .price-lg {
  font-size: 22px;
  font-weight: 700;
  color: var(--olive);
}

.sheet .tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--cream-2);
  font-size: 12px;
  font-weight: 500;
}

.mods {
  margin-top: 20px;
}

.mods h4 {
  display: flex;
  justify-content: space-between;
  margin: 0 0 8px;
  font-size: 14px;
}

.mods h4 span {
  font-weight: 400;
  color: rgba(43, 51, 32, 0.55);
}

.mods ul {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  border: 1px solid var(--line-ink);
  border-radius: 14px;
  background: #fff;
}

.mods li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  font-size: 14px;
}

.mods li + li {
  border-top: 1px solid var(--line-ink);
}

.mods li .price {
  color: var(--olive);
  font-weight: 600;
}

.note {
  margin-top: 16px;
  font-size: 12.5px;
  color: rgba(43, 51, 32, 0.5);
}

.to-top {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom));
  inset-inline-end: 16px;
  z-index: 9;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--olive);
  color: var(--cream);
  box-shadow: 0 10px 24px -10px rgba(20, 24, 14, 0.6);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.to-top.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.to-top svg {
  width: 20px;
  height: 20px;
}

body.menu-page :focus-visible {
  outline-color: var(--olive);
}
