/* bundle.css — multi-step bundle: flavor product grid (multi-select) + free-gift step with color swatches (accent #2563C9). */

#my-custom-bundle {
  --bundle-accent: #2563C9;
  --bundle-border: #e3e3e3;
  --bundle-text: #1a1a1a;
  --bundle-muted: #8a8a8a;

  box-sizing: border-box;
  max-width: 640px;
  margin: 20px auto;
  padding: 0;
  font-family: inherit;
  font-size: 14px;
  color: var(--bundle-text);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
#my-custom-bundle *,
#my-custom-bundle *::before,
#my-custom-bundle *::after { box-sizing: inherit; }

#my-custom-bundle h2,
#my-custom-bundle h3 {
  margin: 0;
  font-family: inherit;
  letter-spacing: normal;
  text-transform: none;
}
#my-custom-bundle button,
#my-custom-bundle select {
  font-family: inherit;
  letter-spacing: normal;
  text-transform: none;
}
#my-custom-bundle button:focus-visible,
#my-custom-bundle select:focus-visible {
  outline: 2px solid var(--bundle-accent);
  outline-offset: 2px;
}

/* ── Rows ────────────────────────────────────────────────────────────── */
#my-custom-bundle .bundle__rows {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
#my-custom-bundle .bundle__row--loading {
  color: var(--bundle-muted);
  font-size: 13px;
  text-align: center;
  padding: 40px 20px;
}

/* ── Flavor step: product grid (multi-select) ────────────────────────── */
#my-custom-bundle .bundle__flavorstep { display: block; }
#my-custom-bundle .bundle__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
/* ---------- Product card ---------- */
#my-custom-bundle .bundle__card {
  box-sizing: border-box;
  width: 100%;
  min-height: 376px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 24px;
  box-shadow: 0 4px 40px rgba(0,0,0,.05);
  text-align: center;
}
#my-custom-bundle .bundle__card.is-selected {
  background: #E7F2FB;
  border-color: #0069B4;
}
#my-custom-bundle .bundle__card.is-unavailable { opacity: 0.5; }

/* ---------- Image ---------- */
#my-custom-bundle .bundle__card-thumb {
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  margin: 0 0 24px;
  background: #F4F4F4;
  border: 1px solid #F4F4F4;
  border-radius: 16px;
  overflow: hidden;
}
#my-custom-bundle .bundle__card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- Text ---------- */
#my-custom-bundle .bundle__card-info {
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  text-align: center;
}
#my-custom-bundle .bundle__card-title {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-family: 'Proxima Nova', sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 120%;
  color: #222;
  text-align: center;
}
#my-custom-bundle .bundle__card-weight {
  margin: 0;
  font-family: 'Proxima Nova', sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 120%;
  color: #222;
  text-align: center;
}
#my-custom-bundle .bundle__card-weight[hidden] { display: none; }
#my-custom-bundle .bundle__card-sub {
  margin: 0;
  font-family: 'Proxima Nova', sans-serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 120%;
  color: #222;
  text-align: center;
}
#my-custom-bundle .bundle__card-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
}
#my-custom-bundle .bundle__card-price-current {
  font-size: 16px;
  font-weight: 700;
  color: var(--bundle-text);
}
#my-custom-bundle .bundle__card-price-original {
  font-size: 13px;
  font-weight: 600;
  color: var(--bundle-muted);
  text-decoration: line-through;
}

/* Add button (unselected card) */
#my-custom-bundle .bundle__add-btn {
  width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--bundle-accent);
  border-radius: 999px;
  background: #fff;
  color: var(--bundle-accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
#my-custom-bundle .bundle__add-btn:hover { background: var(--bundle-accent); color: #fff; }
#my-custom-bundle .bundle__add-btn.is-disabled,
#my-custom-bundle .bundle__add-btn:disabled {
  border-color: var(--bundle-border);
  background: #f4f4f4;
  color: var(--bundle-muted);
  cursor: not-allowed;
}
#my-custom-bundle .bundle__add-btn:disabled:hover { background: #f4f4f4; color: var(--bundle-muted); }

