* { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.55;
  font-size: 14px;
}

main { flex: 1 0 auto; }

a { color: var(--color-primary); }

h1, h2, h3, h4 { font-family: var(--font-heading); margin: 0 0 10px; }

img { max-width: 100%; display: block; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px); }

.note { background: var(--ink); color: var(--bg); text-align: center; font-size: 13px; font-weight: 600; padding: 10px 16px; }

/* Header */
.hdr { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.hdr-in { display: grid; grid-template-columns: auto minmax(240px, 1fr) auto auto; align-items: center; gap: 12px 28px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand .mark { width: 44px; height: 44px; flex: none; border-radius: var(--rs); background: var(--accent); color: var(--onAccent); display: grid; place-items: center; font-family: var(--fd); font-weight: var(--fw); font-size: 20px; overflow: hidden; }
.brand-t { display: flex; flex-direction: column; min-width: 0; }
.brand-t b { font-family: var(--fd); font-weight: var(--fw); font-size: 19px; letter-spacing: var(--ls); line-height: 1.2; }
.brand-t small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--rp); color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); }
.search input::placeholder { color: var(--muted); }
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search-clear { border: 0; background: transparent; color: var(--muted); cursor: pointer; display: flex; padding: 0; flex: none; border-radius: 50%; }
.search-clear:hover { color: var(--accent); }
.nav { display: flex; gap: 4px; }
.nav a { padding: 12px 14px; border-radius: var(--rp); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover { background: var(--line); }
.cartbtn { position: relative; width: 48px; height: 48px; border-radius: var(--rs); border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; text-decoration: none; }
.cartbtn .badge { position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--onAccent); font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; }
/* Mobile-only profile icon (replaces the cart icon in the header's top-right
   slot on phones — cart itself moves to the fixed bottom bar below). Hidden
   by default; shown only inside the ≤720px block. */
.acct-mobile { display: none; }

@media (max-width: 1024px) {
  .hdr-in { grid-template-columns: auto minmax(0, 1fr) auto; }
  .nav { display: none; }
}
@media (max-width: 720px) {
  .hdr-in { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand account"; padding-block: 10px; }
  .brand { grid-area: brand; }
  .acct-mobile { grid-area: account; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--rs); border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }

  /* Search + cart move to a fixed bar pinned to the bottom of the screen,
     replacing the old 4-item tab bar. position:fixed lifts the SAME
     <form>/<a> the desktop header uses out of the grid entirely — same
     ids, same JS bindings (#site-search-form, #cart-count) — nothing
     duplicated, just relocated for this breakpoint. */
  .search { position: fixed; left: 14px; right: 74px; bottom: 14px; z-index: 30; height: 48px; box-shadow: 0 6px 18px rgba(0,0,0,0.14); }
  .cartbtn { position: fixed; right: 14px; bottom: 14px; z-index: 30; box-shadow: 0 6px 18px rgba(0,0,0,0.14); }
  body { padding-bottom: 76px; }
}

/* Hero — shape language (radius/shadow/border) now follows the active
   theme's tokens (var(--r) etc.), not fixed pixel values, so Editorial's
   sharp 2px corners and Fresh's soft 22px ones both read correctly here,
   same as every other themed component. */
.hero-rich { background: var(--bg); border-bottom: 1px solid var(--line); }
.hero-rich-inner { padding: 40px 16px 34px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; align-items: center; }
.hero-text h1 { font-family: var(--fd); font-weight: var(--fw); letter-spacing: var(--ls); font-size: 2.1rem; color: var(--ink); line-height: 1.16; margin: 0 0 10px; max-width: 18ch; }
.hero-text p { margin: 0; color: var(--muted); max-width: 46ch; }
.hero-tagline-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; font-size: 0.82rem; color: var(--muted); }
.hero-tagline-row .dot { color: var(--line); }
.hero-offers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface); border: var(--cb); border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; }
.hero-offer { padding: 18px 10px; text-align: center; border-right: 1px solid var(--line); }
.hero-offer:last-child { border-right: 0; }
.hero-offer .stat { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 1rem; font-weight: 700; color: var(--ink); }
.hero-offer .stat i { color: var(--accent); font-size: 0.9rem; }
.hero-offer .label { font-size: 0.66rem; color: var(--muted); margin-top: 4px; }
.hero-with-image { display: flex; align-items: center; gap: 44px; text-align: left; padding: 44px 0; }
.hero-with-image .hero-text { flex: 1; }
.hero-with-image .hero-text h1 { font-size: 2.2rem; line-height: 1.15; }
.hero-with-image .hero-text p { max-width: none; margin: 0; color: var(--muted); }
.hero-with-image .hero-image { flex: 1; }
.hero-with-image .hero-image img { border-radius: var(--r); width: 100%; aspect-ratio: 4/3; object-fit: cover; box-shadow: var(--sh); }
.hero-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; background: var(--accent); color: var(--onAccent); padding: 12px 22px; border-radius: var(--rp); font-weight: 700; font-size: 0.85rem; text-decoration: none; }
.hero-cta:hover { filter: brightness(1.08); }

