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

#my-custom-bundle[template-id="skyr-duo-shaker-template-v2-15268"] {
  --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;

  & *,
  & *::before,
  & *::after { box-sizing: inherit; }

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

  /* ── Rows ────────────────────────────────────────────────────────────── */
  & .bundle__rows {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  & .bundle__row {
    border: 1px solid #f0f0f0;
    border-radius: 24px;
    padding: 24px 10px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  & .bundle__row--loading {
    color: var(--bundle-muted);
    font-size: 13px;
    text-align: center;
    padding: 40px 20px;
  }

  /* Card top: thumbnail + title */
  & .bundle__row-top {
    display: flex;
    align-items: center;
    gap: 24px;
  }
  & .bundle__row-thumb {
    flex: 0 0 140px;
    width: 140px;
    height: 140px;
    border-radius: 16px;
    background: #f4f4f4;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  & .bundle__row-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  & .bundle__row-info {
    flex: 1 1 auto;
    min-width: 0;
  }
  & .bundle__row-title {
    margin: 0;
    font-size: 33.3px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--bundle-text);
  }

  /* ── Flavor chips ────────────────────────────────────────────────────── */
  & .bundle__flavor {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  & .bundle__flavor-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--bundle-text);
  }
  & .bundle__flavor-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
  }
  & .bundle__flavor-chip {
    padding: 8px 24px;
    border: 1px solid var(--bundle-border);
    border-radius: 40px;
    background: #fff;
    color: var(--bundle-text);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  }
  & .bundle__flavor-chip:hover { border-color: var(--bundle-accent); }
  & .bundle__flavor-chip.is-selected {
    background: var(--bundle-accent);
    border-color: var(--bundle-accent);
    color: #fff;
    font-weight: 600;
  }
  & .bundle__flavor-chip.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
  }
  & .bundle__flavor-chip.is-disabled:hover { border-color: var(--bundle-border); }

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

  /* ── Gift step (big card + swatches) ─────────────────────────────────── */
  & .bundle__row--gift {
    position: relative;
    border: 1px solid #F2F2F7;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0px 4px 40px 0px #0000000D;
    gap: 10px;
  }
  & .bundle__row--gift.is-locked { overflow: hidden; }

  & .bundle__gift-top {
    display: flex;
    align-items: center;
    gap: 28px;
  }
  & .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;
  }
  & .bundle__gift-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  & .bundle__gift-info {
    flex: 1 1 auto;
    min-width: 0;
  }
  & .bundle__gift-title {
    font-size: 33.18px;
    font-weight: 700;
    line-height: 1.25;
    color: #222;
  }

  & .bundle__gift-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

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

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

  /* Text-label fallback pill (unmapped color) */
  & .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;
  }
  & .bundle__color-pill.is-selected {
    border-color: #0069b4;
    background: #0069b4;
    color: #fff;
  }
  & .bundle__color-pill.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
  }

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

  /* Lock overlay */
  & .bundle__row--gift.is-locked .bundle__gift-top,
  & .bundle__row--gift.is-locked .bundle__gift-body {
    opacity: 0.35;
    filter: grayscale(0.6);
    pointer-events: none;
    user-select: none;
  }
  & .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;
  }
  & .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 ─────────────────────────────────────────────── */
  & .bundle__foot {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  & .bundle__price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 28px;
    font-weight: 700;
    color: var(--bundle-text);
    line-height: 1.1;
  }
  & .bundle__price-current { color: var(--bundle-text); }
  & .bundle__price-original {
    font-size: 18px;
    font-weight: 600;
    color: var(--bundle-muted);
    text-decoration: line-through;
  }
  & .bundle__atc-btn {
    width: 100%;
    padding: 15px 24px;
    border: 0;
    background: var(--bundle-accent);
    color: #fff;
    border-radius: 999px;
    font-size: 19.2px;
    font-weight: 500;
    cursor: pointer;
    transition: filter 0.15s ease;
  }
  & .bundle__atc-btn:hover { filter: brightness(1.08); }
  & .bundle__atc-btn:disabled {
    background: #cfcfcf;
    cursor: not-allowed;
  }
  & .bundle__atc-btn.is-loading {
    background: var(--bundle-accent);
    color: transparent;
    position: relative;
    cursor: wait;
  }
  & .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-skyr-duo-shaker-template-v2-15268 0.7s linear infinite;
  }

  /* ── Loader ──────────────────────────────────────────────────────────── */
  & .bundle__loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--bundle-muted);
    font-size: 14px;
  }
  & .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-skyr-duo-shaker-template-v2-15268 0.9s linear infinite;
  }

  /* ── Mobile ──────────────────────────────────────────────────────────── */
  @media (max-width: 768px) {
    & { max-width: 100%; }
    & .bundle__gift-heading-text { font-size: 20px; }
    & .bundle__gift-heading { gap: 14px; }
    & .bundle__row-top { gap: 16px; }
    & .bundle__row-thumb { flex-basis: 100px; width: 100px; height: 100px; }
    & .bundle__row-title { font-size: 20px; }
    & .bundle__price { font-size: 24px; }

    /* Gift step: stack image above title; tighter padding + smaller swatches. */
    & .bundle__row--gift { padding: 20px; border-radius: 24px; gap: 18px; }
    & .bundle__gift-top { flex-direction: column; align-items: flex-start; gap: 16px; }
    & .bundle__gift-thumb { flex-basis: 100px; width: 100px; height: 100px; }
    & .bundle__gift-title { font-size: 20px; }
    & .bundle__gift-lock { border-radius: 24px; }
    & .bundle__swatches { gap: 24px; }
    & .bundle__swatch { width: 28px; height: 28px; }
    & .bundle__swatch.is-selected { box-shadow: 0 0 0 2px #fff inset, 0 0 0 0px #000; }
    & .bundle__row-title {
      font-size: 23px !important;
    }
  }

  & .bundle__gift-top {
    flex-direction: row !important;
  }
  & .bundle__gift-info {
    align-self: center!important;
  }
  & .bundle__price-original {
    color: #000 !important;
  }
}

@keyframes bundle-spin-skyr-duo-shaker-template-v2-15268 { to { transform: rotate(360deg); } }