/* Storefront components. Tokens (--paper, --ink, --green, --mint, --dots ...) come from index.html. */
[hidden] { display: none !important; }
body.locked { overflow: hidden; }

/* Category chips: sticky under the header */
.tabs-wrap { display: flex; align-items: stretch; position: sticky; top: var(--hh, 64px); z-index: 20; background: var(--paper); border-bottom: 2px solid var(--ink); margin: 0 calc(-1 * var(--pad)); }
.tabs-wrap[hidden] { display: none; }
.order-tabs { flex: 1 1 auto; min-width: 0; display: flex; gap: 8px; overflow-x: auto; padding: 10px var(--pad); scrollbar-width: none; scroll-snap-type: x proximity; }
.tabs-arrow { display: none; }
.order-tabs::-webkit-scrollbar { display: none; }
.order-tabs a { flex: 0 0 auto; scroll-snap-align: start; text-decoration: none; font-weight: 800; font-size: .82rem; border: 2px solid var(--ink); border-radius: 999px; padding: 7px 14px; background: var(--paper); }
.order-tabs a:hover { background: var(--mint2); }
.order-tabs a.on { background: var(--ink); color: var(--paper); }

.order-cat { scroll-margin-top: calc(var(--hh, 64px) + 60px); }
.order-cat h3 { margin: 26px 0 12px; font-size: 1.15rem; font-weight: 900; letter-spacing: -.01em; display: flex; align-items: baseline; gap: 10px; }
.order-cat h3 small { font-size: .75rem; font-weight: 700; color: var(--ink2); }
.order-cat h3::after { content: ""; flex: 1; height: 8px; background: var(--dots); align-self: center; }
.result-note { margin: 16px 0 0; font-weight: 700; color: var(--ink2); }
.order-empty { padding: 28px; border: 2px dashed var(--ink); border-radius: 6px; background: var(--dots), var(--paper2); font-weight: 700; }

/* Product grid */
.dish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.dish { position: relative; background: #fff; border: 2px solid var(--ink); border-radius: 6px; display: flex; flex-direction: column; overflow: hidden; transition: transform .12s, box-shadow .12s; }
.dish:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.dish-media > img, .dish-ph { width: 100%; aspect-ratio: 1 / 1; box-sizing: border-box; padding: 8px; object-fit: contain; display: block; background: #fff; border-bottom: 2px solid var(--ink); }
.dish-ph { display: grid; place-items: center; font-size: 2.2rem; background: var(--dots), var(--paper2); filter: grayscale(1) contrast(1.3); }
.dish-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.dish h4 { margin: 0; font-size: .95rem; line-height: 1.25; }
.dish-open { all: unset; cursor: pointer; }
.dish-open::after { content: ""; position: absolute; inset: 0; }                  /* whole card is the click target */
.dish-open:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.dish .price { font-weight: 900; color: var(--green); }
.dish-media { position: relative; }
.dish-add { position: absolute; right: 8px; bottom: 8px; z-index: 2; }
.dish-add { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--ink); background: var(--mint); color: var(--ink); font-size: 1.3rem; font-weight: 900; line-height: 1; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); display: grid; place-items: center; }
.dish-add:hover { background: var(--mint2); }
.dish-add:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.dish-add.done { background: var(--green); color: var(--paper); }

/* Shared stepper / buttons / text */
.qty { display: inline-flex; align-items: center; gap: 10px; }
.qty button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font-weight: 800; cursor: pointer; line-height: 1; font-family: inherit; }
.qty button:hover { background: var(--mint); }
.qty span { min-width: 1.4em; text-align: center; font-weight: 800; }
.linkbtn { border: 0 !important; background: none !important; width: auto !important; height: auto !important; font-size: .78rem; font-weight: 700 !important; text-decoration: underline; color: var(--ink2) !important; margin-left: 6px; }
.order-btn:disabled { opacity: .6; cursor: wait; }
.shop-err { color: var(--red); font-weight: 700; font-size: .85rem; text-align: center; min-height: 1em; }