/* Hero, image-only slider mode (hero_mode='slider', assets/js/hero-slider.js) */
.hero-slider { position: relative; margin-top: 0; }
.hero-viewport { overflow: hidden; border-radius: var(--r); }
.hero-track { display: flex; transition: transform .6s cubic-bezier(.22,.8,.3,1); }
.islide { position: relative; flex: 0 0 100%; min-width: 0; display: block; aspect-ratio: 16/9; text-decoration: none; color: var(--ink); background: var(--hero0); }
.islide:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.islide picture, .islide img { display: block; width: 100%; height: 100%; }
.islide img { object-fit: cover; }
.hero-slider .ctrl { position: absolute; inset: 0; pointer-events: none; }
.hero-slider .ctrl > * { pointer-events: auto; }
.hero-slider .dots { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; padding-inline: 8px; background: rgba(0,0,0,.45); border-radius: 999px; }
.hero-slider .dot { width: 30px; height: 44px; border: 0; background: none; padding: 0; cursor: pointer; position: relative; }
.hero-slider .dot::before { content: ""; position: absolute; left: 10px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 999px; background: #fff; opacity: .55; transition: width .3s, left .3s, opacity .3s; }
.hero-slider .dot.on::before { left: 3px; width: 24px; opacity: 1; }
.hero-slider .arrow { position: absolute; top: 50%; margin-top: -24px; width: 48px; height: 48px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.hero-slider .arrow.prev { left: 28px; }
.hero-slider .arrow.next { right: 28px; }
.hero-slider .arrow:hover { background: var(--ink); color: var(--bg); }
@media (max-width: 720px) {
  .islide { aspect-ratio: 4/3; }
  .hero-slider .arrow { display: none; }
  .hero-slider .dots { bottom: 10px; }
}

.product-badge { display: inline-flex; align-items: center; gap: 3px; background: var(--accent); color: var(--onAccent); font-size: 0.6rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 8px; border-radius: calc(var(--rs) / 2); box-shadow: 0 1px 2px rgba(0,0,0,0.15); }
.product-card .product-badge { position: absolute; top: 8px; left: 8px; z-index: 2; }

/* Filter chips + mobile category chips */
.filter-bar { display: flex; gap: 8px; overflow-x: auto; padding: 16px 16px 0; }
.filter-chip { display: inline-flex; align-items: center; gap: 7px; flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--rp); padding: 8px 15px; font: inherit; font-size: 0.78rem; font-weight: 600; cursor: pointer; }
.filter-chip.active { border-color: var(--accent); background: var(--accent); color: var(--onAccent); }

/* Menu layout: single column + horizontal chips by default (phone/tablet);
   swaps to a sticky left sidebar at desktop widths, see the min-width:861px
   block below — one template, CSS only decides which nav renders. */
.menu-layout { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: start; padding-top: 14px; }
.category-sidebar { display: none; }
.sidebar-label { font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 10px 18px 8px; font-weight: 700; }
.sidebar-item { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 10px 18px; font: inherit; font-size: 0.85rem; color: var(--ink); text-align: left; cursor: pointer; border-radius: var(--rs); }
.sidebar-item:hover, .sidebar-item.active { background: var(--tint0); color: var(--accent); }
.sidebar-item .count { margin-left: auto; font-size: 0.76rem; color: var(--muted); }

.menu-content { min-width: 0; }
.no-results { padding: 60px 24px; text-align: center; background: var(--surface); border: var(--cb); border-radius: var(--r); }
.no-results .emoji { font-size: 2.4rem; }
.no-results .title { font-size: 1.05rem; font-weight: 700; margin-top: 10px; }
.no-results .hint { font-size: 0.85rem; color: var(--muted); margin-top: 6px; }
.no-results .btn { margin-top: 16px; }

.category-heading { display: flex; align-items: baseline; gap: 10px; margin: 32px 0 14px; }
.category-heading .section-title { margin: 0; }
.category-count { font-size: 0.78rem; color: var(--muted); }
.menu-category:first-child .category-heading { margin-top: 0; }

/* Product grid */
.section-title { font-family: var(--fd); font-weight: var(--fw); letter-spacing: var(--ls); font-size: 1.2rem; color: var(--ink); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.product-card {
  background: var(--surface); border-radius: var(--r); border: var(--cb); overflow: hidden;
  color: var(--ink); display: flex; flex-direction: column; box-shadow: var(--sh);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.product-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.product-card .img-wrap { position: relative; aspect-ratio: 1/1; background: var(--tint0); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.product-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .img-wrap img { transform: scale(1.05); }
.product-card .tile-initials { font-family: 'Caveat', cursive; font-size: 2.1rem; }
.product-card .info { flex: 1; display: flex; flex-direction: column; padding: 12px 13px 14px; gap: 6px; }
/* The "veg" classes are leftover naming from a template this was adapted
   from — this app has no veg/non-veg concept, so the dot is hidden; the
   label itself is kept and restyled as a plain muted category tag
   (matches the reference design's `.ptag`). */
.veg-kicker { display: flex; align-items: center; gap: 7px; }
.veg-mark { display: none; }
.veg-kicker .kicker { font-size: 0.72rem; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: 0; }
.product-name { display: block; font-family: var(--fd); font-size: 0.9rem; font-weight: 700; line-height: 1.32; color: var(--ink); text-decoration: none; }
.product-name:hover { color: var(--accent); }
.product-card .price-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 9px; border-top: 1px solid var(--line); }
.product-card .price { color: var(--ink); font-weight: 800; font-family: var(--fd); font-size: 1rem; }
.product-card .price-label { display: block; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; }

/* Quick add — a round icon-style button at the smallest size (matches the
   reference's circular `.add`), growing into the pill stepper reference
   doesn't have but this app's quantity-adjust UX depends on. */
.quick-add { flex: none; }
.qa-add-btn { background: var(--accent); border: 0; color: var(--onAccent); border-radius: var(--rs); padding: 9px 15px; font: inherit; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.03em; cursor: pointer; white-space: nowrap; }
.qa-add-btn:hover { filter: brightness(1.08); }
.qa-stepper { display: flex; align-items: center; background: var(--accent); border-radius: var(--rs); overflow: hidden; }
.qa-stepper button { border: 0; background: transparent; color: var(--onAccent); width: 30px; height: 36px; font-size: 0.95rem; font-family: inherit; cursor: pointer; line-height: 1; }
.qa-stepper .qa-qty { font-size: 0.8rem; font-weight: 800; color: var(--onAccent); min-width: 18px; text-align: center; }
.qa-stepper[hidden] { display: none; }

/* Same [hidden]-vs-display specificity issue as above: .product-card sets
   its own display, so JS toggling `card.hidden` needs this to actually hide it. */
.product-card[hidden] { display: none; }

/* Product detail */
.product-detail { display: flex; gap: 36px; flex-wrap: wrap; padding: 30px 0; }
.product-detail .media { position: relative; flex: 1 1 320px; }
.product-detail .media .product-badge { position: absolute; top: 14px; left: 14px; }
.product-detail .media img { border-radius: 12px; width: 100%; aspect-ratio: 1/1; object-fit: cover; background: #fbf4e9; box-shadow: 0 10px 24px rgba(61,12,17,0.1); }
.product-detail .info { flex: 1 1 340px; }
.product-detail .eyebrow { color: #a8a29e; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.product-detail .desc { color: #78716c; margin-bottom: 18px; }
.variant-options, .addon-options { margin-bottom: 18px; }
.variant-options strong, .addon-options strong { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text); }
.variant-options .opt, .addon-options .opt { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid #f1ece2; }
.variant-options label, .addon-options label { flex: 1; cursor: pointer; font-weight: 600; font-size: 0.88rem; }
.price-tag { font-size: 1.3rem; font-weight: 800; font-family: var(--font-heading); color: var(--color-primary); margin: 14px 0; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ece6db; border-radius: 10px; overflow: hidden; }
.qty-control button { border: none; background: #fbf4e9; width: 34px; height: 34px; font-size: 1rem; cursor: pointer; color: var(--color-primary); }
.qty-control input { width: 42px; border: none; text-align: center; font-size: 0.95rem; font-weight: 700; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--onAccent); border: none;
  padding: 12px 20px; border-radius: var(--rs); font-family: var(--fb); font-size: 0.82rem; font-weight: 700;
  cursor: pointer; text-decoration: none; text-align: center; letter-spacing: 0.01em;
  transition: filter 0.15s ease, opacity 0.15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn-outline { background: transparent; border: 1.5px solid var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: var(--onAccent); filter: none; }
.btn-block { display: flex; width: 100%; }

/* Cart page */
.cart-item { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid #f1ece2; flex-wrap: wrap; }
.cart-item img { width: 62px; height: 62px; object-fit: cover; border-radius: 9px; background: #fbf4e9; }
.cart-item .details { flex: 1; }
.cart-item .details strong { font-family: var(--font-heading); }
.cart-item .addons-list { font-size: 0.76rem; color: #a8a29e; }
.cart-qty-form { display: flex; align-items: center; gap: 8px; }
.cart-qty-input { width: 56px; padding: 7px; border: 1px solid #ece6db; border-radius: 8px; }
.cart-item-total { min-width: 80px; text-align: right; font-weight: 800; font-family: var(--font-heading); color: var(--color-primary); }
.cart-summary { background: #fff; border: 1px solid #ece6db; border-radius: 12px; padding: 20px; margin-top: 20px; }
.cart-summary .line { display: flex; justify-content: space-between; padding: 5px 0; font-size: 0.86rem; }
.cart-summary .total { font-weight: 800; font-family: var(--font-heading); font-size: 1.1rem; border-top: 1px solid #f1ece2; margin-top: 8px; padding-top: 10px; color: var(--color-primary); }
.empty-state { text-align: center; padding: 60px 20px; color: #a8a29e; }

/* Checkout */
.checkout-grid { display: flex; gap: 30px; flex-wrap: wrap; padding: 20px 0 60px; }
.checkout-form { flex: 2 1 380px; }
.checkout-summary { flex: 1 1 280px; }
fieldset { border: 1px solid #ece6db; border-radius: 12px; margin-bottom: 18px; padding: 6px 18px 18px; background: #fff; }
legend { font-weight: 800; color: var(--color-primary); padding: 0 7px; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; display: flex; align-items: center; gap: 6px; }
label { display: block; font-size: 0.78rem; font-weight: 700; margin: 12px 0 5px; color: #57534e; }
input[type=text], input[type=email], input[type=tel], input[type=date], textarea, select {
  width: 100%; padding: 10px 12px; border: 0px solid #ece6db; border-radius: 9px; font-size: 0.9rem; font-family: inherit;
}
input:focus, textarea:focus, select:focus { outline: 2px solid rgba(114,28,36,0.15); border-color: var(--color-primary); }
.fulfillment-toggle { display: flex; gap: 10px; margin: 8px 0 4px; }
.fulfillment-toggle label { flex: 1; text-align: center; padding: 12px; border: 1.5px solid #ece6db; border-radius: 10px; cursor: pointer; font-weight: 700; margin: 0; font-size: 0.85rem; }
.fulfillment-toggle input { display: none; }
.fulfillment-toggle input:checked + span { color: var(--color-primary); }
.fulfillment-toggle label:has(input:checked) { border-color: var(--color-primary); background: #fdf8f0; }
.field-error { color: #c62828; font-size: 0.78rem; margin-top: 4px; }
.form-errors { background: #fdecea; border: 1px solid #f5c2c0; color: #611a15; padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 0.85rem; }

/* Confirmation */
.confirmation { text-align: center; padding: 60px 20px; max-width: 520px; margin: 0 auto; }
.confirmation .order-number { font-size: 1.5rem; font-weight: 800; font-family: var(--font-heading); color: var(--color-primary); margin: 14px 0; }

/* Footer */
.ft { margin-top: clamp(48px, 7vw, 88px); background: var(--surface); border-top: 1px solid var(--line); }
.ft-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-block: 44px; }
.ft h4 { margin: 0 0 10px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-family: var(--fb); }
.ft a, .ft p { display: block; color: var(--ink); font-size: 15px; line-height: 1.8; margin: 0; text-decoration: none; }
.ft a:hover { text-decoration: underline; }
.ft-bar { border-top: 1px solid var(--line); padding-block: 18px; font-size: 13px; color: var(--muted); }
.ft-bar a { color: inherit; font-weight: 700; }

@media (max-width: 720px) {
  .ft-in { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 32px; }
}

/* ---------- Mobile (phones, <=640px) ---------- */
@media (max-width: 640px) {
  .container { padding: 0 12px; }

  /* Header: let brand + actions wrap onto their own row rather than overflow or
     hide the account link's text (an icon alone can't tell "log in" from "my
     account" apart, so it stays as real text, just smaller). */
  .site-header .bar { padding: 10px 0; gap: 8px 10px; flex-wrap: wrap; }
  .brand { gap: 6px; min-width: 0; }
  .brand img { height: 30px; }
  .brand .name { font-size: 1rem; }
  .brand .tagline { display: none; }
  .header-actions { gap: 6px; flex-wrap: wrap; }
  .whatsapp-btn .btn-label, .cart-link .btn-label { display: none; }
  .whatsapp-btn { padding: 8px 10px; }
  .cart-link { padding: 8px 11px; }
  .account-link { font-size: 0.72rem; padding: 7px 9px; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; margin-top: 2px; padding: 7px 12px; gap: 7px; }
  .header-search i { font-size: 0.72rem; }
  .header-search input { font-size: 0.76rem; }
  .menu-layout { padding-top: 4px; }

  /* Hero: stack the offers card under the text, tighten spacing */
  .hero-rich-inner { padding: 22px 12px 20px; gap: 16px; }
  .hero-text h1 { font-size: 1.5rem; max-width: none; }
  .hero-text p { max-width: none; }
  .hero-offer { padding: 12px 6px; }
  .hero-offer .stat { font-size: 0.84rem; }

  /* The category chips already narrow the menu down by section; the price
     filter chips are a desktop-only refinement to keep the phone view to
     one row of navigation instead of two rows of pills stacked on top of
     each other. */
  .filter-bar { display: none; }

  .announcement-bar { font-size: 0.7rem; padding: 6px 10px; line-height: 1.4; }

  /* Hero-with-image (admin-uploaded hero photo): stack image under text */
  .hero-with-image { flex-direction: column; align-items: stretch; gap: 18px; text-align: center; padding: 20px 0; }
  .hero-with-image .hero-text h1 { font-size: 1.5rem; }
  .hero-with-image .hero-text p { margin: 0 auto; max-width: 420px; }
  .hero-with-image .hero-image img { aspect-ratio: 16/10; }

  .section-title { font-size: 1.05rem; }
  .category-heading { margin: 22px 0 12px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 10px; }
  .product-card .info { padding: 9px 10px 11px; }
  .product-name { font-size: 0.82rem; }
  .product-card .price { font-size: 0.88rem; }
  .qa-add-btn { padding: 7px 10px; }

  .product-detail { gap: 20px; padding: 16px 0; }
  .product-detail .info h1 { font-size: 1.4rem; }

  /* Cart rows: image+details on top, qty/remove/total wrap to a full-width row below */
  .cart-item { gap: 10px; padding: 12px 0; }
  .cart-item img { width: 52px; height: 52px; }
  .cart-item-total { order: 1; width: 100%; text-align: left; margin-top: -6px; }

  .checkout-grid { gap: 20px; padding: 14px 0 40px; }
  fieldset { padding: 4px 12px 14px; }
  .fulfillment-toggle { gap: 8px; }
  .fulfillment-toggle label { padding: 10px 6px; font-size: 0.85rem; }

  .confirmation { padding: 30px 14px; }
  .confirmation .order-number { font-size: 1.3rem; }
}

/* ---------- Extra-small phones (<=380px) ---------- */
@media (max-width: 380px) {
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
  .fulfillment-toggle { flex-direction: column; }
}

/* ---------- Desktop: sticky sidebar replaces the horizontal chips ---------- */
@media (min-width: 861px) {
  .filter-bar { padding-left: 0; padding-right: 0; }
  .menu-layout { grid-template-columns: 250px minmax(0, 1fr); }
  .category-sidebar { display: block; position: sticky; top: 84px; background: var(--surface); border: var(--cb); border-radius: var(--r); padding: 10px 0; align-self: start; }
}

/* ---------- Floating cart bar + Menu button ---------- */
.floating-stack { position: fixed; right: 24px; bottom: 24px; z-index: 30; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.floating-cart-bar { display: flex; align-items: center; gap: 14px; background: var(--color-primary); color: #fff; border-radius: 16px; box-shadow: 0 10px 28px rgba(61,12,17,0.3); padding: 13px 16px; max-width: 340px; text-decoration: none; transition: opacity .25s ease, transform .25s ease; }
/* Toast-style fade-out on phones (see storefront.js updateCartBar) before
   the [hidden] attribute removes it from layout entirely. */
.floating-cart-bar.leaving { opacity: 0; transform: translateY(8px); }
.floating-cart-bar i.fa-basket-shopping { font-size: 1.1rem; }
.cart-bar-count { font-size: 0.84rem; font-weight: 700; line-height: 1.2; }
.cart-bar-total { font-size: 0.72rem; opacity: 0.85; margin-top: 2px; }
.cart-bar-checkout { margin-left: auto; display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.16); border-radius: 99px; padding: 8px 14px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.floating-menu-btn { display: flex; align-items: center; gap: 9px; background: #2f2124; color: #fff; border: 0; border-radius: 99px; box-shadow: 0 12px 28px rgba(47,33,36,0.34); padding: 14px 22px; font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; }

/* Menu panel + variant modal share the same slide-up sheet chrome */
.menu-panel-backdrop, .variant-modal-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(47,33,36,0.42); }
.menu-panel, .variant-modal { position: fixed; z-index: 41; right: 24px; bottom: 96px; width: 340px; max-width: calc(100vw - 32px); max-height: 70vh; background: var(--surface); border: var(--cb); border-radius: var(--r); box-shadow: 0 18px 44px rgba(0,0,0,0.26); display: flex; flex-direction: column; overflow: hidden; }
.menu-panel-head, .variant-modal-head { padding: 16px 18px 12px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.menu-panel-count { font-size: 0.78rem; color: var(--muted); font-weight: 500; }
.menu-panel-close { margin-left: auto; border: 0; background: var(--tint0); width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; flex: none; }
.menu-panel-list { overflow-y: auto; padding: 6px 0 12px; }
.menu-panel-item { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; background: transparent; padding: 12px 18px; font: inherit; text-align: left; cursor: pointer; border-bottom: 1px solid #f9f5f0; color: var(--color-text); }
.menu-panel-item .count { margin-left: auto; font-size: 0.78rem; color: #a8a29e; }
.menu-panel-item i { color: #cbbfae; }

/* Variant picker modal (multi-size products) */
.variant-modal-body { overflow-y: auto; padding: 6px 18px; flex: 1; }
.variant-modal-body .vm-section-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text); font-weight: 700; margin: 14px 0 4px; }
.variant-modal-body .vm-opt { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid #f1ece2; }
.variant-modal-body .vm-opt label { flex: 1; margin: 0; font-weight: 600; font-size: 0.85rem; color: var(--color-text); text-transform: none; letter-spacing: 0; }
.variant-modal-body .vm-opt span.vm-price { font-size: 0.82rem; color: var(--color-primary); font-weight: 700; }
.variant-modal-foot { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid #f1ece2; }
.variant-modal-foot .btn { flex: 1; }

/* [hidden] must win over the component display rules above regardless of
   source order — otherwise a panel/modal with the hidden attribute still
   renders (the same specificity-vs-source-order bug fixed in the admin
   search bar: an attribute selector here still loses to a later class rule
   of equal specificity unless stated explicitly like this). */
.floating-cart-bar[hidden],
.menu-panel[hidden],
.variant-modal[hidden],
.menu-panel-backdrop[hidden],
.variant-modal-backdrop[hidden] { display: none; }

@media (max-width: 640px) {
  /* Bumped up to clear the fixed search+cart bar (storefront.css header
     rules, @media max-width:720px) that now sits along the bottom edge. */
  .floating-stack { right: 16px; bottom: 92px; }
  .menu-panel, .variant-modal { right: 16px; left: 16px; width: auto; bottom: 160px; }
}
