/* menu.css - the menu (menu.html) and the windows both pages use (index.html
   loads it too, after home.css). Search, menu page top, item cards, menu
   states, item window, packages.

   Contents - search for the marker, e.g. "== MENU: search ==":
     == MENU: search ==  topbar search bar and results
     == MENU: page top ==  menu.html banner + categories (icons on a computer, fold-out list on a phone)
     == MENU: category bar ==  the categories under the topbar while reading the dishes
     == MENU: cards ==  menu grid, category titles, item cards, quantity, add to cart
     == MENU: states ==  menu load error, store-closed popup
     == MENU: item window ==  item modal, photo window (bottom sheet on phones), option chips, quantity + add bar, gallery
     == MENU: packages ==  menus by number of guests (button + list in the item window)
*/

/* == MENU: search == */
#search-bar {
  position: fixed;
  top: 58px;
  right: 0;
  left: 0;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  z-index: 49;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
#search-bar.hidden { transform: translateY(-100%); opacity: 0; pointer-events: none; }

#search-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--ink);
}
#search-input:focus { outline: none; border-color: var(--accent); }

#search-results {
  margin-top: 8px;
  max-height: 60vh;
  overflow-y: auto;
}
#search-results:empty { margin-top: 0; }
.search-result-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: start;
  font-family: inherit;
  color: var(--ink);
}
.search-result-row:hover, .search-result-row:focus-visible { background: var(--bg); }
.search-result-row img, .search-result-row .search-result-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}
.search-result-row .search-result-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border);
  color: var(--muted);
}
.search-result-row .search-result-placeholder svg { width: 20px; height: 20px; }
.search-result-name { font-size: 0.9rem; font-weight: 600; }
.search-no-results { padding: 10px 8px; color: var(--muted); font-size: 0.9rem; }

/* == MENU: page top == */
/* menu.html: "תפריטים" handwritten (like Lilach's notes on "קצת עלינו") with a
   drawn swoosh under it - on the same white band as the menus under it - then
   "where to start?", a row of category icons on a computer. Further down, the
   category bar takes over; on a phone it is there from the start instead
   (== MENU: category bar ==). Until 2026-11-02 the title sat on the first hero photo. */
.menu-title { padding: 34px 16px 18px; background: var(--card); text-align: center; }
.menu-title:has(+ .menu-picker[hidden]) { border-bottom: 1px solid var(--border); }
.menu-title + .menu-picker { padding-top: 0; }
.menu-title h1 { margin: 0; font-family: "Gveret Levin", cursive; font-size-adjust: none; font-weight: 400; font-size: clamp(3rem, 10vw, 4.6rem); line-height: 1; color: var(--accent-dark); transform: rotate(-2deg); }
.menu-title h1:lang(en) { font-family: "Bellefair", serif; font-style: italic; }
.menu-title-swoosh { display: block; width: min(240px, 60vw); height: 22px; margin: 2px auto 0; color: var(--accent-warm); }

/* "בחרו תפריט" (renderMenuTabs), when Lilach added menus in the panel: a
   round icon (picked in the panel) over each name, on a white band. The names
   are in the dishes' font (.item-card h3), a little bigger. */
