/* Step 2 personalise — per-bouquet panels + colour grid */

.colour-lines-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.bouquet-line {
  border: 1px solid var(--border, #ebe6e8);
  border-radius: 12px;
  background: var(--white, #fff);
  overflow: hidden;
}

/* Business Balloon Columns: no outer card frame around the always-open
   Step 2 colour area (.bouquet-line--static is exclusive to this product
   family) — individual colour-chip borders/selected states are untouched. */
/* No outer card frame here (see comment above), so its own left/right inset
   padding is no longer needed — zero it out to keep this panel's section
   titles ("Chrome/Reflex Finish", "Special Instructions") left-aligned flush
   with Step 1's "Quantity"/"Top Balloon Colour"/"Custom Message" titles,
   which sit directly in the (unpadded) Step 1 body. Other products keep
   .bouquet-line__body's normal inset — they still have the visible card
   border this padding is meant to clear. */
.bouquet-line--static .bouquet-line__body {
  padding-left: 0;
  padding-right: 0;
}

.bouquet-line--static {
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.bouquet-line__head {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.15rem 0.5rem;
  padding: 0.75rem 0.85rem;
  min-height: 3rem;
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.bouquet-line__head::after {
  content: "";
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: center;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--maroon, #7a1528);
  border-bottom: 2px solid var(--maroon, #7a1528);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.bouquet-line[open] .bouquet-line__head::after {
  transform: rotate(-135deg);
}

.bouquet-line__head::-webkit-details-marker {
  display: none;
}

.bouquet-line[open] .bouquet-line__head {
  border-bottom: 1px solid var(--border, #ebe6e8);
  background: var(--pink, #faf0f2);
}

.bouquet-line__title {
  grid-column: 1;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lux-muted, var(--muted, #6b5c60));
}

.bouquet-line__meta {
  grid-column: 1;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--maroon-dark, #5c0f1e);
  line-height: 1.3;
  word-break: break-word;
}

/* Second summary line — balloon capacity ("Max. N Balloons · X Standard"). */
.bouquet-line__detail {
  grid-column: 1;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--lux-muted, var(--muted, #6b5c60));
  line-height: 1.3;
  word-break: break-word;
}

.bouquet-line__body {
  padding: 0.5rem 0.85rem 0.85rem;
  /* Browsers reveal <details> content via an internal content-visibility
     toggle with a discrete transition. That transition has a known paint
     bug: images inside the newly-revealed content finish loading/decoding
     (naturalWidth/complete are correct) but don't get painted until some
     later reflow forces it — which is why every colour photo "appears" the
     instant any card is clicked. Forcing content-visibility back to its
     default here skips that buggy native transition entirely. */
  content-visibility: visible;
}

.bouquet-line__body .colour-section {
  border-bottom: none;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.bouquet-line__body .colour-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

.colour-copy-btn {
  display: block;
  width: 100%;
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.65rem;
  min-height: 2.75rem;
  border: 1px dashed var(--border, #ebe6e8);
  border-radius: 8px;
  background: var(--white, #fff);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--maroon, #7a1528);
  cursor: pointer;
  touch-action: manipulation;
}

.colour-copy-btn:active {
  background: var(--pink, #faf0f2);
}

.check-row--split {
  margin-bottom: 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border, #ebe6e8);
  border-radius: 10px;
  background: var(--cream, #faf8f6);
}

.check-row--split span {
  font-size: 0.78rem;
  line-height: 1.4;
}

/* Step 2 personalise — mobile-first colour grid (works with step 1 bouquet slider) */

.colour-step-hint {
  margin: 0 0 0.75rem;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted, #6b5c60);
  text-align: left;
  line-height: 1.35;
}

.colour-step-hint--inline {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.colour-step-hint--prominent {
  font-size: 1rem;
  font-weight: 800;
}

.config-step__body--colours .colour-section {
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border, #ebe6e8);
}

.config-step__body--colours .colour-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* Sitewide small-option-title typography (Quantity, Custom Message,
   Standard Balloon Colours, Chrome/Reflex Finish, Ribbon Colour, Weight
   Colour, Special Instructions, Height, Foil Number, etc.) — standardised
   on the Standard Balloon Column's typography (shop/products/balloon-column.html
   ?slug=latex), the site's agreed visual source of truth. Previously this
   was the shared uppercase/muted style below, with balloon-column.html
   overriding to this title-case/brand-red look; promoted here so every
   product page matches by default instead of needing a page-scoped override. */
.colour-section__title {
  margin: 0 0 0.55rem;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  color: var(--lux-accent, var(--maroon, #7a1528));
}

/* .col-qty-proxy__label has no shared base counterpart (it's markup private
   to the Business Balloon Columns desktop proxy layout, see
   js/balloon-column-layout.js) — kept matching the typography above. */
body.page-corporate-columns .col-qty-proxy__label {
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--lux-accent, var(--maroon, #7a1528));
}

/* No faint divider between adjacent colour-section blocks (Standard Colours
   / Chrome-Reflex Finish, both in Step 1's Top Balloon proxy and Step 2's
   column balloon colours) — headings and spacing already separate the
   groups clearly. Scoped to corporate-columns only. */
body.page-corporate-columns .colour-section {
  border-bottom: none;
}

.colour-section__req {
  color: var(--lux-accent, var(--maroon, #7a1528));
}

.colour-section__sub {
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.75rem;
  color: var(--lux-muted, var(--muted, #6b5c60));
}

.colour-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
}

.colour-grid--compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.colour-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-height: 4.5rem;
  padding: 0.45rem 0.3rem 0.5rem;
  border: 2px solid var(--border, #ebe6e8);
  border-radius: 10px;
  background: var(--white, #fff);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  font: inherit;
  text-align: center;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.colour-chip.is-selected {
  border-color: var(--lux-accent, var(--maroon, #7a1528));
  background: var(--pink, #faf0f2);
  box-shadow: 0 0 0 1px var(--lux-accent, var(--maroon, #7a1528));
}

.colour-chip--disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

.colour-limit-hint {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.55;
  color: var(--muted, #6b5c60);
}

.colour-limit-hint--full {
  color: var(--maroon, #7a1528);
}

/* Height Selection Redesign — STEP 2 "Height" section (Table/Mid/Floor),
   sitting between Colours and Special Instructions on every bouquet that
   has a real height axis. Reuses the same card/selected-state look as
   .colour-chip (border + pink tint + accent ring) so it reads as the same
   family of option control, not a new one-off widget. Exactly 3 options,
   always — a fixed 3-column grid (not colour-chip's auto-fill) keeps them
   evenly sized and easy to tap on narrow phones without ever wrapping. */
.height-option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  max-width: 26rem;
}

.height-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px; /* touch-target minimum */
  padding: 0.5rem 0.35rem;
  border: 2px solid var(--border, #ebe6e8);
  border-radius: 10px;
  background: var(--white, #fff);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  font: inherit;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.height-option.is-selected {
  border-color: var(--lux-accent, var(--maroon, #7a1528));
  background: var(--pink, #faf0f2);
  box-shadow: 0 0 0 1px var(--lux-accent, var(--maroon, #7a1528));
}

.height-option:active {
  transform: scale(0.97);
}

.height-option__img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 110px;
  aspect-ratio: 640 / 408;
  object-fit: contain;
}

.height-option__measurement {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--maroon-dark, var(--lux-accent, #7a1528));
  text-align: center;
}

.colour-chip:active {
  transform: scale(0.97);
}

.colour-chip__swatch {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--swatch, #f4c4d0);
  border: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  /* Desktop paint bug: photo swatches inside a freshly-opened <details> panel
     finish decoding (naturalWidth/complete are correct) but the browser
     doesn't paint them until some later reflow forces it — clicking any
     card "fixes" every image at once. Promoting the swatch to its own
     compositing layer sidesteps the invalidation bug entirely. */
  transform: translateZ(0);
}

.colour-chip--chrome .colour-chip__swatch {
  background: radial-gradient(circle at 30% 25%, #fff, var(--swatch) 45%, #fff 55%, var(--swatch));
}

/* Ribbon/Weight photo swatch — fills the chip exactly like the sibling
   Balloon Colour tile (.colour-grid--balloons .colour-chip--balloon-photo
   .colour-chip__swatch below), instead of the old fixed 2.5rem box that
   made these tiles render visibly smaller than Balloon Colour on tablet/
   mobile (the old rule never scaled past its own hardcoded rem cap, no
   matter how wide the surrounding chip actually was). Unified across every
   breakpoint — no separate mobile/tablet override needed any more. */
.colour-chip--weight-photo .colour-chip__swatch,
.colour-chip--ribbon-photo .colour-chip__swatch {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  max-width: none;
  max-height: none;
  border-radius: 0;
  background: none;
  border: none;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ribbon & weight product photos: unselected tile stays fully transparent
   (no boxed white background/border behind the image). Selected state is
   deliberately left alone here — it must fall through to the shared
   .colour-chip.is-selected rule above (pink background + accent border),
   the exact same highlight the Balloon Colour tiles use, and that rule
   wins on specificity alone. Mobile also gets the same box-shadow removal
   + checkmark badge as .colour-grid--balloons below, so selection reads
   identically across all three colour types. */
.colour-chip--weight-photo,
.colour-chip--ribbon-photo {
  position: relative;
  background: transparent;
  border-color: transparent;
}

.colour-grid--weights .colour-chip.is-selected,
.colour-grid--ribbons .colour-chip.is-selected {
  box-shadow: none;
}

.colour-grid--weights .colour-chip.is-selected::after,
.colour-grid--ribbons .colour-chip.is-selected::after {
  content: "";
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--lux-accent, var(--maroon, #7a1528));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.6rem;
  box-shadow: 0 0 0 2px var(--white, #fff);
}

/* Balloon Column "Top colour" (Orb Colour / topper) photo chips — the
   proxy grid (js/balloon-column-layout.js, js/graduation-column-layout.js)
   now renders these inside .colour-grid--balloons and also tags each chip
   with .colour-chip--balloon-photo, so they automatically inherit the
   exact same tile size/padding/border-radius/image-fill/selected-state/
   text-size rules as the Step 2 balloon colour tiles above — no separate
   sizing CSS needed here. .colour-chip--top-photo only adds the one thing
   that's genuinely different: a transparent (not white) unselected
   background, matching the Ribbon/Weight photo tiles. */
.colour-chip--top-photo {
  background: transparent;
  border-color: transparent;
}

.colour-chip--weight-photo .colour-chip__swatch img,
.colour-chip--ribbon-photo .colour-chip__swatch img {
  display: block;
  width: 88%;
  height: 88%;
  object-fit: contain;
  object-position: center center;
}

.colour-grid--weights .colour-chip--weight-photo {
  padding: 0.25rem 0.12rem 0.3rem;
  gap: 0.15rem;
}

.colour-grid--weights .colour-chip {
  min-height: 4.65rem;
}

.colour-grid--weights .colour-chip__name {
  font-size: 0.56rem;
}

.colour-grid--ribbons .colour-chip {
  min-height: 4.65rem;
}

.colour-grid--ribbons .colour-chip__name {
  font-size: 0.56rem;
}

/* "Match Balloon Colours" ribbon chip — the button contains ONLY the
   supplied artwork (assets/ribbon-buttons/match-balloon-colours-button.png,
   which already has "MATCH BALLOON COLOURS" baked into the image) — no
   separate rendered name label (see js/colours.js's chipHtml() and its
   standalone-page copies, which skip .colour-chip__name entirely when
   isMatchBalloon), no background box, no border drawn around the artwork
   itself (that read as an unwanted extra outline/frame around the image).
   The image fills the button the same way Height option images fill
   their cards — only the button's own selected-state border/background
   (.colour-chip.is-selected, shared with every other chip) indicates
   selection, not a second frame around the artwork. No separate
   checkbox — the chip itself is the selection. */
.colour-chip__swatch--match {
  /* Fills the ENTIRE remaining height of the button (flex:1 in the
     column-flex .colour-chip), not just a width-driven aspect-ratio
     slice — every sibling ribbon chip's button is taller than a 40px
     swatch alone because of its .colour-chip__name label underneath; the
     match chip has no label, so without this it sat short and pinned to
     the top of a much taller box, reading as "too small / too high".
     align-self:stretch fills the width too (overriding the parent
     .colour-chip's align-items:center, which would otherwise size this
     to its own content width). Centres the image both ways via flex. */
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  /* No circle: this swatch has no shape of its own (unlike every other
     colour swatch, which is deliberately a circle) — the base
     .colour-chip__swatch rule's border-radius:50% must not apply here. */
  border-radius: 0;
  /* No fallback pink swatch colour showing through the artwork's
     transparent areas — this button has no swatch colour of its own,
     just the supplied image. */
  background: none;
}

.colour-chip__swatch--match img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* ---- 30cm latex balloon colour selector: one unified card, no inner frame ---- */

.colour-grid--balloons {
  grid-template-columns: repeat(auto-fill, minmax(4.75rem, 1fr));
  gap: 0.5rem;
}

.colour-grid--balloons .colour-chip {
  position: relative;
  min-height: 0;
  padding: 0.4rem 0.3rem 0.5rem;
  gap: 0.25rem;
  border-width: 1px;
  border-radius: 12px;
}

.colour-grid--balloons .colour-chip.is-selected {
  box-shadow: none;
}

.colour-grid--balloons .colour-chip--balloon-photo .colour-chip__swatch {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  max-width: none;
  max-height: none;
  border-radius: 0;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.colour-grid--balloons .colour-chip--balloon-photo .colour-chip__swatch img {
  display: block;
  width: 88%;
  height: 88%;
  object-fit: contain;
  object-position: center center;
}

/* Column Accents (Party Pole) — same flat white studio background issue as
   the category thumbnails and product photos elsewhere; blend it out
   instead of cropping/editing the source PNGs (matches the technique used
   for .category-card__visual img and .photo-preview__logo). */
.colour-chip--accent-photo .colour-chip__swatch img {
  mix-blend-mode: multiply;
}

/* Football/Basketball Top Balloon topper photos (Sports Balloons set) — same
   flat white studio background as the Party Pole accent PNGs. Every other
   product's topper photo (Orb/Star/Standard/Party Pole) is already a
   pre-processed transparent asset, so multiply-blending it against the
   white/cream card background it already sits on is a visual no-op there —
   safe to apply to the whole topper-photo class rather than singling out
   just the two new sports images. */
.colour-chip--topper-photo .colour-chip__swatch img {
  mix-blend-mode: multiply;
}

/* 45cm's `standard45` Standard Balloon Colour palette and Heart's
   `standardHeart` palette (including the Caribbean Blue/Green additions)
   are photographed on a flat-white studio background — same root cause as
   the accent/topper sets above, fixed the same way. 30cm and 60cm's
   balloon-colour photos are already correctly pre-processed/transparent
   and are NOT part of this selector — do not add them here. */
.colour-chip--studio-photo .colour-chip__swatch img {
  mix-blend-mode: multiply;
}

.colour-grid--balloons .colour-chip__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.2em;
  align-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--lux-text, var(--maroon-dark, #5c0f1e));
}

.colour-grid--balloons .colour-chip.is-selected .colour-chip__name {
  color: var(--lux-accent, var(--maroon, #7a1528));
}

/* Chrome chips already show their own quantity badge — don't add a second,
   competing selected-state indicator on top of it. */
.reflex-chip-wrap .colour-chip.is-selected::after {
  display: none;
}

.colour-grid--balloons .colour-chip.is-selected::after {
  content: "";
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--lux-accent, var(--maroon, #7a1528));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.6rem;
  box-shadow: 0 0 0 2px var(--white, #fff);
}

/* Desktop only: Balloon Colours, Ribbon and Weight share one compact,
   unified card design — no inner image-box-in-card-frame anywhere.
   Mobile keeps its existing (already-correct) sizing/styling untouched. */
@media (min-width: 720px) {
  /* .colour-grid (base class) added so this out-specifies the older
     .colour-grid--compact 6-column rule that weight/ribbon grids also carry. */
  .colour-grid.colour-grid--balloons,
  .colour-grid.colour-grid--weights,
  .colour-grid.colour-grid--ribbons {
    grid-template-columns: repeat(auto-fill, minmax(4.25rem, 1fr));
    gap: 0.45rem;
  }

  .colour-grid--balloons .colour-chip,
  .colour-grid--weights .colour-chip,
  .colour-grid--ribbons .colour-chip {
    position: relative;
    min-height: 0;
    padding: 0.3rem 0.25rem 0.35rem;
    gap: 0.2rem;
    border-width: 1px;
    border-radius: 10px;
  }

  .colour-grid--balloons .colour-chip.is-selected,
  .colour-grid--weights .colour-chip.is-selected,
  .colour-grid--ribbons .colour-chip.is-selected {
    box-shadow: none;
  }

  .colour-grid--weights .colour-chip--weight-photo .colour-chip__swatch,
  .colour-grid--ribbons .colour-chip--ribbon-photo .colour-chip__swatch {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    max-width: none;
    max-height: none;
    border-radius: 0;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .colour-grid--weights .colour-chip--weight-photo .colour-chip__swatch img,
  .colour-grid--ribbons .colour-chip--ribbon-photo .colour-chip__swatch img {
    width: 82%;
    height: 82%;
    object-fit: contain;
    object-position: center center;
    transform: none;
  }

  .colour-grid--balloons .colour-chip--balloon-photo .colour-chip__swatch img {
    width: 82%;
    height: 82%;
  }

  .colour-grid--balloons .colour-chip__name,
  .colour-grid--weights .colour-chip__name,
  .colour-grid--ribbons .colour-chip__name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.1em;
    align-content: center;
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--lux-text, var(--maroon-dark, #5c0f1e));
  }

  .colour-grid--balloons .colour-chip.is-selected .colour-chip__name,
  .colour-grid--weights .colour-chip.is-selected .colour-chip__name,
  .colour-grid--ribbons .colour-chip.is-selected .colour-chip__name {
    color: var(--lux-accent, var(--maroon, #7a1528));
  }

  .colour-grid--balloons .colour-chip.is-selected::after,
  .colour-grid--weights .colour-chip.is-selected::after,
  .colour-grid--ribbons .colour-chip.is-selected::after {
    content: "";
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 50%;
    background: var(--lux-accent, var(--maroon, #7a1528));
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 0.5rem;
    box-shadow: 0 0 0 2px var(--white, #fff);
  }
}

.reflex-chip-wrap {
  position: relative;
  display: block;
  min-height: 4.65rem;
}

.reflex-chip-wrap .colour-chip {
  width: 100%;
  position: relative;
}

.reflex-qty-badge {
  position: absolute;
  top: 0.12rem;
  right: 0.12rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  padding: 0;
  border: 1.5px solid var(--maroon, #7a1528);
  border-radius: 50%;
  background: var(--white, #fff);
  color: var(--maroon, #7a1528);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s, color 0.12s, transform 0.1s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  z-index: 2;
}

.reflex-qty-badge--active {
  background: var(--maroon, #7a1528);
  color: var(--white, #fff);
  border-color: var(--maroon, #7a1528);
}

.reflex-qty-badge:hover {
  background: var(--pink, #faf0f2);
  color: var(--maroon, #7a1528);
  transform: scale(1.1);
}

.reflex-qty-badge--active:hover {
  background: var(--maroon-dark, #5c0f1e);
  color: var(--white, #fff);
}

.reflex-qty-badge:active {
  transform: scale(0.9);
}

.reflex-hint {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  color: var(--muted, #6b5c60);
  font-style: italic;
}

/* Business Balloon Columns — small inline warning shown when a Top Balloon
   colour or Custom Message is attempted before a quantity is picked. */
.col-top-colour-notice {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--lux-accent, var(--maroon, #7a1528));
}

.colour-section__notes-hint {
  margin: 0.4rem 0 0;
  font-size: 0.7rem;
  color: var(--muted, #6b5c60);
  font-style: italic;
  line-height: 1.4;
}

.colour-chip__name {
  display: block;
  font-size: 0.58rem;
  line-height: 1.2;
  font-weight: 600;
  color: var(--maroon-dark, #5c0f1e);
  word-break: break-word;
  hyphens: auto;
}

.colour-section__picked {
  margin: 0.45rem 0 0;
  font-size: 0.7rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.55;
  color: var(--muted, #6b5c60);
}

.colour-match-btn {
  display: inline-block;
  margin-top: 0.45rem;
  padding: 0.5rem 0.75rem;
  min-height: 2.75rem;
  border: 1px solid var(--border, #ebe6e8);
  border-radius: 8px;
  background: var(--white, #fff);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--maroon, #7a1528);
  cursor: pointer;
  touch-action: manipulation;
}

.colour-match-btn:active {
  background: var(--pink, #faf0f2);
}

/* Primary colour-step action button — ribbon "Match Balloon Colour/s" and
   "Apply to All Bouquets" share this look: burgundy border/text on a blush
   fill, matching the site's brand tokens. */
.colour-primary-btn {
  display: block;
  width: 100%;
  margin-top: 0.45rem;
  padding: 0.6rem 0.85rem;
  min-height: 2.75rem;
  border: 1.5px solid var(--maroon, #7a1528);
  border-radius: var(--lux-radius, 8px);
  background: var(--pink, #f8e8ec);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--maroon-dark, #5c0f1e);
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.colour-primary-btn:hover,
.colour-primary-btn:focus-visible {
  background: var(--pink-deep, #e8b4c4);
  box-shadow: 0 0 0 1px var(--maroon, #7a1528);
}

.colour-primary-btn:active {
  background: var(--pink-deep, #e8b4c4);
}

.option-cards {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.option-card {
  display: block;
  cursor: pointer;
}

.option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-card__body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.7rem 0.75rem;
  border: 2px solid var(--border, #ebe6e8);
  border-radius: 10px;
  background: var(--white, #fff);
  transition: border-color 0.15s, background 0.15s;
}

.option-card input:checked + .option-card__body {
  border-color: var(--lux-accent, var(--maroon, #7a1528));
  background: var(--pink, #faf0f2);
  box-shadow: 0 0 0 1px var(--lux-accent, var(--maroon, #7a1528));
}

.option-card__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink, #2a1a1e);
  line-height: 1.3;
}

.option-card__detail {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted, #6b5c60);
  line-height: 1.35;
}

.option-card__price {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--maroon, #7a1528);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.option-card__price--included {
  color: var(--muted, #6b5c60);
}

.option-included {
  margin: 0;
  padding: 0.65rem 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--maroon-dark, #5c0f1e);
  background: var(--pink, #faf0f2);
  border: 1px solid var(--border, #ebe6e8);
  border-radius: 10px;
}

.addon-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.addon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  min-height: 2.75rem;
  border: 1px solid var(--border, #ebe6e8);
  border-radius: 10px;
  background: var(--white, #fff);
  cursor: pointer;
  touch-action: manipulation;
}

.addon-row:has(input:checked) {
  border-color: var(--maroon, #7a1528);
  background: var(--pink, #faf0f2);
}

.addon-row input {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--maroon, #7a1528);
}

.addon-row__label {
  flex: 1;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink, #2a1a1e);
}

.addon-row__price {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--maroon, #7a1528);
  font-variant-numeric: tabular-nums;
}

.product-notes,
.card-message {
  display: block;
  width: 100%;
  margin-top: 0.45rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border, #ebe6e8);
  border-radius: 10px;
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.45;
  resize: vertical;
  min-height: 4.5rem;
  box-sizing: border-box;
}

.product-notes:focus,
.card-message:focus {
  outline: 2px solid var(--maroon, #7a1528);
  outline-offset: 1px;
}

.colour-step__hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.config-step.colour-step--waiting .config-step__body--colours .colour-section {
  opacity: 0.42;
  pointer-events: none;
  user-select: none;
}

.config-step.colour-step--waiting .colour-step-hint {
  opacity: 1;
  color: var(--maroon-dark, #5c0f1e);
}

@media (hover: none) and (pointer: coarse) {
  .colour-chip {
    min-height: 4.75rem;
  }

  .colour-chip__swatch {
    width: 2.5rem;
    height: 2.5rem;
  }

  .colour-grid--balloons .colour-chip--balloon-photo .colour-chip__swatch,
  .colour-grid--weights .colour-chip--weight-photo .colour-chip__swatch,
  .colour-grid--ribbons .colour-chip--ribbon-photo .colour-chip__swatch {
    width: min(100%, 3.3rem);
    height: min(100%, 3.3rem);
    max-width: 3.3rem;
    max-height: 3.3rem;
  }
}

@media (min-width: 480px) {
  .colour-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .colour-grid--compact {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 720px) {
  .colour-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .colour-grid--compact {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* —— Mobile optimisations (keeps full personalise flow) —— */
@media (max-width: 719px) {
  .page-helium--simple {
    overflow-x: clip;
  }

  .page-helium--simple .config-step {
    scroll-margin-bottom: calc(6rem + var(--safe-bottom, 0px));
  }

  .page-helium--simple .config-step__head {
    flex-wrap: wrap;
    row-gap: 0.2rem;
    align-items: flex-start;
    padding: 0.85rem 0.75rem;
    touch-action: manipulation;
  }

  .page-helium--simple .config-step__pick {
    flex: 1 1 100%;
    max-width: 100%;
    text-align: left;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--muted, #6b5c60);
  }

  /* Root-cause fix (not another per-page label): the rule above is
     correctly sized for pages that actually populate .config-step__pick
     with real hint text (30cm/45cm/60cm/Number Combo/Baby Shower's STEP
     2/3 hints). Several standalone product pages under this same
     page-helium--simple body class (Ceiling Balloons, Cascade, Balloon
     Sculptures, Number Stack, Super Mario Centrepiece, Fathers Day
     Balloon Box, Halloween Garland) render a permanently-empty
     `<span class="config-step__pick"></span>` in STEP 1 that no JS on
     those pages ever fills in — flex-basis:100% on an EMPTY sibling still
     claims almost the entire row in a nowrap flex container, squeezing
     .config-step__label (flex:1, min-width:0) down to zero width, so
     "STEP 1 - Quantity" visibly rendered as just "STEP 1 -" on mobile
     even though "Quantity" was present in the DOM the whole time. Scoped
     to :empty so it can only ever affect a pick element with no content —
     any page that legitimately populates this element (via JS or by
     giving it id="stepPick1", which already has its own narrower rule
     below) is completely unaffected. */
  .page-helium--simple .config-step__pick:empty {
    flex: 0 0 auto;
    max-width: 0;
    padding: 0;
    margin: 0;
  }

  /* Step 1's bouquet-count badge ("3 Bouquets") stays inline with the
     "Size and Qty" title, right-aligned and vertically centred — unlike
     Step 2/3's longer hint text, which still wraps to its own line above.
     Scoped to step 1 only via [data-step="1"] so Step 2/3 keep their
     existing wrap-to-own-line behaviour for longer hint copy. */
  .page-helium--simple .config-step[data-step="1"] .config-step__head {
    flex-wrap: nowrap;
    align-items: center;
  }

  .page-helium--simple #stepPick1 {
    flex: 0 1 auto;
    max-width: 55%;
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    align-self: center;
  }

  .config-step__body--colours {
    padding-inline: 0.15rem;
  }

  .colour-lines-wrap {
    gap: 0.45rem;
  }

  .bouquet-line {
    scroll-margin-bottom: calc(6rem + var(--safe-bottom, 0px));
  }

  .bouquet-line__body {
    padding: 0.65rem 0.65rem 0.75rem;
  }

  .colour-section__picked {
    font-size: 0.72rem;
    line-height: 1.4;
    word-break: break-word;
  }

  .colour-match-btn {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
  }

  .option-card__body {
    flex-wrap: wrap;
  }

  .option-card__price {
    margin-left: auto;
  }

  .product-notes,
  .card-message {
    font-size: 16px;
  }

  /* 5 chips per row (was 4) across all three colour grids — balloon,
     ribbon (incl. Match Balloon Colour/s) and weight. Desktop sizing
     (>=720px) is untouched; only this mobile query is affected. */
  .colour-grid,
  .colour-grid--compact,
  .colour-grid--balloons {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.3rem;
  }

  .colour-chip {
    padding: 0.35rem 0.2rem 0.4rem;
  }

  .colour-chip__swatch {
    width: 1.95rem;
    height: 1.95rem;
  }

  /* .colour-chip__swatch--match carries the base .colour-chip__swatch
     class too, so without this it inherited the fixed 1.95rem circle
     size above at this breakpoint — the actual cause of the swatch
     looking small/off-centre on mobile specifically. Restore the
     fill-the-button sizing from the base (non-mobile) rule. */
  .colour-chip__swatch--match {
    width: 100%;
    height: 100%;
  }

  .colour-grid--ribbons .colour-chip__name,
  .colour-grid--weights .colour-chip__name {
    font-size: 0.52rem;
  }
}

@media (max-width: 519px) {
  .apex-lux.page-helium {
    padding-bottom: calc(7.75rem + var(--safe-bottom, 0px));
  }

  .apex-lux.page-helium .checkout-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "main cart"
      "btn btn";
    gap: 0.45rem 0.6rem;
    padding: 0.6rem 1rem calc(0.6rem + var(--safe-bottom, 0px));
    max-width: none;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
  }

  .apex-lux.page-helium .checkout-bar__main {
    grid-area: main;
    min-width: 0;
  }

  .apex-lux.page-helium .checkout-bar__cart {
    grid-area: cart;
    align-self: center;
    min-height: 2.5rem;
    padding: 0.45rem 0.6rem;
    white-space: nowrap;
  }

  .apex-lux.page-helium .checkout-bar__btn {
    grid-area: btn;
    width: 100%;
    min-height: 3rem;
  }

  .apex-lux.page-helium .checkout-bar__detail {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 339px) {
  .colour-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
