/* ============================================================
   AYVAH COFFEE MENU — STYLES
   Layout follows the printed menu: masthead with the Arabic mark,
   then cards, panels and banners on a two-column grid.
   Type: Lalezar (self-hosted, single weight) for every script.
   Phone first (one column), two columns from 860px.
   ============================================================ */

@font-face {
  font-family: 'Lalezar';
  src: url("assets/fonts/Lalezar-Regular.woff2") format("woff2"),
       url("assets/fonts/Lalezar-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Brand palette: three theme colours only. Surfaces and soft text are
   tints (light theme) or shades (dark theme) of those same colours.
   The theme is set on <html data-theme> by the inline script in
   index.html; .theme-light forces light tokens (used for the PDF). */
:root {
  --rust: #ab5a44;        /* theme colour 1 */
  --ink: #232323;         /* theme colour 2 */
  --grey: #5a5d5a;        /* theme colour 3 */
  --paper: #f9f3f2;       /* rust tint 7% */
}
:root, .theme-light {
  color-scheme: light;
  --bg: var(--paper);     /* page */
  --card: #fdfbfa;        /* rust tint 2.5% */
  --line: #e2c5be;        /* rust tint 35%: card borders */
  --rust-1: #f5ebe9;      /* rust tint 12% */
  --rust-2: #eededa;      /* rust tint 20% */
  --grey-1: #e6e7e6;      /* grey tint 15% */
  --grey-2: #d1d2d1;      /* grey tint 28% */
  --dots: #c5c6c5;        /* grey tint 35%: dot leaders */
  --text: var(--ink);
  --text-soft: var(--grey);
  --accent-text: var(--rust);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: var(--ink);
  --card: #2b2b2b;        /* ink + 14% grey */
  --line: #3c3d3c;        /* ink + 45% grey */
  --rust-1: #392c28;      /* ink + 16% rust */
  --rust-2: #46312c;      /* ink + 26% rust */
  --grey-1: #343434;      /* ink + 30% grey */
  --grey-2: #3c3d3c;      /* ink + 45% grey */
  --dots: #4a4c4a;        /* ink + 70% grey */
  --text: var(--paper);
  --text-soft: #b5b6b5;   /* grey tint 45% */
  --accent-text: #c89485; /* rust tint 65% */
}
:root {
  --r-lg: 24px;
  --r-md: 16px;
  --r-pill: 999px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --dur: 220ms;
  --gutter: 16px;
  --header-h: 64px;       /* overwritten by JS with the measured tab bar */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); overflow-x: clip; }
body {
  font-family: 'Lalezar', system-ui, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.45;
  font-synthesis: none;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
h1, h2, h3, p { margin: 0; font-weight: 400; }
button { font: inherit; color: inherit; cursor: pointer; }
/* Arabic is cursive: any letter-spacing breaks the joins between letters. */
:lang(ar) { letter-spacing: 0 !important; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }

.skip {
  position: absolute; inset-inline-start: var(--gutter); top: -60px; z-index: 100;
  background: var(--rust); color: var(--paper); padding: 10px 16px; border-radius: var(--r-pill);
  text-decoration: none; transition: top var(--dur) var(--ease);
}
.skip:focus-visible { top: 12px; }

.page { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter) 24px; }

/* ---------- masthead ---------- */
.masthead {
  position: relative; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 0 16px; border-bottom: 2px solid var(--rust);
}
.blob { position: absolute; border-radius: 50%; z-index: -1; pointer-events: none; }
.blob-l { width: 150px; height: 150px; left: -90px; top: -80px; background: var(--grey-1); }
.blob-r { width: 260px; height: 260px; right: -120px; top: -130px; background: var(--rust-2); }

.logo { display: block; width: 96px; height: 96px; border-radius: 18px; flex: none; }

.masthead-title { text-align: end; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 0; }
.menu-word { font-size: 44px; line-height: 1; text-transform: uppercase; color: var(--text); }
.cat { font-size: 16px; line-height: 1.2; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); }
.tagline { font-size: 13px; line-height: 1.35; color: var(--text-soft); max-width: 30ch; text-wrap: balance; }

