/* ==========================================================================
   Pref Menu — guest stylesheet.
   Hand written, no framework, no build. Every colour derives from the single
   brand hex in menu.json, so a new customer rebrands from the admin panel.
   Written with logical properties throughout so Arabic and Kurdish flip for
   free rather than needing a separate RTL sheet.
   ========================================================================== */

:root {
  --brand: #23181c;
  --ink:   #fefefe;

  --bg:        var(--brand);
  --bg-far:    color-mix(in oklab, var(--brand) 62%, #9d818a);
  --surface:   color-mix(in oklab, var(--brand) 88%, #ffffff);
  --surface-2: color-mix(in oklab, var(--brand) 80%, #ffffff);
  --line:      color-mix(in oklab, var(--ink) 15%, transparent);
  --line-soft: color-mix(in oklab, var(--ink) 8%,  transparent);
  --muted:     color-mix(in oklab, var(--ink) 60%, transparent);
  --faint:     color-mix(in oklab, var(--ink) 40%, transparent);
  --accent:    #e0a94a;

  --col: 34rem;              /* the phone column, on every screen size */
  --r:   14px;
  --r-sm: 10px;
  --head-h: 3.75rem;
  --tabs-h: 3rem;
  --pad: 1.15rem;

  --shadow: 0 1px 2px rgb(0 0 0 / .28), 0 8px 24px -12px rgb(0 0 0 / .5);
  --ease: cubic-bezier(.22, .61, .36, 1);

  --font: "Urbanist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-rtl: "IBM Plex Sans Arabic", ui-sans-serif, system-ui, sans-serif;
}

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

/* An author-origin `display` outranks the UA stylesheet's [hidden] rule, so
   `el.hidden = true` silently did nothing on anything we gave a display to —
   the lightbox kept showing the previous item's photo. State it once, here. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg) linear-gradient(191deg, var(--bg) 0%, var(--bg-far) 78%) fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;   /* not `hidden` — that would break the sticky header/tabs */
}
html[dir="rtl"] body { font-family: var(--font-rtl); }

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; }   /* icon SVGs use currentColor; without this they go link-blue */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto !important; }
}

/* --------------------------------------------------------------- layout */

.shell {
  width: 100%;
  max-width: var(--col);
  margin-inline: auto;
  min-height: 100svh;
  position: relative;
  z-index: 2;
  padding-bottom: env(safe-area-inset-bottom);
}

/* Desktop: the menu keeps its phone proportions and the empty space becomes a
   branded panel, rather than stretching a mobile layout across 1400px. */
.stage { display: none; }
@media (min-width: 60rem) {
  .stage {
    display: grid;
    place-items: center;
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    width: calc(50% - var(--col) / 2);
    border-inline-end: 1px solid var(--line-soft);
    background: linear-gradient(191deg, var(--bg) 0%, var(--bg-far) 70%);
  }
  .stage img { width: 9rem; opacity: .9; }
  .shell { box-shadow: 0 0 60px rgb(0 0 0 / .35); }
}

/* --------------------------------------------------------------- boot */

.boot { min-height: 100svh; display: grid; place-items: center; }
.spinner {
  width: 2rem; height: 2rem; border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--ink);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* --------------------------------------------------------------- intro */

