/* A&M Cupcakes prototype v2, "The counter".
   Taken from the Colpetty shop: raspberry awning, white room, glass case, magenta tags, magenta box. */
:root {
  --magenta: #ff10f0;     /* logo, box */
  --tag: #c400b6;         /* tag cards, readable white text */
  --raspberry: #b0124f;   /* awning, buttons, links */
  --raspberry-dark: #8c0c3e;
  --ink: #2a0d22;
  --ink-2: #5b4255;
  --glass: #eef3f5;
  --line: #ece4ea;
  --white: #fff;
  --xmas: #0f3d2e;
  --xmas-red: #d7263d;
  --ok: #157a46;
  --warn: #b0124f;
  --display: "Baloo 2", system-ui, sans-serif;
  --body: Figtree, system-ui, sans-serif;
  --max: 1280px;
  --gut: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.55 var(--body); color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: var(--raspberry); text-underline-offset: 3px; }
a:hover { color: var(--raspberry-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--magenta); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }

/* Type */
.display, h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: clamp(46px, 7vw, 92px); line-height: 0.92; margin: 0; }
h2 { font-size: clamp(32px, 4.4vw, 54px); line-height: 0.98; margin: 0; }
h3 { font-size: 18px; line-height: 1.3; margin: 0; font-weight: 700; }
.muted { color: var(--ink-2); }
.lede { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; color: var(--ink-2); max-width: 34em; margin: 0; }
.head-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 32px; margin-bottom: 40px; }
.head-row p { margin: 12px 0 0; max-width: 36em; color: var(--ink-2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px; border: 2px solid var(--raspberry); border-radius: 999px;
  background: var(--raspberry); color: #fff; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--raspberry-dark); border-color: var(--raspberry-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { background: #d9c9d3; border-color: #d9c9d3; color: #fff; cursor: not-allowed; transform: none; }
.btn-line { background: transparent; color: var(--raspberry); }
.btn-line:hover { background: var(--raspberry); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; font-size: 17px; padding: 0 32px; }
.text-link { font-weight: 700; color: var(--raspberry); }

/* ---------- Header: sign + awning ---------- */
.sign { background: rgba(255,255,255,.96); position: sticky; top: 0; z-index: 50; transition: box-shadow .2s; backdrop-filter: saturate(1.4) blur(8px); }
.sign.scrolled { box-shadow: 0 1px 0 var(--line), 0 8px 24px -12px rgba(42,13,34,.2); }
.sign-row { display: flex; align-items: center; gap: 32px; min-height: 76px; }
.logo img { height: 52px; width: auto; }
.nav { display: flex; gap: 26px; font-weight: 600; font-size: 15px; margin-right: auto; }
.nav a { color: var(--ink); text-decoration: none; padding: 6px 0; position: relative; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--raspberry); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--magenta); }
.actions { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  position: relative; width: 44px; height: 44px; border-radius: 50%; border: none; background: transparent;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink);
}
.icon-btn:hover { background: var(--glass); }
.bag-count {
  position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--magenta); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
}
.bag-count:empty { display: none; }
.menu-btn { display: none; }