.menu-picker { padding: 28px 16px 24px; background: var(--card); border-bottom: 1px solid var(--border); text-align: center; }
.menu-picker[hidden] { display: none; }
.menu-picker h2 { margin: 0 0 14px; font-size: 1.5rem; }
/* Padding: room for the chosen ring's halo inside the scrolling row. */
.menu-picker-row { display: flex; gap: 14px 44px; padding: 8px 4px 4px; overflow-x: auto; scrollbar-width: none; }
/* Centred while they fit; more than fit scroll from the first one instead of being cut. */
.menu-picker-row > :first-child { margin-inline-start: auto; }
.menu-picker-row > :last-child { margin-inline-end: auto; }
.menu-picker-row button {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 128px;
  padding: 0;
  border: none;
  background: none;
  color: var(--ink);
  font: 700 1.2rem "Rubik", sans-serif;
  cursor: pointer;
}
.menu-picker-ring {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(201, 112, 47, 0.12);
  color: var(--accent);
  transition: background 0.2s ease, color 0.2s ease;
}
.menu-picker-ring svg { width: 44px; height: 44px; }
.menu-picker-row button:hover .menu-picker-ring { background: rgba(201, 112, 47, 0.22); }
.menu-picker-row button[aria-pressed="true"] { color: var(--accent-dark); }
.menu-picker-row button[aria-pressed="true"] .menu-picker-ring { background: var(--accent-dark); color: #fff; box-shadow: 0 0 0 5px var(--card), 0 0 0 8px var(--accent-warm); }
/* A closed menu (not turned on in the panel): faded, "בקרוב" on its ring, not clickable. */
.menu-picker-ring, .side-menu-ring { position: relative; }
.menu-soon { position: absolute; top: -6px; inset-inline-end: -10px; padding: 2px 8px; border-radius: 999px; background: var(--accent-dark); color: #fff; font: 600 0.68rem/1.5 "Rubik", sans-serif; white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); }
.menu-picker-row button.is-soon { cursor: default; color: var(--muted); }
.menu-picker-row button.is-soon:hover .menu-picker-ring { background: rgba(201, 112, 47, 0.12); }
.is-soon .menu-picker-ring svg, .is-soon .side-menu-ring svg { opacity: 0.5; }
/* "רוצים לראות עוד תפריטים?" after the dishes: the same circles, the other menus. */
.more-menus { max-width: 1100px; margin: 8px auto 56px; padding: 28px 16px 0; border-top: 1px solid var(--border); text-align: center; }
.more-menus h2 { margin: 0 0 14px; font-size: 1.4rem; }
.menu-empty { margin: 40px 0; text-align: center; color: var(--muted); font-size: 1.05rem; }
.menu-picker-row button[aria-pressed="true"] .menu-picker-name::after { content: ""; display: block; width: 36px; height: 3px; margin: 6px auto 0; border-radius: 3px; background: var(--accent-warm); }

.menu-cats { max-width: 1100px; margin: 0 auto; padding: 26px 16px 4px; text-align: center; }
.menu-cats h2 { margin: 0 0 18px; font-size: 1.5rem; }
#menu-cats-icons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; }
#menu-cats-icons button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 110px;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
#menu-cats-icons .icon {
  width: 58px;
  height: 58px;
  padding: 15px;
  border-radius: 50%;
  background: rgba(201, 112, 47, 0.12);
  color: var(--accent);
  stroke-width: 1.6;
  transition: background 0.2s ease, color 0.2s ease;
}
#menu-cats-icons button:hover .icon { background: var(--accent); color: #fff; }

@media (max-width: 639.98px) {
  .menu-title { padding-top: 24px; }
  .menu-picker { padding: 22px 12px 18px; }
  .menu-picker h2 { margin-bottom: 10px; font-size: 1.3rem; }
  .menu-picker-row { gap: 4px; }
  .menu-picker-row button { width: 86px; gap: 8px; font-size: 0.95rem; }
  .menu-picker-ring { width: 68px; height: 68px; }
  .menu-picker-ring svg { width: 32px; height: 32px; }
  .menu-cats { display: none; }
}

/* == MENU: category bar == */
/* One row of pills, each with the category's icon (renderCategoryNav). Out of
   the page's flow under the topbar (z-index 50, which hides it while it is
   pulled up); it slides down once the dishes reach it, and the scroll spy
   colors the current category orange. Centred when it fits, the pills scroll
   sideways when they don't (the auto margins centre it without clipping the
   first pill). With added menus the shown one comes first, its list opening
   under it - so only the pills' row scrolls, not the bar. */
#category-nav {
  position: fixed;
  top: 58px;
  inset-inline: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  padding: 12px 16px;
  /* Solid, no backdrop-filter: a blur under a bar that stays on screen is
     redrawn on every scroll frame and made scrolling feel slow on phones. */
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 14px rgba(58, 53, 47, 0.08);
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform 0.25s ease, visibility 0s linear 0.25s;
}
#category-nav.is-shown { transform: none; visibility: visible; transition: transform 0.25s ease; }
#category-nav > :first-child { margin-inline-start: auto; }
#category-nav > :last-child { margin-inline-end: auto; }
.cat-nav-track { flex: 0 1 auto; min-width: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.cat-nav-track::-webkit-scrollbar { display: none; }
.cat-nav-track button {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 9px 16px 9px 14px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.cat-nav-track button .icon { width: 18px; height: 18px; flex: none; color: var(--accent); transition: color 0.2s ease; }
.cat-nav-track button:active { transform: scale(0.96); }
.cat-nav-track button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(201, 112, 47, 0.3);
}
.cat-nav-track button.active .icon { color: #fff; }
/* The menu being shown, then a line; a click opens every menu under it. */
.cat-nav-menu { position: relative; flex: none; align-self: stretch; display: flex; align-items: center; margin-inline-end: 10px; padding-inline-end: 10px; border-inline-end: 1px solid var(--border); }
.cat-nav-menu-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px 8px 10px; border: none; border-radius: 999px; background: rgba(201, 112, 47, 0.12); color: var(--accent-dark); font: inherit; font-size: 0.92rem; font-weight: 700; white-space: nowrap; cursor: pointer; }
.cat-nav-menu-btn > svg:first-child { width: 22px; height: 22px; flex: none; }
.cat-nav-chevron { width: 16px; height: 16px; flex: none; transition: transform 0.2s ease; }
.cat-nav-menu-btn[aria-expanded="true"] .cat-nav-chevron { transform: rotate(180deg); }
.cat-nav-menus { position: absolute; top: calc(100% + 12px); inset-inline-start: 0; min-width: 230px; padding: 6px; border-radius: 18px; background: var(--card); border: 1px solid var(--border); box-shadow: 0 18px 40px rgba(58, 53, 47, 0.18); }
.cat-nav-menus button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: none; border-radius: 12px; background: none; color: var(--ink); font: inherit; font-size: 0.95rem; font-weight: 600; text-align: start; cursor: pointer; }
.cat-nav-menus button:hover { background: rgba(201, 112, 47, 0.08); }
.cat-nav-menus button[aria-current="true"] { background: rgba(201, 112, 47, 0.14); color: var(--accent-dark); }
.cat-nav-menus button[aria-disabled="true"] { cursor: default; background: none; color: var(--muted); }
.cat-nav-menu-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: rgba(201, 112, 47, 0.12); color: var(--accent); }
.cat-nav-menu-icon svg { width: 20px; height: 20px; }
.cat-nav-menus [aria-disabled="true"] .cat-nav-menu-icon svg { opacity: 0.5; }
.cat-nav-menus small { margin-inline-start: auto; padding: 2px 8px; border-radius: 999px; background: var(--accent-dark); color: #fff; font-size: 0.7rem; font-weight: 600; }
@media (max-width: 639.98px) {
  /* A phone has no "באיזו קטגוריה" icons: the bar sits in their place from
     the start and sticks under the topbar. */
  #category-nav { position: sticky; transform: none; visibility: visible; box-shadow: none; }
  #category-nav { padding: 10px 12px; }
  .cat-nav-track { gap: 6px; }
  .cat-nav-track button { padding: 8px 13px 8px 11px; font-size: 0.85rem; gap: 6px; }
  .cat-nav-track button .icon { width: 16px; height: 16px; }
  .cat-nav-menu { margin-inline-end: 8px; padding-inline-end: 8px; }
  /* Only the menu's icon (its name is in the list it opens), so more categories fit. */
  .cat-nav-menu-btn { padding: 8px 7px 8px 9px; gap: 4px; }
  .cat-nav-menu-btn > span { display: none; }
  .cat-nav-menu-btn > svg:first-child { width: 20px; height: 20px; }
  .cat-nav-chevron { width: 14px; height: 14px; }
  .cat-nav-menus { top: calc(100% + 10px); }
}

/* == MENU: cards == */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

/* Breakpoints: phone is max-width 639.98px, tablet/desktop starts at 640px -
   no width matches both (a plain 640px on each side overlapped at exactly 640). */
@media (min-width: 640px) and (max-width: 1023.98px) {
  .items-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}

.category-title {
  margin: 32px 0 14px;
  font-size: 1.4rem;
  color: var(--ink);
  position: relative;
  padding-bottom: 8px;
  scroll-margin-top: 130px; /* topbar + the category bar (CATEGORY_NAV_LINE in app-menu.js) */
}
#menu .category-title {
  margin-top: 44px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
#menu .category-title:first-of-type {
  margin-top: 20px;
  padding-top: 0;
  border-top: none;
}
.category-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 48px;
  height: 3px;
  background: var(--accent-warm);
  border-radius: 3px;
}

