/* g3-app · menu.css (step 1) · tiles (F3b 03, F1b 04), category list (F1b 05), one-scroll (F2b 05) */

/* order again row (member) */
.again { display: flex; flex-direction: column; gap: 10px; padding: 22px 0 0 var(--gutter); }
.again-head { display: flex; align-items: baseline; justify-content: space-between; padding-right: var(--gutter); }
.again-title { font-family: var(--f-sans); font-size: 20px; line-height: 24px; }
.again-hist { font-size: 14px; line-height: 18px; font-weight: 500; }
.again-row {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-right: var(--gutter); scrollbar-width: none;
}
.again-row::-webkit-scrollbar { display: none; }
.again-card {
  flex: 0 0 290px; display: flex; flex-direction: column; gap: 12px; padding: 14px;
  border-radius: var(--r-card); background: var(--beige); scroll-snap-align: start;
}
.again-top { display: flex; align-items: center; gap: 10px; }
.again-img { width: 72px; height: 64px; object-fit: contain; flex-shrink: 0; }
.again-text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.again-label { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--muted); }
.again-names { font-family: var(--f-sans); font-size: 17px; line-height: 20px; }
.again-card .btn-secondary { background: transparent; }
.again-card .btn-secondary .price { font-size: 15px; line-height: 18px; }

/* category tiles */
.mtiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 22px var(--gutter) 0; }
.mtiles.is-member { padding-top: 24px; }
.mtile {
  position: relative; height: 170px; padding: 16px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  border-radius: var(--r-tile); background: var(--beige); color: var(--ink); text-align: left;
  transition: transform var(--dur-fast) var(--ease);
}
.mtile:active { transform: scale(0.98); }
.mtile .tile-name { position: relative; z-index: 1; overflow-wrap: normal; letter-spacing: -0.015em; margin-right: -6px; } /* "Karastusjoogid" stays whole at 375 */
.mtile-img { position: absolute; left: 15px; top: 14px; width: calc(100% - 30px); height: 100px; object-fit: contain; }
.mtile.is-new { background: var(--red); color: var(--white); justify-content: space-between; }
.mtile-new { position: relative; z-index: 1; font-family: var(--f-stripes); font-weight: 900; text-transform: uppercase; font-size: 36px; line-height: 36px; overflow-wrap: normal; }
:lang(ru) .mtile-new { font-size: 24px; line-height: 28px; } /* "Новинки" fits one line at 375 */
.mtile-newimg { position: absolute; left: 10px; top: 50px; width: calc(100% - 20px); height: 92px; object-fit: contain; }
.mtile-newsub { position: relative; z-index: 1; font-size: 12px; line-height: 16px; font-weight: 500; }
.mtile.is-fav { background: var(--ink); color: var(--white); justify-content: space-between; }
.mtile-heart { color: var(--red); position: relative; z-index: 1; }
.mtile-favimg { position: absolute; right: -14px; top: 18px; width: 110px; height: 80px; object-fit: contain; }
.mtile-foot { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 1px; }
.mtile.is-fav .tile-sub { color: var(--on-ink-muted); }
/* member tiles are the compact F3b size */
.mtiles.is-member .mtile { height: 156px; padding: 12px 14px 14px; border-radius: var(--r-card); }
.mtiles.is-member .mtile:not(.is-fav) .mtile-img { left: 50%; top: 12px; width: 130px; height: 96px; margin-left: -65px; }
.mtiles.is-member .tile-name { font-size: 19px; line-height: 24px; }

/* category list */
.cat-intro { padding: 16px var(--gutter) 4px; font-size: 15px; line-height: 20px; color: var(--muted); }
.cat-rows { padding-top: 4px; }
.menu-row { cursor: pointer; }
.menu-row.is-soldout .row-photo, .menu-row.is-soldout .row-main { opacity: 0.45; }
.menu-soldout { flex-shrink: 0; font-size: 12px; line-height: 16px; color: var(--muted); }

/* compact rows (one-scroll, search) */
.menu-row.is-compact { padding: 12px 0; }
.menu-row.is-compact .row-photo { width: 76px; height: 76px; }
.menu-row.is-compact .row-photo img { width: 100%; height: 100%; }
.menu-row.is-compact .row-name { font-size: 18px; line-height: 22px; }
.menu-row.is-compact .row-price { font-family: var(--f-ui); font-size: 14px; line-height: 18px; font-weight: 600; padding-top: 0; }
.menu-row.is-compact .row-price s { font-weight: 400; font-size: 12px; }
.add-btn.is-white { background: var(--white); }

