.page-template-page-bundle-builder #masthead {
  background: #ef4f93;
}

.bbBuilder {
  --bb-pink: #ef4f93;
  --bb-rose: #993556;
  --bb-rose-dark: #72243e;
  --bb-rose-tint: #fbeaf0;
  --bb-amber-bg: #faeeda;
  --bb-amber-ink: #854f0b;
  --bb-star: #ef9f27;
  --bb-ink: #1d1d1b;
  --bb-text: #4d4d49;
  --bb-muted: #8a8a85;
  --bb-line: rgba(29, 29, 27, 0.12);
  --bb-line-soft: rgba(29, 29, 27, 0.07);
  --bb-paper: #ffffff;
  --bb-bg: #faf6f3;
  --bb-accent: #993556;
  --bb-radius-lg: 18px;
  --bb-radius-md: 11px;
  --bb-radius-pill: 999px;
  --bb-shadow: 0 1px 2px rgba(29, 29, 27, 0.04), 0 16px 40px -22px rgba(29, 29, 27, 0.32);
  --bb-shadow-hover: 0 1px 2px rgba(29, 29, 27, 0.05), 0 26px 50px -24px rgba(153, 53, 86, 0.42);
  background: var(--bb-bg);
  color: var(--bb-ink);
  padding-bottom: 56px;
  -webkit-font-smoothing: antialiased;
}

/* Bootscore's sticky footer locks html/body/#page to height:100% and relies
   on `#content { flex:1 }` to push the footer down. This template renders
   <main id="main"> instead of an #content wrapper, so without an override the
   main overflows the fixed-height flex column and the footer paints over it.
   Let #page grow with its content and let the main fill the column instead. */
.page-template-page-bundle-builder #page {
  height: auto;
  min-height: 100%;
  /* Reserve space so the fixed summary bar never covers the footer when
     scrolled to the very bottom of the page. */
  padding-bottom: 120px;
}

.bbBuilder {
  flex: 1 0 auto;
}

/* ------------------------------------------------------------------ Hero */
.bbHero {
  position: relative;
  overflow: hidden;
  background-color: var(--bb-pink);
  color: #fff;
  padding: 150px 20px 64px;
}

.bbHero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/wp-content/themes/shewee/img/wavey-white-lines-bg-2.webp");
  background-position: center;
  background-size: cover;
  opacity: 0.14;
}

.bbHeroInner {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
}

.bbKicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: var(--bb-radius-pill);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.bbHero h1 {
  max-width: 800px;
  margin: 20px 0 0;
  font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.4rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.bbIntro {
  max-width: 640px;
  margin-top: 16px;
  font-size: 1.08rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}

.bbIntro > :last-child {
  margin-bottom: 0;
}

/* -------------------------------------------------------------- Products */
.bbProducts {
  padding: 36px 16px 40px;
}

.bbProductsInner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

/* --------------------------------------------------------------- Card */
.bbCard {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  border: 1px solid var(--bb-line);
  border-radius: var(--bb-radius-lg);
  background: var(--bb-paper);
  box-shadow: var(--bb-shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.bbCard.has-quantity {
  border-color: var(--bb-accent);
  border-color: color-mix(in srgb, var(--bb-accent) 55%, transparent);
  box-shadow: var(--bb-shadow-hover);
}

.bbCard.has-quantity::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1.5px solid var(--bb-accent);
  pointer-events: none;
  opacity: 0.55;
}

/* Media panel */
.bbCardMedia {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 230px;
  padding: 28px;
  background: #ffffff;
  border-bottom: 1px solid var(--bb-line-soft);
}

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

.bbCardMedia img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
  filter: drop-shadow(0 18px 26px rgba(29, 29, 27, 0.16));
  transition: transform 0.3s ease;
}

.bbCard:hover .bbCardMedia img {
  transform: translateY(-3px) scale(1.02);
}

.bbBadge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 5px 12px;
  border-radius: var(--bb-radius-pill);
  background: var(--bb-accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.bbMediaCaption {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--bb-rose-dark);
  color: color-mix(in srgb, var(--bb-accent) 78%, #000 12%);
  opacity: 0.85;
}

/* Card body */
.bbCardBody {
  display: flex;
  flex-direction: column;
  padding: 20px 22px 22px;
}

.bbEyebrow {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--bb-muted);
}

.bbTitleRow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.bbTitle {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.bbTitle a {
  color: var(--bb-ink);
  text-decoration: none;
}

.bbTitle a:hover,
.bbTitle a:focus {
  color: var(--bb-rose);
}

.bbPrice {
  flex: 0 0 auto;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--bb-rose);
  white-space: nowrap;
}

.bbPrice del {
  margin-right: 6px;
  color: var(--bb-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.bbPrice ins {
  text-decoration: none;
}

.bbSubtitle {
  margin: 4px 0 0;
  font-size: 1rem;
  color: var(--bb-text);
}

/* Rating */
.bbRating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.bbStars {
  display: inline-flex;
  gap: 2px;
  color: var(--bb-star);
  font-size: 0.92rem;
}

.bbRatingText {
  font-size: 0.85rem;
  color: var(--bb-text);
}

.bbRatingText span {
  color: var(--bb-muted);
  margin: 0 2px;
}

/* Copy */
.bbCopy {
  margin-top: 12px;
  color: var(--bb-text);
  font-size: 0.95rem;
  line-height: 1.55;
}

.bbCopy p {
  margin: 0 0 8px;
}

.bbCopy > :last-child {
  margin-bottom: 0;
}

/* Deal pill */
.bbDeal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin: 14px 0 0;
  padding: 8px 13px;
  border-radius: var(--bb-radius-md);
  background: var(--bb-amber-bg);
  color: var(--bb-amber-ink);
  font-size: 0.85rem;
  font-weight: 600;
}

.bbDeal i {
  font-size: 0.9rem;
}

/* Options */
.bbOptions {
  margin-top: 18px;
}

.bbOptionLabel {
  display: block;
  margin-bottom: 9px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bb-muted);
}

.bbSwatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bbSwatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 13px;
  border: 1px solid var(--bb-line);
  border-radius: var(--bb-radius-md);
  background: var(--bb-paper);
  color: var(--bb-text);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.1;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.bbSwatch:hover,
.bbSwatch:focus-visible {
  border-color: var(--bb-accent);
  outline: none;
}

.bbSwatch.is-active {
  border-color: var(--bb-accent);
  border-width: 1.5px;
  background: #fbeaf0;
  background: color-mix(in srgb, var(--bb-accent) 8%, #fff);
  color: var(--bb-rose-dark);
  box-shadow: 0 0 0 1px var(--bb-accent) inset;
}

.bbSwatchDot {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border-radius: 50%;
  background: var(--swatch-color);
  box-shadow: 0 0 0 1px var(--bb-line);
}

.bbSwatch.is-active::after {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.7rem;
  color: var(--bb-accent);
}

.bbSwatch--text {
  flex: 1 1 auto;
  justify-content: center;
  min-width: 72px;
}

.bbSwatchName {
  overflow-wrap: anywhere;
}

/* Actions: qty + add */
.bbCardActions {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 20px;
}

.bbQty {
  display: inline-flex;
  align-items: stretch;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--bb-line);
  border-radius: var(--bb-radius-md);
  background: var(--bb-paper);
}

.bbQty button {
  display: grid;
  place-items: center;
  width: 42px;
  min-height: 46px;
  border: 0;
  background: transparent;
  color: var(--bb-ink);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.bbQty button:hover,
.bbQty button:focus-visible {
  background: color-mix(in srgb, var(--bb-accent) 12%, #fff);
  color: var(--bb-rose);
  outline: none;
}

.bbQty input {
  width: 46px;
  min-width: 0;
  border: 0;
  border-left: 1px solid var(--bb-line);
  border-right: 1px solid var(--bb-line);
  color: var(--bb-ink);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.bbQty input::-webkit-outer-spin-button,
.bbQty input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

.bbCardAdd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex: 1 1 auto;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--bb-radius-md);
  background: var(--bb-rose);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

.bbCardAdd:hover,
.bbCardAdd:focus-visible {
  background: var(--bb-rose-dark);
  outline: none;
}

.bbCardAdd:active {
  transform: translateY(1px);
}

.bbCardAdd.is-added {
  background: #117244;
}

/* Selected bundle lines */
.bbSelections {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--bb-line);
  border-radius: var(--bb-radius-md);
  background: #fbf8fa;
}

.bbSelections[hidden] {
  display: none;
}

.bbSelection {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 36px;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 7px 7px 7px 11px;
  border: 1px solid var(--bb-line-soft);
  border-radius: 8px;
  background: #ffffff;
}

.bbSelectionName {
  min-width: 0;
  color: var(--bb-ink);
  font-size: 0.9rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.bbSelectionPrice {
  color: var(--bb-rose);
  font-size: 0.9rem;
  white-space: nowrap;
}

.bbSelectionRemove {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: #f7eef3;
  color: var(--bb-rose);
}

.bbSelectionRemove:hover,
.bbSelectionRemove:focus-visible {
  background: var(--bb-rose);
  color: #ffffff;
  outline: none;
}

/* Line total */
.bbLineTotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--bb-line);
  color: var(--bb-muted);
  font-size: 0.85rem;
}

.bbLineTotal strong {
  color: var(--bb-ink);
  font-size: 1.05rem;
}

/* --------------------------------------------------- Sticky summary bar */
.bbStickySummary {
  position: fixed;
  z-index: 1030;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
  padding: 13px 13px 13px 20px;
  border: 1px solid var(--bb-line);
  border-radius: var(--bb-radius-lg);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px -16px rgba(29, 29, 27, 0.4);
}

.bbStickySummary > div {
  display: grid;
  gap: 1px;
}

.bbStickySummary [data-bundle-count] {
  color: var(--bb-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.bbStickySummary strong {
  color: var(--bb-ink);
  font-size: 1.55rem;
  line-height: 1.05;
  font-weight: 700;
}

.bbAddButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: var(--bb-radius-md);
  background: var(--bb-rose);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.bbAddButton:hover:not(:disabled),
.bbAddButton:focus-visible:not(:disabled) {
  background: var(--bb-rose-dark);
  outline: none;
}

.bbAddButton:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.bbAddButton.is-loading i {
  animation: bb-spin 0.8s linear infinite;
}

.bbMessage {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--bb-text);
  font-size: 0.85rem;
  font-weight: 600;
}

.bbMessage:empty {
  display: none;
}

.bbMessage[data-message-type="success"] {
  color: #117244;
}

.bbMessage[data-message-type="error"] {
  color: var(--bb-rose);
}

/* ----------------------------------------------------------------- Empty */
.bbEmpty {
  padding: 36px;
  border-radius: var(--bb-radius-lg);
  background: var(--bb-paper);
  border: 1px solid var(--bb-line);
  box-shadow: var(--bb-shadow);
}

.bbEmpty h2 {
  margin: 0 0 8px;
  font-size: 1.4rem;
  font-weight: 700;
}

.bbEmpty p {
  margin: 0;
  color: var(--bb-text);
}

@keyframes bb-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ----------------------------------------------------- Tablet and up */
@media (min-width: 640px) {
  .bbCard {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .bbCardMedia {
    min-height: 100%;
    border-bottom: 0;
    border-right: 1px solid var(--bb-line-soft);
  }

  .bbCardMedia img {
    max-height: 320px;
  }

  .bbCardBody {
    padding: 24px 28px 26px;
  }

  .bbCardActions {
    max-width: 420px;
  }
}

@media (min-width: 992px) {
  .bbCard {
    grid-template-columns: 360px minmax(0, 1fr);
  }

  .bbCardMedia {
    padding: 36px;
  }

  .bbCardMedia img {
    max-height: 380px;
  }
}

@media (min-width: 1200px) {
  .bbCard {
    grid-template-columns: 400px minmax(0, 1fr);
  }

  .bbCardMedia img {
    max-height: 420px;
  }
}

/* ----------------------------------------------------- Small screens */
@media (max-width: 639.98px) {
  .bbBuilder {
    padding-bottom: 40px;
  }

  .page-template-page-bundle-builder #page {
    padding-bottom: 200px;
  }

  .bbHero {
    padding: 118px 16px 44px;
  }

  .bbProducts {
    padding: 22px 12px 32px;
  }

  .bbCardMedia {
    min-height: 200px;
    padding: 24px;
  }

  .bbCardMedia img {
    max-height: 180px;
  }

  .bbTitleRow {
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  .bbStickySummary {
    right: 10px;
    bottom: 10px;
    left: 10px;
    grid-template-columns: 1fr;
    padding: 14px 16px;
  }

  .bbAddButton {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bbCard,
  .bbCardMedia img,
  .bbCardAdd,
  .bbSwatch {
    transition: none;
  }

  .bbCard:hover .bbCardMedia img {
    transform: none;
  }
}