.item-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.item-card.in-view { opacity: 1; transform: translateY(0); }
.item-card.out-of-stock { opacity: 0.6; }

.stock-badge {
  display: inline-block;
  background: #c0392b;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  vertical-align: middle;
}

.out-of-stock-btn {
  background: var(--border);
  color: var(--muted);
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-family: inherit;
  cursor: not-allowed;
}
.item-card:hover { box-shadow: 0 8px 20px rgba(58,53,47,0.08); }

.item-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.item-tag {
  background: var(--bg);
  border: 1px solid var(--accent);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 6px;
}

.item-includes {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 6px 0;
  padding-inline-start: 18px;
}
.item-includes li { margin-bottom: 2px; }

.item-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: radial-gradient(circle at 50% 40%, var(--card) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.item-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tan);
}
.item-photo-placeholder svg { width: 36%; height: 36%; }

.item-photo-wrap { position: relative; }
/* "מתאים ל-X אנשים" (item.serves) at the photo's bottom left: the people icon,
   opening to the side with the sentence for 3 seconds (renderMenu). */
.serves-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  max-width: 34px;
  padding: 0 8px;
  overflow: hidden;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--accent-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  font: inherit;
  cursor: pointer;
  transition: max-width 0.3s ease;
}
.serves-badge .icon { width: 18px; height: 18px; flex: none; }
/* Hidden while closed: in the closed pill its first letters showed past the icon.
   Open, it never passes the photo's edge (max-width); on a phone's narrow card
   "מתאים ל-" goes above "8-10 אנשים", so all of it shows. */
