/* Single-page storefront ("Menu Mobile Mockup") design.
   Loaded in the <head> by s/wrapper.php BEFORE the tenant's per-store custom CSS,
   so a tenant's custom CSS (and their brand fonts/colors) can override any of this
   at equal specificity. Everything is scoped to .vm-store so it never leaks into
   the other storefront pages (menu / category / item). */
.vm-store{--s-bg:#f7f4f4;--s-card:#fff;--s-ink:#1a1616;--s-muted:#8a8080;--s-muted-2:#6b6161;--s-accent:#d01d21;--s-accent-hover:#ac0311;--s-accent-soft:rgba(208,29,33,.1);--s-h:"Sora","Manrope",system-ui,sans-serif;--s-b:"Manrope",system-ui,sans-serif;background:var(--s-bg);color:var(--s-ink);font-family:var(--s-b);min-height:100vh;}
.vm-store *{box-sizing:border-box;}
.vm-store a{text-decoration:none;color:inherit;}
.vm-store .s-wrap{max-width:620px;margin:0 auto;}
.vm-store h1,.vm-store h2,.vm-store h3{font-family:var(--s-h);margin:0;}

/* header */
.vm-store .s-head{padding:18px 20px 4px;display:flex;flex-direction:column;gap:12px;}
.vm-store .s-head-top{display:flex;justify-content:space-between;align-items:center;gap:12px;}
.vm-store .s-brand{display:flex;align-items:center;gap:12px;min-width:0;}
/* When a logo is uploaded it IS the identity — no separate title next to it. Natural
   aspect ratio (never cropped), capped in height and width. */
.vm-store .s-logo-img{height:48px;width:auto;max-width:58vw;object-fit:contain;object-position:left center;display:block;flex:none;}
.vm-store .s-name{font-family:var(--s-h);font-size:20px;font-weight:800;letter-spacing:-.02em;line-height:1.2;min-width:0;}
/* the address + open/closed line: full width, WRAPS instead of truncating, dot inline */
.vm-store .s-place{display:flex;align-items:center;flex-wrap:wrap;gap:4px 6px;font-size:12px;color:var(--s-muted);line-height:1.45;}
/* open/closed as a dot: green pulsing = open now, grey = closed (+ "po X val." hint) */
.vm-store .s-dot{display:inline-block;width:9px;height:9px;border-radius:50%;vertical-align:middle;margin:-2px 1px 0 1px;}
.vm-store .s-dot-open{background:#22c55e;animation:s-pulse 1.8s ease-out infinite;}
.vm-store .s-dot-closed{background:#b9b0b0;}
.vm-store .s-reopen{color:var(--s-muted);font-weight:600;}
@keyframes s-pulse{
    0%{box-shadow:0 0 0 0 rgba(34,197,94,.45);}
    70%{box-shadow:0 0 0 7px rgba(34,197,94,0);}
    100%{box-shadow:0 0 0 0 rgba(34,197,94,0);}
}
@media(prefers-reduced-motion: reduce){ .vm-store .s-dot-open{animation:none;} }
.vm-store .s-cart{position:relative;border:1.5px solid rgba(26,22,22,.12);border-radius:999px;padding:8px 12px;font-size:13px;font-weight:700;display:inline-flex;align-items:center;gap:7px;white-space:nowrap;flex:none;}
.vm-store .s-cart-count{background:var(--s-accent);color:#fff;border-radius:999px;min-width:20px;height:20px;padding:0 5px;font-size:11px;display:inline-flex;align-items:center;justify-content:center;}
/* search + Vegi share one EXPLICIT height — not min-height, not stretch — so nothing
   (emoji line metrics, inherited button styles, a stale rule on one of them) can ever
   make them differ again. box-sizing is border-box, so 48px includes both 1.5px borders. */
.vm-store .s-tools{display:flex;gap:8px;align-items:flex-start;}
.vm-store .s-search{flex:1;min-width:0;height:48px;background:var(--s-card);border:1.5px solid rgba(26,22,22,.12);border-radius:14px;padding:0 14px;display:flex;align-items:center;gap:8px;color:var(--s-muted);}
/* mockup spec: 🌿 Vegi — white + subtle border when off, accent fill + white text when on */
.vm-store .s-vegi{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:none;height:48px;line-height:1;margin:0;border-radius:14px;padding:0 16px;font-size:13px;font-weight:700;cursor:pointer;background:var(--s-card);color:var(--s-ink);border:1.5px solid rgba(26,22,22,.12);white-space:nowrap;user-select:none;font-family:var(--s-b);transition:background .15s,color .15s,border-color .15s;}
.vm-store .s-vegi.on{background:var(--s-accent);color:#fff;border-color:var(--s-accent);}
/* 16px: anything smaller makes iOS Safari zoom on focus and leaves the page shifted sideways */
.vm-store .s-search input{border:0;outline:0;background:transparent;font-family:inherit;font-size:16px;line-height:1.2;color:var(--s-ink);width:100%;min-width:0;padding:0;height:100%;}

/* sticky category nav */
.vm-store .s-nav{position:sticky;top:0;z-index:10;background:rgba(253,252,252,.92);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-bottom:1px solid rgba(26,22,22,.05);}
.vm-store .s-nav-inner{max-width:620px;margin:0 auto;padding:12px 20px;display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;}
.vm-store .s-nav-inner::-webkit-scrollbar{display:none;}
.vm-store .s-chip{flex-shrink:0;font-size:13px;font-weight:700;padding:8px 16px;border-radius:999px;cursor:pointer;background:#f2eeee;color:var(--s-ink);border:0;font-family:var(--s-b);white-space:nowrap;transition:background .15s,color .15s;}
.vm-store .s-chip.active{background:var(--s-ink);color:#fff;}

/* sections + cards */
.vm-store .s-body{padding:8px 20px 24px;display:flex;flex-direction:column;gap:22px;}
.vm-store .s-sec-head{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:12px;}
.vm-store .s-sec-head h2{font-size:20px;font-weight:800;letter-spacing:-.02em;}
.vm-store .s-sec-count{font-size:12px;font-weight:600;color:var(--s-muted);}
.vm-store .s-items{display:flex;flex-direction:column;gap:12px;}
/* Card: [image] [name + description] [price]. Keeping the price in its own right-hand
   column removes the dead space that appeared under short names and keeps every card
   the same compact height on a phone. */
/* color is explicit: item cards are <button>s and iOS Safari's UA stylesheet tints
   button text BLUE — desktop browsers default to black, which hid this */
.vm-store .s-item{background:var(--s-card);color:var(--s-ink);-webkit-appearance:none;appearance:none;border-radius:18px;padding:10px;display:flex;gap:12px;align-items:center;box-shadow:0 2px 12px rgba(26,22,22,.05);cursor:pointer;transition:box-shadow .15s,transform .15s;text-align:left;width:100%;border:0;font-family:var(--s-b);}
.vm-store .s-item:hover{box-shadow:0 6px 20px rgba(26,22,22,.1);}
.vm-store .s-item:active{transform:scale(.99);}
.vm-store .s-item-img{width:76px;height:76px;border-radius:14px;flex-shrink:0;background:repeating-linear-gradient(45deg,#e9e4e4,#e9e4e4 5px,#f2eeee 5px,#f2eeee 10px);background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;}
.vm-store .s-item-img span{font-size:9px;color:#a89e9e;letter-spacing:.06em;font-weight:700;}
.vm-store .s-item-body{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:3px;}
.vm-store .s-item-top{display:flex;align-items:center;gap:6px;flex-wrap:wrap;}
.vm-store .s-item-name{font-family:var(--s-h);font-size:15px;font-weight:700;line-height:1.25;}
.vm-store .s-tag-top{font-size:10px;font-weight:800;background:var(--s-accent-soft);color:var(--s-accent-hover);padding:2px 7px;border-radius:999px;white-space:nowrap;}
.vm-store .s-tag-vegi{font-size:12px;line-height:1;}
.vm-store .s-item-desc{font-size:12px;line-height:1.4;color:var(--s-muted);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;}
.vm-store .s-item-price{flex:0 0 auto;margin-left:auto;padding-left:4px;text-align:right;white-space:nowrap;font-family:var(--s-h);font-size:16px;font-weight:800;color:var(--s-accent);}

/* very small phones: give the text a little more room */
@media(max-width:360px){
    .vm-store .s-item-img{width:64px;height:64px;}
    .vm-store .s-item-name{font-size:14px;}
    .vm-store .s-item-price{font-size:15px;}
}
.vm-store .s-empty{text-align:center;color:var(--s-muted);padding:40px 0;font-size:14px;display:none;}
.vm-store .s-foot{text-align:center;padding:10px 0 6px;display:flex;flex-direction:column;gap:4px;}
.vm-store .s-foot div{font-size:12px;color:#a89e9e;}
.vm-store .s-foot a{font-weight:800;color:var(--s-accent);}

/* the shared storefront footer (copyright + branding + tenant socials) used to be an
   unstyled white block dangling below the 100vh page — restyled into the system so the
   page ends on purpose, with safe-area padding for iPhones */
.store-footer{background:var(--s-bg,#f7f4f4);max-width:none;margin:0;padding:22px 20px calc(26px + env(safe-area-inset-bottom));text-align:center;font-size:12px;color:#8a8080;font-family:"Manrope",system-ui,sans-serif;}
.store-footer .row{display:flex;flex-direction:column;align-items:center;gap:10px;margin:0;}
.store-footer [class*="col-"]{padding:0;max-width:none;flex:none;width:auto;text-align:center !important;}
.store-footer a{color:inherit;}

/* detail sheet */
.vm-store .s-sheet-bd{position:fixed;inset:0;background:rgba(26,22,22,.45);z-index:1000;opacity:0;pointer-events:none;transition:opacity .2s;}
.vm-store .s-sheet-bd.open{opacity:1;pointer-events:auto;}
.vm-store .s-sheet{position:fixed;left:0;right:0;bottom:0;z-index:1001;background:var(--s-bg);border-radius:28px 28px 0 0;padding:12px 22px calc(26px + env(safe-area-inset-bottom));max-width:620px;margin:0 auto;max-height:88vh;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:14px;transform:translateY(100%);transition:transform .28s cubic-bezier(.32,.72,0,1);box-shadow:0 -16px 48px rgba(26,22,22,.2);}
.vm-store .s-sheet.open{transform:translateY(0);}
.vm-store .s-sheet-grab{width:40px;height:4px;border-radius:999px;background:rgba(26,22,22,.15);align-self:center;}
/* item photos are square (1:1): show the WHOLE square, never a cropped landscape strip */
.vm-store .s-sheet-img{width:100%;max-width:300px;aspect-ratio:1/1;height:auto;margin:0 auto;border-radius:20px;background:repeating-linear-gradient(45deg,#e9e4e4,#e9e4e4 6px,#f2eeee 6px,#f2eeee 12px);background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;color:#a89e9e;font-size:10px;font-weight:700;letter-spacing:.06em;}
.vm-store .s-sheet-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;}
.vm-store .s-sheet-name{font-family:var(--s-h);font-size:21px;font-weight:800;letter-spacing:-.02em;}
.vm-store .s-sheet-price{font-family:var(--s-h);font-size:19px;font-weight:800;color:var(--s-accent);white-space:nowrap;}
.vm-store .s-sheet-desc{font-size:14px;line-height:1.6;color:var(--s-muted-2);margin:0;}
.vm-store .s-sheet-allergens{display:flex;gap:8px;flex-wrap:wrap;}
.vm-store .s-sheet-allergens span{font-size:12px;font-weight:700;background:#f2eeee;color:var(--s-muted-2);padding:6px 12px;border-radius:999px;}
.vm-store .s-sheet-vegi{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:700;color:var(--s-accent-hover);}
.vm-store .s-sheet-btns{display:flex;gap:10px;margin-top:2px;}
.vm-store .s-btn{flex:1;text-align:center;font-family:var(--s-h);font-weight:700;font-size:15px;padding:14px;border-radius:16px;cursor:pointer;border:0;}
.vm-store .s-btn-close{background:#f2eeee;color:var(--s-ink);}
.vm-store .s-btn-cart{background:var(--s-accent);color:#fff;}
.vm-store .s-btn-cart.added{background:#2fa84f;}
@supports not (aspect-ratio: 1/1){ .vm-store .s-sheet-img{height:280px;} }

/* ─── dark mode (storefront) — keyed off the app's native flag, <body data-theme-style="dark">
   (set from the theme_style cookie by ThemeStyle::get() and flipped by the footer switch in
   partials/theme_style_js.php). Tokens flip first, then the few rules that carried hard-coded
   light values. ─── */
[data-theme-style="dark"] .vm-store{
    --s-bg:#141212;--s-card:#1e1a1a;--s-ink:#f3eeee;--s-muted:#9c9292;--s-muted-2:#bcb2b2;
    --s-accent:#e8353a;--s-accent-hover:#ff5a5e;--s-accent-soft:rgba(232,53,58,.18);
}
[data-theme-style="dark"] .vm-store .s-dot-closed{background:#5e5656;}
[data-theme-style="dark"] .vm-store .s-cart,
[data-theme-style="dark"] .vm-store .s-search,
[data-theme-style="dark"] .vm-store .s-vegi{border-color:rgba(255,255,255,.14);}
[data-theme-style="dark"] .vm-store .s-logo-empty{background-color:rgba(255,255,255,.08);}
[data-theme-style="dark"] .vm-store .s-nav{background:rgba(20,18,18,.9);border-bottom-color:rgba(255,255,255,.06);}
[data-theme-style="dark"] .vm-store .s-chip{background:#2a2424;}
[data-theme-style="dark"] .vm-store .s-chip.active{background:#f3eeee;color:#141212;}
[data-theme-style="dark"] .vm-store .s-item{box-shadow:0 2px 12px rgba(0,0,0,.35);}
[data-theme-style="dark"] .vm-store .s-item:hover{box-shadow:0 6px 20px rgba(0,0,0,.5);}
[data-theme-style="dark"] .vm-store .s-item-img,
[data-theme-style="dark"] .vm-store .s-sheet-img{background-image:repeating-linear-gradient(45deg,#2a2424,#2a2424 5px,#332c2c 5px,#332c2c 10px);}
[data-theme-style="dark"] .vm-store .s-item-img span,
[data-theme-style="dark"] .vm-store .s-sheet-img span,
[data-theme-style="dark"] .vm-store .s-foot div{color:#7a6f6f;}
[data-theme-style="dark"] .vm-store .s-sheet-bd{background:rgba(0,0,0,.62);}
[data-theme-style="dark"] .vm-store .s-sheet{box-shadow:0 -16px 48px rgba(0,0,0,.6);}
[data-theme-style="dark"] .vm-store .s-sheet-grab{background:rgba(255,255,255,.18);}
[data-theme-style="dark"] .vm-store .s-sheet-allergens span{background:#2a2424;color:var(--s-muted-2);}
[data-theme-style="dark"] .vm-store .s-btn-close{background:#2a2424;}
[data-theme-style="dark"] .store-footer{background:#141212;color:#7a6f6f;}

/* footer light/dark switch — a pill in the design system (the JS toggles the two spans) */
.store-footer .s-theme-switch{display:inline-flex;align-items:center;gap:8px;border:1.5px solid rgba(26,22,22,.12);border-radius:999px;padding:9px 16px;background:#fff;color:#1a1616;font:700 13px/1 "Manrope",system-ui,sans-serif;cursor:pointer;-webkit-appearance:none;appearance:none;margin-top:4px;}
.store-footer .s-theme-switch:hover{border-color:rgba(26,22,22,.3);}
[data-theme-style="dark"] .store-footer .s-theme-switch{background:#1e1a1a;color:#f3eeee;border-color:rgba(255,255,255,.14);}
.vm-store .s-logo-wrap{display:block;flex:none;min-width:0;}

/* modifiers in the sheet: option groups as pills, extras as check rows */
.vm-store .s-sheet-mods{display:flex;flex-direction:column;gap:14px;}
.vm-store .s-sheet-mods:empty{display:none;}
.vm-store .s-opt-name{font-family:var(--s-h);font-size:13px;font-weight:800;margin-bottom:8px;}
.vm-store .s-opt-vals{display:flex;flex-wrap:wrap;gap:8px;}
.vm-store .s-opt-val{border:1.5px solid rgba(26,22,22,.12);background:var(--s-card);color:var(--s-ink);font-family:var(--s-b);font-size:13px;font-weight:700;padding:9px 14px;border-radius:999px;cursor:pointer;-webkit-appearance:none;appearance:none;transition:background .15s,color .15s,border-color .15s,opacity .15s;}
.vm-store .s-opt-val.on{background:var(--s-ink);color:var(--s-bg);border-color:var(--s-ink);}
.vm-store .s-opt-val.off{opacity:.35;cursor:not-allowed;}
.vm-store .s-extras{display:flex;flex-direction:column;}
.vm-store .s-extra{display:flex;align-items:center;gap:10px;padding:10px 0;border-top:1px solid rgba(26,22,22,.08);font-size:14px;cursor:pointer;margin:0;}
.vm-store .s-extra input{width:20px;height:20px;accent-color:var(--s-accent);margin:0;flex:none;}
.vm-store .s-extra-name{flex:1;min-width:0;}
.vm-store .s-extra-price{font-family:var(--s-h);font-weight:800;color:var(--s-accent);white-space:nowrap;}
.vm-store .s-btn-cart.disabled,.vm-store .s-btn-cart:disabled{opacity:.45;cursor:not-allowed;}
[data-theme-style="dark"] .vm-store .s-opt-val{border-color:rgba(255,255,255,.14);}
[data-theme-style="dark"] .vm-store .s-extra{border-top-color:rgba(255,255,255,.1);}

/* extras are collapsed by default: a "Priedai · 12  (+)" row; (+) opens the list inside the
   scrolling sheet, so a dish with 20 extras no longer fills the whole screen on tap.
   The count pill shows how many are available, and turns accent with the selected number. */
.vm-store .s-extras{display:flex;flex-direction:column;}
.vm-store .s-extras-toggle{display:flex;align-items:center;gap:10px;width:100%;padding:8px 0;margin:0;background:none;border:0;border-top:1px solid rgba(26,22,22,.08);color:var(--s-ink);font-family:var(--s-b);cursor:pointer;-webkit-appearance:none;appearance:none;text-align:left;}
.vm-store .s-extras-toggle .s-opt-name{margin:0;}
.vm-store .s-extras-count{font-size:12px;font-weight:800;background:#f2eeee;color:var(--s-muted-2);padding:3px 9px;border-radius:999px;}
.vm-store .s-extras-count.picked{background:var(--s-accent);color:#fff;}
.vm-store .s-extras-plus{margin-left:auto;flex:none;width:32px;height:32px;border-radius:50%;border:1.5px solid rgba(26,22,22,.14);background:var(--s-card);color:var(--s-ink);display:inline-flex;align-items:center;justify-content:center;font-size:22px;font-weight:500;line-height:1;transition:transform .2s,background .15s,color .15s,border-color .15s;}
.vm-store .s-extras.open .s-extras-plus{transform:rotate(45deg);background:var(--s-ink);color:var(--s-bg);border-color:var(--s-ink);}
.vm-store .s-extras-list{display:flex;flex-direction:column;}
.vm-store .s-extras-list[hidden]{display:none;}
.vm-store .s-extras-list .s-extra:first-child{border-top:0;}
[data-theme-style="dark"] .vm-store .s-extras-toggle{border-top-color:rgba(255,255,255,.1);}
[data-theme-style="dark"] .vm-store .s-extras-count{background:#2a2424;}
[data-theme-style="dark"] .vm-store .s-extras-plus{border-color:rgba(255,255,255,.16);}

/* ─── desktop (≥ 820px): a wider column, every category chip visible at once (the bar wraps
   instead of scrolling sideways — a mouse cannot scroll a hidden-scrollbar strip), and the
   dishes in two columns. Still one design: same header, chips, cards and sheet. ─── */
@media(min-width:820px){
    .vm-store .s-wrap,.vm-store .s-nav-inner{max-width:1040px;}
    .vm-store .s-head{padding-top:28px;}
    .vm-store .s-nav-inner{flex-wrap:wrap;overflow:visible;padding:14px 20px;}
    .vm-store .s-body{padding:12px 20px 32px;}
    .vm-store .s-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;}
    .vm-store .s-item{height:100%;}
}