.intro {
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto auto;
  padding: 2rem var(--pad) 1.25rem;
  text-align: center;
  position: relative;
}
.intro::before {                       /* soft glow so the logo is not floating */
  content: "";
  position: absolute;
  inset-block-start: 12%;
  inset-inline: 0;
  margin-inline: auto;
  width: min(24rem, 90%);
  aspect-ratio: 1;
  background: radial-gradient(circle, color-mix(in oklab, var(--ink) 9%, transparent), transparent 68%);
  pointer-events: none;
}
.intro__main { display: grid; align-content: center; justify-items: center; gap: .35rem; position: relative; }
.intro__logo {
  width: min(11rem, 46vw);
  height: auto;
  object-fit: contain;
  margin-bottom: 1.25rem;
  animation: rise .7s var(--ease) both;
}
.intro__name {
  font-size: clamp(1.6rem, 7vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 0;
  animation: rise .7s var(--ease) .06s both;
}
.intro__desc {
  color: var(--muted);
  margin: .1rem 0 0;
  font-size: .98rem;
  line-height: 1.6;
  max-width: 26rem;
  animation: rise .7s var(--ease) .12s both;
}
@keyframes rise { from { opacity: 0; translate: 0 .75rem; } to { opacity: 1; translate: 0 0; } }

.intro__actions { display: grid; gap: .6rem; margin-block: 2rem 1.25rem; animation: rise .7s var(--ease) .18s both; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 3.25rem;
  padding-inline: 1.5rem;
  border: 0;
  border-radius: var(--r);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s var(--ease), background-color .15s var(--ease);
}
.btn:active { transform: scale(.985); }
.btn--primary { background: var(--ink); color: var(--brand); }
.btn--ghost {
  background: color-mix(in oklab, var(--ink) 8%, transparent);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn--ghost:hover { background: color-mix(in oklab, var(--ink) 13%, transparent); }
.btn--block { width: 100%; }

.langpick { display: flex; gap: .4rem; justify-content: center; margin-bottom: 1.5rem; }
.langpick button {
  min-height: 2.5rem;
  padding-inline: 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
  transition: all .15s var(--ease);
}
.langpick button[aria-pressed="true"] { background: var(--ink); color: var(--brand); border-color: transparent; }

.social { display: flex; gap: .55rem; justify-content: center; }
.social a {
  width: 2.75rem; height: 2.75rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: color-mix(in oklab, var(--ink) 10%, transparent);
  color: var(--ink);
  text-decoration: none;
  transition: background-color .15s var(--ease);
}
.social a:hover { background: color-mix(in oklab, var(--ink) 20%, transparent); }
.social svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }

.foot { color: var(--faint); font-size: .72rem; margin-top: 1.5rem; }

/* --------------------------------------------------------------- header */

.head {
  position: sticky;
  inset-block-start: 0;
  z-index: 20;
  height: var(--head-h);
  display: flex;
  align-items: center;
  gap: .5rem;
  padding-inline: .6rem;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-block-end: 1px solid var(--line-soft);
}
.iconbtn {
  width: 2.75rem; height: 2.75rem;
  display: grid; place-items: center;
  border: 0; border-radius: var(--r-sm);
  background: transparent;
  cursor: pointer;
  flex: none;
  transition: background-color .15s var(--ease);
}
.iconbtn:hover { background: color-mix(in oklab, var(--ink) 10%, transparent); }
.iconbtn svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html[dir="rtl"] .iconbtn--back svg { transform: scaleX(-1); }

.head__logo { height: 2rem; width: auto; object-fit: contain; margin-inline: auto; }
.head__title { margin: 0; font-size: 1.05rem; font-weight: 600; margin-inline: auto; }

/* Language picker. The button names the language you are CURRENTLY reading;
   the menu is where you switch. The old control was labelled with the next
   language in a cycle, which read as a status rather than an action. */
.langwrap { position: relative; flex: none; }

.langbtn {
  display: flex; align-items: center; gap: .35rem;
  min-height: 2.5rem;
  padding-inline: .7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
}
.langbtn svg {
  width: 1.05rem; height: 1.05rem; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7;
}
.langbtn .chev { font-size: .6rem; opacity: .6; transition: rotate .18s var(--ease); }
.langbtn[aria-expanded="true"] .chev { rotate: 180deg; }

/* Same trap as the lightbox: a class display would beat the hidden attribute. */
.langmenu[hidden] { display: none; }

.langmenu {
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: calc(100% + .45rem);
  z-index: 30;
  min-width: 11rem;
  padding: .3rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: color-mix(in oklab, var(--bg) 60%, black);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  animation: pop .16s var(--ease);
}
@keyframes pop { from { opacity: 0; translate: 0 -.35rem; } }

.langmenu button {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  width: 100%;
  min-height: 2.75rem;
  padding: .5rem .7rem;
  border: 0; border-radius: var(--r-sm);
  background: none;
  color: var(--muted);
  font-size: .95rem;
  text-align: start;
  cursor: pointer;
}
.langmenu button:hover { background: color-mix(in oklab, var(--ink) 10%, transparent); }
.langmenu button[aria-current="true"] { color: var(--ink); font-weight: 600; }
.langmenu .tick { color: var(--accent); }

/* --------------------------------------------------------------- tabs */

.tabs {
  position: sticky;
  inset-block-start: var(--head-h);
  z-index: 19;
  display: flex;
  gap: .4rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  padding: .55rem var(--pad);
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-block-end: 1px solid var(--line-soft);
  scroll-padding-inline: var(--pad);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  white-space: nowrap;
  min-height: 2.25rem;
  padding: .4rem .85rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  flex: none;
  transition: all .18s var(--ease);
}
.tab[aria-current="true"] { background: var(--ink); color: var(--brand); border-color: transparent; }

/* --------------------------------------------------------------- menu */

.menu { padding: 0 var(--pad) 4rem; }

.viewtoggle { display: flex; justify-content: flex-end; padding-block: .85rem .25rem; }
.viewtoggle button {
  display: flex; align-items: center; gap: .35rem;
  min-height: 2.25rem; padding-inline: .7rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: transparent; color: var(--muted);
  font-size: .8rem; cursor: pointer;
}
.viewtoggle svg {
  width: 1rem; height: 1rem;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.section { scroll-margin-block-start: calc(var(--head-h) + var(--tabs-h) + .5rem); }

.section__title {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin: 2rem 0 1rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: color-mix(in oklab, var(--ink) 88%, transparent);
}
.section__title::before,
.section__title::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}

/* grid view */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  overflow: hidden;
  text-align: start;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform .18s var(--ease), border-color .18s var(--ease);
}
.card:active { transform: scale(.985); }
.card:hover { border-color: var(--line); }