.serves-text { display: flex; align-items: baseline; gap: 3px; white-space: nowrap; font-size: 0.85rem; color: var(--ink); opacity: 0; transition: opacity 0.2s ease; }
.serves-pre { font-weight: 500; }
.serves-text b { font-weight: 700; }
.serves-badge.open { max-width: calc(100% - 20px); }
.serves-badge.open .serves-text { opacity: 1; }
@media (max-width: 639.98px) {
  .serves-badge { left: 8px; bottom: 8px; }
  .serves-badge.open { max-width: calc(100% - 16px); height: auto; min-height: 34px; padding: 4px 10px 4px 9px; border-radius: 14px; }
  .serves-text { flex-direction: column; align-items: flex-start; gap: 0; font-size: 0.8rem; line-height: 1.25; }
  .serves-pre { font-size: 0.7rem; color: var(--muted); }
}
.item-tags-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}
.item-tag-chip {
  background: rgba(255,255,255,0.92);
  /* Fixed dark orange: the chip stays white in dark mode too, where
     --accent-dark turns light orange (unreadable on white). */
  color: #8a4a1c;
  border: 1px solid var(--accent);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  line-height: 1.4;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.item-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.item-card h3 { margin: 0 0 6px; font-size: 1.1rem; font-family: "Rubik", sans-serif; font-weight: 700; text-align: center; }
.item-card .desc { font-size: 0.9rem; margin: 6px 0; color: var(--muted); }
/* "120 ₪ · 16 יח'" as one line of text (renderMenu): a long unit breaks
   between its own words, and no-break spaces keep the dot on the price's line.
   No reserved height: the footer sits at the card's bottom, so the last lines
   of cards side by side line up. */
.item-card .price { font-weight: 700; color: var(--accent-dark); font-size: 1.15rem; white-space: nowrap; }
.item-card .unit { color: var(--muted); font-size: 0.92rem; }
.item-card .unit::before { content: "\00a0·\00a0"; }
/* A dish in sizes (sizeColumns in app-menu.js): a column per size, its
   price over its quantity, with a slash between - on the card and in the
   item window, where only the chosen size stays once one is chosen. */
.size-cols { display: inline-flex; align-items: center; gap: 8px; }
.size-cols > span { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.size-cols b { color: var(--accent-dark); font-size: 1.15rem; font-weight: 700; white-space: nowrap; }
.size-cols small { color: var(--muted); font-size: 0.92rem; white-space: nowrap; }
.size-cols i { color: var(--border); font-size: 1.9rem; font-style: normal; font-weight: 300; line-height: 1; }
.size-unit { display: block; color: var(--muted); font-size: 0.92rem; }
.item-price-line .size-cols b { color: var(--accent); font-size: 1.5rem; }

/* The dish name opens the item window - looks like plain text. */
.item-name-btn { padding: 0; background: none; border: none; color: inherit; font: inherit; text-align: inherit; cursor: pointer; }
.item-name-btn:hover { color: var(--accent-dark); }

.item-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

.qty-add-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
}
.qty-add-row .add-to-cart-btn,
.qty-add-row .out-of-stock-btn {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 9px 8px;
}

/* Items with nothing to choose: "add to cart" turns into − 2 בעגלה +
   (syncCardSteppers in app-menu.js), green with a check for a moment
   after each change. */
:root { --ok: #2e7d32; }
:root[data-theme="dark"] { --ok: #81c784; }
.card-stepper { flex: 1; display: flex; align-items: center; justify-content: space-between; min-width: 0; min-height: 40px; border: 1.5px solid var(--accent); border-radius: 6px; background: color-mix(in srgb, var(--accent) 10%, var(--card)); transition: background 0.2s ease, border-color 0.2s ease; }
.card-stepper .qty-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 38px; background: none; color: var(--accent-dark); font-size: 1.25rem; }
.card-stepper .qty-btn svg { width: 18px; height: 18px; }
.card-stepper-qty { color: var(--accent-dark); font-size: 0.92rem; font-weight: 700; white-space: nowrap; }
.card-stepper.saved { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--card)); }
.card-stepper.saved .card-stepper-qty { color: var(--ok); }
.card-stepper.saved .card-stepper-qty::before { content: "✓ "; }

.item-price-row { text-align: center; line-height: 1.3; }