/* one-scroll menu */
.promos { display: flex; gap: 10px; overflow-x: auto; padding: 18px var(--gutter) 0; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-padding: 0 var(--gutter); }
.promos::-webkit-scrollbar { display: none; }
.promo {
  position: relative; flex: 0 0 300px; height: 150px; padding: 18px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  border-radius: var(--r-card); background: var(--beige); color: var(--ink); text-align: left; scroll-snap-align: start;
}
.promo.is-red { background: var(--red); color: var(--white); }
.promo-text { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; width: 150px; overflow-wrap: normal; }
.promo-title { width: max-content; max-width: 200px; }
.promo-title { font-family: var(--f-stripes); font-weight: 900; text-transform: uppercase; font-size: 26px; line-height: 24px; }
.promo-sub { font-size: 13px; line-height: 16px; }
.promo-sub.is-ink { color: var(--muted); }
.promo-price { position: relative; z-index: 1; padding: 6px 12px; border-radius: 999px; background: var(--white); color: var(--ink); font-family: var(--f-sans); font-size: 15px; line-height: 18px; }
.promo-price.is-ink { background: var(--ink); color: var(--white); }
.promo-img { position: absolute; right: -10px; bottom: 6px; width: 150px; height: 120px; object-fit: contain; }

.mchips.is-sticky {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--white);
  padding: 16px var(--gutter) 14px; border-bottom: 1px solid var(--line);
}
.mchips .chip { height: 38px; }
.msec { display: flex; flex-direction: column; padding: 26px var(--gutter) 0; scroll-margin-top: 70px; }
.msec-title { font-family: var(--f-stripes); font-weight: 900; text-transform: uppercase; font-size: 32px; line-height: 34px; padding-bottom: 6px; }
.sec-rows { display: flex; flex-direction: column; }
.pcards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 10px; padding-top: 6px; }
.pcard { display: flex; flex-direction: column; gap: 10px; cursor: pointer; text-align: left; }
.pcard-ph { position: relative; height: 150px; border-radius: var(--r-card); background: var(--beige); display: flex; align-items: center; justify-content: center; }
.pcard-ph img { width: 140px; height: 116px; object-fit: contain; }
.pcard-ph .add-btn { position: absolute; right: 10px; bottom: 10px; width: 36px; height: 36px; }
.pcard-text { display: flex; flex-direction: column; gap: 3px; padding: 0 4px; }
.pcard-name { font-family: var(--f-sans); font-size: 17px; line-height: 21px; }
.pcard-price { padding-top: 3px; font-size: 14px; line-height: 18px; font-weight: 600; }
.pcard-price s { font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 6px; }

/* search sheet */
.msearch { padding: 0 var(--gutter) 6px; }

/* in-order stepper on product rows and cards (web2 card stepper): white pill,
   grey minus, count in Kentucky Sans, red plus; buttons bounce on press */
.step-pill { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; padding: 4px; border-radius: 999px; background: var(--white); box-shadow: 0 2px 10px rgba(16, 16, 16, 0.12); }
.step-btn { width: 36px; height: 36px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; transition: transform 160ms cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.step-btn:active { transform: scale(0.82); }
.step-btn.is-minus { background: var(--beige); color: var(--ink); }
.step-btn.is-plus { background: var(--red); color: var(--white); }
.step-n { min-width: 28px; text-align: center; font-family: var(--f-sans); font-size: 18px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.pcard-ph .step-pill { position: absolute; right: 8px; bottom: 8px; }
@media (prefers-reduced-motion: reduce) { .step-btn { transition: none; } }

/* in the order: the photo shrinks into the top left corner so the name,
   description and price get the room next to the stepper */
.menu-row .row-photo { align-self: center; transition: width 260ms cubic-bezier(0.23, 1, 0.32, 1), height 260ms cubic-bezier(0.23, 1, 0.32, 1), border-radius 260ms cubic-bezier(0.23, 1, 0.32, 1); }
.menu-row.is-in .row-photo { align-self: flex-start; width: 56px; height: 56px; border-radius: 16px; }
.menu-row.is-compact.is-in .row-photo { width: 52px; height: 52px; }
@media (prefers-reduced-motion: reduce) { .menu-row .row-photo { transition: none; } }
/* the whole menu as one list: section titles, intros, rows */
.menu.is-all .msec { padding-top: 22px; }
.menu.is-all .cat-intro.is-sec { padding: 0 0 4px; }
.menu.is-all .sec-rows .row:last-child { border-bottom: 1px solid var(--line); }

/* ── long menu top block: header + category tabs in one sticky block ──
   at the top the tabs are photo cards (photo over the name); after the first
   few px of scroll the photo folds away into the small pills; scrolling down
   slides the header out (transform), any scroll up slides it back.
   Frequent, scroll-driven: fast 220ms, strong ease-out, transform/opacity
   plus one grid-rows fold for the photo. */
.mtop { position: sticky; top: 0; z-index: 6; background: var(--white); transform: translateY(0); transition: transform 220ms cubic-bezier(0.23, 1, 0.32, 1); will-change: transform; }
/* the header slides away but the tabs stop under the status bar (home-screen app: the page runs
   under it; in the browser the inset is 0) */
.mtop.is-hidden { transform: translateY(calc(env(safe-area-inset-top, 0px) - var(--hdr-h, 0px))); }
.mtop .mchips { position: static; padding: 6px var(--gutter) 14px; border-bottom: 1px solid var(--line); background: var(--white); }
.mchip { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; height: auto; min-width: 84px; padding: 10px 14px; border-radius: 18px;
  transition: padding 220ms cubic-bezier(0.23, 1, 0.32, 1), border-radius 220ms cubic-bezier(0.23, 1, 0.32, 1), background-color 160ms ease, color 160ms ease; }
.mchip-ph { display: grid; grid-template-rows: 1fr; opacity: 1; transform: scale(1);
  transition: grid-template-rows 220ms cubic-bezier(0.23, 1, 0.32, 1), opacity 160ms ease, transform 220ms cubic-bezier(0.23, 1, 0.32, 1); }
.mchip-ph > span { min-height: 0; overflow: hidden; display: flex; justify-content: center; }
.mchip-ph img { width: 60px; height: 50px; object-fit: contain; margin-bottom: 6px; }
.mchip-l { font-size: 14px; line-height: 18px; white-space: nowrap; }
.mtop.is-compact .mchip { min-width: 0; padding: 9px 16px; border-radius: 19px; }
.mtop.is-compact .mchip-ph { grid-template-rows: 0fr; opacity: 0; transform: scale(0.7); }
.mtop.is-compact .mchip-l { font-size: 15px; }
.menu.is-all .msec { scroll-margin-top: 70px; }
@media (prefers-reduced-motion: reduce) {
  .mtop, .mchip, .mchip-ph { transition: none; }
}
.mtop .mchips .chip.mchip { height: auto; }
.mtop .mchips .chip.mchip.is-active .mchip-ph img { filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25)); }
/* the folding tab row must not drag the page with it */
.menu.is-all { overflow-anchor: none; }
/* a little more air between the header and the tabs */
.mtop .mchips { padding-top: 14px; }