/* ---------- tab bar (sticky) ---------- */
.tabbar {
  position: sticky; top: 0; z-index: 20; background: var(--bg);
  padding: 12px 0; margin-bottom: 8px;
}
.tabs { display: flex; gap: 8px; }
.tab {
  flex: 1; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 16px; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--card); color: var(--text);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform 120ms var(--ease);
  text-decoration: none;
}
.tab .pri { font-size: 16px; line-height: 1; letter-spacing: 0.04em; text-transform: uppercase; }
.tab .sec { font-size: 14px; line-height: 1; color: var(--text-soft); }
.tab:hover { border-color: var(--rust); }
.tab:active { transform: scale(0.98); }
/* white on rust: 4.9:1, where the paper tint is 4.47:1 */
.tab[aria-selected="true"] { background: var(--rust); border-color: var(--rust); color: #fff; }
.tab[aria-selected="true"] .sec { color: #fff; }

/* ---------- actions: theme toggle + PDF download ---------- */
.tabbar { display: flex; align-items: center; gap: 8px; }
.tabbar .tabs { flex: 1; min-width: 0; }
.actions { display: flex; gap: 8px; flex: none; }
.action {
  min-width: 46px; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--card); color: var(--text); font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase;
  transition: border-color var(--dur) var(--ease), transform 120ms var(--ease), opacity var(--dur) var(--ease);
}
.action:hover { border-color: var(--rust); }
.action:active { transform: scale(0.96); }
.action[aria-busy="true"] { opacity: 0.6; cursor: progress; }
.ui { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.action-label { display: none; }
/* language switch: short label on phones, full name from 600px; always in the sticky bar */
.lang-switch { text-decoration: none; text-transform: none; letter-spacing: 0; font-size: 15px; }
.action-short { display: inline; }
.ui-sun { display: none; }
[data-theme="dark"] .ui-sun { display: block; }
[data-theme="dark"] .ui-moon { display: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* phones: stack Arabic under English inside the tabs so both fit */
@media (max-width: 599px) {
  .tab { flex-direction: column; gap: 3px; padding: 6px 10px; min-height: 52px; }
  .tab .pri { font-size: 14px; }
  .tab .sec { font-size: 12px; }
  .action { min-height: 52px; min-width: 48px; padding: 8px; }
}
[data-theme="dark"] .peek { box-shadow: 0 0 0 1px var(--line), 0 28px 60px rgba(0, 0, 0, 0.5); }

/* ---------- tones ---------- */
.tone-rust-1 { background: var(--rust-1); }
.tone-rust-2 { background: var(--rust-2); }
.tone-grey { background: var(--grey-1); }

/* ---------- grid ---------- */
#panel, .cat-panel { display: flex; flex-direction: column; gap: 18px; }
.grid, .col { display: flex; flex-direction: column; gap: 18px; }

/* ---------- card ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 18px 20px;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-radius: var(--r-md); padding: 14px 18px; margin-bottom: 6px;
}
.card-head-text { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 10px; }
.card-title { font-size: 32px; line-height: 1.05; text-transform: uppercase; color: var(--accent-text); }
.card-head .sec { font-size: 17px; color: var(--text-soft); }
.card-tagline { grid-column: 1 / -1; font-size: 13.5px; color: var(--text-soft); }
.art { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; color: var(--accent-text); flex: none; }
.card-icon { width: 46px; height: 46px; }

.menu-section { padding-top: 16px; }
.menu-section + .menu-section { margin-top: 4px; }
.section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; scroll-margin-top: calc(var(--header-h) + 12px); }
.section-title { font-size: 17px; line-height: 1.2; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-text); }
.section-head .sec { font-size: 14px; color: var(--text-soft); }
.section-art { display: block; width: 64px; height: 56px; margin-block: 14px 4px; margin-inline-start: auto; }

/* ---------- item rows ---------- */
.items { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.item {
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 12px;
  width: 100%; padding: 7px 0; border: 0; background: none; text-align: start;
  -webkit-tap-highlight-color: transparent;
}
.item.has-thumb { grid-template-columns: 44px minmax(0, 1fr); }
/* an item without a photo lines up with its neighbours' text */
.items:has(.has-thumb) .item:not(.has-thumb) { padding-inline-start: 56px; }
.item-main { display: flex; flex-direction: column; min-width: 0; }
.item-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.item .pri { font-size: 15.5px; line-height: 1.25; color: var(--text); transition: color var(--dur) var(--ease); min-width: 0; }
.leader { flex: 1 1 12px; min-width: 12px; border-bottom: 2px dotted var(--dots); transform: translateY(-4px); }
.item .sec { font-size: 13px; line-height: 1.35; color: var(--text-soft); }
button.item:active .pri { color: var(--accent-text); }

/* the riyal sign sits left of the number in both languages */
.price { direction: ltr; unicode-bidi: isolate; display: inline-flex; align-items: baseline; gap: 3px; flex: none; color: var(--accent-text); font-size: 16px; line-height: 1; white-space: nowrap; }
.riyal { display: inline-block; width: 0.62em; height: 0.68em; fill: currentColor; }
.amount { font-variant-numeric: tabular-nums; }

.thumb {
  display: block; width: 44px; height: 44px; border-radius: 12px; object-fit: cover;
  background: var(--rust-1); box-shadow: inset 0 0 0 1px rgba(35, 35, 35, 0.06);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  button.item:hover .pri { color: var(--accent-text); }
  .thumb { cursor: zoom-in; }
  .thumb:hover { transform: scale(1.08); box-shadow: 0 0 0 2px var(--rust); }
}

/* ---------- card note / aside ---------- */
.block-note { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 18px; }
.block-note p { font-size: 14px; color: var(--text-soft); }
.note-art { width: 80px; height: 40px; }
.card-aside {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 18px; padding: 18px 22px; border-radius: var(--r-md);
}
.aside-title { font-size: 26px; line-height: 1.1; color: var(--accent-text); }
.card-aside p { margin-top: 6px; font-size: 14.5px; line-height: 1.5; color: var(--text); max-width: 26ch; }
.aside-art { width: 58px; height: 58px; }

/* ---------- panel (stay awhile.) ---------- */
.panel { position: relative; border-radius: var(--r-lg); padding: 26px 26px 22px; }
.panel-title { font-size: 38px; line-height: 1.05; color: var(--accent-text); }
.panel-text { margin-top: 8px; font-size: 16px; line-height: 1.5; color: var(--text); max-width: 24ch; }
.panel-art { position: relative; margin-top: 18px; min-height: 210px; }
.panel-mug { width: 150px; height: 150px; stroke-width: 3.2; }
.beans { display: flex; gap: 14px; margin: 6px 0 0 8px; }
.bean { width: 20px; height: 28px; stroke-width: 2; }
.bean:nth-child(2) { transform: translateY(14px) rotate(-8deg); }
.bean:nth-child(3) { transform: rotate(12deg); }
.badge {
  display: grid; place-items: center; text-align: center; flex: none;
  width: 92px; height: 92px; border-radius: 50%; padding: 12px;
  font-size: 13px; line-height: 1.15; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text);
}
.panel .badge { position: absolute; inset-inline-end: 0; bottom: 0; background: var(--rust-2); }

/* ---------- banners ---------- */
.banner {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-radius: var(--r-md); padding: 18px 22px;
}
.banner-text { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 14px; row-gap: 2px; min-width: 0; }
.banner-title { font-size: 34px; line-height: 1.05; text-transform: uppercase; color: var(--accent-text); }
.banner .sec { font-size: 18px; color: var(--text-soft); }
.banner-sub { flex-basis: 100%; font-size: 14.5px; color: var(--text-soft); }
.banner .badge { background: var(--grey-2); width: 84px; height: 84px; margin-block: -30px; margin-inline-end: -6px; }
.banner-lg { border-radius: var(--r-lg); padding: 28px 26px; flex-wrap: wrap; }
.banner-lg .banner-title { font-size: clamp(30px, 6vw, 44px); text-transform: none; text-wrap: balance; }
.banner-lg .banner-sub { color: var(--text); font-size: 15.5px; }
.banner-art { display: flex; align-items: flex-end; gap: 22px; }
.banner-icon { width: 76px; height: 50px; }
.banner-icon:first-child { width: 64px; height: 64px; }

/* ---------- deals carousel ---------- */
.deals { margin: 4px 0 18px; }
.deals-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  border-radius: var(--r-md); scrollbar-width: none; overscroll-behavior-x: contain;
}
.deals-track::-webkit-scrollbar { display: none; }
.deal { flex: 0 0 100%; scroll-snap-align: start; }
.deal picture { display: block; }
.deal img { display: block; width: 100%; height: auto; aspect-ratio: 2058 / 520; border-radius: var(--r-md); background: var(--grey-1); }
.deals-nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; }
.deals-arrow {
  display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: var(--card); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer;
}
.deals-arrow:hover { color: var(--accent-text); }
.deals-arrow.next .ui { transform: scaleX(-1); }
[dir="rtl"] .deals-arrow .ui { transform: scaleX(-1); }
[dir="rtl"] .deals-arrow.next .ui { transform: none; }
.deals-dots { display: flex; gap: 2px; }
.deals-dot { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.deals-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dots); transition: width var(--dur) var(--ease), background var(--dur) var(--ease); }
.deals-dot[aria-current="true"]::before { width: 22px; border-radius: 4px; background: var(--rust); }
@media (prefers-reduced-motion: reduce) { .deals-track { scroll-behavior: auto; } }
/* many deals: slimmer dots so the row still fits a phone */
.deals-dots:has(> :nth-child(8)) .deals-dot { width: 18px; }
.deals-dots:has(> :nth-child(8)) .deals-dot::before { width: 7px; height: 7px; }
.deals-dots:has(> :nth-child(8)) .deals-dot[aria-current="true"]::before { width: 14px; }

