:root {
  --brown: #563B26;
  --brown-deep: #3D2620;
  --terracotta: #9A5A3C;
  --cream: #EDE4D6;
  --paper: #F5F0E8;
  --card: #FFFCF7;
  --ink: #3A2718;
  --muted: #8C7663;
  --line: #E3D6C4;
  --chip: #F0E5D5;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Tajawal', system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.en { font-family: 'Cormorant Garamond', Georgia, serif; font-variant-numeric: lining-nums; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.top {
  background: var(--brown);
  color: var(--cream);
  text-align: center;
  padding: 26px 16px 18px;
}
.logo { width: 118px; height: auto; display: block; margin: 0 auto; }
.tagline { margin-top: 8px; font-size: 13px; opacity: .8; letter-spacing: .02em; }
.tagline .en { font-size: 15px; letter-spacing: .08em; }
.tagline .dot { margin: 0 4px; }

.switch {
  position: sticky; top: 0; z-index: 20;
  background: var(--brown);
  padding: 0 16px 14px;
  box-shadow: 0 6px 16px -10px rgba(40, 24, 12, .6);
}
.switch-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  background: rgba(237, 228, 214, .12);
  border-radius: 14px; padding: 4px;
  max-width: 480px; margin: 0 auto;
}
.switch button {
  border-radius: 11px; padding: 9px 8px 7px;
  color: var(--cream);
  display: flex; flex-direction: column; align-items: center; line-height: 1.15;
  transition: background .2s, color .2s;
}
.switch button .ar { font-weight: 700; font-size: 16px; }
.switch button .en { font-size: 13px; opacity: .75; letter-spacing: .06em; }
.switch button[aria-selected="true"] { background: var(--cream); color: var(--brown); }
.switch button:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }

main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 8px 16px 32px; }

.group { padding-top: 26px; }
.group-head {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 10px; margin-bottom: 4px;
  border-bottom: 1.5px solid var(--terracotta);
}
.group-head svg { width: 26px; height: 26px; flex: 0 0 auto; color: var(--terracotta); }
.group-head h2 { font-size: 19px; font-weight: 800; color: var(--brown); }
.group-head .en {
  margin-inline-start: auto;
  font-size: 15px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--terracotta);
}

.row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px dashed var(--line);
}
.row:last-child { border-bottom: 0; }
.row .names { flex: 1; min-width: 0; }
.row .ar { font-size: 16px; font-weight: 700; line-height: 1.35; }
.row .names .en { display: block; direction: ltr; text-align: right; font-size: 15px; color: var(--muted); line-height: 1.25; }
.note {
  display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap; margin-top: 5px;
  font-size: 12px; color: var(--terracotta);
  background: var(--chip); border-radius: 999px; padding: 2px 9px;
}
.note .en { font-size: 13.5px; opacity: .8; }
.row .names .note .en { display: inline; color: inherit; }

.kcal { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; }

.price {
  flex: 0 0 auto; text-align: center; min-width: 46px;
  font-weight: 800; font-size: 18px; color: var(--brown); line-height: 1;
  padding-top: 2px;
}
.price small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); margin-top: 3px; }

.sizes-head {
  display: flex; justify-content: flex-end; gap: 12px;
  padding: 10px 2px 0; font-size: 12px; color: var(--muted);
}
.sizes-head span, .prices .price { min-width: 46px; text-align: center; }
.prices { display: flex; gap: 12px; }

.sweets-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  padding-top: 22px;
}
@media (min-width: 620px) { .sweets-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }

.card {
  background: var(--card); border-radius: 18px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(86, 59, 38, .06), 0 6px 18px -12px rgba(86, 59, 38, .35);
  display: flex; flex-direction: column;
}
.card .ph { aspect-ratio: 1 / 1; background: #F3E3CF; }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 1px; flex: 1; }
.card .ar { font-size: 15px; font-weight: 700; line-height: 1.35; }
.card .body > .en { direction: ltr; text-align: right; font-size: 14.5px; color: var(--muted); line-height: 1.2; }
.card .meta { margin-top: auto; padding-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.card .price { text-align: start; min-width: 0; padding: 0; font-size: 17px; }
.card .price small { display: inline; margin: 0 3px 0 0; }
.card .kcal { margin: 0; }

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

.foot {
  background: var(--brown); color: var(--cream);
  text-align: center; padding: 22px 16px calc(22px + env(safe-area-inset-bottom));
  font-size: 12.5px;
}
.foot p { opacity: .85; }
.foot .en { font-size: 14px; opacity: .65; }
.credit {
  display: inline-block; margin-top: 14px;
  font-size: 11.5px; color: var(--cream); opacity: .5;
  text-decoration: none; letter-spacing: .02em;
}
.credit:hover, .credit:focus-visible { opacity: .85; }
