/* Life Café ordering page. Every colour comes from a theme variable set by the admin theme editor. */
:root {
  --bg: #7a0b10;
  --bg-image: none;
  --bg-size: 360px;
  --bg-overlay: 0;
  --header-bg: #5c070b;
  --header-text: #f6d27a;
  --hero-text: #fff4d6;
  --panel: #fff8ec;
  --ink: #3b1a12;
  --muted: #8a6a55;
  --line: #e7c98a;
  --primary: #c8102e;
  --on-primary: #fff;
  --accent: #d4a23a;
  --heading-font: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --body-font: "Noto Sans SC", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .18);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body-font);
  color: var(--ink);
  background-color: var(--bg);
  background-image: linear-gradient(rgba(0,0,0,var(--bg-overlay)), rgba(0,0,0,var(--bg-overlay))), var(--bg-image);
  background-size: auto, var(--bg-size);
  background-attachment: fixed;
  line-height: 1.55;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
button, input { font: inherit; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--header-bg); color: var(--header-text);
  border-bottom: 2px solid var(--accent); }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { color: var(--header-text); text-decoration: none; font-family: var(--heading-font); font-weight: 900; font-size: 1.35rem; letter-spacing: .5px; }
.lang { display: inline-flex; border: 1px solid var(--accent); border-radius: 999px; overflow: hidden; }
.lang button { background: transparent; color: var(--header-text); border: 0; padding: 6px 14px; cursor: pointer; font-size: .9rem; }
.lang button.active { background: var(--accent); color: var(--header-bg); font-weight: 700; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; color: var(--hero-text); text-align: center; padding: 56px 16px 64px; }
.hero-inner { position: relative; max-width: 760px; margin: 0 auto; z-index: 1; }
.hero-badge { display: inline-block; border: 1px solid var(--accent); color: var(--accent); border-radius: 999px;
  padding: 4px 16px; font-size: .85rem; letter-spacing: 2px; text-transform: uppercase; background: rgba(0,0,0,.18); }
.hero h1 { font-family: var(--heading-font); font-weight: 900; font-size: clamp(2rem, 6vw, 3.6rem); line-height: 1.15;
  margin: 16px 0 12px; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.hero p { font-size: 1.08rem; margin: 0 auto; max-width: 600px; opacity: .95; }
.hero-note { margin-top: 22px; display: inline-flex; gap: 8px; align-items: center; background: rgba(0,0,0,.25);
  border-radius: 10px; padding: 8px 14px; font-size: .92rem; }
/* Banner ornaments: image, size (--w) and movement (m-*) come from the decoration registry (lifecafe/themes.py). */
.deco { position: absolute; top: -6px; width: var(--w, 100px); opacity: .95; display: none; transform-origin: top center; }
.deco-left { left: max(2vw, 8px); }
.deco-right { right: max(2vw, 8px); }
body.deco-on .deco { display: block; }
.deco.m-sway { animation: sway 5s ease-in-out infinite; }
.deco-right.m-sway { animation-delay: -2.5s; }
.deco.m-still { top: 18px; }
.deco.m-hang { top: -2px; }
.deco.m-float { top: 18px; animation: float 6s ease-in-out infinite; }
.deco-right.m-float { animation-delay: -3s; }
.deco.m-bob { top: 26px; transform-origin: center; animation: bob 4s ease-in-out infinite; }
@keyframes sway { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(5px) rotate(2deg); } }

/* Light themes (shop.js adds these classes from the theme colours): lighten the banner's shading. */
body.light-hero .hero-badge, body.light-hero .hero-note { background: rgba(255,255,255,.55); }
body.light-hero .hero h1 { text-shadow: 0 2px 0 rgba(255,255,255,.5); }
body.light-hero .hero-badge { color: var(--primary); border-color: var(--primary); }   /* gold accents fade on light paper */
body.light-header .ph { background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.5), transparent 55%), linear-gradient(135deg, var(--header-bg), var(--bg)); }