.awning { background: var(--raspberry); color: #fff; position: relative; z-index: 40; font-size: 14px; }
.awning::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px;
  background: radial-gradient(circle at 14px 0, var(--raspberry) 13.5px, transparent 14px) 0 0 / 28px 12px repeat-x;
}
.awning-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 28px; min-height: 40px; padding-top: 4px; padding-bottom: 4px; }
.awning b { font-weight: 700; }
.area-btn { background: none; border: none; color: #fff; padding: 0; cursor: pointer; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.awning .push { margin-left: auto; }

.search-panel { background: #fff; border-bottom: 1px solid var(--line); }
.search-panel form { display: flex; gap: 10px; padding-top: 24px; padding-bottom: 14px; }

@media (max-width: 1100px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .sign-row { justify-content: space-between; }
  .nav.open {
    display: flex; flex-direction: column; gap: 0; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; padding: 8px var(--gut) 20px; border-top: 1px solid var(--line); box-shadow: 0 20px 30px rgba(42,13,34,.08);
  }
  .nav.open a { font-size: 19px; padding: 12px 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .logo img { height: 42px; }
  .sign-row { min-height: 64px; }
  .awning { font-size: 13px; }
  .awning .hide-sm { display: none; }
}

/* Inputs */
.input {
  width: 100%; min-height: 48px; padding: 10px 16px; border: 1.5px solid #d8ccd4; border-radius: 12px; background: #fff; font-size: 16px;
}
.input:focus { outline: none; border-color: var(--raspberry); box-shadow: 0 0 0 3px rgba(176,18,79,.15); }
textarea.input { min-height: 96px; resize: vertical; }
select.input { appearance: none; padding-right: 40px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232a0d22' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 16px center; }
.label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.label small { font-weight: 400; color: var(--ink-2); }

/* ---------- Tag card (from the shop's display case) ---------- */
.tag {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px;
  background: var(--tag); color: #fff; padding: 6px 10px 7px; border-radius: 3px; position: relative;
  box-shadow: 0 1px 0 rgba(0,0,0,.08); max-width: 100%;
}
.tag, .tag:hover { color: #fff; text-decoration: none; }
a.tag:hover { background: #a3009a; }
.tag-name { font-weight: 800; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; line-height: 1.25; }
.tag-price { font-size: 13px; font-weight: 500; }

/* ---------- Glass shelf ---------- */
.case { background: linear-gradient(#fff, var(--glass) 60%); padding: 64px 0 80px; }
.shelf {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--item, 220px), 1fr));
  column-gap: 28px; row-gap: 48px; overflow: hidden; padding: 0 2px 8px;
}
.item { position: relative; display: flex; flex-direction: column; min-width: 0; }
.item-photo { position: relative; display: block; aspect-ratio: 1; border-radius: 6px 6px 0 0; overflow: hidden; background: var(--glass); }
.item-photo img { width: 100%; height: 100%; object-fit: cover; }
/* the glass ledge the product stands on; it runs through the gutters so each row reads as one shelf */
.ledge { height: 12px; margin: 0 -14px; position: relative;
  background: linear-gradient(#fff 0 2px, #dfe9ee 2px, #c9d7de 100%); box-shadow: 0 8px 14px -6px rgba(42,13,34,.18); }
.item .tag { margin-top: -2px; align-self: flex-start; z-index: 1; }
.item-meta { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-add {
  position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; border-radius: 50%; border: none;
  background: #fff; color: var(--raspberry); font-size: 26px; font-weight: 500; line-height: 1; cursor: pointer;
  box-shadow: 0 4px 12px rgba(42,13,34,.18); display: flex; align-items: center; justify-content: center; z-index: 2;
}
.item-add:hover { background: var(--raspberry); color: #fff; }
.item-add.in { background: var(--magenta); color: #fff; font-size: 16px; font-weight: 800; }
.item-flag { position: absolute; left: 10px; top: 10px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }

/* ---------- Hero: the box ---------- */
.hero { padding: 72px 0 56px; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); column-gap: 56px; row-gap: 24px; align-items: center;
  grid-template-areas: "title box" "copy box";
}
.hero-title { grid-area: title; align-self: end; }
.hero .box { grid-area: box; }
.hero-copy { grid-area: copy; align-self: start; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; }
.sizes { display: inline-flex; padding: 4px; background: var(--glass); border-radius: 999px; align-self: flex-start; }
.sizes button {
  border: none; background: none; min-height: 40px; padding: 0 18px; border-radius: 999px; cursor: pointer; font-weight: 700; color: var(--ink-2);
}
.sizes button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(42,13,34,.12); }
.box-total { display: flex; align-items: baseline; gap: 14px; color: var(--ink-2); }
.box-total b { font-family: var(--display); font-size: 36px; font-weight: 800; line-height: 1; color: var(--ink); }
.box-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }

.box { --cols: 3; position: relative; max-width: 560px; margin-left: auto; width: 100%; }
.box-lid {
  position: relative; height: clamp(58px, 9vw, 84px); margin: 0 18px -6px; border-radius: 14px 14px 4px 4px;
  background: linear-gradient(#ea2fdd, #e00ad2); transform-origin: bottom; transform: perspective(900px) rotateX(30deg);
  display: flex; align-items: center; justify-content: space-between; padding: 0 22px; color: #fff; overflow: hidden;
}
/* the cellophane window on the real box */
.lid-window { position: absolute; left: 36%; right: 8%; top: 18%; bottom: 22%; border-radius: 6px;
  background: linear-gradient(115deg, rgba(255,255,255,.55), rgba(255,255,255,.12) 40%, rgba(255,255,255,.3) 60%, rgba(255,255,255,.1)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.lid-print { position: relative; display: flex; flex-direction: column; gap: 2px; }
.lid-print img { height: clamp(24px, 3.4vw, 34px); width: auto; filter: brightness(0) invert(1); }
.lid-print span { font-size: 11px; font-weight: 700; letter-spacing: .04em; opacity: .9; }
.box-base {
  background: var(--magenta); border-radius: 10px; padding: clamp(12px, 2.6vw, 22px); position: relative;
  box-shadow: 0 34px 60px -24px rgba(176,18,79,.55), inset 0 -6px 0 rgba(0,0,0,.08), inset 0 2px 0 rgba(255,255,255,.25);
}
/* card stock grain */
.box-base::before, .box-lid::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .18; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E"); }
.box-tray {
  position: relative; background: #ffd9f7; border-radius: 6px; padding: clamp(10px, 2.4vw, 20px);
  display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: clamp(8px, 2vw, 16px);
  box-shadow: inset 0 4px 10px rgba(140,0,120,.28);
}
.cup {
  position: relative; aspect-ratio: 1; border-radius: 50%; border: none; padding: 0; background: #f6b8e8;
  box-shadow: inset 0 5px 10px rgba(140,0,120,.35);
}
/* paper liner pleats around each cupcake */
.cup .liner { position: absolute; inset: 0; border-radius: 50%;
  background: repeating-conic-gradient(#fff 0 5deg, #f1e4ec 5deg 10deg); box-shadow: inset 0 0 0 1px rgba(140,0,120,.12); }
.cup:not(.filled) .liner { inset: 14%; opacity: .55; }
.cup img { position: absolute; inset: 7%; width: 86%; height: 86%; object-fit: cover; border-radius: 50%; box-shadow: 0 4px 8px rgba(60,0,40,.35); }
.cup.filled { cursor: pointer; }
.cup.filled::after { content: "Take out"; position: absolute; inset: 7%; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 800; background: rgba(42,13,34,.55); opacity: 0; transition: opacity .15s; }
.cup.filled:hover::after, .cup.filled:focus-visible::after { opacity: 1; }
.cup.incoming img { opacity: 0; }
.cup.drop img { animation: drop .35s cubic-bezier(.2,.9,.3,1.3); }
.cup.intro img { animation: drop .5s cubic-bezier(.2,.9,.3,1.3) both; animation-delay: calc(var(--i) * 90ms + 150ms); }
@keyframes drop { from { transform: translateY(-50%) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.flyer { position: fixed; z-index: 90; object-fit: cover; pointer-events: none; box-shadow: 0 16px 30px rgba(42,13,34,.35); transform-origin: 0 0; }
.box-count { position: absolute; right: -10px; bottom: -14px; background: var(--ink); color: #fff; font-weight: 800; font-size: 14px; padding: 6px 12px; border-radius: 999px; }

@media (max-width: 900px) {
  .hero { padding: 40px 0 32px; }
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: "title" "box" "copy"; row-gap: 28px; }
  .box { margin: 0 auto; }
}

/* sticky box bar on small screens */
.box-bar {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 35; background: var(--ink); color: #fff; border-radius: 16px;
  display: none; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; box-shadow: 0 12px 30px rgba(42,13,34,.35);
}
.box-bar .dots { display: flex; gap: 4px; flex-wrap: wrap; }
.box-bar span { flex: 1; font-size: 14px; font-weight: 600; }
.box-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.25); }
.box-bar .dots i.on { background: var(--magenta); }
.box-bar .btn { min-height: 42px; padding: 0 18px; font-size: 15px; }
@media (max-width: 900px) { .box-bar.show { display: flex; } }

@media (max-width: 640px) {
  .shelf, .shelf[style] { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; row-gap: 32px; }
  .ledge { margin: 0 -8px; height: 10px; }
  .tag { padding: 5px 8px 6px; }
  .tag-name { font-size: 11px; }
  .tag-price { font-size: 12px; }
  .item-add { width: 40px; height: 40px; right: 6px; top: 6px; font-size: 24px; }
  .item-flag { left: 6px; top: 6px; font-size: 11px; padding: 3px 8px; }
  .item-meta { font-size: 13px; }
  .case { padding: 48px 0 56px; }
  .section { padding: 64px 0; }
  .season { padding: 64px 0 72px; }
  .head-row { margin-bottom: 28px; }
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }

.cakes-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; align-items: start; }
.cakes-aside { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 14px; }
.cakes-aside h3 { font-family: var(--display); font-size: 28px; font-weight: 800; line-height: 1.05; }
.size-guide { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.size-guide li { border-bottom: 1px solid var(--line); padding: 14px 0; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; }
.size-guide b { font-family: var(--display); font-size: 24px; font-weight: 800; line-height: 1.1; }
.size-guide span { text-align: right; font-weight: 700; align-self: center; }
.size-guide small { grid-column: 1 / -1; color: var(--ink-2); font-size: 14px; }
@media (max-width: 960px) { .cakes-layout { grid-template-columns: 1fr; } .cakes-aside { position: static; } }

/* Occasions */
.occasions { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.occ-list { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--line); }
.occ-list a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--ink);
}
.occ-list .display { font-size: clamp(36px, 5vw, 64px); line-height: 1; transition: color .15s; }
.occ-list small { font-size: 14px; color: var(--ink-2); text-align: right; }
.occ-list a:hover .display, .occ-list a[aria-current="true"] .display { color: var(--raspberry); }
.occ-photo { position: relative; aspect-ratio: 4 / 5; border-radius: 8px; overflow: hidden; background: var(--glass); }
.occ-photo img { width: 100%; height: 100%; object-fit: cover; }
.occ-photo .tag { position: absolute; left: 16px; bottom: 16px; }
@media (max-width: 860px) { .occasions { grid-template-columns: 1fr; gap: 32px; } .occ-photo { aspect-ratio: 4 / 3; order: -1; } }

/* Seasonal band */
.season { background: var(--xmas); color: #fff; padding: 88px 0 96px; }
.season h2 { color: #fff; }
.season .head-row p { color: #cfe2da; }
.season .shelf { --item: 220px; }
.season .tag { background: var(--xmas-red); }
.season .ledge { background: linear-gradient(rgba(255,255,255,.55) 0 2px, rgba(255,255,255,.2) 2px, rgba(255,255,255,.08)); box-shadow: none; }
.season .btn { background: #fff; border-color: #fff; color: var(--xmas); }
.season .btn:hover { background: #e6f0eb; border-color: #e6f0eb; }
.season-note { display: inline-block; margin-top: 16px; border: 1.5px solid rgba(255,255,255,.45); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600; }

/* Visit */
.visit { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.storefront { margin: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 40px -24px rgba(42,13,34,.35); }
.storefront svg { display: block; width: 100%; height: auto; }
.outlets { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.outlets li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.outlets b { font-family: var(--display); font-size: 30px; font-weight: 800; line-height: 1; }
.outlets span { color: var(--ink-2); font-size: 15px; grid-column: 1 / -1; }
.outlets .hours { grid-column: 2; grid-row: 1; text-align: right; font-weight: 700; color: var(--ink); align-self: center; }
.rating { margin-top: 28px; display: flex; flex-direction: column; gap: 6px; }
.rating .stars { position: relative; font-size: 24px; letter-spacing: 4px; color: #e7d6e1; margin: 0; width: max-content; }
.rating .stars::before { content: "★★★★★"; }
.rating .stars span { position: absolute; inset: 0; width: var(--pct); overflow: hidden; color: var(--magenta); white-space: nowrap; }
.rating .stars span::before { content: "★★★★★"; }
.rating-line { margin: 0; font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.15; }
.checker { margin-top: 56px; background: var(--glass); border-radius: 16px; padding: 28px 32px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 40px; align-items: center; }
.checker h3 { font-family: var(--display); font-size: 30px; font-weight: 800; line-height: 1.05; margin-bottom: 6px; }
.checker p { margin: 0; color: var(--ink-2); }
.checker form { display: flex; gap: 10px; }
.checker form .btn { flex: none; }
.checker .result { grid-column: 2; }
.result { margin: 0; font-weight: 600; min-height: 1.5em; }
.result.ok { color: var(--ok); }
.result.no { color: var(--warn); }
@media (max-width: 860px) {
  .visit { grid-template-columns: 1fr; gap: 32px; }
  .checker { grid-template-columns: 1fr; padding: 24px; margin-top: 40px; }
  .checker .result { grid-column: 1; }
}

/* Flavour family filter */
.fam-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.fam-filter button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid #d8ccd4; background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
.fam-filter button:hover { border-color: var(--ink); }
.fam-filter button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (max-width: 640px) { .fam-filter { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--gut) * -1); padding: 0 var(--gut) 4px; scrollbar-width: none; } .fam-filter button { flex: none; } }

/* Review */
.review { text-align: center; max-width: 920px; margin: 0 auto; }
.review blockquote { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(26px, 3.4vw, 42px); line-height: 1.18; }
.review figcaption { margin-top: 22px; color: var(--ink-2); }
.review figcaption b { color: var(--ink); }
.stars { color: var(--magenta); letter-spacing: 4px; font-size: 20px; margin-bottom: 18px; }

/* Footer */
.footer { background: var(--ink); color: #e9dbe4; padding: 72px 0 28px; position: relative; }
.footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -11px; height: 12px;
  background: radial-gradient(circle at 14px 12px, var(--ink) 13.5px, transparent 14px) 0 0 / 28px 12px repeat-x;
}
.footer a { color: #e9dbe4; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot-col { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.foot-col h4 { margin: 0 0 6px; color: #fff; font-size: 15px; }
.foot-brand img { height: 64px; width: auto; background: #fff; padding: 8px 14px; border-radius: 14px; box-sizing: content-box; }
.foot-brand p { margin: 14px 0 0; max-width: 22em; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; color: #bda9b6; }
.foot-bottom nav { display: flex; flex-wrap: wrap; gap: 18px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

.wa {
  position: fixed; right: 18px; bottom: 18px; z-index: 30; width: 56px; height: 56px; border-radius: 50%; background: #1f9d55;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px rgba(0,0,0,.2);
}
@media (max-width: 900px) { body.has-bar .wa { bottom: 84px; } }

/* ---------- Shop page ---------- */
.page-top { padding-top: 56px; padding-bottom: 28px; }
.crumbs { font-size: 14px; color: var(--ink-2); margin-bottom: 14px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--raspberry); text-decoration: underline; }
.page-top p { margin: 14px 0 0; color: var(--ink-2); max-width: 36em; font-size: 17px; }
.tabs { display: flex; gap: 26px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs a { white-space: nowrap; padding: 14px 0; color: var(--ink-2); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="true"] { color: var(--ink); border-color: var(--magenta); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0 0; font-size: 14px; color: var(--ink-2); }
.toolbar select { width: auto; min-height: 40px; font-size: 14px; }
.shop-case { padding-top: 40px; }
.empty { text-align: center; padding: 72px 16px; grid-column: 1 / -1; }
.empty h3 { font-family: var(--display); font-size: 32px; font-weight: 800; }
.empty p { color: var(--ink-2); }

/* ---------- Product page ---------- */
.pdp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; align-items: start; padding-top: 40px; padding-bottom: 88px; }
.pdp-photo { position: sticky; top: 24px; }
.pdp-photo .frame { aspect-ratio: 1; border-radius: 8px 8px 0 0; overflow: hidden; background: var(--glass); }
.pdp-photo .frame img { width: 100%; height: 100%; object-fit: cover; }
.pdp-photo .ledge { margin: 0; height: 14px; }
.pdp-photo .tag { margin-top: -2px; margin-left: 24px; }
.pdp-info { display: flex; flex-direction: column; gap: 24px; }
.pdp-info h1 { font-size: clamp(40px, 5vw, 64px); }
.pdp-price { font-family: var(--display); font-size: 34px; font-weight: 800; line-height: 1; }
.pdp-desc { margin: 0; font-size: 17px; line-height: 1.65; color: var(--ink-2); max-width: 34em; }
.opt { display: flex; flex-direction: column; gap: 10px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button {
  min-height: 52px; padding: 6px 18px; border-radius: 12px; border: 1.5px solid #d8ccd4; background: #fff; cursor: pointer; font-weight: 700;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; line-height: 1.25;
}
.seg button small { font-weight: 400; color: var(--ink-2); font-size: 13px; }
.seg button[aria-checked="true"] { border-color: var(--raspberry); background: #fff1f6; box-shadow: inset 0 0 0 1px var(--raspberry); }
.buy { display: flex; gap: 12px; flex-wrap: wrap; }
.buy .btn { flex: 1 1 220px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid #d8ccd4; border-radius: 999px; }
.qty button { width: 44px; height: 44px; border: none; background: none; border-radius: 50%; font-size: 20px; cursor: pointer; }
.qty button:hover { background: var(--glass); }
.qty output, .qty span { min-width: 28px; text-align: center; font-weight: 700; }
.facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); font-size: 15px; }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts li span:first-child { color: var(--ink-2); }
.facts li span:last-child { font-weight: 600; text-align: right; }
.note { border-left: 3px solid var(--magenta); padding: 4px 0 4px 14px; color: var(--ink-2); font-size: 15px; }
.upload { position: relative; display: flex; align-items: center; gap: 16px; border: 1.5px dashed #c9b3c2; border-radius: 12px; padding: 16px; cursor: pointer; }
.upload:hover { border-color: var(--raspberry); background: #fff6fa; }
.upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upload:focus-within { outline: 3px solid var(--magenta); outline-offset: 2px; }
.upload .thumb { width: 64px; height: 64px; border-radius: 8px; background: var(--glass); flex: none; overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--ink-2); font-size: 26px; }
.upload .thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload b { display: block; }
.upload small { color: var(--ink-2); }
.wa-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: #157a46; text-decoration: none; }
.wa-link:hover { color: #0f5c34; text-decoration: underline; }
@media (max-width: 900px) { .pdp { grid-template-columns: 1fr; gap: 32px; padding-top: 16px; } .pdp-photo { position: static; } }

.pdp .box { margin: 0; max-width: 460px; }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.pick {
  display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 5px; border: 1.5px solid var(--line); border-radius: 999px;
  background: #fff; cursor: pointer; text-align: left; font-weight: 600; font-size: 14px; line-height: 1.2;
}
.pick img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; }
.pick:hover:not([disabled]) { border-color: var(--raspberry); }
.pick[aria-pressed="true"] { border-color: var(--magenta); background: #fff3fd; }
.pdp-box-link { margin: -8px 0 0; font-size: 15px; color: var(--ink-2); }
.pick .n { margin-left: auto; min-width: 22px; height: 22px; border-radius: 11px; background: var(--magenta); color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.pick .n:empty { display: none; }

/* ---------- Bag drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(42,13,34,.45); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 60; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: #fff; z-index: 70;
  transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column; visibility: hidden;
}
.drawer.open { transform: none; visibility: visible; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 32px; }
.drawer-body { flex: 1; overflow: auto; padding: 8px 24px 16px; }
.drawer-foot { padding: 18px 24px 24px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.meter { padding: 14px 0 6px; font-size: 14px; color: var(--ink-2); }
.meter .bar { height: 6px; background: var(--glass); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.meter .bar i { display: block; height: 100%; background: var(--magenta); transition: width .3s; }

.line { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line img { width: 76px; height: 76px; object-fit: cover; border-radius: 6px; }
.line h4 { margin: 0; font-size: 15px; }
.line h4 a { color: var(--ink); text-decoration: none; }
.line .meta { font-size: 13px; color: var(--ink-2); margin-top: 3px; line-height: 1.4; }
.line .qty { margin-top: 8px; border-width: 1px; }
.line .qty button { width: 34px; height: 34px; font-size: 17px; }
.line .right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; font-weight: 700; white-space: nowrap; }
.remove { border: none; background: none; padding: 0; color: var(--ink-2); font-size: 13px; text-decoration: underline; cursor: pointer; }
.remove:hover { color: var(--raspberry); }
.sum { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.sum.total { font-size: 19px; font-weight: 800; padding-top: 10px; border-top: 1px solid var(--line); }
.drawer .empty { padding: 56px 0; }

/* ---------- Bag + checkout pages ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 56px; align-items: start; padding-top: 8px; padding-bottom: 96px; }
.summary { position: sticky; top: 24px; background: var(--glass); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.summary h2 { font-size: 32px; }
.coupon { display: flex; gap: 8px; }
.coupon .input { min-height: 44px; }
.coupon .btn { min-height: 44px; padding: 0 18px; }
.msg { font-size: 14px; margin: 0; }
.msg.ok { color: var(--ok); }
.msg.no { color: var(--warn); }
.step { border: none; margin: 0 0 40px; padding: 0; display: grid; gap: 14px; min-width: 0; }
.step legend { font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1.1; padding: 0; margin-bottom: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.options label { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1.5px solid #d8ccd4; border-radius: 12px; cursor: pointer; }
.options label:has(input:checked) { border-color: var(--raspberry); background: #fff1f6; box-shadow: inset 0 0 0 1px var(--raspberry); }
.options input { accent-color: var(--raspberry); margin-top: 4px; }
.options b { display: block; }
.options small { color: var(--ink-2); font-size: 13px; }
.thanks { grid-column: 1 / -1; text-align: center; padding: 56px 0; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.thanks .box { max-width: 300px; margin: 0 auto 8px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } .summary { position: static; } }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }

/* Area dialog */
dialog { border: none; border-radius: 16px; padding: 28px; width: min(440px, calc(100% - 32px)); box-shadow: 0 30px 60px rgba(42,13,34,.3); color: var(--ink); }
dialog::backdrop { background: rgba(42,13,34,.45); }
dialog h2 { font-size: 34px; margin-bottom: 8px; }
dialog p { margin: 0; color: var(--ink-2); }
dialog form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translate(-50%, 160%); transition: transform .25s;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px; font-weight: 600; font-size: 15px; max-width: calc(100% - 32px);
  visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.proto { position: fixed; left: 12px; bottom: 12px; z-index: 20; font-size: 11px; background: rgba(42,13,34,.8); color: #fff; padding: 5px 9px; border-radius: 6px; }
@media (max-width: 900px) { .proto { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Experience layer: planner, quick view, search, bag, checkout ---------- */
.link-btn { background: none; border: none; padding: 0; color: var(--raspberry); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; }
.awning .link-btn, .awning .area-btn { color: #fff; }
.warn { color: var(--warn); font-weight: 700; }

/* planner dialog */
#plan-dialog { width: min(520px, calc(100% - 24px)); }
#plan-dialog form { margin-top: 0; }
.toggle2 { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: var(--glass); border-radius: 14px; gap: 4px; }
.toggle2 label { position: relative; }
.toggle2 input { position: absolute; opacity: 0; }
.toggle2 span { display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 10px; font-weight: 700; cursor: pointer; color: var(--ink-2); }
.toggle2 input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(42,13,34,.14); }
.toggle2 input:focus-visible + span { outline: 3px solid var(--magenta); }
.days { border: none; padding: 0; margin: 0; min-width: 0; }
.day-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.day-chips label { position: relative; }
.day-chips input { position: absolute; opacity: 0; }
.day-chips span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: 4px 6px; border: 1.5px solid #d8ccd4; border-radius: 12px; font-weight: 600; font-size: 14px; cursor: pointer; line-height: 1.2; }
.day-chips input:checked + span { border-color: var(--raspberry); background: #fff1f6; box-shadow: inset 0 0 0 1px var(--raspberry); }
.day-chips input:focus-visible + span { outline: 3px solid var(--magenta); }
#day-note { margin-top: 10px; color: var(--ink-2); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
@media (max-width: 480px) { .day-chips { grid-template-columns: repeat(3, 1fr); } dialog { padding: 22px; } }

/* quick view */
.quick { width: min(860px, calc(100% - 24px)); padding: 0; overflow: hidden; display: none; }
.quick[open] { display: grid; grid-template-columns: 1fr 1fr; }
.quick-photo { position: relative; background: var(--glass); padding: 28px 28px 40px; }
.quick-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px 8px 0 0; }
.quick-photo .ledge { margin: 0 -8px; }
.quick-photo .tag { margin-top: -2px; margin-left: 16px; }
.quick-body { padding: 40px 32px 32px; display: flex; flex-direction: column; gap: 14px; }
.quick-body h2 { font-size: 40px; }
.quick-body p { margin: 0; color: var(--ink-2); line-height: 1.6; }
.quick-body .quick-fam { color: var(--raspberry); font-weight: 700; font-size: 14px; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.quick-close { position: absolute; top: 10px; right: 10px; z-index: 2; background: #fff; }
@media (max-width: 720px) {
  .quick[open] { grid-template-columns: 1fr; max-height: 92vh; overflow: auto; margin: auto auto 0; border-radius: 20px 20px 0 0; width: 100%; max-width: 100%; }
  .quick-photo { padding: 20px 20px 32px; }
  .quick-photo img { max-height: 42vh; }
  .quick-body { padding: 8px 20px 28px; }
  .quick-body h2 { font-size: 32px; }
  .quick-actions .btn { flex: 1 1 100%; }
}

/* search suggestions */
.suggest { list-style: none; margin: 0 auto; padding-bottom: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 16px; }
.suggest a { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; color: var(--ink); text-decoration: none; }
.suggest a:hover, .suggest a:focus-visible { background: var(--glass); }
.suggest img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.suggest b { display: block; font-size: 15px; }
.suggest small { color: var(--ink-2); }
.suggest .all { grid-column: 1 / -1; }
.suggest .all a { color: var(--raspberry); font-weight: 700; }
.suggest .none { color: var(--ink-2); padding: 8px; grid-column: 1 / -1; }

/* bag */
.plan-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; padding: 10px 12px; background: var(--glass); border-radius: 10px; }
.plan-row.is-late { background: #fff1f6; }
.plan-row small { color: var(--warn); font-weight: 600; }
.foot-links { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.foot-links a:first-child { color: var(--ink-2); }

/* toast with action */
.toast { display: flex; align-items: center; gap: 16px; }
#toast-action { background: none; border: none; color: #ff9cf5; font-weight: 800; cursor: pointer; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }

/* checkout */
.field-error { margin: 6px 0 0; color: var(--warn); font-size: 14px; font-weight: 600; min-height: 0; }
.field-error:empty { display: none; }
.input[aria-invalid="true"] { border-color: var(--warn); }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1.5px solid #d8ccd4; border-radius: 12px; cursor: pointer; }
.check:has(input:checked) { border-color: var(--raspberry); background: #fff1f6; }
.check input { accent-color: var(--raspberry); margin-top: 4px; width: 18px; height: 18px; }
#gift-fields { display: grid; gap: 14px; }
#gift-fields[hidden] { display: none; }
.summary details summary { list-style: none; display: flex; justify-content: space-between; align-items: baseline; cursor: pointer; font-family: var(--display); font-weight: 800; font-size: 28px; }
.summary details summary::-webkit-details-marker { display: none; }
.summary details summary b { font-family: var(--body); font-size: 18px; }
.summary details summary::after { content: "Show"; font-family: var(--body); font-size: 14px; font-weight: 700; color: var(--raspberry); margin-left: 12px; }
.summary details[open] summary::after { content: "Hide"; }
.sum-lines { display: grid; gap: 10px; margin-top: 14px; }
@media (max-width: 900px) { .split .summary { order: -1; } }
.next-steps { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 12px; text-align: left; max-width: 460px; }
.next-steps li { background: var(--glass); border-radius: 12px; padding: 14px 18px; color: var(--ink-2); }
.next-steps b { display: block; color: var(--ink); }

/* ---------- Top-tier polish ---------- */
/* Page-to-page crossfade, and the tapped product photo grows into the product page (Chrome, Edge, Safari 18+). */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
::view-transition-group(product-photo) { animation-duration: .38s; animation-timing-function: cubic-bezier(.3,.7,.2,1); }

/* Photos fade in on the glass colour instead of popping. */
.item-photo img, .frame img, .occ-photo img, .quick-photo img { opacity: 0; transition: opacity .35s ease; }
.item-photo img.ok, .frame img.ok, .occ-photo img.ok, .quick-photo img.ok { opacity: 1; }
.item-photo img { transition: opacity .35s ease, transform .5s cubic-bezier(.2,.8,.2,1); }
@media (hover: hover) { .item-photo:hover img { transform: scale(1.04); } }

/* Prices line up */
.tag-price, .pdp-price, .box-total b, .sum, .line .right, .seg small { font-variant-numeric: tabular-nums; }

/* Not ready for the chosen day */
.item-flag.flag-late { background: var(--ink); color: #fff; }
.item.is-late .item-photo img.ok { filter: saturate(.6); opacity: .85; }

/* Live cake preview */
.frame { position: relative; }
.cake-preview { position: absolute; left: 22%; right: 22%; top: 27%; height: 26%; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
#photo-preview { width: 70%; aspect-ratio: 1.6; object-fit: cover; border-radius: 50%; transform: scaleY(.62); box-shadow: 0 0 0 3px rgba(255,255,255,.85); opacity: .95; }
#msg-preview { font-family: "Dancing Script", cursive; font-weight: 700; font-size: clamp(20px, 3.2vw, 36px); line-height: 1.1; color: #ff4fd8; text-align: center; transform: rotate(-4deg);
  text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff, 0 2px 6px rgba(60,0,40,.25); }
#photo-preview:not([hidden]) + #msg-preview { margin-top: -6%; }
.preview-chip { position: absolute; left: 14px; top: 14px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }

/* Visual size guide: cake tops to scale next to a dinner plate */
.size-viz { display: flex; align-items: flex-end; gap: 18px; padding: 8px 0 2px; }
.size-viz span { --px: calc(var(--d) * 13px); width: var(--px); height: var(--px); border-radius: 50%; border: 2px dashed #d3c2cd; display: flex; align-items: center; justify-content: center; transition: background .2s, border-color .2s; }
.size-viz span.on { background: #ffd9f7; border: 2px solid var(--magenta); }
.size-viz i { font-style: normal; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.size-viz .plate { --d: 10.5; border: 2px solid #e6dde3; background: repeating-radial-gradient(circle, #fff 0 18px, #f6f1f4 18px 19px); }
.size-viz .plate i { color: #a493a0; font-weight: 600; }
@media (max-width: 480px) { .size-viz span { --px: calc(var(--d) * 10px); } }

/* Sticky buy bar on phones */
.buy-bar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 35; display: none; align-items: center; gap: 12px; padding: 10px 10px 10px 16px;
  background: var(--ink); color: #fff; border-radius: 16px; box-shadow: 0 12px 30px rgba(42,13,34,.35); transform: translateY(140%); transition: transform .25s ease; }
.buy-bar span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.buy-bar b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buy-bar small { font-size: 13px; opacity: .8; font-variant-numeric: tabular-nums; }
.buy-bar .btn { min-height: 44px; padding: 0 20px; font-size: 15px; }
@media (max-width: 900px) { .buy-bar { display: flex; } .buy-bar.show { transform: none; } body:has(.buy-bar.show) .wa { bottom: 84px; } }

/* Shop toolbar */
.toolbar-left { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.ready-toggle { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); cursor: pointer; }
.ready-toggle input { accent-color: var(--raspberry); width: 18px; height: 18px; }

/* Buttons feel pressed */
.btn { transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; }
.btn:not([disabled]):hover { box-shadow: 0 6px 16px -6px rgba(176,18,79,.5); }

/* ---------- Box, round 3: mixes, lid note, drag and drop, send-off ---------- */
.box-extras { display: flex; flex-direction: column; gap: 12px; }
.mixes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mixes-label { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-right: 4px; }
.mixes button { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1.5px solid #e2d4dd; background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.mixes button:hover { border-color: var(--magenta); color: var(--tag); }
.mixes button[data-mix="surprise"] { border-style: dashed; }
.lid-note-field summary { cursor: pointer; font-weight: 700; color: var(--raspberry); font-size: 15px; list-style: none; width: max-content; }
.lid-note-field summary::-webkit-details-marker { display: none; }
.lid-note-field summary::before { content: "+ "; }
.lid-note-field[open] summary::before { content: "\2212  "; }
.lid-note-field summary small { color: var(--ink-2); font-weight: 500; }
.lid-note-field .input { margin-top: 10px; max-width: 360px; }
@media (max-width: 640px) { .mixes { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--gut) * -1); padding: 0 var(--gut) 4px; scrollbar-width: none; } .mixes button, .mixes-label { flex: none; } }

/* the note, handwritten on a white sticker on the lid */
.lid-note { position: absolute; right: 9%; top: 50%; transform: translateY(-50%) rotate(-3deg); max-width: 50%; z-index: 1;
  background: #fff; color: var(--raspberry); font-family: "Dancing Script", cursive; font-weight: 700; font-size: clamp(14px, 2vw, 20px); line-height: 1.1;
  padding: 4px 12px 5px; border-radius: 6px; box-shadow: 0 2px 6px rgba(80,0,60,.25); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.box-caption { margin: 22px 4px 0; font-size: 14px; color: var(--ink-2); line-height: 1.45; text-align: center; min-height: 2.9em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* flavour name on hover over a cupcake in the box */
.cup.filled::after { content: attr(data-name) "\A Take out"; white-space: pre; text-align: center; line-height: 1.25; font-size: 11px; padding: 0 6px; }

/* drag and drop */
.item[draggable="true"] .item-photo { cursor: grab; }
.box.drag-over .box-tray { box-shadow: inset 0 0 0 3px #fff, inset 0 4px 10px rgba(140,0,120,.28); }
.cup.target { outline: 3px dashed #fff; outline-offset: 3px; }
.pick[draggable="true"] { cursor: grab; }

/* the lid closes before the box flies to the bag */
.box.closing .box-lid { animation: lid-close .42s cubic-bezier(.5,0,.4,1) forwards; z-index: 3; }
@keyframes lid-close {
  from { transform: perspective(900px) rotateX(30deg); }
  to { transform: perspective(900px) rotateX(178deg) translateY(-4px); background: #c707bb; }
}
.box.closing .box-lid > * { opacity: 0; transition: opacity .1s .15s; }
.box.closing .box-caption, .box.closing .box-count { opacity: 0; transition: opacity .2s; }
/* grid children must be allowed to shrink, or long rows (mixes, captions) widen the page */
.pdp > *, .hero-grid > *, .split > *, .visit > * { min-width: 0; }
@media (max-width: 900px) { .pdp { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Every product gets the same care ---------- */
/* shelf control: + turns into a stepper once it's in the bag */
.item-ctl { position: absolute; right: 10px; top: 10px; z-index: 2; }
.item-ctl .item-add { position: static; }
.item-step { display: flex; align-items: center; background: var(--magenta); color: #fff; border-radius: 999px; box-shadow: 0 4px 12px rgba(42,13,34,.2); animation: pop .25s ease-out; }
.item-step button { width: 38px; height: 40px; border: none; background: none; color: #fff; font-size: 20px; font-weight: 700; cursor: pointer; border-radius: 999px; }
.item-step button:hover { background: rgba(255,255,255,.18); }
.item-step span { min-width: 18px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
@keyframes pop { from { transform: scale(.7); opacity: .4; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) { .item-ctl { right: 6px; top: 6px; } .item-step button { width: 32px; height: 36px; } }

/* bag: goes well with */
.pairs { margin-top: 20px; padding: 16px; background: var(--glass); border-radius: 14px; display: grid; gap: 10px; }
.pairs h3 { font-family: var(--display); font-size: 22px; font-weight: 800; }
.pair { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; }
.pair img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.pair b { display: block; font-size: 14px; }
.pair small { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pair .item-add { position: static; width: 36px; height: 36px; font-size: 22px; box-shadow: 0 2px 6px rgba(42,13,34,.15); }

/* piping colour */
.piping { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.piping button { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px 0 8px; border-radius: 999px; border: 1.5px solid #d8ccd4; background: #fff; font-weight: 600; cursor: pointer; }
.piping i { width: 20px; height: 20px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.piping button[aria-checked="true"] { border-color: var(--raspberry); box-shadow: inset 0 0 0 1px var(--raspberry); }
#msg-preview { color: var(--pipe, #ff4fd8); }
#msg-preview.pipe-white { text-shadow: 0 0 2px #5a2b1a, 0 0 3px #5a2b1a, 0 2px 6px rgba(0,0,0,.35); }

/* celebration add-ons */
.extras { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.extra { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border: 1.5px solid #e2d4dd; border-radius: 12px; cursor: pointer; background: #fff; }
.extra input { position: absolute; opacity: 0; }
.extra img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; }
.extra b { display: block; font-size: 13px; line-height: 1.2; }
.extra small { color: var(--ink-2); font-size: 12px; }
.extra:has(input:checked) { border-color: var(--magenta); background: #fff3fd; box-shadow: inset 0 0 0 1px var(--magenta); }
.extra:has(input:checked)::after { content: "\2713"; position: absolute; right: 8px; top: 6px; color: var(--tag); font-weight: 800; }
.extra:has(input:focus-visible) { outline: 3px solid var(--magenta); outline-offset: 2px; }

/* props drawn on the cake preview */
.cake-props { position: absolute; inset: 0; pointer-events: none; }
.prop { position: absolute; display: block; animation: pop .3s ease-out; }
.prop svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 3px 4px rgba(0,0,0,.25)); }
.prop-topper { left: 30%; width: 40%; top: 6%; }
.prop-sparkler { left: 30%; width: 7%; top: 12%; }
.prop-candle { right: 30%; width: 7%; top: 17%; }
.spark { transform-origin: 30px 36px; animation: twinkle .6s ease-in-out infinite alternate; }
.flame { transform-origin: 30px 30px; animation: flicker .25s ease-in-out infinite alternate; }
@keyframes twinkle { from { transform: scale(.85) rotate(0); } to { transform: scale(1.1) rotate(20deg); } }
@keyframes flicker { from { transform: scaleY(.9) skewX(-4deg); } to { transform: scaleY(1.1) skewX(4deg); } }

/* bundle contents as a mini box */
.inside { display: flex; flex-direction: column; gap: 10px; }
.box.mini { max-width: 300px; margin: 0; }
.box.mini .box-base { padding: 10px; }
.box.mini .box-tray { padding: 10px; gap: 8px; }
.box.mini .cup { cursor: default; }
.box.mini .cup::after { display: none; }
.bento-cell em { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); background: var(--ink); color: #fff; font-style: normal; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px; white-space: nowrap; }
.inside-list { margin: 0; font-size: 14px; color: var(--ink-2); }

/* gift card preview */
.gift-card { aspect-ratio: 1.586; border-radius: 22px; padding: clamp(20px, 4vw, 36px); color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(circle at 85% 15%, rgba(255,255,255,.35), transparent 40%), linear-gradient(135deg, #ff10f0, #b0124f);
  box-shadow: 0 30px 60px -24px rgba(176,18,79,.6); display: flex; flex-direction: column; gap: 6px; }
.gift-card::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 200px; height: 200px; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255,255,255,.18) 0 6deg, transparent 6deg 12deg); }
.gift-card img { height: 40px; width: auto; align-self: flex-start; filter: brightness(0) invert(1); }
.gift-card b { font-family: var(--display); font-weight: 800; font-size: clamp(40px, 7vw, 72px); line-height: 1; margin-top: auto; font-variant-numeric: tabular-nums; }
.gift-card span { font-weight: 700; font-size: 18px; }
.gift-card p { margin: 0; font-family: "Dancing Script", cursive; font-weight: 700; font-size: clamp(18px, 2.4vw, 24px); max-width: 80%; position: relative; z-index: 1; }
.gift-card small { opacity: .85; position: relative; z-index: 1; }
.gift-fields { gap: 14px; }
.box.mini .bento-cell { grid-column: span 2; grid-row: span 2; }
.box.mini .bento-cell em { bottom: 6%; font-size: 11px; }
.order-now { display: none; }