.qty-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.qty-btn {
  background: var(--bg);
  border: none;
  width: 28px;
  height: 28px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
}
.qty-btn:active { background: var(--accent); color: #fff; }

.add-to-cart-btn {
  background: var(--card);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 9px 20px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.add-to-cart-btn:hover { background: var(--ink); color: var(--card); }
.add-to-cart-btn:active { transform: scale(0.95); }

/* Phone card sizes - after the base card rules above, so they win (they
   sat before them until 2026-10-25 and never applied). */
@media (max-width: 639.98px) {
  .items-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .item-card-body { padding: 8px 10px 10px; }
  .item-card h3 { font-size: 0.95rem; margin-bottom: 4px; }
  .item-footer { padding-top: 4px; gap: 6px; }
  .item-card .price, .item-card .size-cols b { font-size: 1.05rem; }
  .item-card .unit, .item-card .size-cols small, .item-card .size-unit { font-size: 0.85rem; }
  /* 36px tap targets for the cart's quantity buttons. */
  .qty-stepper .qty-btn { width: 36px; height: 36px; font-size: 1rem; }
  .qty-add-row .add-to-cart-btn { padding: 8px 4px; font-size: 0.8rem; line-height: 1.15; }
  .qty-add-row .out-of-stock-btn { padding: 8px 4px; font-size: 0.8rem; line-height: 1.15; }
}
/* The narrowest phones (320px), after the phone sizes so it wins: "285 ₪ / 350 ₪" must still fit a card. */
@media (max-width: 359.98px) {
  .item-card .size-cols { gap: 4px; }
  .item-card .size-cols b { font-size: 0.9rem; }
  .item-card .size-cols i { font-size: 1.4rem; }
}

/* == MENU: states == */
.load-error {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.load-error p { margin: 8px 0; }
.load-error a { color: var(--accent-dark); font-weight: 700; }

/* Closed for orders: browsing stays open, ordering is blocked */
#store-closed-popup {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(30,26,20,0.5);
}
.store-closed-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}
.store-closed-card p { margin: 0 0 18px; line-height: 1.6; color: var(--ink); white-space: pre-line; }
.store-closed .add-to-cart-btn,
.store-closed .modal-add-btn { opacity: 0.45; cursor: not-allowed; }

/* == MENU: item window == */
/* Small popup modal for extra item info (details/options) */
#item-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(360px, 88vw);
  max-height: 80vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  padding: 22px 20px;
  z-index: 35;
}
#item-modal.hidden { display: none; }
#item-modal h3 { margin: 0 0 10px; font-family: "Rubik", sans-serif; }
.modal-warning {
  background: #fdecea;
  color: #c0392b;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  margin: 4px 0 10px;
}
#item-modal-close {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--bg);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  color: var(--muted);
  font-size: 1rem;
}

/* Photo window (items with a photo). Computers: details | photo side by side,
   the photo square and the details column scrolling beside it. Phones (at the
   end of this section): a sheet from the bottom with the whole photo on top. */
#photo-lightbox {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1000px, 94vw);
  overflow: hidden;
  border-radius: 28px;
  background: var(--card);
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  z-index: 35;
}
#photo-lightbox.hidden { display: none; }
.lightbox-body { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "info photo"; }
.lightbox-gallery { grid-area: photo; position: relative; aspect-ratio: 1 / 1; max-height: 90vh; touch-action: pan-y; }
#photo-lightbox-img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* contain: size - the column takes the photo's height and scrolls, instead
   of stretching the window to the length of its text. */
.lightbox-info { grid-area: info; contain: size; overflow-y: auto; display: flex; flex-direction: column; }
#photo-lightbox-head { padding: 32px 32px 0; }
#photo-lightbox-head h3 { margin: 0 0 6px; font: 400 2rem/1.2 "Bellefair", serif; font-size-adjust: 0.492; }
#photo-lightbox-details { flex: 1 0 auto; display: flex; flex-direction: column; padding: 4px 32px 0; }
#photo-lightbox-close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  cursor: pointer;
}
#item-modal.wide { width: min(560px, 92vw); max-height: 86vh; }

/* Window contents - shared by the photo window and the text-only #item-modal. */
.item-cat { margin-bottom: 4px; color: var(--accent-dark); font-size: 0.85rem; font-weight: 600; }
.item-price-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 12px; }
.item-price-line .item-price { color: var(--accent); font-size: 1.5rem; font-weight: 700; }
.item-unit { color: var(--muted); font-size: 0.92rem; }
/* "Serves 8-10" under the price (item.serves). */
.item-serves { display: inline-flex; align-items: center; gap: 8px; margin: -2px 0 14px; padding: 7px 14px; color: var(--accent-dark); background: color-mix(in srgb, var(--accent) 12%, var(--card)); border-radius: 999px; font-weight: 700; }
.item-serves .icon { width: 20px; height: 20px; flex-shrink: 0; }
#photo-lightbox-details .desc, #item-modal .desc { margin: 0 0 14px; color: var(--muted); line-height: 1.65; }
/* Ingredients/allergens inside their folded "item-more" row (app-menu.js). */
.item-ingredients { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 14px; font-size: 0.85rem; }
.item-ingredients span { display: inline-flex; align-items: center; gap: 5px; text-transform: capitalize; padding-block: 3px; padding-inline: 4px 11px; background: var(--card); border: 1px solid var(--border); border-radius: 999px; }
.item-ingredients .icon { width: 24px; height: 24px; color: var(--accent); }
/* Choices as a two-column checklist - a box for "pick some", a circle for
   "pick one". The real radio/checkbox lies invisibly over each choice, so
   keyboard and screen readers work as before. */
