/* Whole widget, scoped to this template's root */
#my-custom-bundle[template-id="the-stocking-filler-gift-set-74636"] {
  --bundle-line: #000;
  --bundle-soft-line: #e6e6e6;
  --bundle-muted: #555;
  --bundle-thumb-bg: #fff;

  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  /* Theme font: the theme's body font first, then Futura PT by name */
  font-family: var(--font-body-family, "futura-pt", "Futura PT", "Futura", sans-serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: .025em;
  color: #000;
  background: #fff;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

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

  /* Reset theme button styles inside the widget */
  & button {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: none;
    text-align: left;
    min-height: 0;
    cursor: pointer;
    height: auto;
    min-width: 0;
    line-height: inherit;
    text-decoration: none;
    justify-content: flex-start;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
  }
  /* No theme decorations on buttons */
  & button::before,
  & button::after {
    content: none;
  }
  & button:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
  }

  /* Intro text above the list */
  & .bundle__intro {
    margin: 0 0 30px;
    line-height: 1.4;
  }
  & .bundle__intro[hidden] { display: none; }

  /* The bordered list */
  & .bundle__list {
    border: 1px solid var(--bundle-line);
  }
  & .bundle__group + .bundle__group {
    border-top: 1px solid var(--bundle-line);
  }

  /* Step and gift headers */
  & .bundle__head {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    min-height: 96px;
    padding: 16px 20px;
  }
  & .bundle__head-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  & .bundle__kicker {
    font-size: 15px;
    letter-spacing: .3em;
    text-transform: uppercase;
    line-height: 1.4;
  }
  & .bundle__head-name {
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  & .bundle__group--gift .bundle__head-name { font-weight: 400; }
  & .bundle__head-name.is-placeholder { font-weight: 400; }

  /* Thumbnail backdrop: the photo's own white */
  & .bundle__thumb,
  & .bundle__opt-thumb {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    background: var(--bundle-thumb-bg);
    overflow: hidden;
  }
  & .bundle__thumb { width: 64px; height: 64px; }
  & .bundle__opt-thumb { width: 56px; height: 56px; }
  & .bundle__thumb img,
  & .bundle__opt-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  /* Number box before a pick */
  & .bundle__thumb--num {
    background: none;
    border: 1px solid var(--bundle-line);
    font-size: 25px;
    line-height: 1;
  }

  /* Change link and chevron */
  & .bundle__change {
    flex: 0 0 auto;
    font-size: 15px;
    letter-spacing: .3em;
    text-transform: uppercase;
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 1px;
  }
  & .bundle__chev {
    flex: 0 0 22px;
    display: flex;
    width: 22px;
    height: 22px;
    transition: transform .22s ease;
  }
  & .bundle__chev svg { width: 22px; height: 22px; }
  & .bundle__group.is-open .bundle__chev { transform: rotate(180deg); }

  /* Free badge */
  & .bundle__badge {
    flex: 0 0 auto;
    padding: 3px 10px;
    background: #000;
    color: #fff;
    font-size: 15px;
    line-height: 1.4;
    white-space: nowrap;
  }

  /* Slide-open panel */
  & .bundle__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .22s ease;
  }
  & .bundle__group.is-open .bundle__panel { grid-template-rows: 1fr; }
  & .bundle__panel-inner {
    min-height: 0;
    overflow: hidden;
  }
  & .bundle__group:not(.is-open) .bundle__panel-inner {
    visibility: hidden;
    transition: visibility 0s .22s;
  }
  & .bundle__options {
    padding: 0 20px 16px;
  }

  /* Product rows */
  & .bundle__opt {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    min-height: 80px;
    padding: 10px 0;
    border-top: 1px solid var(--bundle-soft-line);
  }
  & .bundle__opt-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }
  & .bundle__opt-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  & .bundle__opt-line {
    margin-top: 2px;
    font-size: 17px;
    line-height: 1.35;
    color: var(--bundle-muted);
  }
  & .bundle__opt-line:empty { display: none; }
  /* Hover underline only on devices with a mouse (no stuck underline after a tap) */
  @media (hover: hover) {
    & .bundle__opt:not(:disabled):hover .bundle__opt-name {
      text-decoration: underline;
      text-underline-offset: 4px;
    }
  }
  & .bundle__opt.is-selected .bundle__opt-name { font-weight: 700; }

  /* Radio circle */
  & .bundle__radio {
    flex: 0 0 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid #000;
    border-radius: 50%;
    background: #fff;
  }
  & .bundle__radio svg { width: 15px; height: 15px; visibility: hidden; }
  & .bundle__opt.is-selected .bundle__radio { background: #000; }
  & .bundle__opt.is-selected .bundle__radio svg { visibility: visible; }

  /* Sold-out row */
  & .bundle__opt:disabled { cursor: default; }
  & .bundle__opt.is-soldout .bundle__opt-thumb,
  & .bundle__opt.is-soldout .bundle__opt-text { opacity: .4; }
  & .bundle__soldout {
    flex: 0 0 auto;
    font-size: 15px;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--bundle-muted);
    margin-right: -.15em;
  }

  /* Empty and loading text inside a step */
  & .bundle__opt-empty {
    padding: 18px 0;
    border-top: 1px solid var(--bundle-soft-line);
    font-size: 17px;
    color: var(--bundle-muted);
  }

  /* Add to cart button */
  & .bundle__atc {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 51px;
    margin-top: 30px;
    padding: 11px 20px 11px calc(20px + .3em);
    border: 1px solid #000;
    background: #000;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .3em;
    text-transform: uppercase;
    text-align: center;
    transition: background .15s ease, color .15s ease;
  }
  & .bundle__atc.is-choose {
    background: #fff;
    color: #000;
  }
  /* Hover fill only on devices with a mouse (no stuck black button after a tap) */
  @media (hover: hover) {
    & .bundle__atc.is-choose:hover {
      background: #000;
      color: #fff;
    }
  }
  & .bundle__atc:disabled { cursor: not-allowed; opacity: .5; }
  & .bundle__atc.is-loading,
  & .bundle__atc.is-loading:disabled { opacity: .85; cursor: progress; }
  & .bundle__atc.is-loading::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: bundle-spin-the-stocking-filler-gift-set-74636 .9s linear infinite;
  }

  /* Why the button is blocked */
  & .bundle__validation {
    margin-top: 10px;
    font-size: 15px;
    text-align: center;
    color: #b3261e;
  }
  & .bundle__validation[hidden] { display: none; }

  /* Gift note under the button */
  & .bundle__note {
    margin-top: 14px;
    font-size: 17px;
    line-height: 1.45;
    text-align: center;
  }
  & .bundle__note[hidden] { display: none; }
  & .bundle__note-icon {
    display: inline-flex;
    vertical-align: -2px;
    margin-right: 6px;
  }
  & .bundle__note-icon svg { width: 18px; height: 18px; }

  /* Loader while the bundle loads */
  & .bundle__loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    color: var(--bundle-muted);
    font-size: 15px;
  }
  & .bundle__loader::before {
    content: "";
    width: 14px;
    height: 14px;
    margin-right: 10px;
    border: 2px solid #ccc;
    border-top-color: #000;
    border-radius: 50%;
    animation: bundle-spin-the-stocking-filler-gift-set-74636 .9s linear infinite;
  }

  /* Phones: same layout, tighter */
  @media (max-width: 768px) {
    & { font-size: 18.4px; }
    & .bundle__head {
      gap: 14px;
      min-height: 84px;
      padding: 14px;
    }
    & .bundle__thumb { width: 56px; height: 56px; }
    & .bundle__head-text { gap: 3px; }
    & .bundle__thumb--num { font-size: 24px; }
    & .bundle__opt-thumb { width: 52px; height: 52px; }
    & .bundle__change { display: none; }
    & .bundle__options { padding: 0 14px 16px; }
    & .bundle__opt {
      gap: 14px;
      min-height: 76px;
    }
    & .bundle__opt-line,
    & .bundle__opt-empty { font-size: 15.5px; }
    & .bundle__kicker,
    & .bundle__soldout { font-size: 14px; }
    & .bundle__soldout { letter-spacing: .2em; }
    & .bundle__badge { font-size: 14px; }
    & .bundle__atc {
      min-height: 50px;
      padding-left: calc(20px + .25em);
      font-size: 15px;
      letter-spacing: .25em;
    }
    & .bundle__note { font-size: 15.5px; }

    /* Included rows: badge under the name, so a long name and "Complimentary" both fit */
    & .bundle__group--gift .bundle__head {
      display: grid;
      grid-template-columns: 56px minmax(0, 1fr);
      grid-template-areas: "thumb text" "thumb badge";
      align-items: center;
      column-gap: 14px;
      row-gap: 0;
    }
    & .bundle__group--gift .bundle__thumb { grid-area: thumb; }
    & .bundle__group--gift .bundle__head-text { grid-area: text; }
    & .bundle__group--gift .bundle__badge {
      grid-area: badge;
      justify-self: start;
      margin-top: 6px;
    }
    & .bundle__group--gift .bundle__head-name { -webkit-line-clamp: 3; }
  }

  /* Small phones (360–400 px): a little less padding and tracking so nothing spills over */
  @media (max-width: 400px) {
    & .bundle__head { gap: 12px; padding: 14px 12px; }
    & .bundle__group--gift .bundle__head { column-gap: 12px; }
    & .bundle__options { padding: 0 12px 16px; }
    & .bundle__opt { gap: 12px; }
    & .bundle__kicker { letter-spacing: .22em; }
    & .bundle__atc {
      padding-left: calc(14px + .18em);
      padding-right: 14px;
      font-size: 14px;
      letter-spacing: .18em;
    }
  }
}

/* Spinner animation, unique to this template */
@keyframes bundle-spin-the-stocking-filler-gift-set-74636 {
  to { transform: rotate(360deg); }
}