/* One fixed ratio for every photo, so the grid reads as a grid. The reference
   uses 20vh here, which changes shape on every device. */
.card__img { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; background: var(--surface-2); }
.card__img--none {
  aspect-ratio: 1 / 1;
  display: grid; place-items: center;
  background: var(--surface-2);
  color: var(--faint);
  font-size: 1.6rem;
}
.card__body { padding: .6rem .7rem .7rem; display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.card__name {
  unicode-bidi: plaintext;
  font-size: .92rem; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__price {
  margin-top: auto; padding-top: .4rem; font-size: .9rem; font-weight: 600;
  direction: ltr; unicode-bidi: isolate;
}
html[dir="rtl"] .card__price { text-align: right; }

/* list view */
.list { display: flex; flex-direction: column; gap: .45rem; }
.row {
  display: flex;
  gap: .8rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: .6rem;
  text-align: start;
  cursor: pointer;
  transition: transform .18s var(--ease);
}
.row:active { transform: scale(.99); }
.row__img { width: 3.5rem; height: 3.5rem; border-radius: var(--r-sm); object-fit: cover; flex: none; background: var(--surface-2); }
.row__img--none { display: grid; place-items: center; color: var(--faint); font-size: 1.3rem; }
.row__body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: .15rem; }
.row__name { font-size: .98rem; font-weight: 600; unicode-bidi: plaintext; }
.row__price { font-size: .95rem; font-weight: 600; white-space: nowrap; direction: ltr; unicode-bidi: isolate; }

.price__sm { font-size: .72rem; color: var(--muted); font-weight: 500; }
.cur { font-size: .68em; color: var(--faint); margin-inline-start: .2em; font-weight: 500; }

.badge {
  display: inline-block;
  font-size: .62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--accent);
  border: 1px solid color-mix(in oklab, var(--accent) 45%, transparent);
  border-radius: 4px;
  padding: .05rem .3rem;
  margin-inline-end: .3rem;
  vertical-align: 1px;
}

.empty { text-align: center; color: var(--muted); padding: 4rem 1rem; }