/* ---------- deals pop-up (posters) ---------- */
html:has(.promo[open]) { overflow: hidden; }
.promo {
  /* the poster is 4:5; it fits the screen width and height with room for the dots */
  --promo-w: min(440px, calc(100vw - 32px), calc((100dvh - 96px) * 0.8));
  width: var(--promo-w); max-width: none; max-height: none; margin: auto; padding: 0; border: 0;
  background: none; color: var(--paper); overflow: visible;
}
.promo[open] { animation: dialog-in 260ms var(--ease); }
.promo::backdrop { background: rgba(35, 35, 35, 0.72); animation: fade-in 260ms var(--ease); }
.promo-deals { margin: 0; }
.promo .deals-track { border-radius: var(--r-lg); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); }
.promo .deal img { aspect-ratio: 1080 / 1350; border-radius: var(--r-lg); }
.promo .deals-nav { margin-top: 12px; gap: 6px; }
/* many posters: compact controls so the row stays within the poster's width */
.promo .deals-nav:has(.deals-dots > :nth-child(8)) .deals-arrow { width: 34px; height: 34px; }
.promo .deals-dots:has(> :nth-child(8)) .deals-dot { width: 16px; }
.promo .deals-dot::before { background: rgba(255, 255, 255, 0.55); }
.promo .deals-dot[aria-current="true"]::before { background: var(--rust); }
.promo-close { top: 12px; inset-inline-end: 12px; z-index: 1; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.5); }
@media (prefers-reduced-motion: reduce) { .promo[open], .promo::backdrop { animation: none; } }