.item-options { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; row-gap: 2px; margin: 0 0 18px; }
.option-group-title, .option-group-hint { grid-column: 1 / -1; }
.option-group-hint { margin: -2px 0 6px; color: var(--muted); font-size: 0.8rem; }
.item-options label { position: relative; cursor: pointer; }
.item-options input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.item-options label span { display: flex; align-items: flex-start; gap: 8px; padding: 7px 0; font-size: 0.9rem; line-height: 1.35; }
.item-options label span::before { content: ""; flex-shrink: 0; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; box-sizing: border-box; border: 2px solid color-mix(in srgb, var(--accent) 40%, var(--border)); border-radius: 5px; background: var(--card); color: #fff; font-size: 11px; }
.item-options:not(.multi) label span::before { border-radius: 50%; }
.item-options input:checked + span { font-weight: 600; }
.item-options input:checked + span::before { content: "✓"; background: var(--accent); border-color: var(--accent); }
/* Split button (app-menu.js adds .split): the choices side by side across the width. */
.item-options.split { display: flex; flex-wrap: wrap; gap: 0; }
.item-options.split .option-group-title { flex-basis: 100%; margin-bottom: 8px; }
.item-options.split label { flex: 1; }
.item-options.split label span { justify-content: center; align-items: center; height: 100%; box-sizing: border-box; padding: 11px 6px; text-align: center; background: var(--card); border: 1.5px solid var(--border); font-size: 0.88rem; transition: background 0.15s ease; }
.item-options.split label + label span { border-inline-start: none; }
.item-options.split label:first-of-type span { border-start-start-radius: 12px; border-end-start-radius: 12px; }
.item-options.split label:last-of-type span { border-start-end-radius: 12px; border-end-end-radius: 12px; }
.item-options.split label span::before { content: none; }
.item-options.split input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.item-options input:disabled { cursor: not-allowed; }
.item-options input:disabled + span { opacity: 0.45; }
.item-options input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
/* "Add to cart" on a card with choices to make opens this window with each
   required group framed (.must-choose): orange until chosen, then green. */
.option-need { display: none; grid-column: 1 / -1; flex-basis: 100%; margin-bottom: 4px; font-size: 0.85rem; font-weight: 700; }
.option-need .need-ok { display: none; }
.must-choose .item-options:has(.option-need) { padding: 12px 14px; border: 2px solid var(--accent-warm); border-radius: 16px; background: color-mix(in srgb, var(--accent-warm) 9%, var(--card)); }
.must-choose .item-options.done:has(.option-need) { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, var(--card)); }
.must-choose .option-need { display: block; color: var(--accent-dark); }
.must-choose .done .need-todo { display: none; }
.must-choose .done .need-ok { display: inline; color: var(--ok); }
.item-more { margin: 0 0 8px; padding: 0 16px; background: var(--bg); border-radius: 14px; font-size: 0.92rem; }
.item-more summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 13px 0; font-weight: 600; cursor: pointer; }
.item-more summary::-webkit-details-marker { display: none; }
.item-more summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.item-more[open] summary::after { content: "−"; }
.item-more p { margin: 0 0 13px; color: var(--muted); line-height: 1.6; white-space: pre-line; }
/* Quantity + "add to cart · total", pinned to the bottom while the details scroll. */
.modal-buy { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding: 14px 0 18px; background: var(--card); border-top: 1px solid var(--border); }
#photo-lightbox .modal-buy { margin-inline: -32px; padding-inline: 32px; }
#item-modal .modal-buy { margin: 14px -20px 0; padding-inline: 20px; }
#item-modal:has(.modal-buy) { padding-bottom: 0; }
.modal-buy .modal-warning { flex-basis: 100%; margin: 0; }
/* 2 or more of a dish with a flavour (wireItemDetails, "דוגמה 2"): a note,
   then a green line per one added and "מנה 2 מתוך 3"; the size and add-ons
   chosen with the first hide behind "לכל המנות: ...". */
