/* BeyondMilk — site styles. Tokens first; everything else builds on them. */
:root {
  --bg: #FAF6EF;
  --surface: #FFFFFF;
  --surface-2: #F4EDE1;
  --ink: #211A14;
  --muted: #74685B;
  --line: #E8DFD0;
  --gold: #A8802F;
  --gold-ink: #7C5B17;
  --gold-soft: #F3E8D1;
  --cocoa: #2A201A;
  --leaf: #5C7748;
  --leaf-soft: #E7EEDD;
  --danger: #B3402E;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(42, 32, 26, .05), 0 12px 32px -12px rgba(42, 32, 26, .14);
  --shadow-lg: 0 2px 4px rgba(42, 32, 26, .06), 0 28px 60px -20px rgba(42, 32, 26, .25);
  --gutter: clamp(18px, 4vw, 56px);
  --maxw: 1360px;
  --font-body: "Inter", "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-display: "Fraunces", "Noto Serif TC", "Songti TC", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4.4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0; text-wrap: pretty; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow { font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-ink); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; }
.section { padding-block: clamp(48px, 7vw, 104px); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(24px, 3vw, 40px); flex-wrap: wrap; }
.section-head p { max-width: 56ch; color: var(--muted); margin-top: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  background: var(--ink); color: #fff; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease; white-space: nowrap;
}
.btn:hover { background: #3A2D23; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--gold { background: var(--gold); }
.btn--gold:hover { background: var(--gold-ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--gold-soft); }
.btn--sm { min-height: 38px; padding: 0 16px; font-size: .9rem; }
.btn--block { width: 100%; }
.link { color: var(--gold-ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.link:hover { color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-decoration: none; margin-right: auto; }
.brand b { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; letter-spacing: -.02em; }
.brand span { font-size: .78rem; line-height: 1; color: var(--gold-ink); letter-spacing: .32em; white-space: nowrap; }
.nav { display: flex; gap: 4px; }
.nav a { white-space: nowrap; text-decoration: none; padding: 8px 14px; border-radius: 999px; font-size: .95rem; font-weight: 500; color: var(--muted); transition: background .2s, color .2s; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--gold-soft); }
.lang { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.lang button { border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--muted); min-height: 32px; }
.lang button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.cart-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; font-size: .92rem; }
.cart-btn .count { background: var(--gold); min-width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; font-size: .78rem; padding: 0 6px; }
.cart-btn.bump { animation: bump .45s ease; }
@keyframes bump { 30% { transform: scale(1.12); } }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
/* the longer brand name needs the menu button from 1180px down */
@media (max-width: 1180px) {
  .menu-btn { display: grid; place-items: center; order: 5; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; padding: 12px var(--gutter) 18px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 1.05rem; }
}
@media (max-width: 900px) {
  .brand span { display: none; }
  .cart-btn .label { display: none; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--cocoa); color: #E9DFD2; margin-top: clamp(48px, 7vw, 104px); }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-block: 56px 28px; }
.site-footer h4 { font-family: var(--font-body); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: #C9A965; margin-bottom: 14px; font-weight: 600; }
.site-footer a { color: inherit; text-decoration: none; display: block; padding: 4px 0; opacity: .85; }
.site-footer a:hover { opacity: 1; text-decoration: underline; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 20px; font-size: .82rem; opacity: .65; }
.site-footer .f-brand b { font-family: var(--font-display); font-size: 1.6rem; color: #fff; font-weight: 500; }
.site-footer .f-brand p { margin-top: 10px; max-width: 34ch; opacity: .8; font-size: .95rem; }
@media (max-width: 800px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .f-brand { grid-column: 1 / -1; } }

/* ---------- Cards, chips, forms ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: clamp(20px, 2.4vw, 32px); }
.step-label { display: inline-flex; align-items: center; gap: 10px; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-ink); font-weight: 600; margin-bottom: 6px; }
.step-label i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; background: var(--gold-soft); display: grid; place-items: center; letter-spacing: 0; font-size: .78rem; transition: background .3s, color .3s; }
.step.done .step-label i { background: var(--leaf); color: #fff; }
.step h2 { font-size: 1.5rem; margin-bottom: 4px; }
.step > p { color: var(--muted); font-size: .93rem; margin-bottom: 18px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > label, .field > .label { font-size: .86rem; font-weight: 600; }
.field .hint { font-size: .8rem; color: var(--muted); }
.field .err { font-size: .8rem; color: var(--danger); }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: #fff; transition: border-color .2s, box-shadow .2s;
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.input.invalid { border-color: var(--danger); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 0; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer;
  font-size: .92rem; font-weight: 500; transition: all .18s ease; user-select: none;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"], .chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .12); flex: none; }
.chip--combo .dot + .dot { margin-left: -12px; }

/* option tiles (sizes, payment, fulfilment) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile {
  position: relative; text-align: left; padding: 16px; border-radius: 16px; border: 1.5px solid var(--line);
  background: #fff; cursor: pointer; transition: all .18s ease; display: grid; gap: 2px;
}
.tile:hover { border-color: var(--ink); transform: translateY(-2px); }
.tile[aria-pressed="true"] { border-color: var(--gold); background: #FFFBF2; box-shadow: 0 0 0 4px var(--gold-soft); }
.tile[aria-pressed="true"]::after {
  content: "✓"; position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold); color: #fff; display: grid; place-items: center; font-size: .75rem; font-weight: 700;
}
.tile b { font-size: 1rem; }
.tile .price { font-family: var(--font-display); font-size: 1.25rem; }
.tile .sub { font-size: .8rem; color: var(--muted); }
.tile svg { margin: 0 auto 6px; }

/* flavour swatches */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.swatch {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px;
  border: 1.5px solid var(--line); background: #fff; cursor: pointer; text-align: left; transition: all .18s; position: relative; min-height: 56px;
}
.swatch:hover { border-color: var(--ink); }
.swatch .blob { width: 30px; height: 30px; border-radius: 50%; flex: none; border: 1px solid rgba(0, 0, 0, .1); box-shadow: inset -4px -5px 8px rgba(0, 0, 0, .12), inset 3px 3px 6px rgba(255, 255, 255, .5); }
.swatch .nm { font-size: .88rem; font-weight: 500; line-height: 1.25; }
.swatch .sub { font-size: .72rem; font-weight: 400; color: var(--muted); display: block; }
.swatch .tag { font-size: .7rem; color: var(--gold-ink); display: block; }
.swatch[aria-pressed="true"] { border-color: var(--gold); background: #FFFBF2; box-shadow: 0 0 0 4px var(--gold-soft); }
.swatch .pos { position: absolute; top: -8px; right: -6px; background: var(--ink); color: #fff; font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.swatch.avoid { opacity: .4; }

/* quantity steppers: one compact pill everywhere (cake add-ons, catering steps 3 and 5) */
.qty, .stepper { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; background: #fff; flex: none; }
.qty button, .stepper .btn.btn--ghost { min-width: 32px; min-height: 0; height: 32px; padding: 0 8px; border: 0; border-radius: 999px; background: transparent; box-shadow: none; cursor: pointer; font: 500 .8rem var(--font-body); color: var(--muted); }
.qty button { width: 32px; padding: 0; font-size: 1.15rem; color: var(--ink); }
.stepper .btn.btn--ghost[data-d="-10"], .stepper .btn.btn--ghost[data-d="10"] { color: var(--ink); font-size: .88rem; }
.qty button:hover, .stepper .btn.btn--ghost:hover { background: var(--surface-2); }
.qty output, .stepper output { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; width: auto; height: 32px; padding: 0 12px; margin: 0 2px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: 600 1.2rem var(--font-body); font-variant-numeric: tabular-nums; }
.row-opt { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.row-opt:first-of-type { border-top: 0; }
.row-opt .t b { display: block; font-size: .96rem; }
.row-opt .t span { font-size: .82rem; color: var(--muted); }

/* ---------- Home ---------- */
.hero { padding-block: clamp(32px, 5vw, 72px) clamp(40px, 6vw, 88px); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero p.lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--muted); max-width: 46ch; margin: 22px 0 30px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .facts { display: flex; gap: 28px; margin-top: 40px; flex-wrap: wrap; }
.hero .facts div { font-size: .85rem; color: var(--muted); }
.hero .facts b { display: block; font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); font-weight: 500; }
.hero-art { position: relative; aspect-ratio: 1 / 1; max-height: 620px; display: grid; place-items: center; }
.hero-art::before { content: ""; position: absolute; inset: 4%; border-radius: 46% 54% 52% 48% / 50% 46% 54% 50%; background: radial-gradient(circle at 30% 25%, #FBEFD6, #EFDDBD 60%, #E6CFA6); animation: morph 14s ease-in-out infinite alternate; }
@keyframes morph { to { border-radius: 54% 46% 44% 56% / 46% 56% 44% 54%; transform: rotate(4deg); } }
.hero-art svg { position: relative; width: 82%; height: auto; }
.hero-art .now { position: absolute; bottom: 5%; left: 50%; transform: translateX(-50%); background: #fff; border-radius: 999px; padding: 8px 18px; box-shadow: var(--shadow); font-size: .86rem; font-weight: 600; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } .hero-art { order: -1; max-height: 380px; } }

.paths { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 20px; }
.path { position: relative; border-radius: 28px; overflow: hidden; min-height: 380px; display: flex; flex-direction: column; justify-content: flex-end; padding: 28px; text-decoration: none; color: #fff; isolation: isolate; transition: transform .25s ease, box-shadow .25s ease; }
.path:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.path img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s ease; }
.path:hover img { transform: scale(1.05); }
.path::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(42, 32, 26, 0) 30%, rgba(42, 32, 26, .86)); }
.path--cake { background: linear-gradient(160deg, #F3E3C3, #E3C795); color: var(--ink); }
.path--cake::after { display: none; }
.path--cake svg { position: absolute; right: -4%; top: 4%; width: 62%; z-index: -1; }
.path .n { font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; opacity: .8; font-weight: 600; }
.path h3 { font-size: clamp(1.5rem, 2.2vw, 2rem); margin: 6px 0 8px; }
.path p { font-size: .95rem; opacity: .9; max-width: 32ch; }
.path .go { margin-top: 16px; font-weight: 600; display: inline-flex; gap: 6px; }
@media (max-width: 1000px) { .paths { grid-template-columns: 1fr; } .path { min-height: 300px; } }

.size-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.size-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px 14px 16px; text-align: center; text-decoration: none; transition: all .2s ease; }
.size-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold); }
.size-card svg { height: 110px; width: auto; margin: 0 auto 10px; }
.size-card b { display: block; font-size: .95rem; }
.size-card .price { font-family: var(--font-display); font-size: 1.3rem; display: block; }
.size-card .sub { font-size: .78rem; color: var(--muted); display: block; }
@media (max-width: 1000px) { .size-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .size-row { grid-template-columns: repeat(2, 1fr); } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.split img { border-radius: 28px; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: var(--shadow-lg); }
.split ul { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 12px; }
.split li { display: flex; gap: 12px; align-items: flex-start; }
.split li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-top: 9px; flex: none; }
.split .cart-pic { display: block; }
.split .cart-pic img { aspect-ratio: 16 / 9; height: auto; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split .cart-pic img { aspect-ratio: 1 / 1; } }

.band { background: var(--cocoa); color: #F3EADC; border-radius: 36px; padding: clamp(28px, 5vw, 72px); }
.band .eyebrow { color: #D8B872; }
.band p { color: #D9CDBD; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 36px; }
.stat { border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 16px; }
.stat b { font-family: var(--font-display); font-size: clamp(1.6rem, 2.6vw, 2.4rem); color: #fff; font-weight: 500; display: block; }
.stat span { font-size: .88rem; color: #CDBFAD; }
@media (max-width: 800px) { .stats { grid-template-columns: 1fr 1fr; } }

.how { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: how; }
.how div { counter-increment: how; padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.how div::before { content: "0" counter(how); font-family: var(--font-display); font-size: 1.6rem; color: var(--gold); display: block; margin-bottom: 10px; }
.how b { display: block; margin-bottom: 4px; }
.how span { font-size: .9rem; color: var(--muted); }
@media (max-width: 900px) { .how { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .how { grid-template-columns: 1fr; } }

/* ---------- Page head ---------- */
.page-head { padding-block: clamp(28px, 4vw, 56px) clamp(20px, 2.5vw, 32px); }
.page-head h1 { font-size: clamp(2rem, 4vw, 3.2rem); margin-top: 8px; }
.page-head p { color: var(--muted); max-width: 62ch; margin-top: 12px; font-size: 1.05rem; }

/* ---------- Builder (cake + catering) ---------- */
.builder { display: grid; grid-template-columns: minmax(340px, 5fr) 7fr; gap: clamp(20px, 2.5vw, 40px); align-items: start; }
.builder .steps { display: grid; gap: 20px; }
.preview { position: sticky; top: 88px; overflow: hidden; }
.preview .stage { background: radial-gradient(circle at 50% 30%, #FDF6E7, #F1E3C8); padding: 16px 16px 0; position: relative; }
.preview .stage svg { width: 100%; height: auto; max-height: 46vh; }
.preview .caption { position: absolute; top: 14px; left: 16px; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-ink); font-weight: 600; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 12px 20px; border-bottom: 1px solid var(--line); font-size: .84rem; background: #FFFCF6; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .12); }
.summary { padding: 8px 20px 4px; }
.summary dl { margin: 0; }
.summary .r { display: flex; justify-content: space-between; gap: 16px; padding: 9px 8px; margin-inline: -8px; border-bottom: 1px dashed var(--line); font-size: .92rem; border-radius: 8px; }
.summary .r:last-child { border-bottom: 0; }
.summary dt { color: var(--muted); flex: none; }
.summary dd { margin: 0; font-weight: 600; text-align: right; }
.summary dd.none { color: #B9AD9D; font-weight: 400; }
.summary .r.flash { animation: flash 1.1s ease; }
@keyframes flash { 0%, 35% { background: var(--gold-soft); } 100% { background: transparent; } }
.total { display: flex; align-items: baseline; justify-content: space-between; padding: 16px 20px; border-top: 1px solid var(--line); }
.total b { font-family: var(--font-display); font-size: 1.9rem; font-weight: 500; }
.total b.tick { animation: tick .4s ease; }
@keyframes tick { 40% { transform: scale(1.08); color: var(--gold-ink); } }
.preview .actions { padding: 0 20px 20px; display: grid; gap: 8px; }
.preview .missing { font-size: .82rem; color: var(--muted); text-align: center; min-height: 1.2em; }
.mobile-bar { display: none; }
@media (max-width: 960px) {
  .builder { grid-template-columns: 1fr; }
  .preview { position: static; }
  .preview .stage svg { max-height: 300px; }
  .mobile-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 -8px 24px rgba(42, 32, 26, .08); }
  .mobile-bar b { font-family: var(--font-display); font-size: 1.4rem; font-weight: 500; }
  body.has-bar { padding-bottom: 76px; }
}

/* cake SVG transitions */
.cake-svg [data-fill] { transition: fill .45s ease; }
.cake-svg .tier { transition: transform .5s cubic-bezier(.3, 1.4, .5, 1), opacity .3s; }
.cake-svg .pop { animation: pop .5s cubic-bezier(.3, 1.6, .5, 1); transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.cake-svg .flame { animation: flicker 1.4s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes flicker { to { transform: scale(.86, 1.12) rotate(3deg); } }

/* ---------- Shop ---------- */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.product { display: flex; flex-direction: column; overflow: hidden; }
.product .ph { aspect-ratio: 1 / 1; background: var(--surface-2); overflow: hidden; }
.product .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product:hover .ph img { transform: scale(1.04); }
.product .body { padding: 18px; display: grid; gap: 8px; flex: 1; align-content: start; }
.product h3 { font-size: 1.12rem; font-family: var(--font-body); font-weight: 600; }
.product .desc { font-size: .88rem; color: var(--muted); }
.product .meta { display: flex; justify-content: space-between; align-items: baseline; }
.product .price { font-family: var(--font-display); font-size: 1.35rem; }
.product .foot { padding: 0 18px 18px; display: grid; gap: 10px; }
.product .foot .line { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--leaf-soft); color: var(--leaf); }
.badge--cold { background: #E3EEF5; color: #2F6687; }
.badge--gold { background: var(--gold-soft); color: var(--gold-ink); }
.facts3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.fact { padding: 26px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.fact b { font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; display: block; margin-bottom: 8px; }
.fact p { color: var(--muted); font-size: .95rem; }
.fact .ico { width: 44px; height: 44px; border-radius: 14px; background: var(--leaf-soft); display: grid; place-items: center; margin-bottom: 16px; color: var(--leaf); }
@media (max-width: 800px) { .facts3 { grid-template-columns: 1fr; } }

/* ---------- Cart / checkout / order ---------- */
.two-col { display: grid; grid-template-columns: 7fr minmax(320px, 4fr); gap: clamp(20px, 2.5vw, 40px); align-items: start; }
.two-col > aside { position: sticky; top: 88px; }
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; } .two-col > aside { position: static; } }
.line-item { display: grid; grid-template-columns: 96px 1fr auto; gap: 18px; padding: 20px 0; border-top: 1px solid var(--line); align-items: start; }
.line-item:first-child { border-top: 0; padding-top: 0; }
.line-item .thumb { width: 96px; height: 96px; border-radius: 16px; background: radial-gradient(circle at 50% 30%, #FDF6E7, #F1E3C8); overflow: hidden; display: grid; place-items: center; }
.line-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.line-item .thumb svg { width: 88%; }
.line-item h3 { font-family: var(--font-body); font-size: 1.02rem; font-weight: 600; }
.line-item .kind { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); font-weight: 600; }
.line-item ul { list-style: none; margin: 6px 0 10px; padding: 0; font-size: .86rem; color: var(--muted); display: grid; gap: 2px; }
.line-item .p { font-family: var(--font-display); font-size: 1.2rem; text-align: right; white-space: nowrap; }
.line-item .rm { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .84rem; text-decoration: underline; padding: 6px 0; }
.line-item .rm:hover { color: var(--danger); }
@media (max-width: 560px) { .line-item { grid-template-columns: 64px 1fr; } .line-item .thumb { width: 64px; height: 64px; } .line-item .p { grid-column: 2; text-align: left; } }
.sum-rows { display: grid; gap: 10px; font-size: .95rem; }
.sum-rows div { display: flex; justify-content: space-between; gap: 16px; }
.sum-rows .grand { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; align-items: baseline; font-weight: 600; }
.sum-rows .grand b { font-family: var(--font-display); font-size: 1.8rem; font-weight: 500; }
.empty { text-align: center; padding: clamp(40px, 8vw, 96px) 20px; }
.empty h2 { margin-bottom: 10px; }
.empty .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.upsell { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.upsell a { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; border: 1px dashed #D9CBB3; text-decoration: none; background: #FFFCF6; transition: all .2s; }
.upsell a:hover { border-style: solid; border-color: var(--gold); transform: translateY(-2px); }
.upsell b { display: block; font-size: .94rem; }
.upsell span { font-size: .8rem; color: var(--muted); }
.upsell .plus { width: 36px; height: 36px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-ink); display: grid; place-items: center; font-size: 1.2rem; flex: none; }
@media (max-width: 760px) { .upsell { grid-template-columns: 1fr; } }

.notice { padding: 14px 16px; border-radius: 14px; background: var(--gold-soft); color: #5C4310; font-size: .9rem; }
.notice--leaf { background: var(--leaf-soft); color: #3A5229; }
.notice--danger { background: #F8E3DE; color: #7E2A1C; }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: .88rem; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status--paid { background: var(--leaf-soft); color: var(--leaf); }
.status--unpaid { background: var(--gold-soft); color: var(--gold-ink); }
.status--failed, .status--cancelled { background: #F8E3DE; color: var(--danger); }
.bank { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-top: 14px; }
.bank div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--line); background: #fff; }
.bank div:first-child { border-top: 0; }
.bank span { color: var(--muted); font-size: .9rem; }
.bank b { font-variant-numeric: tabular-nums; letter-spacing: .02em; text-align: right; }
.bank .acct b { font-size: 1.25rem; font-family: var(--font-display); }
.copy { border: 1px solid var(--line); background: #fff; border-radius: 999px; font-size: .75rem; padding: 3px 10px; cursor: pointer; margin-left: 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; font-size: .94rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all .3s ease; z-index: 100; font-size: .93rem; display: flex; gap: 14px; align-items: center; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast a { color: #E7C77F; font-weight: 600; white-space: nowrap; }
@media (max-width: 960px) { body.has-bar .toast { bottom: 92px; } }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .site-footer, .no-print, .toast, .mobile-bar { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}
.tiles--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 520px) { .tiles--3 { grid-template-columns: repeat(2, 1fr); } }

/* header: keep everything on one line on small phones */
.brand b, .lang button, .cart-btn { white-space: nowrap; }
.cart-btn svg { flex: none; }
@media (max-width: 900px) {
  .site-header .wrap { gap: 10px; min-height: 60px; }
  .brand b { font-size: 1.2rem; }
  .lang button { padding: 6px 9px; }
  .cart-btn { padding: 0 12px; min-height: 40px; }
  .menu-btn { width: 40px; height: 40px; flex: none; }
}

/* pickup slot that is only bookable on some weekdays */
.chip small { font-size: .7rem; font-weight: 600; color: var(--gold-ink); background: var(--gold-soft); padding: 2px 8px; border-radius: 999px; }
.chip[aria-pressed="true"] small { background: rgba(255, 255, 255, .18); color: #fff; }
.chip.off { opacity: .5; border-style: dashed; }

/* long brand name: let it wrap on narrow phones so the header never overflows */
@media (max-width: 520px) {
  .brand { min-width: 0; }
  .brand b { white-space: normal; font-size: 1.02rem; line-height: 1.12; }
}

/* number candles: quantity, then the digits in order */
.row-opt--col { flex-direction: column; align-items: stretch; gap: 10px; }
.row-opt--col .row-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.digit-box { padding-top: 4px; }
.digit-pad { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.digit-pad button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; font-weight: 600; cursor: pointer; font-size: 1rem; }
.digit-pad button:hover { border-color: var(--ink); }
.digit-pad[data-full="true"] button { opacity: .4; cursor: default; }
.digit-chosen { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .88rem; color: var(--muted); }
.digit-chosen .chip { min-height: 36px; padding: 4px 12px; }
/* step 5 contact */
.phone-row { display: grid; grid-template-columns: minmax(130px, 200px) 1fr; gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); cursor: pointer; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--gold-ink); }
@media (max-width: 520px) { .phone-row { grid-template-columns: 1fr; } }
/* checkout reminders */
.remind { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 18px; }
.remind li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; }
.remind .no { font-weight: 700; color: var(--gold-ink); letter-spacing: .06em; padding-top: 2px; }
.remind b { display: block; margin-bottom: 2px; }
.remind p { color: var(--muted); font-size: .92rem; margin: 0; }
.remind .sizes { margin: 6px 0 0; padding: 0; list-style: none; font-size: .88rem; color: var(--ink); display: grid; gap: 2px; }

/* mobile cake builder only: the live preview stays pinned under the header while you scroll through the steps (the catering page keeps its normal layout) */
@media (max-width: 960px) {
  body[data-page="cake"] .builder { align-items: stretch; }
  body[data-page="cake"] .preview { display: contents; }                     /* lets the stage stick relative to the whole builder */
  body[data-page="cake"] .preview .stage { position: sticky; top: 60px; z-index: 30; padding: 10px 16px 0; border-radius: 0 0 22px 22px; box-shadow: 0 10px 24px -12px rgba(33, 26, 20, .35); margin-inline: calc(var(--gutter) * -1); }
  body[data-page="cake"] .preview .stage svg { max-height: 170px; }
  body[data-page="cake"] .preview .caption { top: 10px; }
  body[data-page="cake"] .preview .legend { border: 1px solid var(--line); border-radius: 14px; }
  body[data-page="cake"] .builder .steps { order: 2; }
  body[data-page="cake"] .preview .summary { order: 3; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 8px 18px; }
  body[data-page="cake"] .preview .total, body[data-page="cake"] .preview .actions { display: none; }  /* the bottom bar already shows the total and Add to cart */
  body[data-page="cake"] .step { scroll-margin-top: 250px; }
  body[data-page="cake"] .preview .stage { transition: opacity .25s ease, transform .25s ease; }
  body[data-page="cake"] .preview .stage.stage--away { opacity: 0; transform: translateY(-16px); pointer-events: none; }
}

.row-opt .chip { min-height: 34px; padding: 0 14px; font-size: .88rem; }
.row-opt .t { flex: 1 1 200px; min-width: 0; }
.row-opt > .stepper, .row-opt > .qty, .row-opt > .chips { margin-left: auto; }

/* native date/time/select inputs have an intrinsic width in Safari, Chrome and Edge: keep them inside their grid column */
.grid-2 > *, .grid-3 > * { min-width: 0; }
.input[type="date"], .input[type="time"], select.input { display: block; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; -webkit-appearance: none; appearance: none; }
.input[type="date"] { min-height: 46px; text-align: left; }
.input[type="date"]::-webkit-date-and-time-value { text-align: left; min-width: 0; }
select.input { padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2374685B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }

/* logo in the header; cart button never shrinks, so the count badge stays inside it */
.brand { flex-direction: row; align-items: center; flex: none; }
.brand img { display: block; height: 46px; width: auto; mix-blend-mode: multiply; }
.lang, .cart-btn, .menu-btn { flex: none; }
.cart-btn { padding: 0 8px 0 16px; }
.cart-btn .count { flex: none; }
@media (max-width: 900px) { .brand img { height: 40px; } .cart-btn { padding: 0 8px 0 12px; } }
@media (min-width: 1181px) and (max-width: 1360px) { .nav a { padding: 8px 10px; font-size: .9rem; } .site-header .wrap { gap: 12px; } }
