/* Sweeter Side by Dachel — online menu
   Palette sampled from the brand logo and the printed menu posters. */

:root {
  color-scheme: light;

  /* Brand */
  --butter:        #F7E4A1;
  --butter-deep:   #F2DE95;
  --cream:         #FFF9E8;
  --coral:         #EF5350;
  --coral-ink:     #D2402C;  /* AA-safe coral for text and buttons */
  --navy:          #3E5E7E;

  /* Surfaces and text */
  --bg:            #FFFCF3;
  --surface:       #FFFFFF;
  --ink:           #4A3520;  /* 10.2:1 on white */
  --ink-soft:      #7A6244;  /* 5.2:1 on white  */
  --line:          #EFE2C4;

  /* Scale */
  --sp-1: .25rem; --sp-2: .5rem;  --sp-3: .75rem; --sp-4: 1rem;
  --sp-5: 1.5rem; --sp-6: 2rem;   --sp-7: 3rem;   --sp-8: 4rem;
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-full: 999px;
  --shadow: 0 1px 2px rgba(74,53,32,.06), 0 8px 24px rgba(74,53,32,.08);
  --shadow-lg: 0 2px 4px rgba(74,53,32,.08), 0 16px 40px rgba(74,53,32,.14);
  --ease: cubic-bezier(.4, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.5 "Nunito", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Fredoka", "Nunito", ui-rounded, system-ui, sans-serif;
  font-weight: 600; margin: 0; line-height: 1.15;
}
img { max-width: 100%; }

:where(a, button, input, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.skip {
  position: absolute; left: var(--sp-4); top: -100px; z-index: 100;
  background: var(--surface); color: var(--ink); padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-sm); box-shadow: var(--shadow-lg); font-weight: 700;
  transition: top .2s var(--ease);
}
.skip:focus { top: var(--sp-4); }

/* Visually hidden, still read by screen readers. */
.vh {
  position: absolute !important; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.wrap { width: min(100% - 2rem, 1120px); margin-inline: auto; }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(120% 90% at 50% -10%, #FFF6D6 0%, var(--butter) 55%, var(--butter-deep) 100%);
  padding: var(--sp-6) 0 var(--sp-7);
  text-align: center;
  border-bottom: 1px solid rgba(74,53,32,.08);
}
.hero__logo {
  width: clamp(112px, 26vw, 156px); height: auto;
  border-radius: 50%; display: block; margin: 0 auto var(--sp-4);
  box-shadow: 0 6px 20px rgba(74,53,32,.16);
}
.hero__title { font-size: clamp(2rem, 7vw, 3.25rem); letter-spacing: -.01em; color: var(--ink); }
.hero__sub {
  margin: var(--sp-3) auto 0; max-width: 46ch; color: #6B5330;
  font-size: clamp(1rem, 2.6vw, 1.125rem);
}
/* Open or closed, under the tagline. */
.status {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--sp-2);
  margin: var(--sp-4) auto 0; max-width: 46ch; font-size: .9375rem; font-weight: 600; color: #6B5330;
}
.status__pill {
  display: inline-flex; align-items: center; gap: .4em; padding: .3rem .75rem; border-radius: var(--r-full);
  font-size: .8125rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
}
.status__pill::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: currentColor; }
.status--open .status__pill { color: #1F5A3A; background: #DDF0E3; }
.status--closed .status__pill { color: #fff; background: #6B5330; }

/* The link to the custom cake page. */
.hero__cta {
  display: inline-flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-4);
  min-height: 44px; padding: 0 var(--sp-5); border-radius: var(--r-full);
  font-weight: 700; color: #fff; background: var(--coral-ink); text-decoration: none;
  box-shadow: var(--shadow); transition: filter .2s var(--ease), transform .12s var(--ease);
}
.hero__cta:hover { filter: brightness(1.08); }
.hero__cta:active { transform: scale(.98); }
.hero--small { padding: var(--sp-5) 0 var(--sp-6); }
.hero--small .hero__logo { width: clamp(80px, 18vw, 104px); }
.hero__home { display: inline-block; border-radius: 50%; }

/* ---------- Sticky toolbar ---------- */
.toolbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: rgba(255, 252, 243, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: var(--sp-3) 0;
}
.toolbar__inner { display: flex; flex-direction: column; gap: var(--sp-3); }

.search { position: relative; display: flex; align-items: center; }
.search svg {
  position: absolute; left: 14px; width: 20px; height: 20px;
  color: var(--ink-soft); pointer-events: none;
}
.search input {
  width: 100%; min-height: 48px;
  padding: var(--sp-3) var(--sp-4) var(--sp-3) 44px;
  font: inherit; color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--r-full);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.search input::placeholder { color: #9A8462; }
.search input:hover { border-color: #E2CFA5; }
.search input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(62,94,126,.14);
  outline: none;
}

.filters { display: flex; gap: var(--sp-2); overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; min-height: 44px; padding: 0 var(--sp-4);
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font: 600 .9375rem/1 "Nunito", sans-serif; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--r-full); cursor: pointer; white-space: nowrap;
  transition: background .2s var(--ease), border-color .2s var(--ease),
              color .2s var(--ease), transform .12s var(--ease);
}
.chip:hover { border-color: #E2CFA5; background: var(--cream); }
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"] { background: var(--coral-ink); border-color: var(--coral-ink); color: #fff; }
.chip__n { font-size: .8125rem; opacity: .72; font-variant-numeric: tabular-nums; }

/* ---------- Sections and grid ---------- */
main { padding-block: var(--sp-7) var(--sp-8); }
.section + .section { margin-top: var(--sp-8); }
.section__head {
  display: flex; align-items: baseline; gap: var(--sp-3);
  margin-bottom: var(--sp-5); flex-wrap: wrap;
}
.section__title { font-size: clamp(1.5rem, 4.5vw, 2rem); }
.section__rule { flex: 1; height: 2px; min-width: 2rem; background: var(--line); border-radius: 2px; }
.section__count { color: var(--ink-soft); font-size: .9375rem; font-variant-numeric: tabular-nums; }

.grid {
  display: grid; gap: var(--sp-4);
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  margin: 0; padding: 0; list-style: none;
}
@media (min-width: 640px)  { .grid { gap: var(--sp-5); grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); } }

/* ---------- Card ---------- */
.card {
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #E7D6AE; }
.card:has(.card__btn:focus-visible) { outline: 3px solid var(--navy); outline-offset: 2px; }
.card:has(.card__add:hover) { transform: none; }

/* The photo is a window cropped out of the shared menu poster.
   --x/--y = top-left of the crop in the source image, --w/--h = its size. */
.shot {
  position: relative; overflow: hidden; background: #fff;
  aspect-ratio: calc(var(--w) / var(--h));
  border-bottom: 1px solid var(--line);
}
.shot img {
  position: absolute; display: block; height: auto;
  max-width: none;   /* overrides the global img cap — the sprite must overflow */
  width: calc(102100% / var(--w));
  left: calc(var(--x) * -100% / var(--w));
  top:  calc(var(--y) * -100% / var(--h));
  transition: transform .35s var(--ease);
  transform-origin: center;
}
.card:hover .shot img { transform: scale(1.045); }

/* An item whose photo has no crop window: show the whole image. */
.shot--plain { aspect-ratio: 3 / 4; }
.shot--plain img {
  position: absolute; inset: 0; left: 0; top: 0;
  width: 100%; height: 100%; object-fit: cover;
}

.no-items {
  text-align: center; color: var(--ink-soft);
  padding: var(--sp-8) var(--sp-4); font-size: 1.0625rem;
}

.card__body { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-4); flex: 1; }
.card__name { font-size: 1.0625rem; font-weight: 600; }
.card__btn {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: transparent; z-index: 2;
}
.card__btn:focus-visible { outline: none; }
.card__foot {
  margin-top: auto; display: flex; align-items: center;
  justify-content: space-between; gap: var(--sp-2);
}
.price {
  font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.125rem;
  color: var(--coral-ink); font-variant-numeric: tabular-nums;
}
.price small { font-size: .75em; font-weight: 500; color: var(--ink-soft); margin-right: .15em; }
.tag {
  font-size: .75rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: var(--navy); background: #EAF1F7; border-radius: var(--r-full); padding: .25rem .5rem;
}

/* ---------- Empty state ---------- */
.empty { display: none; text-align: center; padding: var(--sp-8) var(--sp-4); color: var(--ink-soft); }
.empty h2 { font-size: 1.25rem; color: var(--ink); margin-bottom: var(--sp-2); }
.empty button {
  margin-top: var(--sp-4); min-height: 44px; padding: 0 var(--sp-5); cursor: pointer;
  font: 600 1rem "Nunito", sans-serif; color: #fff; background: var(--coral-ink);
  border: 0; border-radius: var(--r-full);
  transition: filter .2s var(--ease), transform .12s var(--ease);
}
.empty button:hover { filter: brightness(1.08); }
.empty button:active { transform: scale(.97); }
body[data-empty="true"] .empty { display: block; }
body[data-empty="true"] .section { display: none; }
.section[hidden], .card[hidden] { display: none; }

/* ---------- Detail dialog ---------- */
.sheet {
  /* Fixed, not relative: a modal dialog given position: relative becomes
     absolute in the top layer, so it opens at the top of the document and
     the page jumps there. Fixed keeps it on screen and still anchors .sheet__close. */
  position: fixed;
  margin: auto;                  /* centres the modal in the viewport */
  width: min(100% - 2rem, 420px); padding: 0; border: 0;
  border-radius: var(--r-lg); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.sheet::backdrop { background: rgba(58, 40, 22, .5); backdrop-filter: blur(3px); }
.sheet .shot { border-bottom: 1px solid var(--line); border-radius: 0; }
/* An uploaded photo keeps the card's 3:4 shape, but never taller than most of the screen. */
.sheet .shot--plain { width: 100%; max-height: 60vh; }
.sheet__body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }
.sheet__name { font-size: 1.5rem; }
.sheet__row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.sheet__price { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.5rem; color: var(--coral-ink); }
.sheet__close {
  position: absolute; top: var(--sp-3); right: var(--sp-3); z-index: 3;
  width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer;
  background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 50%;
  color: var(--ink); box-shadow: var(--shadow);
  transition: background .2s var(--ease), transform .12s var(--ease);
}
.sheet__close:hover { background: #fff; }
.sheet__close:active { transform: scale(.94); }

/* ---------- Cart ---------- */
/* Ordering needs JavaScript; without it the menu stays a plain menu. */
.card__add, .foot__js { display: none; }
.has-cart .foot__js { display: block; }

.has-cart .card__add {
  position: relative; z-index: 3;   /* above the full-card .card__btn */
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; min-width: 64px; padding: 0 var(--sp-4); cursor: pointer;
  font: 700 .9375rem/1 "Nunito", sans-serif; color: var(--coral-ink);
  background: var(--surface); border: 1.5px solid var(--coral-ink); border-radius: var(--r-full);
  transition: background .2s var(--ease), color .2s var(--ease), transform .12s var(--ease);
}
.has-cart .card__foot { flex-wrap: wrap; }

/* Sold out: still on the menu so people know it exists, but greyed. */
.card--soldout .shot img { filter: grayscale(1); opacity: .6; }
.card--soldout .card__name, .card--soldout .price { color: var(--ink-soft); }
.card__soldout {
  font-size: .75rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: #6B5330; background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--r-full); padding: .3rem .6rem;
}
.card__left { margin: 0; font-size: .875rem; font-weight: 700; color: var(--coral-ink); }

/* Promotions: a best seller ribbon on the photo, and a sale price. */
.card__badge {
  position: absolute; top: var(--sp-3); left: var(--sp-3); z-index: 1;
  padding: .3rem .6rem; border-radius: var(--r-full);
  font-size: .75rem; font-weight: 700; letter-spacing: .02em;
  color: #5A3A00; background: #FFD66B; box-shadow: 0 2px 6px rgba(90,58,0,.18);
}
.card__sale {
  margin: 0; align-self: flex-start; padding: .15rem .5rem; border-radius: var(--r-full);
  font-size: .8125rem; font-weight: 700; color: #fff; background: var(--coral-ink);
}
.price__was {
  font-family: "Nunito", sans-serif; font-size: .8125rem; font-weight: 600;
  color: var(--ink-soft); text-decoration-thickness: 1.5px; margin-right: .2em;
}
.card--soldout .card__sale { background: var(--ink-soft); }
.card__add:hover { background: #FDF1EE; }
.card__add:active { transform: scale(.95); }
.card__add.is-added { background: var(--coral-ink); color: #fff; }
.has-cart .card__add[hidden] { display: none; }

.sheet__add, .checkout__submit {
  min-height: 48px; padding: 0 var(--sp-5); cursor: pointer; width: 100%;
  font: 700 1rem "Nunito", sans-serif; color: #fff; background: var(--coral-ink);
  border: 0; border-radius: var(--r-full);
  transition: filter .2s var(--ease), transform .12s var(--ease);
}
.sheet__add:hover, .checkout__submit:hover:not(:disabled) { filter: brightness(1.08); }
.sheet[data-soldout] .sheet__add { display: none; }
.sheet__add:active, .checkout__submit:active:not(:disabled) { transform: scale(.98); }
.checkout__submit:disabled { opacity: .6; cursor: progress; }

/* Bar pinned to the bottom of the screen while the cart has items. */
.cartbar {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, rgba(255,252,243,.98) 60%, rgba(255,252,243,0));
}
.cartbar[hidden] { display: none; }
.cartbar__btn {
  width: min(100%, 560px); margin-inline: auto; min-height: 56px;
  display: flex; align-items: center; gap: var(--sp-3); padding: 0 var(--sp-5); cursor: pointer;
  font: 700 1rem "Nunito", sans-serif; color: #fff; background: var(--coral-ink);
  border: 0; border-radius: var(--r-full); box-shadow: var(--shadow-lg);
  transition: filter .2s var(--ease), transform .12s var(--ease);
}
.cartbar__btn:hover { filter: brightness(1.08); }
.cartbar__btn:active { transform: scale(.985); }
.cartbar__n {
  background: rgba(255,255,255,.2); border-radius: var(--r-full);
  padding: .2rem .6rem; font-size: .875rem; font-variant-numeric: tabular-nums;
}
.cartbar__label { flex: 1; text-align: left; }
.cartbar__total { font-family: "Fredoka", sans-serif; font-weight: 600; font-variant-numeric: tabular-nums; }
/* Keep the footer reachable above the bar. */
body.cart-open-bar .foot { padding-bottom: calc(var(--sp-6) + 88px + env(safe-area-inset-bottom, 0px)); }

.cart {
  width: min(100% - 2rem, 480px);
  max-height: calc(100dvh - 2rem); overflow-y: auto; overscroll-behavior: contain;
}
.cart__view, .cart__done { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-4); }
.cart__view[hidden], .cart__done[hidden] { display: none; }
.cart__title { font-size: 1.5rem; padding-right: 48px; }
.cart__title:focus { outline: none; }
.cart__empty { margin: 0; color: var(--ink-soft); }
.cart__notice, .cart__alert {
  margin: 0; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); font-size: .9375rem;
}
.cart__notice { background: var(--cream); border: 1px solid var(--line); }
.cart__alert { background: #FDF1EF; border: 1px solid #F0D2CC; color: #8E2C1D; }
.cart__notice[hidden], .cart__alert[hidden], .cart__sum[hidden], .checkout[hidden] { display: none; }
.cart__closed { margin: 0; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--cream); border: 1px solid var(--line); font-weight: 600; }
.cart__closed[hidden], .cart__sum div[hidden], .checkout [data-for][hidden] { display: none; }

/* Voucher code entry, above the totals. */
.voucher { display: flex; flex-direction: column; gap: var(--sp-2); }
.voucher[hidden], .voucher__entry[hidden], .voucher__applied[hidden], .voucher__have[hidden] { display: none; }
.voucher__have { min-height: 44px; display: inline-flex; align-items: center; gap: var(--sp-2); align-self: flex-start; font-weight: 700; font-size: .9375rem; cursor: pointer; }
.voucher__have input { width: 20px; height: 20px; margin: 0; accent-color: var(--coral-ink); }
.voucher__entry { display: flex; flex-direction: column; gap: var(--sp-1); }
.voucher__entry label { font-weight: 700; font-size: .9375rem; }
.voucher__row { display: flex; gap: var(--sp-2); }
.voucher__row input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 var(--sp-4);
  font: inherit; font-size: 1rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--r-full);
}
.voucher__row input::placeholder { text-transform: none; letter-spacing: 0; }
.voucher__row input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(62,94,126,.14); }
.voucher__apply, .voucher__remove {
  min-height: 44px; padding: 0 var(--sp-4); cursor: pointer;
  font: 700 .9375rem "Nunito", sans-serif; color: var(--coral-ink);
  background: var(--surface); border: 1.5px solid var(--coral-ink); border-radius: var(--r-full);
}
.voucher__apply:hover, .voucher__remove:hover { background: #FDF1EE; }
.voucher__apply:disabled { opacity: .5; cursor: wait; }
.voucher__applied {
  margin: 0; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4); border-radius: var(--r-md);
  background: #EEF6F0; border: 1px solid #CFE6D7; color: #1F5A3A; font-weight: 700;
}
.voucher__remove { min-height: 36px; font-size: .875rem; }
#cart-discount, #done-discount { color: #2E7D52; }