/* ---------- Stepper: outlined when 0, blue pill when selected ---------- */
#my-custom-bundle .bundle__stepper {
  box-sizing: border-box;
  width: 100%;
  height: 32px;
  margin: 8px 0 0;
  padding: 8px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid #CFCFCF;
  border-radius: 40px;
}
#my-custom-bundle .bundle__stepper .bundle__step-btn,
#my-custom-bundle .bundle__stepper .bundle__step-qty {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  height: auto;
  padding: 0;
  background: none;
  border: 0;
  font-family: 'Proxima Nova', sans-serif;
  font-size: 16px;
  line-height: 100%;
  color: #222;
  cursor: pointer;
}
#my-custom-bundle .bundle__stepper .bundle__step-btn { font-weight: 700; }
#my-custom-bundle .bundle__stepper .bundle__step-qty { font-weight: 500; }
#my-custom-bundle .bundle__card.is-selected .bundle__stepper {
  background: #0069B4;
  border-color: #0069B4;
}
#my-custom-bundle .bundle__card.is-selected .bundle__step-btn,
#my-custom-bundle .bundle__card.is-selected .bundle__step-qty { color: #fff; }
#my-custom-bundle .bundle__stepper .bundle__step-btn:disabled {
  color: #bdc1c6;
  cursor: not-allowed;
}

/* Gift step heading: "Wähle deinen Shaker" + trailing rule line */
#my-custom-bundle .bundle__gift-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
#my-custom-bundle .bundle__gift-heading {
  display: flex;
  align-items: center;
  gap: 20px;
}
#my-custom-bundle .bundle__gift-heading-text {
  font-size: 23px;
  font-weight: 700;
  color: #222222;
  line-height: 1.1;
  white-space: nowrap;
}
#my-custom-bundle .bundle__gift-heading-rule {
  flex: 1 1 auto;
  height: 1px;
  background: #ececec;
}

/* ── Gift step (big card + swatches) ─────────────────────────────────── */
#my-custom-bundle .bundle__row--gift {
  position: relative;
  border: 1px solid #f0f0f0;
  border-radius: 24px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#my-custom-bundle .bundle__row--gift.is-locked { overflow: hidden; }

#my-custom-bundle .bundle__gift-top {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 28px;
}
#my-custom-bundle .bundle__gift-thumb {
  flex: 0 0 140px;
  width: 140px;
  height: 140px;
  border-radius: 16px;
  background: #f4f4f4;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
#my-custom-bundle .bundle__gift-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#my-custom-bundle .bundle__gift-info {
  flex: 1 1 auto;
  min-width: 0;
  align-self: center;
}
#my-custom-bundle .bundle__gift-title-line1,
#my-custom-bundle .bundle__gift-title-line2 { display: block; }
#my-custom-bundle .bundle__gift-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: #1a1a1a;
}

#my-custom-bundle .bundle__gift-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Color label */
#my-custom-bundle .bundle__color-label {
  font-size: 16px;
  color: var(--bundle-text);
}
#my-custom-bundle .bundle__color-label-prefix { font-weight: 700; }
#my-custom-bundle .bundle__color-label-value { font-weight: 400; }

/* Swatches */
#my-custom-bundle .bundle__swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
#my-custom-bundle .bundle__swatch {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #CCCCCC;
  padding: 0;
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}
/* Selected: white gap + dark outer ring */
#my-custom-bundle .bundle__swatch.is-selected {
  border-color: #000;
  box-shadow: 0 0 0 2px #fff inset, 0 0 0 2px #000;
}
/* Out of stock: faded + diagonal strike, not selectable */
#my-custom-bundle .bundle__swatch.is-oos {
  opacity: 0.4;
  cursor: not-allowed;
}
#my-custom-bundle .bundle__swatch.is-oos::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -4px;
  right: -4px;
  height: 2px;
  background: #333;
  transform: rotate(-45deg);
}
#my-custom-bundle .bundle__swatch:disabled { cursor: not-allowed; }