/* Floating actions */
.fabs {
  position: fixed;
  inset-block-end: calc(1rem + env(safe-area-inset-bottom));
  inset-inline-end: 1rem;
  z-index: 15;
  display: flex; flex-direction: column; gap: .5rem;
}
@media (min-width: 60rem) {
  .fabs { inset-inline-end: calc(50% - var(--col) / 2 + 1rem); }
}
.fab {
  width: 3rem; height: 3rem;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: color-mix(in oklab, var(--bg) 75%, black);
  backdrop-filter: blur(8px);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.fab svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fab[hidden] { display: none; }

/* --------------------------------------------------------------- feedback */

.fb { padding: .5rem var(--pad) 4rem; }
.fb__intro { text-align: center; margin-block: 1.25rem 2rem; }
.fb__title { font-size: clamp(1.4rem, 6vw, 1.75rem); font-weight: 700; margin: 0 0 .4rem; }
.fb__sub { color: var(--muted); margin: 0; font-size: .95rem; line-height: 1.6; }

.field { margin-bottom: 1.1rem; }
.field__label { display: block; font-size: .92rem; font-weight: 600; margin-bottom: .5rem; }
.field__hint { font-size: .78rem; color: var(--faint); font-weight: 400; }

.rate {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: .85rem 1rem;
  margin-bottom: .55rem;
}
.rate__name { font-size: .95rem; font-weight: 500; }
.stars { display: flex; gap: .15rem; }
.star {
  width: 2.4rem; height: 2.4rem;      /* 44px tap target, not a 16px glyph */
  display: grid; place-items: center;
  border: 0; background: none; cursor: pointer;
  color: var(--faint);
  font-size: 1.45rem; line-height: 1;
  padding: 0;
  transition: color .12s var(--ease), transform .12s var(--ease);
}
.star[data-on="1"] { color: var(--accent); }
.star:active { transform: scale(.85); }

.smiles {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: .7rem .5rem;
}
.smile {
  display: grid; justify-items: center; gap: .3rem;
  padding: .5rem .1rem;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: none; cursor: pointer;
  transition: all .15s var(--ease);
}
.smile span:first-child { font-size: 1.75rem; line-height: 1; filter: grayscale(1); opacity: .5; transition: all .18s var(--ease); }
.smile span:last-child  { font-size: .65rem; color: var(--faint); text-align: center; line-height: 1.2; }
.smile[aria-pressed="true"] { border-color: var(--line); background: color-mix(in oklab, var(--ink) 7%, transparent); }
.smile[aria-pressed="true"] span:first-child { filter: none; opacity: 1; transform: scale(1.15); }
.smile[aria-pressed="true"] span:last-child { color: var(--ink); }

.input, .textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  padding: .85rem 1rem;
  min-height: 3.25rem;
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .textarea:focus { outline: none; border-color: color-mix(in oklab, var(--ink) 40%, transparent); }
.textarea { min-height: 6.5rem; resize: vertical; line-height: 1.55; }

.counter { text-align: end; font-size: .72rem; color: var(--faint); margin-top: .3rem; }

.hp {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; white-space: nowrap;
  clip-path: inset(50%);          /* no negative offsets, so RTL-safe */
}

.note {
  border-radius: var(--r);
  padding: .8rem 1rem;
  font-size: .88rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}
.note--err { background: color-mix(in oklab, #ff5f56 18%, transparent); border: 1px solid color-mix(in oklab, #ff5f56 40%, transparent); }

.thanks { text-align: center; padding: 5rem 1rem; animation: rise .5s var(--ease) both; }
.thanks__mark { font-size: 3.5rem; margin-bottom: 1rem; }
.thanks h2 { font-size: 1.5rem; margin: 0 0 .5rem; }
.thanks p { color: var(--muted); margin: 0 0 2rem; line-height: 1.6; }

/* --------------------------------------------------------------- lightbox */

/* A class rule with display:grid beats the UA stylesheet's [hidden]{display:none},
   so the overlay must opt out of its own display explicitly. */
.lightbox[hidden] { display: none; }

.lightbox {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: color-mix(in oklab, #000 88%, transparent);
  backdrop-filter: blur(6px);
  animation: fade .2s var(--ease);
}
@keyframes fade { from { opacity: 0; } }
.lightbox img { max-width: 100%; max-height: 72svh; border-radius: var(--r); object-fit: contain; }
.lightbox__cap { text-align: center; max-width: 30rem; }
.lightbox__cap b { display: block; font-size: 1.1rem; margin-bottom: .3rem; }
.lightbox__cap span { color: var(--muted); font-size: .9rem; line-height: 1.55; }
.lightbox__close {
  position: absolute;
  inset-block-start: max(1rem, env(safe-area-inset-top));
  inset-inline-end: 1rem;
  width: 2.75rem; height: 2.75rem;
  border: 0; border-radius: 50%;
  background: color-mix(in oklab, var(--ink) 12%, transparent);
  color: var(--ink); font-size: 1.6rem; line-height: 1;
  cursor: pointer;
}