/* campaign video banner (kiosk / web2 k-banner) */
.mban {
  position: relative; display: flex; align-items: flex-end; width: calc(100% - 2 * var(--gutter)); margin: 4px var(--gutter) 12px;
  min-height: 236px; border-radius: var(--r-card); overflow: hidden; isolation: isolate; margin-top: 18px;
  background-color: var(--ink); background-size: cover; background-position: center 42%; text-align: left;
  transition: transform var(--dur-fast) var(--ease);
}
.mban:active { transform: scale(0.985); }
.mban::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(0deg, rgba(56, 0, 8, 0.66) 0%, rgba(56, 0, 8, 0.28) 46%, rgba(56, 0, 8, 0) 72%);
}
.mban-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; pointer-events: none; }
.mban-body { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px 20px 20px; }
.mban-title { font-family: var(--f-stripes); font-weight: 900; text-transform: uppercase; font-size: 28px; line-height: 30px; color: var(--white); }
.mban-sub { font-size: 13px; line-height: 18px; color: rgba(255, 255, 255, 0.92); max-width: 30ch; }
.mban-cta {
  display: inline-flex; align-items: center; margin-top: 6px; height: 40px; padding: 0 18px; border-radius: var(--r-pill);
  background: var(--white); color: var(--red); font-family: var(--f-sans); font-size: 16px; line-height: 20px;
}
@media (prefers-reduced-motion: reduce) { .mban-video { display: none; } }
.mban { margin-bottom: 0; }
.mban + .mtiles { padding-top: 10px; }

/* ── long menu product area (Paper "Menu list (iterations)") ──
   list = v3 photo right, grid = v2 two-column cards; both share the .qctl
   quantity control in the photo's bottom-right corner. */
.msec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 6px; }
.msec-head .msec-title { padding-bottom: 0; min-width: 0; flex: 1 1 auto; overflow-wrap: normal; word-break: normal; white-space: nowrap; }

/* layout switch: compact segmented control, beige track, white active */
.mview { display: inline-flex; flex-shrink: 0; gap: 2px; padding: 2px; border-radius: var(--r-pill); background: var(--beige); }
.mview-btn { position: relative; width: 32px; height: 28px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; color: var(--muted);
  transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease); }
.mview-btn::after { content: ""; position: absolute; inset: -6px -1px; }
.mview-btn.is-active { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 16, 16, 0.1); }
.mview-btn:active { transform: scale(0.94); }
.mview-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

/* switching: the product areas fade out (90ms), swap, fade back in (150ms) */
.msec-body { transition: opacity 150ms ease; }
.menu.is-swapping .msec-body { opacity: 0; transition-duration: 90ms; }