.cart__lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
/* Thumbnail on the left; beside it the name and price on one row, then the
   stepper and the line total. The cart is never wider than 480px, so this
   two-row layout is used at every width and the name always has room. */
.cline {
  display: grid; grid-template-columns: 56px 1fr auto; grid-template-areas: "thumb main main" "thumb step total";
  gap: var(--sp-2) var(--sp-3); align-items: center;
  padding: var(--sp-3) 0; border-bottom: 1px solid var(--line);
}
.cline:first-child { padding-top: 0; }

/* A small square thumbnail: the card's photo (a sprite window or a whole
   photo), scaled to cover the square and centred. */
.cline__thumb {
  grid-area: thumb; align-self: start; position: relative;
  width: 56px; height: 56px; overflow: hidden;
  border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff;
}
.cline__thumb .shot {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: max(100%, calc(56px * var(--w) / var(--h))); border: 0;
}
.cline__thumb .shot--plain { width: 100%; height: 100%; aspect-ratio: auto; }
.cline__main { grid-area: main; display: flex; flex-direction: column; min-width: 0; }
.cline__name { font-weight: 700; overflow-wrap: anywhere; }
.cline__each { font-size: .875rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.cline__total {
  grid-area: total; justify-self: end; text-align: right;
  font-family: "Fredoka", sans-serif; font-weight: 600;
  color: var(--coral-ink); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.stepper {
  grid-area: step; justify-self: start;
  display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--r-full);
}
.stepper__btn {
  width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer;
  font: 700 1.125rem/1 "Nunito", sans-serif; color: var(--ink);
  background: none; border: 0; border-radius: var(--r-full);
}
.stepper__btn:hover:not(:disabled) { background: var(--cream); }
.stepper__btn:disabled { opacity: .35; cursor: not-allowed; }
.stepper__n { min-width: 2ch; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

.cart__sum { margin: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.cart__sum div { display: flex; justify-content: space-between; gap: var(--sp-3); }
.cart__sum dt { color: var(--ink-soft); }
.cart__sum dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.cart__sum .cart__total { padding-top: var(--sp-2); border-top: 1.5px solid var(--line); }
.cart__total dt { color: var(--ink); font-weight: 700; }
.cart__total dd { font-family: "Fredoka", sans-serif; font-size: 1.375rem; color: var(--coral-ink); }

.checkout {
  display: flex; flex-direction: column; gap: var(--sp-4);
  padding-top: var(--sp-4); border-top: 1px solid var(--line);
}
.checkout__title { font-size: 1.125rem; }
.checkout__note { margin: 0; text-align: center; font-size: .875rem; color: var(--ink-soft); }

/* Order type: a segmented control of three radios. */
.otype { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.otype[hidden] { display: none; }
.otype legend { padding: 0; margin-bottom: var(--sp-2); font-family: "Fredoka", "Nunito", ui-rounded, system-ui, sans-serif; font-weight: 600; color: var(--ink); }
.otype__opts { display: flex; gap: var(--sp-2); }
.otype__opt { flex: 1 1 0; position: relative; }
.otype__opt[hidden] { display: none; }
.otype__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.otype__opt span {
  min-height: 48px; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 0 var(--sp-2); font-weight: 700; font-size: .9375rem; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-full);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.otype__opt input:hover + span { border-color: #E2CFA5; }
.otype__opt input:checked + span { background: var(--coral-ink); border-color: var(--coral-ink); color: #fff; }
.otype__opt input:focus-visible + span { box-shadow: 0 0 0 4px rgba(62,94,126,.24); }
.otype__note { margin: 0; font-size: .875rem; color: var(--ink-soft); }
.otype__note[hidden] { display: none; }

.cfield { display: flex; flex-direction: column; gap: var(--sp-1); }
.cfield label { font-weight: 700; font-size: .9375rem; }
.cfield__hint { display: block; font-weight: 400; font-size: .8125rem; color: var(--ink-soft); }
.cfield input, .cfield textarea, .cfield select {
  width: 100%; min-height: 48px; padding: var(--sp-3) var(--sp-4);
  font: inherit; font-size: 1rem;   /* 16px stops iOS zooming into the field */
  color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.cfield textarea { resize: vertical; min-height: 88px; }
.cfield input:hover, .cfield textarea:hover, .cfield select:hover { border-color: #E2CFA5; }
.cfield input:focus, .cfield textarea:focus, .cfield select:focus {
  outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(62,94,126,.14);
}
.cfield [aria-invalid="true"] { border-color: var(--coral-ink); }
.cfield__money { position: relative; display: flex; align-items: center; }
.cfield__money span { position: absolute; left: var(--sp-4); color: var(--ink-soft); font-weight: 600; pointer-events: none; }
.cfield__money input { padding-left: 3.25rem; font-variant-numeric: tabular-nums; }
.cfield__change { margin: 0; min-height: 1.5em; font-weight: 700; color: #2E7D52; font-size: .9375rem; }
.cfield__change.is-short { color: var(--coral-ink); }
.cfield__err { margin: 0; color: var(--coral-ink); font-size: .875rem; font-weight: 600; }
.cfield__err[hidden] { display: none; }

.cart__done p { margin: 0; }
.checkout__req { margin: calc(var(--sp-2) * -1) 0 0; font-size: .875rem; color: var(--ink-soft); }

.cart__back {
  min-height: 44px; padding: 0 var(--sp-5); cursor: pointer;
  font: 700 .9375rem "Nunito", sans-serif; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-full);
}
.cart__back:hover { background: var(--cream); }

/* ---------- Custom cake booking page ---------- */
.cakes { max-width: 640px; }
.cakes__nojs { padding: var(--sp-4); border-radius: var(--r-md); background: var(--cream); border: 1px solid var(--line); }
.cakes__nojs[hidden], .cake-form[hidden], .cake-done[hidden], .photo-pick__chosen[hidden], #k-address-field[hidden] { display: none; }
.cake-form, .cake-done {
  display: flex; flex-direction: column; gap: var(--sp-5);
  padding: var(--sp-5); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.cake-done { gap: var(--sp-3); }
.cake-done p { margin: 0; }
.cake-done .cart__back { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; align-self: flex-start; }
.cake-step { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-4); }
.cake-step + .cake-step { padding-top: var(--sp-5); border-top: 1px solid var(--line); }
.cake-step__title { padding: 0; margin-bottom: var(--sp-1); font: 600 1.25rem "Fredoka", "Nunito", sans-serif; color: var(--ink); }
.cfield select { appearance: auto; }
.cfield__label { font-weight: 700; font-size: .9375rem; }

/* Sizes as cards: name and starting price. */
.sizes { display: grid; gap: var(--sp-2); }
@media (min-width: 520px) { .sizes { grid-template-columns: 1fr 1fr; } }
.size { position: relative; display: block; cursor: pointer; }
.size input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.size__body {
  height: 100%; display: flex; flex-direction: column; gap: var(--sp-1);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md);
  border: 1.5px solid var(--line); background: var(--surface);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.size__name { font-weight: 700; }
.size__price { font-size: .9375rem; color: var(--ink-soft); }
.size__price strong { color: var(--coral-ink); font-family: "Fredoka", sans-serif; font-weight: 600; }
.size input:hover + .size__body { border-color: #E2CFA5; }
.size input:checked + .size__body { border-color: var(--coral-ink); background: #FDF1EE; box-shadow: inset 0 0 0 1px var(--coral-ink); }
.size input:focus-visible + .size__body { box-shadow: 0 0 0 4px rgba(62,94,126,.24); }

/* Reference photo picker. */
.photo-pick { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.photo-pick__btn {
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 var(--sp-4); cursor: pointer;
  font-weight: 700; color: var(--navy); background: #EAF1F7; border-radius: var(--r-full);
}
.photo-pick input:focus-visible + .photo-pick__chosen, .photo-pick__btn:focus-within { outline: 3px solid var(--navy); }
.photo-pick__chosen { display: flex; align-items: center; gap: var(--sp-3); }
.photo-pick__chosen img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); }

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--line); background: var(--cream);
  padding: var(--sp-6) 0 calc(var(--sp-6) + env(safe-area-inset-bottom, 0px));
  text-align: center; color: var(--ink-soft); font-size: .9375rem;
}
.foot strong {
  display: block; color: var(--ink); font-family: "Fredoka", sans-serif;
  font-size: 1.125rem; margin-bottom: var(--sp-2);
}
.foot a { color: var(--navy); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover { transform: none; }
  .card:hover .shot img { transform: none; }
}

/* Checkout honeypot: off-screen rather than display:none, so form-filling bots still see it. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