/* Text-label fallback pill (unmapped color) */
#my-custom-bundle .bundle__color-pill {
  padding: 10px 18px;
  border: 2px solid #D0D0D0;
  border-radius: 999px;
  background: #fff;
  color: var(--bundle-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
#my-custom-bundle .bundle__color-pill.is-selected {
  border-color: #0069b4;
  background: #0069b4;
  color: #fff;
}
#my-custom-bundle .bundle__color-pill.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* Gift price: struck original + Gratis */
#my-custom-bundle .bundle__gift-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
#my-custom-bundle .bundle__gift-price-original {
  font-size: 20px;
  color: var(--bundle-muted);
  text-decoration: line-through;
}
#my-custom-bundle .bundle__gift-price-free {
  font-size: 24px;
  font-weight: 700;
  color: var(--bundle-accent);
}

/* Lock overlay */
#my-custom-bundle .bundle__row--gift.is-locked .bundle__gift-top,
#my-custom-bundle .bundle__row--gift.is-locked .bundle__gift-body {
  opacity: 0.35;
  filter: grayscale(0.6);
  pointer-events: none;
  user-select: none;
}
#my-custom-bundle .bundle__gift-lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 24px;
}
#my-custom-bundle .bundle__gift-lock-msg {
  max-width: 340px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #444;
  line-height: 1.4;
}

/* ── Footer: price + CTA ─────────────────────────────────────────────── */
#my-custom-bundle .bundle__foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#my-custom-bundle .bundle__price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 28px;
  font-weight: 700;
  color: var(--bundle-text);
  line-height: 1.1;
}
#my-custom-bundle .bundle__price-current { color: var(--bundle-text); }
#my-custom-bundle .bundle__price-original {
  font-size: 18px;
  font-weight: 600;
  color: #000;
  text-decoration: line-through;
}
#my-custom-bundle .bundle__atc-btn {
  width: 100%;
  padding: 16px 24px;
  border: 0;
  background: var(--bundle-accent);
  color: #fff;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease;
}
#my-custom-bundle .bundle__atc-btn:hover { filter: brightness(1.08); }
#my-custom-bundle .bundle__atc-btn:disabled {
  background: #cfcfcf;
  cursor: not-allowed;
}
#my-custom-bundle .bundle__atc-btn.is-loading {
  background: var(--bundle-accent);
  color: transparent;
  position: relative;
  cursor: wait;
}
#my-custom-bundle .bundle__atc-btn.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: bundle-spin 0.7s linear infinite;
}

/* ── Loader ──────────────────────────────────────────────────────────── */
#my-custom-bundle .bundle__loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--bundle-muted);
  font-size: 14px;
}
#my-custom-bundle .bundle__loader::before {
  content: "";
  width: 14px;
  height: 14px;
  margin-right: 10px;
  border: 2px solid #ccc;
  border-top-color: var(--bundle-accent);
  border-radius: 50%;
  animation: bundle-spin 0.9s linear infinite;
}
@keyframes bundle-spin { to { transform: rotate(360deg); } }

/* ── Mobile ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #my-custom-bundle { max-width: 100%; }
  #my-custom-bundle .bundle__grid { gap: 12px; }
  #my-custom-bundle .bundle__card { padding: 12px; border-radius: 16px; gap: 10px; }
  #my-custom-bundle .bundle__card-title { font-size: 15px; }
  #my-custom-bundle .bundle__card-sub { font-size: 13px; }
  #my-custom-bundle .bundle__card-price-current { font-size: 15px; }

  #my-custom-bundle .bundle__gift-heading-text { font-size: 20px; }
  #my-custom-bundle .bundle__gift-heading { gap: 14px; }

  /* Gift step: keep image beside title; tighter padding + swatch sizing. */
  #my-custom-bundle .bundle__row--gift { padding: 20px; border-radius: 24px; gap: 18px; }
  #my-custom-bundle .bundle__gift-thumb { flex-basis: 100px; width: 100px; height: 100px; }
  #my-custom-bundle .bundle__gift-title { font-size: 23px; }
  #my-custom-bundle .bundle__gift-lock { border-radius: 24px; }
  #my-custom-bundle .bundle__swatches { gap: 20px; }
  #my-custom-bundle .bundle__price { font-size: 24px; }
}