/* ---------- visit: branch + review QR ---------- */
.visit { margin-top: 22px; }
.visit-inner { display: flex; flex-direction: column; gap: 18px; }
.visit-card { display: flex; align-items: center; gap: 18px; border-radius: var(--r-lg); padding: 22px; }
.visit-text { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.visit-label { font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-soft); }
.visit-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 26px; line-height: 1.1; color: var(--text); }
.visit-name .sec { font-size: 20px; color: var(--text-soft); }
.visit-ar { font-size: 17px; color: var(--text-soft); }
.visit-sub { font-size: 14.5px; line-height: 1.45; color: var(--text-soft); }
.visit-pin { width: 56px; height: 56px; align-self: flex-start; }
.visit-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; min-height: 44px; padding: 10px 18px;
  border-radius: var(--r-pill); background: var(--rust); color: #fff; text-decoration: none;
  font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase;
  transition: transform 120ms var(--ease), filter var(--dur) var(--ease);
}
.visit-btn:hover { filter: brightness(1.08); }
.visit-btn:active { transform: scale(0.97); }
.visit-btn .ui { width: 18px; height: 18px; }
/* the QR always sits on a light tile so phones can scan it in dark mode too */
.qr-tile { cursor: pointer; display: block; flex: none; width: 132px; height: 132px; padding: 6px; border-radius: 18px; background: #fdfbfa; box-shadow: 0 0 0 1px var(--line); }
.qr { display: block; width: 100%; height: 100%; border-radius: 12px; }
@media (max-width: 599px) {
  .visit-review, .visit-social, .visit-branch:has(.qr-tile) { flex-direction: column; align-items: flex-start; }
  .visit-card .qr-tile { width: 168px; height: 168px; }
}
@media (min-width: 860px) {
  .visit-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
  .qr-tile { width: 150px; height: 150px; }
}
/* PDF QR strip: one slim row */
.pdf-qrs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; }
.pdf-qr { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: var(--r-md); min-width: 0; }
[dir="rtl"] .pdf-qr { padding: 8px 8px 8px 12px; }
.pdf-qr .qr-tile { width: 112px; height: 112px; padding: 5px; border-radius: 12px; }
.pdf-qr .qr { border-radius: 8px; }
.pdf-qr-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pdf-qr-title { font-size: 15px; line-height: 1.15; color: var(--text); }
.pdf-qr-sub { font-size: 11.5px; line-height: 1.3; color: var(--text-soft); }

