/* Breadcrumb */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 0; list-style: none; font-size: 12px; color: var(--muted); }
.crumbs li { display: inline-flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
.crumbs a:hover { color: var(--brown); }
.crumbs [aria-current] { color: var(--ink); }
.gb > .crumbs { padding-block: 20px 22px; }

/* Layout */
.gb-main {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px);
  align-items: start; padding-bottom: clamp(48px, 5vw, 80px);
}

/* Media */
.gb-media {
  position: sticky; top: calc(var(--header-h) + 60px); aspect-ratio: 1; overflow: hidden;
  border-radius: 24px; background: var(--cream); box-shadow: var(--shadow);
}
.gb-media img { width: 100%; height: 100%; object-fit: cover; }
.gb-media__tag {
  position: absolute; left: 16px; top: 16px; padding: 6px 14px; border-radius: 99px; background: rgba(255, 255, 255, .92);
  font-size: 10.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink);
}

/* Head */
.gb-title { font: 600 clamp(38px, 4vw, 54px)/1.05 var(--serif); color: var(--ink); }
.gb-lede { max-width: 540px; margin-top: 12px; font-size: 14.5px; line-height: 1.75; color: var(--text); }
.gb-eta { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.gb-eta svg { width: 17px; height: 17px; color: var(--gold); flex: none; }
.gb-eta strong { font-weight: 500; color: var(--ink); }
.gb-eta .is-today { color: #3f6b3a; }

.gb-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.gb-price strong { font: 600 36px/1 var(--serif); color: var(--ink); }
.gb-price span { font-size: 13px; color: var(--muted); }
.gb-price__for { margin-left: auto; padding: 4px 12px; border-radius: 99px; background: var(--cream); color: var(--ink) !important; }

/* Options */
.gb-opt { min-width: 0; margin: 24px 0 0; padding: 0; border: 0; }
.gb-label {
  display: block; margin-bottom: 10px; padding: 0;
  font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
}
.gb-label span { margin-left: 6px; font-weight: 400; letter-spacing: .02em; text-transform: none; color: var(--muted); }

.gb-sizes { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 10px; }
.gb-size { position: relative; cursor: pointer; }
.gb-size input { position: absolute; opacity: 0; pointer-events: none; }
.gb-size span {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: center;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.gb-size b { font-size: 14px; font-weight: 500; color: var(--ink); }
.gb-size small { font-size: 12px; color: var(--muted); }
.gb-size:hover span { border-color: rgba(184, 138, 74, .6); }
.gb-size input:checked + span { border-color: var(--brown); background: #fffaf4; box-shadow: inset 0 0 0 1px var(--brown); }
.gb-size input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Builder */
.gb-build { padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.gb-build__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; }
.gb-build__head .gb-label { margin: 0; }
.gb-count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.gb-count b { font-weight: 600; color: var(--ink); }
.gb-count.is-full b { color: #3f6b3a; }

.gb-build__grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 16px; align-items: start; margin-top: 14px; }
.gb-build__box { min-width: 0; }
.gb-tray {
  display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 48px)); justify-content: center; align-content: center;
  gap: 10px; min-height: 260px; margin: 0; padding: 18px 12px; list-style: none;
  border: 6px solid #e9dccd; border-radius: 18px; background: var(--cream);
  box-shadow: inset 0 2px 8px rgba(60, 35, 20, .08);
}
.gb-slot {
  position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1;
  border: 1.5px dashed rgba(184, 138, 74, .55); border-radius: 50%; background: rgba(255, 255, 255, .55);
  font-size: 11px; color: var(--muted);
}
.gb-slot.is-on { border: 0; background: none; animation: gb-pop .22s var(--ease); }
.gb-slot button { width: 100%; height: 100%; border-radius: inherit; }
.gb-slot button:hover::after,
.gb-slot button:focus-visible::after {
  content: "×"; position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit;
  background: rgba(43, 26, 18, .5); color: #fff; font-size: 20px; line-height: 1;
}

/* Pieces */
.gb-fl__piece,
.gb-slot.is-on button { background: var(--c); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12), 0 3px 8px rgba(60, 35, 20, .16); }
.gb--macaron-box .gb-fl__piece,
.gb--macaron-box .gb-slot.is-on button {
  border-radius: 50% / 46%;
  background: linear-gradient(180deg, var(--c) 0 40%, #f4e9dc 40% 60%, var(--c) 60%);
}
.gb--chocolate-box .gb-slot { border-radius: 12px; }
.gb--chocolate-box .gb-fl__piece { border-radius: 8px; }
.gb--chocolate-box .gb-slot.is-on button {
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .28), transparent 45%), var(--c);
}

.gb-flavours { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 0; }
.gb-fl {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 9px 9px 12px;
  border: 1px solid var(--line); border-radius: 14px; transition: border-color .2s, background-color .2s;
}
.gb-fl.is-picked { border-color: rgba(90, 55, 32, .45); background: #fffaf4; }
.gb-fl__piece { width: 30px; height: 30px; flex: none; border-radius: 50%; }
.gb-fl__name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500; line-height: 1.3; color: var(--ink); }
.gb-step { display: flex; align-items: center; gap: 4px; flex: none; }
.gb-step button {
  display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); font-size: 17px; line-height: 1; color: var(--ink); transition: border-color .2s, background-color .2s;
}
.gb-step button:hover { border-color: var(--brown); background: var(--bg); }
.gb-step b { min-width: 20px; text-align: center; font-size: 14px; font-weight: 600; color: var(--ink); }

