/* BMB store cart — floating cart button, add-to-cart toast, and the
   /store/checkout/ summary. Cream palette, literal hex (the theme's var
   tokens are purple-surface values and must not be reused on light surfaces). */

/* ── Floating cart button (stacks ABOVE the site's WhatsApp FAB) ─────────── */
.bmb-cart-fab {
  position: fixed;
  right: clamp(1rem, 2.5vw, 1.5rem);
  /* base offset (matches WA fab) + room for the WA fab (3.5rem) below it */
  bottom: calc(clamp(1rem, 2.5vw, 1.5rem) + env(safe-area-inset-bottom, 0px) + 4.25rem);
  z-index: 46;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: 0 1.1rem 0 1rem;
  height: 3.5rem;
  border-radius: 999px;
  background: #5a1f63;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 14px 30px -12px rgba(42, 12, 48, .6);
  transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s ease, background .2s ease;
}
.bmb-cart-fab:hover,
.bmb-cart-fab:focus-visible { background: #6d2578; transform: translateY(-2px); box-shadow: 0 20px 38px -14px rgba(42,12,48,.7); }
.bmb-cart-fab__icon { flex: 0 0 auto; }
.bmb-cart-fab__label { font-family: var(--sans); font-weight: 700; font-size: .95rem; letter-spacing: -.01em; }
.bmb-cart-fab__badge {
  position: absolute; top: -.35rem; right: -.35rem;
  min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: #f4c9fb; color: #43164c;
  font-family: var(--sans); font-weight: 800; font-size: .78rem; line-height: 1;
  box-shadow: 0 2px 6px -1px rgba(42,12,48,.5);
}
.bmb-cart-fab.pulse { animation: bmbCartPulse .5s cubic-bezier(.16,1,.3,1); }
@keyframes bmbCartPulse { 0% { transform: scale(1); } 40% { transform: scale(1.09); } 100% { transform: scale(1); } }

/* lift the site WhatsApp FAB so the two never overlap */
.has-cart-fab .bmb-wa-fab { bottom: calc(clamp(1rem, 2.5vw, 1.5rem) + env(safe-area-inset-bottom, 0px)); }

/* ── Add-to-cart toast ──────────────────────────────────────────────────── */
.bmb-cart-toast {
  position: fixed;
  left: 50%; bottom: 1.5rem; transform: translate(-50%, 1.5rem);
  z-index: 60;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.1rem; border-radius: 999px;
  background: #2a2540; color: #fff;
  font-family: var(--sans); font-size: .92rem; font-weight: 600;
  box-shadow: 0 16px 36px -14px rgba(20,6,24,.7);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease, transform .35s cubic-bezier(.16,1,.3,1);
}
.bmb-cart-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.bmb-cart-toast svg { color: #7ee0a6; }

/* ── Checkout header + step indicator ───────────────────────────────────── */
.co-head { margin-bottom: clamp(1.8rem, 4vw, 2.8rem); text-align: center; }
.co-head h1 { text-align: center; margin-left: auto; margin-right: auto; }
.co-steps { display: flex; align-items: center; justify-content: center; gap: 0; margin: 0 auto 1.5rem; }
.co-step { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #645c6d; }
.co-step-num {
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #ece4d8; color: #645c6d; font-size: .8rem; line-height: 1;
  transition: background .3s ease, color .3s ease;
}
.co-step.is-current { color: #5a1f63; }
.co-step.is-current .co-step-num,
.co-step.is-done .co-step-num { background: #5a1f63; color: #fff; }
.co-step.is-done { color: #5a1f63; }
.co-step-bar { width: clamp(2rem, 9vw, 4.5rem); height: 2px; background: #e7ded0; margin: 0 .85rem; border-radius: 2px; }
.co-step-bar.is-done { background: #5a1f63; }
/* service-cream.css forces span colour with !important; override at higher weight.
   Numbers on the plum circles read cream; upcoming (light circle) stays dark. */
body.svc-cream .service-preview .co-step-num { color: #645c6d !important; }
body.svc-cream .service-preview .co-step.is-current .co-step-num,
body.svc-cream .service-preview .co-step.is-done .co-step-num { color: #fbf8f4 !important; }
body.svc-cream .service-preview .co-step.is-current,
body.svc-cream .service-preview .co-step.is-done { color: #5a1f63 !important; }
.co-head-sub { color: #645c6d; max-width: 44ch; margin: .2rem auto 0; line-height: 1.6; text-wrap: pretty; }
/* theme's .service-preview p resets the auto margins to 0, pinning the box left;
   restore centring at higher weight */
body.svc-cream .service-preview .co-head-sub { margin-left: auto !important; margin-right: auto !important; }

/* ── Checkout page ──────────────────────────────────────────────────────── */
.co-wrap { max-width: var(--max, 1180px); margin: 0 auto; }

/* two columns: items left, sticky summary card right */
#bmb-checkout, .pay-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.co-summary, .pay-summary {
  background: #fff; border: 1px solid #e7ded0; border-radius: 20px;
  padding: clamp(1.4rem, 2.6vw, 1.9rem);
  box-shadow: 0 18px 44px -30px rgba(42,37,64,.4);
  position: sticky; top: 6.5rem;
}
.co-summary-h, .pay-card-h { font-family: var(--font-display, var(--serif)); font-size: 1.25rem; color: #2a2540; margin: 0 0 1.1rem; }
.co-empty { grid-column: 1 / -1; }
.co-alt { display: block; text-align: center; margin-top: .9rem; font-family: var(--sans); font-size: .9rem; color: #8d319b; text-decoration: underline; }
.co-alt:hover { color: #5a1f63; }

/* payment page */
.pay-card { background: #fff; border: 1px solid #e7ded0; border-radius: 22px; padding: clamp(1.9rem, 4vw, 3rem); box-shadow: 0 18px 44px -30px rgba(42,37,64,.4); }
/* generous breathing room: heading → fields → button → reassurance */
.pay-card .pay-card-h { margin: 0 0 1.7rem; font-size: 1.4rem; }
.pay-stripe-slot { min-height: 9rem; margin-bottom: clamp(2rem, 4vw, 2.8rem); }
.pay-pending { color: #4a4553; line-height: 1.6; margin: 0 0 1.3rem; }
.pay-wa { width: 100%; justify-content: center; padding-top: 1.05rem; padding-bottom: 1.05rem; font-size: 1.02rem; }
/* flipped to match the checkout button: solid purple fill, cream text */
body.svc-cream .service-preview .pay-wa { background: #8d319b !important; color: #f1eee9 !important; border-color: #8d319b !important; }
body.svc-cream .service-preview .pay-wa:hover { background: #7a2986 !important; color: #fbf8f4 !important; border-color: #7a2986 !important; }
.pay-error { color: #b3261e; font-size: .9rem; margin: .8rem 0 0; }
.pay-error[hidden] { display: none; }
.pay-secure { font-size: .82rem; color: #8a8190; text-align: center; margin: 1.3rem 0 0; line-height: 1.55; }
.pay-gst span:last-child, .pay-summary .co-summary-line span:last-child { font-family: var(--sans); }
.pay-gst { font-size: .95rem; margin-top: .4rem; }
.pay-gst span:first-child, .pay-gst span:last-child { font-size: 1rem !important; color: #645c6d !important; font-weight: 600 !important; }
.pay-lines { list-style: none; margin: 0 0 1rem; padding: 0 0 1rem; border-bottom: 1px solid #e7ded0; display: grid; gap: .55rem; }
.pay-line { display: flex; justify-content: space-between; gap: 1rem; font-family: var(--sans); font-size: .95rem; color: #4a4553; }
.pay-total span:last-child { font-family: var(--sans); font-weight: 800; font-size: 1.35rem; color: #5a1f63; letter-spacing: -.02em; }

@media (max-width: 820px) {
  #bmb-checkout, .pay-grid { grid-template-columns: 1fr; }
  .co-summary, .pay-summary { position: static; }
}

.co-empty { text-align: center; padding: clamp(2rem, 6vw, 4rem) 1rem; }
.co-empty-title { font-family: var(--font-display, var(--serif)); font-size: 1.5rem; color: #2a2540; margin: 0 0 .5rem; }
.co-empty-sub { color: #645c6d; margin: 0 0 1.6rem; }

.co-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
/* each line item is its own pill card so it reads clearly on the cream page */
.co-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: clamp(.8rem, 2.5vw, 1.6rem);
  padding: 1rem clamp(1rem, 2.6vw, 1.4rem);
  background: #fff;
  border: 1px solid #ece4d8;
  border-radius: 16px;
  box-shadow: 0 12px 30px -24px rgba(42, 37, 64, .55);
  transition: box-shadow .25s ease, border-color .25s ease;
}
.co-row:hover { border-color: #e0d4c4; box-shadow: 0 16px 36px -24px rgba(42, 37, 64, .6); }
.co-row-name { font-family: var(--font-display, var(--serif)); font-size: 1.1rem; color: #2a2540; margin: 0 0 .2rem; }
.co-row-unit { font-size: .85rem; color: #645c6d; margin: 0; }
.co-qty { display: inline-flex; align-items: center; gap: .2rem; border: 1px solid #e7ded0; border-radius: 999px; padding: .2rem; background: #fff; }
.co-qty-btn {
  width: 1.9rem; height: 1.9rem; border: 0; border-radius: 50%; background: transparent;
  color: #5a1f63; font-size: 1.1rem; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s ease;
}
.co-qty-btn:hover { background: #f4efe6; }
.co-qty-val { min-width: 1.5rem; text-align: center; font-family: var(--sans); font-weight: 700; color: #2a2540; }
.co-row-line { font-family: var(--sans); font-weight: 800; font-size: 1.05rem; color: #5a1f63; margin: 0; min-width: 4.5rem; text-align: right; }
.co-remove {
  border: 0; background: transparent; color: #9b8fa6; cursor: pointer;
  padding: .35rem; border-radius: 8px; display: inline-flex; transition: color .2s ease, background .2s ease;
}
.co-remove:hover { color: #b3261e; background: #f7ece9; }

.co-summary { margin-top: 1.6rem; padding-top: 1.6rem; border-top: 2px solid #e7ded0; }
.co-summary-line { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-display, var(--serif)); }
.co-summary-line span:first-child { font-size: 1.15rem; color: #2a2540; }
.co-summary-line span:last-child { font-size: 1.6rem; font-weight: 700; color: #5a1f63; font-family: var(--sans); letter-spacing: -.02em; }
.co-summary-note { font-size: .88rem; color: #645c6d; line-height: 1.55; margin: .7rem 0 1.4rem; }
.co-checkout-btn { width: 100%; justify-content: center; }
/* flipped: solid purple fill with cream text (was cream fill / purple text) */
body.svc-cream .service-preview .co-checkout-btn { background: #8d319b !important; color: #f1eee9 !important; border-color: #8d319b !important; }
body.svc-cream .service-preview .co-checkout-btn:hover { background: #7a2986 !important; color: #fbf8f4 !important; border-color: #7a2986 !important; }
.co-clear { display: block; margin: 1rem auto 0; border: 0; background: transparent; color: #645c6d; font-family: var(--sans); font-size: .85rem; cursor: pointer; text-decoration: underline; }
.co-clear:hover { color: #2a2540; }

@media (max-width: 560px) {
  .co-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'name line'
      'qty  remove';
    align-items: center;
    row-gap: .85rem;
    column-gap: .8rem;
  }
  .co-row-main { grid-area: name; min-width: 0; }
  .co-row-line { grid-area: line; align-self: start; }
  /* grid items stretch by default — pin the qty pill to its own width */
  .co-qty { grid-area: qty; justify-self: start; }
  .co-remove { grid-area: remove; justify-self: end; align-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  .bmb-cart-fab, .bmb-cart-toast, .co-qty-btn, .co-remove { transition: none; }
  .bmb-cart-fab.pulse { animation: none; }
}