/* shared bits */
.mnew { font-family: var(--f-ui); font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--red); }
.mprice { display: flex; align-items: baseline; gap: 6px; padding-top: 4px; white-space: nowrap; }
.mprice-now { font-family: var(--f-sans); font-size: 16px; line-height: 20px; font-variant-numeric: tabular-nums; }
.mprice s { font-size: 13px; line-height: 18px; color: var(--muted); text-decoration-thickness: 1px; }
.menu-row.is-soldout .row-name, .menu-row.is-soldout .mprice-now { color: var(--dot-off); }
.menu-row.is-soldout .mrow-ph img, .menu-row.is-soldout .mcard-ph img { opacity: 0.4; }

/* list: text left, product cut-out right, hairline dividers */
.mlist { display: flex; flex-direction: column; }
.mrow { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); cursor: pointer; text-align: left; }
.mrow-text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mrow .row-name { font-family: var(--f-sans); font-size: 19px; line-height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow-desc { font-size: 13px; line-height: 18px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow .mprice { padding-top: 6px; }
.mrow-ph { position: relative; flex-shrink: 0; width: 112px; height: 96px; display: flex; align-items: center; justify-content: center; }
.mrow-ph img { width: 128px; height: 112px; max-width: none; flex-shrink: 0; object-fit: contain; pointer-events: none; } /* never squeezed to the box before it loads (no shift when it arrives) */
.mrow-ph .qctl { right: 0; bottom: -4px; }

/* grid: two columns, beige photo tile, name + price under it */
.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 12px; padding-top: 12px; }
.mcard { display: flex; flex-direction: column; gap: 10px; min-width: 0; cursor: pointer; text-align: left; }
.mcard-ph { position: relative; aspect-ratio: 169 / 128; border-radius: var(--r-photo); background: var(--beige); display: flex; align-items: center; justify-content: center; }
.mcard-ph img { width: 74%; height: 94%; object-fit: contain; pointer-events: none; }
.mcard-ph .mnew { position: absolute; left: 12px; top: 10px; }
.mcard-ph .qctl { right: 8px; bottom: 8px; }
.mcard-out { position: absolute; left: 8px; bottom: 8px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); background: var(--white); display: inline-flex; align-items: center;
  font-size: 12px; line-height: 16px; font-weight: 500; color: var(--muted); white-space: nowrap; max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; }
.mcard-text { display: flex; flex-direction: column; gap: 2px; padding: 0 4px; min-width: 0; }
.mcard .row-name { font-family: var(--f-sans); font-size: 18px; line-height: 22px;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: break-word; }
.mcard .mprice { padding-top: 2px; }

/* quantity control (kiosk card stepper): a round red + that widens leftwards into a
   white pill with a beige minus, the count and the red plus; at 0 it shrinks back.
   Only the width animates (220ms ease out), minus and count fade in after 60ms. */
.qctl {
  position: absolute; z-index: 1; display: flex; align-items: center; justify-content: flex-end; gap: 0;
  width: 34px; height: 34px; padding: 2px; border-radius: var(--r-pill); overflow: hidden;
  background: var(--white); cursor: default;
  transition: width 220ms var(--ease), box-shadow 220ms var(--ease), background-color 160ms ease;
}
.qctl.is-on { width: 94px; box-shadow: 0 2px 8px rgba(16, 16, 16, 0.12); }
.mcard-ph .qctl:not(.is-on) { background: transparent; } /* grid: plain red + on the beige tile */
.qctl-btn {
  position: relative; flex-shrink: 0; width: 30px; height: 30px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 160ms var(--ease), opacity 160ms ease;
}
.qctl-btn::after { content: ""; position: absolute; inset: -5px; }
.qctl-btn:active { transform: scale(0.92); }
.qctl-btn.is-minus { background: var(--beige); color: var(--ink); }
.qctl-btn.is-plus { background: var(--red); color: var(--white); }
.qctl-n { flex-shrink: 0; width: 30px; overflow: hidden; display: flex; justify-content: center; font-family: var(--f-sans); font-size: 16px; line-height: 20px; color: var(--ink);
  font-variant-numeric: tabular-nums; min-width: 0; transition: opacity 160ms ease; }
.qctl-n > span { display: block; }
.qctl:not(.is-on) .qctl-btn.is-minus, .qctl:not(.is-on) .qctl-n { opacity: 0; pointer-events: none; transition-delay: 0ms; }
.qctl.is-on .qctl-btn.is-minus, .qctl.is-on .qctl-n { opacity: 1; transition-delay: 60ms; }
.qctl-btn:focus-visible { outline: none; }
.qctl:has(.qctl-btn:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .qctl { transition: none; }
  .qctl-btn { transition: opacity 150ms ease; }
  .qctl-btn:active, .mview-btn:active { transform: none; }
  .mview-btn { transition: background-color 150ms ease, color 150ms ease; }
}