/* Dialogs: item + cart drawer */
dialog { color: var(--ink); background: var(--paper); border: 2.5px solid var(--ink); padding: 0; }
dialog::backdrop { background: rgba(17,19,16,.65); }
#item-dialog { width: min(760px, calc(100vw - 24px)); height: min(70dvh, 640px); max-height: calc(100dvh - 24px); border-radius: 6px; box-shadow: 8px 8px 0 var(--green); overflow: hidden; }   /* fixed size so every item opens the same; long text scrolls inside */
.dlg-close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.dlg-close:hover { background: var(--mint); }
#item-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: 100%; }   /* minmax(0,…) so a big photo can't widen its column and squeeze the buy row */
.item-media { align-self: start; aspect-ratio: 1 / 1; margin: 26px 0 22px 22px; background: #fff; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; padding: 14px; box-sizing: border-box; }   /* same insets as .item-info; padding keeps edge-to-edge photos off the frame */
.item-photo { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.item-media .dish-ph { border: 0; aspect-ratio: auto; }
.item-info { padding: 26px 22px 22px; display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: hidden; }
.item-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.item-info h2 { margin: 0 34px 0 0; font-family: "Arial Black", "Helvetica Neue", sans-serif; font-size: 1.5rem; line-height: 1.1; letter-spacing: -.02em; }
.item-info .price { font-weight: 900; color: var(--green); font-size: 1.2rem; }
.item-info .desc { margin: 0; color: var(--ink2); line-height: 1.5; font-size: .92rem; }
.mods { border: 2px solid var(--ink); border-radius: 6px; padding: 8px 12px; margin: 4px 0 0; display: flex; flex-direction: column; gap: 6px; }
.mods legend { font-weight: 800; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; padding: 0 6px; }
.mods label { display: flex; gap: 8px; align-items: center; cursor: pointer; font-size: .9rem; }
.mods label em { margin-left: auto; font-style: normal; color: var(--ink2); font-size: .82rem; }
.mods input { width: 18px; height: 18px; accent-color: var(--green); }
.item-buy { display: flex; gap: 12px; align-items: center; padding-top: 8px; flex-wrap: wrap; flex: 0 0 auto; }
.item-buy .accent-btn { flex: 1; justify-content: center; padding: 13px 18px; min-width: 160px; }

#cart-drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(430px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; border-width: 0 0 0 2.5px; border-radius: 0; box-shadow: -8px 0 0 var(--green); flex-direction: column; }
#cart-drawer[open] { display: flex; animation: slideIn .2s ease; }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 2.5px solid var(--ink); }
.drawer-head h2 { margin: 0; font-family: "Arial Black", "Helvetica Neue", sans-serif; text-transform: uppercase; font-size: 1.15rem; }
.drawer-head .dlg-close { position: static; }
#cart-body { flex: 1; overflow-y: auto; padding: 6px 18px; }
.cart-empty { text-align: center; padding: 40px 10px; color: var(--ink2); }
.cart-empty .accent-btn { margin-top: 12px; }
.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: start; padding: 14px 0; border-bottom: 2px dotted var(--ink); }
.cart-line img, .cart-line .dish-ph { width: 64px; height: 64px; aspect-ratio: auto; border: 2px solid var(--ink); border-radius: 4px; object-fit: contain; font-size: 1.4rem; }
.cart-line img { background: #fff; }
.cl-info { display: flex; flex-direction: column; gap: 4px; font-size: .92rem; }
.cl-info small { color: var(--ink2); }
.cl-info .qty { margin-top: 4px; }
.line-total { font-weight: 800; }
.drawer-foot { padding: 16px 18px 18px; border-top: 2.5px solid var(--ink); background: var(--paper2); display: flex; flex-direction: column; gap: 10px; }
.shop-total { display: flex; justify-content: space-between; font-weight: 900; font-size: 1.2rem; }
.shop-note { font-size: .78rem; color: var(--ink2); text-align: center; margin: 0; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 2000; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 10px 12px 10px 18px; display: flex; gap: 12px; align-items: center; font-weight: 700; font-size: .9rem; box-shadow: 4px 4px 0 var(--green); transition: .2s ease; max-width: calc(100vw - 24px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { border: 2px solid var(--paper); background: var(--mint); color: var(--ink); border-radius: 999px; padding: 4px 12px; font-weight: 800; cursor: pointer; font-family: inherit; }
.shop-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 3000; padding: 14px 16px; text-align: center; font-weight: 700; background: var(--mint); color: var(--ink); border-bottom: 2.5px solid var(--ink); }

@media (max-width: 700px) {
  .tabs-wrap { margin: 0 calc(-1 * var(--pad)); }
  .order-tabs { padding-inline: 4px; scroll-padding-inline: 4px; }
  .tabs-arrow { display: block; flex: 0 0 34px; border: 0; background: var(--paper); color: var(--ink); font-family: inherit; font-weight: 900; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 0 3px; }
  #tabs-prev { border-right: 2px solid var(--ink); }
  #tabs-next { border-left: 2px solid var(--ink); }
  .tabs-arrow:disabled { opacity: .25; cursor: default; }
  .tabs-arrow:not(:disabled):active { background: var(--mint); }
  .dish-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dish-body { padding: 8px 10px 10px; }
  .dish h4 { font-size: .85rem; }
  .dish-add { width: 34px; height: 34px; }
  #item-dialog { inset: var(--tb, 0px) 0 0 0; width: 100vw; max-width: 100vw; height: calc(100dvh - var(--tb, 0px)); max-height: none; margin: 0; border-radius: 0; box-shadow: none; border-width: 2.5px 0 0; }   /* full-screen sheet that starts right under the address/phone strip */
  #item-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .item-media { width: min(calc(100% - 32px), 38dvh); justify-self: center; margin: 18px 0 0; }
  .item-info { padding: 18px 16px; }
  .toast { bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) { #cart-drawer[open] { animation: none; } }

/* Options prompt: which step of a combo, and the skip link */
.item-step { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); margin-right: 40px; }
.item-buy .item-skip { flex-basis: 100%; text-align: center; margin: 2px 0 0; padding: 6px; cursor: pointer; }

.fulfil { display: flex; flex-direction: column; gap: 8px; }
.fulfil-opts { display: flex; gap: 8px; } .fulfil-opts label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; border: 2.5px solid var(--ink); border-radius: 6px; padding: 9px; background: #fff; font-weight: 800; cursor: pointer; }
.fulfil-opts label:has(input:checked) { background: var(--mint); }
.deliver-form { display: flex; flex-direction: column; gap: 6px; } .deliver-form input { border: 2px solid var(--ink); border-radius: 6px; padding: 9px 10px; font: inherit; background: #fff; min-width: 0; }
.deliver-form label.d-zip-row { display: flex; flex-direction: column; gap: 4px; font-weight: 800; } #d-rest { display: flex; flex-direction: column; gap: 6px; } .deliver-form small { font-weight: 700; }
.shop-total.sub { font-size: 1rem; font-weight: 800; }