/* tighter steps for a page that would overflow */
.export-page.fit-1 .item { padding: 1.5px 0; }
.export-page.fit-1 .menu-section { padding-top: 6px; }
.export-page.fit-2 .item { padding: 1px 0; }
.export-page.fit-2 .item .pri, .export-page.fit-2 .price { font-size: 13px; }
.export-page.fit-2 .item .sec { font-size: 11px; }
.export-page.fit-2 .menu-section { padding-top: 4px; }
.export-page.fit-2 .card-head { padding: 8px 14px; }
.export-page.fit-3 .item .pri, .export-page.fit-3 .price { font-size: 12px; }
.export-page.fit-3 .item .sec { font-size: 10.5px; }
.export-page.fit-3 .export-body, .export-page.fit-3 .grid, .export-page.fit-3 .col { gap: 10px; }

/* ---------- visit, about, FAQ ---------- */
.visit, .follow, .about, .faq { margin-top: 26px; }
/* a lone follow card spans the row on wide screens */
.follow-inner > .visit-card:only-child { grid-column: 1 / -1; }
.block-heading {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px;
  font-size: 17px; line-height: 1.2; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text);
}
.block-heading::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rust); flex: none; }
address.visit-sub { font-style: normal; }
.visit-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.visit-actions .visit-btn { margin-top: 10px; }
.visit-btn.ghost { background: var(--card); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.visit-btn .num { font-variant-numeric: tabular-nums; }
.visit-more { display: grid; gap: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); align-items: start; }
.visit-group { display: flex; flex-direction: column; gap: 6px; }
.visit-note { font-size: 14px; color: var(--text-soft); }
.plain { margin: 0; padding: 0; list-style: none; font-size: 15px; color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 6px 12px; border-radius: var(--r-pill); background: var(--rust-1); font-size: 14px; color: var(--text); }
.about p {
  max-width: 70ch; padding: 20px 22px; border-radius: var(--r-lg); background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 16px; line-height: 1.75; color: var(--text); text-wrap: pretty;
}
.faq-list { border-radius: var(--r-lg); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); padding: 4px 22px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 12px 0;
  cursor: pointer; list-style: none; font-size: 16px; line-height: 1.35; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 22px; line-height: 1; color: var(--accent-text); transition: transform var(--dur) var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent-text); }
.faq details p { margin: 0 0 16px; font-size: 15px; line-height: 1.7; color: var(--text-soft); max-width: 75ch; }
@media (min-width: 860px) {
  .visit-more { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

/* ---------- footer ---------- */
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px;
  margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--text-soft);
}
.foot-brand { letter-spacing: 0.1em; text-transform: uppercase; }
.foot a { color: inherit; text-underline-offset: 3px; }
.foot-nap { color: var(--text); }