.per-dish { margin: 4px 0 6px; }
.per-dish p { margin: 0 0 8px; }
.per-dish-msg { padding: 12px 14px; border-radius: 14px; background: #fff7ef; border: 1px solid #f3d9bf; font-size: 0.92rem; line-height: 1.5; }
.per-dish-done { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: #eef6f1; color: #2e5f48; font-size: 0.9rem; }
.per-dish-done i { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #2e7d5b; color: #fff; font-style: normal; font-size: 0.8rem; }
.per-dish-head { display: flex; align-items: center; gap: 8px; margin-top: 12px !important; font-weight: 700; font-size: 1.05rem; }
.per-dish-head span { padding: 3px 10px; border-radius: 999px; background: var(--accent-dark); color: #fff; font-size: 0.82rem; }
.per-dish-fixed { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: #f6efe6; color: var(--muted); font-size: 0.9rem; }
.per-dish-fixed b { color: var(--ink); }
.item-options[hidden], .modal-buy .qty-stepper[hidden], .per-dish[hidden], .per-dish-fixed[hidden] { display: none; }
.modal-buy .qty-stepper { gap: 2px; padding: 4px; border-width: 1.5px; border-radius: 999px; }
.modal-buy .qty-btn { width: 40px; height: 40px; border-radius: 50%; font-size: 1.2rem; }
.modal-qty { min-width: 32px; text-align: center; font-weight: 700; }
/* Same colors as the site's main call-to-action (.hero-cta in base.css). */
.modal-add-btn, .modal-add-btn:hover { flex: 1; padding: 12px 16px; background: var(--accent-warm); color: #2a1d08; border: none; border-radius: 999px; font-size: 1.02rem; font-weight: 700; box-shadow: 0 6px 16px rgba(0,0,0,0.15); }
.modal-add-btn:hover { filter: brightness(0.95); }
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
#gallery-prev { inset-inline-start: 8px; }
#gallery-next { inset-inline-end: 8px; }
.gallery-arrow.hidden, .gallery-counter.hidden { display: none; }
.gallery-counter {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
}

@media (max-width: 699.98px) {
  /* Starts below the top bar (58px, drawn over the window). */
  #photo-lightbox { top: auto; bottom: 0; left: 0; transform: none; width: 100%; max-height: calc(100vh - 66px); max-height: calc(100dvh - 66px); display: flex; flex-direction: column; border-radius: 24px 24px 0 0; }
  /* Grab handle look at the top of the sheet. */
  #photo-lightbox::before { content: ""; position: absolute; top: 8px; left: 50%; z-index: 2; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: rgba(255,255,255,0.9); box-shadow: 0 0 4px rgba(0,0,0,0.3); }
  /* The whole sheet scrolls: the photo shows whole (not cropped) and scrolls
     away when the choices need the room. */
  .lightbox-body { display: block; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .lightbox-gallery { max-height: 60vh; }
  .lightbox-info { display: block; contain: none; overflow: visible; }
  #photo-lightbox-head { padding: 18px 18px 0; }
  #photo-lightbox-head h3 { font-size: 1.6rem; }
  #photo-lightbox-details { display: block; padding: 4px 18px 0; }
  #photo-lightbox .modal-buy { margin: 16px -18px 0; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); }
  #photo-lightbox-close { top: 16px; width: 38px; height: 38px; }
}

/* == MENU: packages == */
/* Menus by number of guests */
.packages-cta {
  max-width: 720px;
  width: calc(100% - 32px);
  margin: 0 auto 22px;
  padding: 22px 20px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.packages-cta.hidden { display: none; }
.packages-cta h2 { margin: 0 0 6px; font-size: 1.35rem; }
.packages-cta p { margin: 0 0 16px; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.packages-cta .hero-cta { border: none; cursor: pointer; font-family: inherit; font-size: 1rem; }
.packages-intro { color: var(--muted); font-size: 0.88rem; line-height: 1.5; margin: 0 0 12px; }
.packages-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.packages-filters label { flex: 1 1 140px; font-size: 0.85rem; font-weight: 600; }
.packages-filters input, .packages-filters select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--card);
  color: var(--ink);
}
.package-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.package-card h4 { margin: 0 0 2px; font-size: 1.05rem; }
.package-meta { margin: 0 0 8px; color: var(--muted); font-size: 0.82rem; }
.package-card ul { margin: 0 0 10px; padding-inline-start: 18px; font-size: 0.88rem; line-height: 1.6; }
.package-card li.unavailable { color: var(--muted); text-decoration: line-through; }
.package-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.package-total strong { color: var(--accent); font-size: 1.15rem; }
.package-add { display: block; width: 100%; border: none; cursor: pointer; font-family: inherit; font-size: 0.95rem; }
.package-add:disabled { opacity: 0.5; cursor: not-allowed; }
.packages-empty { font-size: 0.92rem; line-height: 1.6; }
.packages-empty a { color: var(--accent-dark); font-weight: 600; }

/* "How much to order" (guest calculator, app-home.js): a big window on
   computers, a sheet from under the top bar on phones. */
/* Centered in the space under the top bar (58px), clear of it. */
#item-modal.guest-calc { top: calc(50% + 29px); width: min(720px, 94vw); max-height: calc(100vh - 90px); }
@media (max-width: 699.98px) {
  #item-modal.guest-calc { top: auto; bottom: 0; left: 0; transform: none; width: 100%; max-height: calc(100vh - 66px); max-height: calc(100dvh - 66px); border-radius: 24px 24px 0 0; padding-inline: 16px; }
  #item-modal.guest-calc .modal-buy { margin-inline: -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
}
.calc-box { margin-bottom: 18px; padding: 16px; text-align: center; border: 1px solid var(--border); border-radius: var(--radius); }
.calc-label { display: block; margin-bottom: 10px; font-weight: 700; }
.calc-guests { display: inline-flex; align-items: center; gap: 14px; }
.calc-step { width: 46px; height: 46px; border: 2px solid var(--accent); border-radius: 50%; background: var(--card); color: var(--accent-dark); font-family: inherit; font-size: 1.5rem; font-weight: 700; line-height: 1; cursor: pointer; }
#calc-guests { width: 3.2em; padding: 2px 0; border: 0; border-bottom: 2px solid var(--border); background: none; color: var(--ink); font: 700 2.2rem/1.1 "Rubik", sans-serif; text-align: center; -moz-appearance: textfield; appearance: textfield; }
#calc-guests::-webkit-inner-spin-button, #calc-guests::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.calc-kind { display: flex; justify-content: center; gap: 8px; margin: 14px 0 0; padding: 0; border: 0; }
.calc-kind label { padding: 8px 16px; border: 1.5px solid var(--border); border-radius: 999px; font-weight: 600; cursor: pointer; }
.calc-kind label:has(:checked) { background: var(--ink); border-color: var(--ink); color: var(--card); }
.calc-kind label:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.calc-options { margin: 0 0 18px; padding: 0; border: 0; }
#calc-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.calc-option { display: flex; flex-direction: column; gap: 1px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.calc-option:has(:checked) { border-color: var(--accent); background: rgba(251, 142, 40, 0.08); box-shadow: inset 0 0 0 1px var(--accent); }
.calc-option:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.calc-option b { font-size: 1rem; }
.calc-option strong { font-size: 1.3rem; line-height: 1.2; }
.calc-option span, .calc-option small { color: var(--muted); font-size: 0.8rem; }
.calc-choice { margin-top: 2px; font-size: 0.85rem; }
.calc-choice summary { display: inline-block; color: var(--accent-dark); font-weight: 600; text-decoration: underline; cursor: pointer; list-style: none; }
.calc-choice summary::-webkit-details-marker { display: none; }
.calc-choice fieldset { margin: 6px 0 0; padding: 0; border: 0; }
.calc-choice legend { margin-bottom: 2px; font-weight: 600; }
.calc-choice label { display: flex; align-items: center; gap: 6px; padding: 3px 0; cursor: pointer; }
.calc-choice input { accent-color: var(--accent); }
.calc-choice label:has(:disabled) { opacity: 0.5; cursor: not-allowed; }
.calc-group { margin-bottom: 18px; }
.calc-group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.calc-group-head h4 { margin: 0; font-size: 1rem; }
.calc-group-head span { color: var(--muted); font-size: 0.82rem; }
.calc-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.calc-thumb { width: 52px; height: 52px; flex-shrink: 0; border-radius: 10px; object-fit: cover; background: var(--bg); }
.calc-name { flex: 1; min-width: 0; font-size: 0.92rem; line-height: 1.35; }
.calc-name b { display: block; font-weight: 600; }
.calc-name span { color: var(--muted); font-size: 0.82rem; }
.calc-end { display: flex; align-items: center; gap: 12px; }
.calc-price { min-width: 4.5em; font-weight: 600; text-align: end; }
.calc-stepper { border-radius: 999px; }
.calc-stepper .qty-btn { width: 32px; height: 32px; background: none; color: var(--accent-dark); }
.calc-qty { min-width: 22px; text-align: center; font-weight: 700; }
@media (max-width: 699.98px) {
  .calc-end { flex-direction: column; align-items: flex-end; gap: 4px; }
  .calc-thumb { width: 46px; height: 46px; }
}
/* "עוד מנות שאפשר להוסיף": photos, a tap adds the dish - the first 6 fill 2 rows on phones, 1 on computers. */
.calc-add-title { margin: 12px 0 8px; color: var(--accent-dark); font-size: 0.88rem; font-weight: 700; }
.calc-add-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: start; }
@media (min-width: 700px) { .calc-add-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.calc-add-dish { position: relative; display: block; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: center; cursor: pointer; }
.calc-add-dish:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
.calc-add-dish img, .calc-add-img { display: block; width: 100%; aspect-ratio: 1; border-radius: 12px; object-fit: cover; background: var(--bg); }
.calc-add-dish b { display: block; margin-top: 4px; font-size: 0.75rem; font-weight: 600; line-height: 1.25; }
.calc-add-plus { position: absolute; top: 4px; inset-inline-end: 4px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-warm); color: #2a1d08; font-weight: 800; line-height: 1; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); }
.calc-add-more { display: block; margin: 10px auto 0; padding: 7px 16px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--card); color: var(--accent-dark); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.calc .note { margin: 0; color: var(--muted); font-size: 0.8rem; }
.calc-buy { justify-content: space-between; align-items: center; }
.calc-buy .modal-add-btn { flex: 0 1 220px; }
.calc-buy .modal-add-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.calc-total span { display: block; color: var(--muted); font-size: 0.8rem; }
.calc-total strong { display: block; font-size: 1.3rem; line-height: 1.2; }