/* Banner effects (fx-*): snow, confetti in theme colours, twinkling gold sparkle, drifting petals, rising steam. */
.fx { display: none; position: absolute; inset: 0; pointer-events: none; z-index: 0; }
body.fx-snow .fx, body.fx-confetti .fx, body.fx-sparkle .fx, body.fx-petals .fx, body.fx-steam .fx { display: block; }
body.fx-snow .fx {
  background-image:
    radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,.8), transparent 60%),
    radial-gradient(2px 2px at 90px 120px, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(3px 3px at 150px 60px, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(2px 2px at 210px 170px, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(3px 3px at 60px 200px, rgba(255,255,255,.5), transparent 60%);
  background-size: 240px 240px; animation: fall 14s linear infinite; }
body.fx-confetti .fx, body.fx-confetti .fx::after {
  background-image:
    radial-gradient(2px 5px at 30px 20px, var(--accent) 90%, transparent),
    radial-gradient(5px 2px at 110px 90px, var(--primary) 90%, transparent),
    radial-gradient(3px 3px at 190px 40px, #fff 90%, transparent),
    radial-gradient(2px 5px at 70px 170px, var(--primary) 90%, transparent),
    radial-gradient(5px 2px at 160px 200px, var(--accent) 90%, transparent),
    radial-gradient(3px 3px at 230px 130px, var(--hero-text) 90%, transparent);
  background-size: 260px 240px; opacity: .8; animation: fall 11s linear infinite; }
body.fx-confetti .fx::after { content: ""; position: absolute; inset: 0; background-size: 330px 300px;
  opacity: .7; animation-duration: 16s; }
body.fx-sparkle .fx {
  background-image:
    radial-gradient(2px 2px at 40px 40px, var(--accent), transparent 70%),
    radial-gradient(3px 3px at 150px 90px, var(--accent), transparent 70%),
    radial-gradient(2px 2px at 220px 30px, #fff, transparent 70%),
    radial-gradient(2px 2px at 90px 170px, var(--accent), transparent 70%),
    radial-gradient(3px 3px at 200px 200px, #fff, transparent 70%);
  background-size: 260px 240px; animation: twinkle 3.2s ease-in-out infinite; }
/* Plum petals: small soft ovals in the theme red and blush pink, drifting down and sideways. */
body.fx-petals .fx, body.fx-petals .fx::after {
  background-image:
    radial-gradient(4px 3px at 30px 40px, var(--primary) 85%, transparent),
    radial-gradient(3px 4px at 120px 110px, #f2a7a0 85%, transparent),
    radial-gradient(4px 3px at 200px 30px, #f2a7a0 85%, transparent),
    radial-gradient(3px 4px at 70px 190px, var(--primary) 85%, transparent),
    radial-gradient(4px 3px at 230px 160px, #f7c6c0 85%, transparent);
  background-size: 260px 240px; opacity: .7; animation: drift 16s linear infinite; }
body.fx-petals .fx::after { content: ""; position: absolute; inset: 0; background-size: 340px 300px; opacity: .55; animation-duration: 22s; }
/* Steam: blurred wisps rising from the bottom of the banner (white on dark themes, soft brown on light ones). */
body.fx-steam .fx, body.fx-steam .fx::after {
  --steam: rgba(255,255,255,.16);
  background-image:
    radial-gradient(14px 46px at 60px 200px, var(--steam), transparent 70%),
    radial-gradient(10px 38px at 150px 140px, var(--steam), transparent 70%),
    radial-gradient(16px 52px at 240px 220px, var(--steam), transparent 70%),
    radial-gradient(9px 30px at 110px 60px, var(--steam), transparent 70%);
  background-size: 300px 240px; filter: blur(2px); animation: rise 9s linear infinite; }
body.fx-steam .fx::after { content: ""; position: absolute; inset: 0; background-size: 380px 260px; animation-duration: 13s; }
body.light-hero.fx-steam .fx, body.light-hero.fx-steam .fx::after { --steam: rgba(90,60,30,.09); }
@keyframes fall { from { background-position: 0 0; } to { background-position: 60px 240px; } }
@keyframes drift { from { background-position: 0 0; } to { background-position: 120px 240px; } }
@keyframes rise { 0% { background-position: 0 0; opacity: .9; } 100% { background-position: 20px -240px; opacity: .9; } }
@keyframes twinkle { 0%,100% { opacity: .25; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) { .deco, .fx, .fx::after { animation: none !important; } }
@media (max-width: 640px) {
  .deco { width: calc(var(--w, 100px) * .56); }
  .deco.m-still, .deco.m-float { top: 10px; }
  .hero { padding: 40px 16px 48px; }
  body.deco-on .hero { padding-top: 92px; }   /* keep the badge and title clear of the ornaments */
}

/* shop closed: the message sits centred under the banner */
.closed-banner { max-width: 720px; margin: 24px auto; padding: 22px 24px; background: var(--panel); color: var(--ink);
  border-top: 5px solid var(--primary); border-radius: 14px; font-weight: 500; font-size: 1.05rem; line-height: 1.6;
  text-align: center; box-shadow: var(--shadow, 0 6px 20px rgba(0,0,0,.08)); overflow-wrap: anywhere; }
@media (max-width: 760px) { .closed-banner { margin: 16px; } }

/* ---------- layout ---------- */
.layout { max-width: 1180px; margin: 0 auto; padding: 0 16px 48px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .layout { grid-template-columns: 1fr; } }
.steps { display: grid; gap: 24px; min-width: 0; }
.panel { background: var(--panel); color: var(--ink); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
  border: 1px solid var(--line); position: relative; }
@media (max-width: 640px) { .panel { padding: 18px 16px; } }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.panel h2 { font-family: var(--heading-font); font-size: 1.4rem; margin: 0; }
.step-no { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: var(--primary); color: var(--on-primary); font-weight: 700; }
.sub { font-size: 1rem; margin: 18px 0 10px; color: var(--ink); }
.sub:first-of-type { margin-top: 0; }
.hint { color: var(--muted); font-size: .88rem; margin: 10px 0 0; }

/* ---------- menu ---------- */
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; display: flex; flex-direction: column;
  transition: box-shadow .2s, border-color .2s; }
.card.in-cart { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.card-photo { aspect-ratio: 4 / 3; position: relative; cursor: zoom-in; border: 0; padding: 0; background: none; width: 100%; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.ph { width: 100%; height: 100%; display: grid; place-items: center; text-align: center; padding: 12px;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.12), transparent 50%), linear-gradient(135deg, var(--primary), var(--header-bg));
  color: var(--accent); font-family: var(--heading-font); font-weight: 900; font-size: 2.2rem; line-height: 1.15; }
.ph small { display: block; font-size: .8rem; letter-spacing: 1px; font-weight: 500; color: var(--hero-text); opacity: .8; margin-top: 6px; font-family: var(--body-font); }
.photo-count { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: .75rem; padding: 2px 8px; border-radius: 999px; }
.card-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-weight: 700; font-size: 1.05rem; line-height: 1.3; margin: 0; }
.card-size { color: var(--muted); font-size: .85rem; }
.card-desc { font-size: .88rem; color: var(--ink); opacity: .85; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.more { background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; font-size: .85rem; text-align: left; text-decoration: underline; }
.price { margin-top: auto; padding-top: 8px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.price strong { font-size: 1.3rem; color: var(--primary); }
.price small { color: var(--muted); font-size: .78rem; }
.qty { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.qty-ctrl { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty-ctrl button { width: 40px; height: 40px; border: 0; background: transparent; color: var(--primary); font-size: 1.3rem; cursor: pointer; }
.qty-ctrl button:disabled { color: #ccc; cursor: not-allowed; }
.qty-ctrl output { min-width: 36px; text-align: center; font-weight: 700; }
.qty-rule { font-size: .75rem; color: var(--muted); }

/* ---------- choices ---------- */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.choice { position: relative; border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 14px 14px 44px; cursor: pointer; background: #fff; transition: border-color .15s, box-shadow .15s; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice::before { content: ""; position: absolute; left: 14px; top: 16px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); background: #fff; }
.choice.selected { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.choice.selected::before { border-color: var(--primary); background: radial-gradient(circle, var(--primary) 45%, #fff 50%); }
.choice:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice strong { display: block; }
.choice small { color: var(--muted); display: block; }
.wa { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: #128c7e; margin-top: 4px; }
.wa::before { content: ""; width: 14px; height: 14px; background: #25d366; border-radius: 50%; display: inline-block; }

.date-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.date { border: 1.5px solid var(--line); border-radius: 12px; background: #fff; text-align: center; padding: 12px 6px; cursor: pointer; position: relative; transition: border-color .15s; }
.date input { position: absolute; opacity: 0; pointer-events: none; }
.date .dow { font-size: .78rem; text-transform: uppercase; color: var(--muted); letter-spacing: 1px; }
.date .day { font-family: var(--heading-font); font-size: 2rem; font-weight: 900; line-height: 1.1; }
.date .mon { font-size: .85rem; }
.date .when { display: block; font-size: .72rem; color: var(--muted); margin-top: 6px; line-height: 1.3; }
.date .tag { display: inline-block; margin-top: 6px; font-size: .7rem; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #fff; }
.date.selected { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); background: color-mix(in srgb, var(--primary) 6%, #fff); }
.date:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.date.closed { cursor: not-allowed; background: #f3f0ea; color: #a59c92; border-style: dashed; }
.date.closed .day { text-decoration: line-through; }
.date.closed .tag { background: #b9b0a6; }

/* ---------- fields ---------- */
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: .92rem; }
.field input { border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; background: #fff; color: #222; font-size: 1rem; width: 100%; }
.field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.field small { color: var(--muted); font-weight: 400; font-size: .78rem; }
.field.invalid input { border-color: #c62828; }

/* ---------- summary ---------- */
.summary { position: sticky; top: 76px; }
.summary h2 { font-size: 1.25rem; margin-bottom: 12px; }
.summary-lines { display: grid; gap: 8px; font-size: .92rem; }
.summary-lines .line { display: flex; justify-content: space-between; gap: 10px; }
.summary-lines .empty { color: var(--muted); font-style: italic; }
.totals { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); display: grid; gap: 6px; }
.totals div { display: flex; justify-content: space-between; }
.totals dt, .totals dd { margin: 0; }
.totals .grand { font-size: 1.25rem; font-weight: 700; padding-top: 6px; border-top: 1px solid var(--line); margin-top: 4px; }
.totals .grand dd { color: var(--primary); }
.summary-meta { font-size: .85rem; color: var(--muted); margin: 12px 0; display: grid; gap: 4px; }
.summary-meta b { color: var(--ink); font-weight: 500; }
.terms { font-size: .78rem; color: var(--muted); margin: 12px 0 0; white-space: pre-line; }
.form-error { background: #fdecea; color: #8e1b10; border-radius: 10px; padding: 10px 12px; font-size: .9rem; margin: 10px 0; }
@media (max-width: 960px) { .summary { position: static; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 13px 22px;
  font-weight: 700; border: 0; cursor: pointer; text-decoration: none; font-size: 1rem; transition: filter .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 4px 0 color-mix(in srgb, var(--primary) 60%, #000); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled { filter: grayscale(.7); opacity: .6; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-block { width: 100%; margin-top: 10px; }

/* ---------- mobile bar ---------- */
.mobile-bar { display: none; }
@media (max-width: 960px) {
  .mobile-bar { display: flex; position: sticky; bottom: 0; z-index: 15; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--header-bg); color: var(--header-text); border-top: 2px solid var(--accent); }
  .mobile-bar small { display: block; font-size: .72rem; opacity: .8; }
  .mobile-bar strong { font-size: 1.2rem; }
}

.footer { text-align: center; color: var(--hero-text); padding: 24px 16px 40px; font-size: .95rem; }
.footer-small { font-size: .8rem; opacity: .7; }

/* ---------- dialogs ---------- */
dialog.sheet { border: 0; padding: 0; border-radius: 18px; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px);
  background: var(--panel); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.45); }
dialog.sheet::backdrop { background: rgba(20, 0, 0, .6); backdrop-filter: blur(2px); }
.sheet-inner { padding: 26px 24px 24px; position: relative; }
.sheet-inner h2 { font-family: var(--heading-font); margin: 0 0 12px; font-size: 1.45rem; padding-right: 30px; }
.sheet-close { position: absolute; right: 12px; top: 10px; border: 0; background: transparent; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--muted); }
.pay-amount { display: flex; justify-content: space-between; align-items: baseline; background: var(--header-bg); color: var(--header-text); padding: 12px 16px; border-radius: 12px; }
.pay-amount strong { font-size: 1.6rem; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin: 16px 0 12px; }
.tab { border: 0; background: transparent; padding: 9px; border-radius: 9px; cursor: pointer; font-weight: 500; color: var(--ink); }
.tab.active { background: var(--primary); color: var(--on-primary); }
.qr-box { background: #fff; border-radius: 14px; border: 1px solid var(--line); padding: 14px; display: grid; place-items: center; }
.qr-box { gap: 10px; }
.qr-box img { max-width: 340px; width: 100%; }
.qr-save { padding: 8px 16px; font-size: .88rem; }
.qr-missing { text-align: center; color: var(--muted); padding: 30px 10px; }
.bank { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px 16px; }
.bank div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); align-items: center; }
.bank div:last-child { border-bottom: 0; }
.bank dt { color: var(--muted); font-size: .88rem; }
.bank dd { margin: 0; font-weight: 700; text-align: right; display: flex; align-items: center; gap: 8px; }
.copy { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 2px 8px; cursor: pointer; font-size: .75rem; font-weight: 500; }
.pay-note { font-size: .86rem; color: var(--muted); margin: 10px 0 0; }
.drop { display: block; border: 2px dashed var(--line); border-radius: 14px; background: #fff; padding: 18px; text-align: center; cursor: pointer; position: relative; transition: border-color .15s, background .15s; }
.drop.drag { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 5%, #fff); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-empty strong { display: block; color: var(--primary); }
.drop-empty small { color: var(--muted); }
.drop-preview { display: flex; align-items: center; gap: 12px; text-align: left; }
.drop-preview img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.drop-preview .pdf { width: 72px; height: 72px; display: grid; place-items: center; background: #fdecea; color: #b71c1c; border-radius: 8px; font-weight: 700; }
.drop-preview small { display: block; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 10px; font-size: .92rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.notice { background: #fff4e5; color: #7a4100; border-radius: 10px; padding: 10px 12px; font-size: .86rem; line-height: 1.5; }
.done { text-align: center; }
.done h2 { padding: 0; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; background: #2e7d32; color: #fff; display: grid; place-items: center; font-size: 2rem; margin: 0 auto 12px; }
.done-no { font-size: 1.1rem; }
.done .notice { text-align: left; }
.done-terms { white-space: pre-line; font-size: .92rem; margin: 4px 0 14px; }   /* the shop's terms, line by line */
.done-sent { font-size: .86rem; color: var(--muted); margin: 0 0 8px; }

.gallery-main { aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; background: #000; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.thumbs button { border: 2px solid transparent; padding: 0; border-radius: 8px; overflow: hidden; width: 64px; height: 48px; flex: none; cursor: pointer; background: none; }
.thumbs button.active { border-color: var(--primary); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.item-detail-desc { white-space: pre-line; }

.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { text-align: center; color: var(--hero-text); padding: 60px 16px; }

/* Off day: an outlet closed on the chosen date */
.choice.off { opacity: .55; cursor: not-allowed; }
.choice.off .tag { display: inline-block; margin-left: 6px; font-size: .7rem; padding: 2px 8px; border-radius: 999px; background: var(--muted); color: #fff; vertical-align: middle; }

/* Promo price: promo price on top, normal price slashed below */
.price.promo { display: block; }
.promo-now { display: flex; align-items: center; gap: 8px; }
.promo-tag { font-size: .7rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; padding: 2px 8px;
  border-radius: 999px; background: var(--primary); color: var(--on-primary); }
.promo-was { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.promo-was s { color: var(--muted); font-size: .95rem; }

/* Stock: sold out / only N left */
.card.sold-out .card-photo img, .card.sold-out .ph { filter: grayscale(.85); opacity: .6; }
.card.sold-out .card-title, .card.sold-out .price { opacity: .55; }
.stock-flag { position: absolute; top: 12px; left: 12px; background: #2b2b2b; color: #fff; font-weight: 800;
  font-size: .8rem; letter-spacing: 1px; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
.qty-rule.stock-out { color: var(--primary); font-weight: 700; }
.stock-low { color: var(--primary); }

/* Non-halal label and outlet limits */
.item-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-nonhalal { display: inline-block; background: #2b2b2b; color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .5px;
  text-transform: uppercase; padding: 2px 9px; border-radius: 999px; }
.tag-onlyat { display: inline-block; font-size: .75rem; color: var(--muted); padding: 2px 0; }
.card.not-here .card-photo img, .card.not-here .ph { filter: grayscale(.7); opacity: .65; }
.choice.off .tag { white-space: normal; }

/* Item labels (spicy, vegetarian, allergens, highlights) */
.item-label { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; border: 1px solid currentColor; background: #fff; }
.item-label.lbl-red { color: #c62828; } .item-label.lbl-green { color: #2e7d32; } .item-label.lbl-amber { color: #b26a00; }
.item-label.lbl-gold { color: #9a7400; background: #fff8e1; } .item-label.lbl-blue { color: #1565c0; }

/* ---------- item groups: a section per group, with a bar of links that stays in view while scrolling ---------- */
.menu-groups { display: grid; gap: 26px; }
.group-nav { position: sticky; top: 58px; z-index: 5; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: -6px -8px 0; padding: 8px; background: var(--panel); border-bottom: 1px solid var(--line); }
.group-nav::-webkit-scrollbar { display: none; }
.group-nav a { flex: none; text-decoration: none; color: var(--ink); border: 1.5px solid var(--line); background: #fff;
  border-radius: 999px; padding: 6px 14px; font-size: .9rem; font-weight: 500; white-space: nowrap; }
.group-nav a:hover { border-color: var(--primary); color: var(--primary); }
.group-nav a b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-left: 4px;
  border-radius: 999px; background: var(--primary); color: var(--on-primary); font-size: .72rem; }
.menu-group { scroll-margin-top: 120px; }
.group-title { font-family: var(--heading-font); font-size: 1.2rem; margin: 0 0 12px; display: flex; align-items: baseline;
  gap: 8px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.group-title span { font-size: .9rem; color: var(--muted); font-weight: 500; }

/* ---------- long promo wording ("Early birds only. -10% discount until 31st December 2026") ----------
   Short wording stays a pill beside the price; long wording becomes a note above the price that wraps and is cut
   at three lines on the card (the full text is in the detail window), so the card's layout never changes. */
.promo-note { display: flex; gap: 6px; align-items: flex-start; margin-top: auto; padding: 6px 9px; border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 9%, #fff); color: var(--primary); border: 1px dashed color-mix(in srgb, var(--primary) 45%, #fff);
  font-size: .78rem; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.promo-note span:last-child { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.promo-note.full span:last-child { -webkit-line-clamp: unset; display: block; }
.promo-note + .price { margin-top: 0; }
.promo-tag { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price .from { font-size: .75rem; color: var(--muted); font-weight: 500; }
.promo-now { flex-wrap: wrap; }

/* ---------- flavours / options ---------- */
.opt-count { font-size: .78rem; color: var(--muted); font-weight: 500; }
.opt-qty { flex-wrap: wrap; }
.btn-opt { border: 1.5px solid var(--primary); background: #fff; color: var(--primary); border-radius: 999px; padding: 9px 16px;
  font-weight: 700; cursor: pointer; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; }
.btn-opt.has { background: var(--primary); color: var(--on-primary); }
.btn-opt:disabled { border-color: #ccc; color: #aaa; background: #f6f6f6; cursor: not-allowed; }
.opt-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 999px; background: var(--on-primary);
  color: var(--primary); font-size: .78rem; padding: 0 5px; }
.opt-picked { font-size: .8rem; color: var(--ink); background: color-mix(in srgb, var(--primary) 6%, #fff); border-radius: 8px;
  padding: 6px 8px; line-height: 1.4; }
.opt-sheet { width: min(620px, calc(100vw - 24px)); }
.opt-sheet .sheet-inner { display: flex; flex-direction: column; max-height: calc(100vh - 40px); padding-bottom: 0; }
.opt-head { display: flex; gap: 14px; align-items: flex-start; padding-right: 30px; }
.opt-head img { width: 92px; height: 92px; object-fit: cover; border-radius: 12px; flex: none; }
.opt-head h2 { margin: 0 0 2px; font-size: 1.3rem; }
.opt-head .card-size { margin: 0; }
.opt-head .price { margin-top: 4px; padding-top: 0; }
.opt-search { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; margin-bottom: 8px; background: #fff; font-size: .95rem; }
.opt-list { list-style: none; margin: 0 -24px; padding: 0 24px; overflow-y: auto; flex: 1; min-height: 120px; }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.opt-row.on .opt-name b { color: var(--primary); }
.opt-row.off { opacity: .55; }
.opt-name { min-width: 0; }
.opt-name b { font-weight: 600; }
.opt-name span { color: var(--muted); font-size: .88rem; }
.opt-name small { display: block; color: var(--muted); font-size: .8rem; }
.opt-extra { color: var(--primary); font-weight: 700; }
.opt-row .qty-ctrl button { width: 36px; height: 36px; }
.opt-foot { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0 16px; background: var(--panel); border-top: 1px solid var(--line); margin-top: 6px; }
.opt-foot small { display: block; color: var(--muted); font-size: .75rem; }
.opt-list-inline { font-size: .88rem; }
.opt-list-inline .off { text-decoration: line-through; color: var(--muted); }
.summary-lines .line i { font-style: normal; color: var(--muted); }
.totals .note { color: var(--muted); font-size: .88rem; }


/* ---- collection date calendar (Sunday to Saturday) */
.date-cal { max-width: 560px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; padding: 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cal-title { font-family: var(--heading-font); font-size: 1.1rem; }
.cal-nav { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; color: inherit; }
.cal-nav:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.cal-nav:disabled { opacity: .3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 4px 0; }
.cal-dow.we { color: var(--primary); }
.cal-cell { position: relative; min-height: 52px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .95rem; }
.cal-cell b { font-weight: 600; line-height: 1; }
.cal-cell.none { color: #c3bbb1; }
.cal-cell.today b { text-decoration: underline; text-underline-offset: 3px; }
.cal-cell.date-on { border: 1.5px solid color-mix(in srgb, var(--primary) 45%, var(--line)); background: color-mix(in srgb, var(--primary) 7%, #fff); cursor: pointer; transition: background .15s, border-color .15s; }
.cal-cell.date-on:hover { border-color: var(--primary); }
.cal-cell.date-on b { font-family: var(--heading-font); font-size: 1.15rem; font-weight: 800; }
.cal-cell input { position: absolute; opacity: 0; pointer-events: none; }
.cal-cell i { font-style: normal; font-size: .6rem; line-height: 1.1; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.cal-cell i.dot, .cal-key i.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); padding: 0; display: inline-block; }
.cal-cell.date-on.selected { background: var(--primary); border-color: var(--primary); color: var(--on-primary, #fff); box-shadow: 0 3px 10px color-mix(in srgb, var(--primary) 35%, transparent); }
.cal-cell.date-on.selected i.dot { background: var(--on-primary, #fff); }
.cal-cell.date-on:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.cal-cell.date-on.closed { cursor: not-allowed; background: #f3f0ea; border-style: dashed; border-color: #d6cec3; color: #a59c92; }
.cal-cell.date-on.closed b { text-decoration: line-through; font-weight: 600; }
.cal-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 10px; font-size: .78rem; color: var(--muted); }
.cal-key { display: inline-flex; align-items: center; gap: 5px; }
.cal-key.shut i { width: 12px; height: 10px; border: 1.5px dashed #c9c0b4; border-radius: 3px; display: inline-block; background: #f3f0ea; }
.cal-pages { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px; }
.cal-pages button { font: inherit; font-size: .75rem; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 2px 9px; cursor: pointer; color: inherit; }
.cal-pages button.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary, #fff); }
.cal-info { margin: 10px 2px 0; font-size: .86rem; color: var(--muted); }
.cal-info b { color: var(--ink, inherit); }
@media (max-width: 420px) {
  .date-cal { padding: 10px 8px; }
  .cal-grid { gap: 3px; }
  .cal-cell { min-height: 44px; border-radius: 8px; }
  .cal-cell.date-on b { font-size: 1rem; }
  .cal-cell i:not(.dot) { font-size: .52rem; }
}

/* ---------- boxes: card summary, box sheet, box lines in the cart ---------- */
.box-summary { font-size: .82rem; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.box-sheet .sheet-close { z-index: 2; }
.box-body { flex: 1; min-height: 120px; overflow-y: auto; margin: 0 -24px; padding: 0 24px; }
.box-list { padding: 4px 0 10px; }
.box-list + .box-list { border-top: 1px solid var(--line); padding-top: 10px; }
.box-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 4px 0 6px; }
.box-list-head h3 { margin: 0; font-size: .98rem; min-width: 0; overflow-wrap: anywhere; }
.box-count { flex: none; font-size: .78rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.box-list.full .box-count { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.box-choices { list-style: none; margin: 0; padding: 0; }
.box-choices .opt-name { overflow-wrap: anywhere; }
.opt-name .box-tags { display: inline-flex; gap: 4px; vertical-align: middle; }
.opt-name .box-tags span { font-size: .66rem; padding: 1px 7px; }
.opt-name .box-tags .tag-nonhalal { color: #fff; }
.box-choices .qty-ctrl { flex: none; }
.box-choices .qty-ctrl button { width: 36px; height: 36px; }
.summary-lines .line-main { min-width: 0; overflow-wrap: anywhere; }
.box-in { display: block; color: var(--muted); font-size: .78rem; line-height: 1.35; margin-top: 2px; }
.box-acts { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; font: inherit; font-size: .82rem; text-decoration: underline; }
.qty-ctrl.sm button { width: 30px; height: 30px; font-size: 1.05rem; }
.qty-ctrl.sm output { min-width: 26px; font-size: .88rem; }

/* ---------- deals: badge on the card, discount rows, hints and quote errors in the cart ---------- */
.deal-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.deal-badge { display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 12%, #fff); color: var(--primary); border: 1px solid color-mix(in srgb, var(--primary) 35%, #fff); }
.deal-more { font-size: .72rem; font-weight: 600; color: var(--primary); white-space: nowrap; }
.summary-lines .deal-line { color: var(--primary); font-size: .86rem; margin-top: -4px; }
.summary-lines .deal-line > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.deal-hints { background: color-mix(in srgb, var(--primary) 7%, #fff); border: 1px dashed color-mix(in srgb, var(--primary) 40%, #fff);
  color: var(--primary); border-radius: 10px; padding: 6px 10px; font-size: .82rem; font-weight: 600; }
.deal-hints p { margin: 2px 0; }
.quote-err { background: #fdecea; color: #8e1b10; border-radius: 10px; padding: 8px 10px; font-size: .84rem; margin: 0; overflow-wrap: anywhere; }