.gb-build__acts { display: flex; justify-content: center; gap: 20px; margin-top: 14px; }
.gb-link {
  padding-bottom: 2px; border-bottom: 1px solid var(--gold);
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
}
.gb-link:hover { color: var(--brown); }
.gb-err { margin-top: 12px; font-size: 12.5px; color: var(--wine); }
.gb-err:empty { display: none; }

.gb-fixed { margin-top: 24px; padding: 16px 18px; border-radius: 16px; background: var(--cream); font-size: 14px; color: var(--text); }
.gb-soon { margin-top: 24px; padding: 18px; border-radius: 16px; background: var(--cream); font-size: 14px; }
.gb-soon a { color: var(--ink); border-bottom: 1px solid var(--gold); }

/* Note */
.gb-field { position: relative; }
.gb-field input {
  display: block; width: 100%; height: 50px; padding: 0 70px 0 18px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); font-size: 14px; color: var(--ink); transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.gb-field input::placeholder { color: #a39488; }
.gb-field input:focus { outline: none; background: var(--surface); border-color: rgba(90, 55, 32, .5); box-shadow: 0 0 0 4px rgba(184, 138, 74, .12); }
.gb-field span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 11.5px; color: var(--muted); pointer-events: none; }

/* Buy */
.gb-buy { display: flex; gap: 12px; margin-top: 26px; }
.gb-qty { display: flex; align-items: center; flex: none; height: 50px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.gb-qty button { width: 42px; height: 100%; font-size: 18px; color: var(--ink); }
.gb-qty input { width: 28px; border: 0; background: none; text-align: center; font-weight: 500; }
.gb-qty input:focus { outline: none; }
.gb-add { flex: 1; min-height: 50px; }
.gb-add.is-busy { opacity: .7; }
.gb-tax { margin-top: 10px; font-size: 12px; color: var(--muted); }

/* Others */
.gb-others { padding-block: clamp(48px, 5vw, 80px); background: var(--cream); border-top: 1px solid var(--line); }
.gb-others__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 26px; }
.gb-card {
  display: grid; grid-template-columns: 140px 1fr; gap: 20px; align-items: center; height: 100%; padding: 14px;
  border: 1px solid var(--line); border-radius: 20px; background: var(--surface);
  transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.gb-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.gb-card img { width: 140px; height: 140px; object-fit: cover; border-radius: 14px; background: var(--cream); }
.gb-card h3 { font: 600 24px/1.2 var(--serif); color: var(--ink); }
.gb-card p { margin-top: 4px; font-size: 13px; color: var(--muted); }
.gb-card .gb-card__from { color: var(--ink); font-weight: 500; }
.gb-card .link-arrow { display: inline-block; margin-top: 10px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; padding: 12px 20px; border-radius: 99px;
  background: var(--brown-dark); color: #fff; font-size: 13px; box-shadow: var(--shadow-hover);
  opacity: 0; visibility: hidden; transform: translate(-50%, 10px); transition: opacity .25s, transform .25s, visibility .25s;
}
.toast.is-show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

@keyframes gb-pop {
  from { transform: scale(.6); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* Narrow panel */
@media (min-width: 961px) and (max-width: 1200px) {
  .gb-build__grid { grid-template-columns: 1fr; }
}

/* Tablet */
@media (max-width: 960px) {
  .gb-main { grid-template-columns: 1fr; }
  .gb-media { position: relative; top: auto; width: 100%; max-width: 560px; margin-inline: auto; }
}

/* Mobile */
@media (max-width: 767px) {
  .gb > .crumbs { padding-block: 14px; }
  .gb-main { gap: 24px; }
  .gb-media { border-radius: 18px; }
  .gb-title { font-size: 36px; }
  .gb-price strong { font-size: 32px; }
  .gb-build { padding: 16px 14px; }
  .gb-build__grid { grid-template-columns: 1fr; }
  .gb-tray { gap: 8px; min-height: 0; padding: 14px 10px; }
  .gb--chocolate-box .gb-slot { border-radius: 10px; }
  .gb-sizes { gap: 8px; }
  .gb-size span { padding: 10px 4px; }
  .gb-size b { font-size: 13px; }
  .gb-buy {
    position: sticky; bottom: 0; z-index: 5; margin-inline: calc(var(--gutter) * -1);
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
    background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 -8px 20px rgba(60, 35, 20, .06);
  }
  .gb-others__grid { grid-template-columns: 1fr; gap: 14px; }
  .gb-card { grid-template-columns: 96px 1fr; gap: 14px; }
  .gb-card img { width: 96px; height: 96px; }
  .gb-card h3 { font-size: 21px; }
  .toast { bottom: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  .gb-slot.is-on { animation: none; }
}