/* ---------- hover preview (desktop / mouse) ---------- */
.peek {
  position: fixed; left: 0; top: 0; z-index: 40;
  width: clamp(280px, 26vw, 380px); padding: 10px 10px 14px;
  background: var(--ink); border-radius: var(--r-lg); box-shadow: 0 28px 60px rgba(35, 35, 35, 0.35);
  pointer-events: none; opacity: 0; visibility: hidden;
  transition: opacity 160ms var(--ease), visibility 0s linear 160ms;
}
.peek.on { opacity: 1; visibility: visible; transition: opacity 160ms var(--ease), visibility 0s; }
.peek img {
  display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--r-md);
  background: var(--rust-1); object-fit: cover; opacity: 0; transition: opacity var(--dur) var(--ease);
}
.peek img.loaded, .item-card img.loaded { opacity: 1; }
.peek-name { display: block; padding: 10px 6px 0; font-size: 18px; line-height: 1.1; color: var(--paper); }
@media (hover: none), (pointer: coarse) { .peek { display: none; } }

/* ---------- product card (tap / click) ----------
   Phone: bottom sheet. Tablet and up: centred card. */
html:has(.item-card[open]) { overflow: hidden; }
.item-card {
  position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none;
  max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain;
  padding: 0 0 env(safe-area-inset-bottom); border: 0; border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: var(--card); color: var(--text);
}
.item-card[open] { animation: sheet-in 280ms var(--ease); }
.item-card::backdrop { background: rgba(35, 35, 35, 0.6); animation: fade-in 280ms var(--ease); }
.card-media { padding: 12px 12px 0; }
.card-media img {
  display: block; width: 100%; height: auto; aspect-ratio: 1; max-height: 58dvh; object-fit: cover;
  border-radius: var(--r-md); background: var(--rust-1); opacity: 0; transition: opacity var(--dur) var(--ease);
}
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 18px 22px 28px; }
.card-section { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text); }
.card-name { font-size: 32px; line-height: 1.05; color: var(--text); text-wrap: balance; }
.card-name-ar { font-size: 18px; line-height: 1.4; color: var(--text-soft); }
.card-note { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-soft); }
.item-card .card-price { margin-top: 10px; font-size: 30px; }
.card-close {
  position: absolute; top: 22px; inset-inline-end: 22px; width: 44px; height: 44px; border: 0; border-radius: var(--r-pill);
  display: grid; place-items: center; background: rgba(35, 35, 35, 0.72); color: var(--paper);
  transition: background var(--dur) var(--ease), transform 120ms var(--ease);
}
.card-close:hover { background: var(--ink); }
.card-close:active { transform: scale(0.94); }
.card-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }

/* tablet: centred dialog instead of the bottom drawer */
@media (min-width: 768px) {
  .item-card {
    inset: 0; margin: auto; width: min(480px, calc(100% - 64px)); max-height: calc(100dvh - 64px);
    padding: 0; border-radius: var(--r-lg); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  }
  .item-card[open] { animation: dialog-in 220ms var(--ease); }
  .card-media img { max-height: 52dvh; }
  .card-body { padding: 18px 26px 28px; }
  .card-name { font-size: 36px; }
}
/* desktop: wider dialog, photo beside the details */
@media (min-width: 1024px) {
  .item-card[open] { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); align-items: center; }
  .item-card { width: min(820px, calc(100% - 96px)); }
  .card-media { padding: 14px; }
  .card-media img { max-height: calc(100dvh - 120px); }
  .card-body { padding: 28px 40px 28px 16px; }
  .card-name { font-size: 40px; }
  .card-close { top: 18px; inset-inline-end: 18px; }
}
@keyframes dialog-in { from { transform: translateY(10px) scale(0.97); opacity: 0; } }

/* the review QR in the same dialog: whole code visible on a light tile */
.item-card.is-qr .card-media img { object-fit: contain; background: #fdfbfa; max-height: min(58dvh, 440px); margin: 0 auto; }
.item-card.is-qr .card-name { font-size: 30px; }
/* phone + tablet: room above the code so the close button never covers a corner */
@media (max-width: 1023px) {
  .item-card.is-qr .card-media { padding: 72px 44px 0; }
}
.card-action { align-self: flex-start; margin-top: 14px; }
.card-action[hidden], .card-price[hidden] { display: none; }
.qr-tile { border: 0; font: inherit; }


/* ---------- loading / error ---------- */
.skeleton .bar { height: 14px; border-radius: 7px; background: var(--rust-1); position: relative; overflow: hidden; }
.skeleton .bar::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: translateX(-100%); animation: shimmer 1.4s var(--ease) infinite;
}
.skeleton .head { width: 40%; height: 22px; margin: 6px 0 18px; }
.skeleton .row { display: grid; grid-template-columns: 1fr 44px; gap: 16px; padding: 10px 0; }
.skeleton .row .bar:first-child { width: 70%; }
@keyframes shimmer { to { transform: translateX(100%); } }

.notice { padding: 22px 24px; border-radius: var(--r-md); background: var(--rust-1); }
.notice strong { display: block; font-size: 18px; margin-bottom: 6px; font-weight: 400; }
.notice p { font-size: 15px; color: var(--text-soft); max-width: 48ch; }
.notice button {
  margin-top: 14px; min-height: 44px; padding: 10px 20px; border: 0; border-radius: var(--r-pill);
  background: var(--rust); color: var(--paper);
}

/* ---------- PDF export pages (built off-screen, light theme) ---------- */
.export-root {
  position: absolute; left: 0; top: 0; z-index: -10; width: var(--export-w); visibility: hidden;
  color: var(--text); pointer-events: none;
}
.export-page {
  width: var(--export-w); height: var(--export-h); padding: 40px 48px 30px; overflow: hidden;
  display: flex; flex-direction: column; gap: 16px; background: var(--bg); position: relative; isolation: isolate;
}
.export-page .masthead { padding: 6px 0 16px; }
.export-page .logo { width: 120px; height: 120px; border-radius: 20px; }
.export-page .blob-l { left: -120px; top: -110px; }
.export-page .blob-r { right: -150px; top: -200px; }
.export-body { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.export-page .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.export-page .col { gap: 16px; }
.export-page .card { padding: 14px 20px 18px; }
.export-page .card-head { padding: 10px 16px; }
.export-page .card-title { font-size: 28px; }
.export-page .menu-section { padding-top: 10px; }
.export-page .item { padding: 2.5px 0; }
.export-page .item .pri { font-size: 14px; flex: none; }
.export-page .item .sec { font-size: 12px; flex: 0 1 auto; min-width: 0; line-height: 1.25; }
.export-page .price { font-size: 14px; }
.export-page .leader { transform: translateY(-3px); }
.export-page .panel-art { min-height: 170px; }
.export-page .panel-mug { width: 120px; height: 120px; }
.export-page .section-art { width: 52px; height: 44px; margin-top: 8px; }
.export-page .banner-lg { padding: 20px 24px; flex-wrap: nowrap; }
.export-page .banner-lg .banner-title { font-size: 34px; }
.export-page .foot { margin-top: 0; }

/* ============================================================
   WIDER SCREENS
   ============================================================ */
@media (min-width: 600px) {
  :root { --gutter: 28px; }
  .masthead { padding: 30px 0 20px; }
  .logo { width: 128px; height: 128px; border-radius: 22px; }
  .menu-word { font-size: 60px; }
  .cat { font-size: 19px; }
  .tagline { font-size: 14.5px; max-width: none; }
  .blob-l { width: 200px; height: 200px; left: -100px; top: -90px; }
  .blob-r { width: 360px; height: 360px; right: -150px; top: -190px; }
  .tabbar .tabs { max-width: 480px; }
  .action-label { display: inline; }
  .action-short { display: none; }
  .actions { margin-inline-start: auto; }
  .card { padding: 20px 26px 26px; }
}

@media (min-width: 860px) {
  :root { --gutter: 40px; }
  .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
  .col { gap: 22px; }
  #panel, .cat-panel { gap: 22px; }
  .banner-lg { flex-wrap: nowrap; }
}

@media (min-width: 1200px) {
  .blob-l { left: -140px; }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- print ---------- */
@media print {
  .tabbar, .peek, .item-card, .promo, .blob, .skip, .export-root, .visit-btn, .deals-nav { display: none !important; }
  .thumb { display: none; }
  .item.has-thumb { grid-template-columns: minmax(0, 1fr); }
  .items:has(.has-thumb) .item:not(.has-thumb) { padding-inline-start: 0; }
  .card { break-inside: avoid; }
}
