/* Goldie "Stack your colors" — square, thin-bordered, uppercase. Every rule is nested in this template's root. */

#qb-custom-bundle[template-id="goldie-1-boy-tee-buy-box-stack-your-colors-53684"] {
  --qbc-accent: #1c1c1c;
  --qbc-accent-text: #ffffff;
  --qbc-save: #e4002b;
  --qbc-ink: #000000;
  --qbc-text: #1c1c1c;
  --qbc-muted: #4d4d4d;
  --qbc-border: #dddddd;
  --qbc-divider: #ececec;
  --qbc-radio: #9a9a9a;
  --qbc-surface: #ffffff;
  --qbc-error: #c8102e;
  --qbc-pad-x: 14px;

  display: block;
  width: 100%;
  margin: 0 0 16px;
  padding: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: normal;
  text-align: start;
  text-transform: none;
  overflow-wrap: anywhere;
  color: var(--qbc-text);

  /* Reset */
  & *,
  & *::before,
  & *::after {
    box-sizing: border-box;
    line-height: inherit;
  }
  & h2,
  & h3,
  & p,
  & ul,
  & li,
  & fieldset,
  & legend {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    text-transform: none;
    list-style: none;
  }
  & strong {
    font-weight: 600;
  }
  & button,
  & input,
  & select {
    margin: 0;
    font: inherit;
    color: inherit;
    letter-spacing: normal;
    text-transform: none;
  }
  & button {
    width: auto;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    text-align: inherit;
    cursor: pointer;
  }
  & img {
    display: block;
    max-width: 100%;
    border: 0;
    border-radius: 0;
    object-fit: cover;
  }
  & label {
    margin: 0;
    font: inherit;
    color: inherit;
  }
  & s {
    text-decoration: line-through;
  }
  & button:focus-visible,
  & select:focus-visible {
    outline: 2px solid var(--qbc-accent);
    outline-offset: 2px;
  }
  & .qb__addon-checkbox,
  & .qb__purchase-input,
  & .qb__optin-input {
    position: static;
    display: inline-block;
    flex: none;
    width: 16px;
    height: 16px;
    opacity: 1;
    -webkit-appearance: auto;
    appearance: auto;
    accent-color: var(--qbc-accent);
    cursor: pointer;
  }

  /* The box */
  & .qb__layout {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--qbc-border);
    background: var(--qbc-surface);
  }

  /* Header */
  & .qb__header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 2px 4px 6px;
  }
  /* Widget heading */
  & .qb__title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.3;
    text-transform: uppercase;
    color: var(--qbc-ink);
  }
  & .qb__subtitle {
    font-size: 13px;
    color: var(--qbc-muted);
  }

  /* Tier list */
  & .qb__tiers {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 10px;
  }

  /* Tier card */
  & .qb__tier {
    position: relative;
    border: 1px solid var(--qbc-border);
    background: var(--qbc-surface);
    cursor: pointer;
    transition: border-color 0.15s ease;
  }
  & .qb__tier:hover {
    border-color: #b5b5b5;
  }
  & .qb__tier[data-selected="true"] {
    border-color: var(--qbc-accent);
    cursor: default;
  }

  /* Flag on the card's top edge */
  & .qb__tier-badge {
    position: absolute;
    top: -8px;
    inset-inline-end: 12px;
    z-index: 1;
    max-width: calc(100% - 24px);
    padding: 3px 8px;
    background: var(--qbc-accent);
    color: var(--qbc-accent-text);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Flagged card: room under the flag so it never touches the price */
  & .qb__tier:has(.qb__tier-badge) .qb__tier-head {
    padding-top: 20px;
  }

  /* Tier row */
  & .qb__tier-head {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 56px;
    padding: 12px var(--qbc-pad-x);
    color: var(--qbc-text);
    cursor: pointer;
  }

  /* Radio */
  & .qb__tier-radio {
    width: 16px;
    height: 16px;
    border: 1px solid var(--qbc-radio);
    border-radius: 50%;
    background: var(--qbc-surface);
  }
  & .qb__tier[data-selected="true"] .qb__tier-radio {
    border-color: var(--qbc-accent);
    box-shadow: inset 0 0 0 3px var(--qbc-surface), inset 0 0 0 8px var(--qbc-accent);
  }
  & .qb__tier-image {
    width: 18px;
    height: 18px;
  }

  /* Tier name + subtitle */
  & .qb__tier-texts {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }
  & .qb__tier-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
  }
  & .qb__tier-subtitle {
    font-size: 14px;
    line-height: 1.35;
    color: #333333;
  }

  /* Prices + save chip */
  & .qb__tier-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }
  & .qb__price {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-end;
    gap: 2px 6px;
    white-space: nowrap;
  }
  & .qb__price-current {
    font-size: 16px;
    letter-spacing: 1px;
  }
  & .qb__price-original {
    font-size: 13px;
    color: var(--qbc-muted);
  }
  & .qb__tier-pill {
    padding: 2px 6px;
    border: 1px solid var(--qbc-save);
    color: var(--qbc-save);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
  }

  /* Open card body */
  & .qb__tier-body {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--qbc-divider);
  }

  /* Tee rows */
  & .qb__slots {
    display: flex;
    flex-direction: column;
    padding: 4px var(--qbc-pad-x) 6px;
  }
  & .qb__slot-errors {
    padding: 10px var(--qbc-pad-x);
  }
  & .qb__slot {
    padding: 10px 0;
  }
  & .qb__slots[data-divider="true"] .qb__slot + .qb__slot {
    border-top: 1px solid var(--qbc-divider);
  }

  /* Folded / locked tee */
  & .qb__slot--summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
  }
  /* Portrait tee photo */
  & .qb__slot--summary .qb__slot-image {
    flex: none;
    width: 40px;
    height: auto;
    aspect-ratio: 2 / 3;
    background: #f6f6f6;
  }
  & .qb__slot-texts {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }
  & .qb__slot-title {
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
  }
  & .qb__slot-values {
    color: var(--qbc-muted);
  }
  & .qb__slot-note {
    font-size: 13px;
    letter-spacing: 0.3px;
    line-height: 17px;
    color: var(--qbc-muted);
  }

  /* Edit / Choose / Done link */
  & .qb__slot-action {
    flex: none;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  /* Open tee */
  & .qb__slot--open {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
      "image head"
      "image options"
      ". error";
    column-gap: 12px;
    row-gap: 0;
    align-items: start;
  }
  & .qb__slot--open[data-has-image="false"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "options" "error";
  }
  & .qb__slot--open .qb__slot-image {
    grid-area: image;
    width: 56px;
    height: auto;
    aspect-ratio: 2 / 3;
    background: #f6f6f6;
  }
  & .qb__slot--open .qb__slot-title {
    padding-top: 2px;
  }
  & .qb__slot-head {
    grid-area: head;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  & .qb__slot-options {
    grid-area: options;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
  }
  & .qb__slot--open .qb__error {
    grid-area: error;
    margin-top: 6px;
  }

  /* Option legend */
  & .qb__option {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
  }
  & .qb__option-name {
    float: none;
    width: auto;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
  }
  & .qb__option-value {
    color: var(--qbc-muted);
    text-transform: none;
    letter-spacing: 0.5px;
  }

  /* Choice rows: swatches 10px apart on a 38px tap area, size boxes 6px apart */
  & .qb__choices {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
  }
  & .qb__choices[data-kind="swatch"] {
    gap: 0;
    margin: 6px -5px 0;
  }
  & .qb__choice-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
  }

  /* Size boxes */
  & .qb__choice {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--qbc-ink);
    background: var(--qbc-surface);
    font-size: 12px;
    letter-spacing: normal;
    text-transform: uppercase;
    cursor: pointer;
  }
  & .qb__choice[data-selected="true"] {
    background: var(--qbc-ink);
    color: #ffffff;
  }
  & .qb__choice[data-unavailable="true"] {
    border-color: var(--qbc-border);
    color: #b5b5b5;
    background: linear-gradient(to top right, #ffffff calc(50% - 0.5px), var(--qbc-border) 50%, #ffffff calc(50% + 0.5px));
  }
  & .qb__choice[data-disabled="true"] {
    cursor: not-allowed;
  }
  & .qb__choice:has(.qb__choice-input:focus-visible) {
    outline: 2px solid var(--qbc-accent);
    outline-offset: 2px;
  }

  /* Colour swatches */
  & .qb__choice--swatch,
  & .qb__choice--swatch[data-selected="true"],
  & .qb__choice--swatch[data-unavailable="true"] {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
  }
  & .qb__swatch {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--qbc-swatch-color, #d9d9d9);
    background-image: var(--qbc-swatch-image, none);
    background-position: center;
    background-size: cover;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: none;
  }
  & .qb__choice--swatch[data-selected="true"] .qb__swatch {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 3px var(--qbc-accent);
  }
  & .qb__choice--swatch[data-unavailable="true"] .qb__swatch {
    opacity: 0.45;
  }
  /* Sold-out slash across the swatch */
  & .qb__choice--swatch[data-unavailable="true"]::after {
    content: "";
    position: absolute;
    left: 9px;
    right: 9px;
    top: 50%;
    height: 0;
    border-top: 1px solid var(--qbc-ink);
    transform: rotate(-45deg);
  }

  /* Dropdowns */
  & .qb__select {
    width: 100%;
    max-width: 260px;
    min-height: 36px;
    padding-block: 6px;
    padding-inline: 10px 30px;
    border: 1px solid var(--qbc-ink);
    border-radius: 0;
    background-color: var(--qbc-surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231c1c1c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-position: right 10px center;
    background-repeat: no-repeat;
    font-size: 12px;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
  }
  &:dir(rtl) .qb__select {
    background-position: left 10px center;
  }
  & .qb__select[data-invalid="true"] {
    border-color: var(--qbc-error);
  }

  /* Error rows */
  & .qb__error {
    width: 100%;
    color: var(--qbc-error);
    font-size: 11px;
  }

  /* Add-ons + gifts */
  & .qb__addon,
  & .qb__gift {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    min-height: 52px;
    padding: 8px var(--qbc-pad-x);
    border-top: 1px solid var(--qbc-divider);
  }
  & .qb__addon-main {
    display: flex;
    flex: 1 1 160px;
    align-items: center;
    gap: 10px;
    min-width: 0;
    cursor: pointer;
  }
  & span.qb__addon-main {
    cursor: inherit;
  }
  & .qb__addon-checkbox:disabled {
    pointer-events: none;
  }
  & .qb__addon-image,
  & .qb__gift-image {
    flex: none;
    width: 40px;
    height: 40px;
  }
  & .qb__addon-label,
  & .qb__gift-label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
  }
  & .qb__addon .qb__select,
  & .qb__gift .qb__select {
    width: auto;
    max-width: 160px;
  }
  & .qb__gift-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
  }
  & .qb__free-pill {
    padding: 2px 6px;
    background: var(--qbc-accent);
    color: var(--qbc-accent-text);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
  }

  /* Gift strip on closed cards */
  & .qb__collapsed-gifts {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 6px var(--qbc-pad-x);
    background: #f6f6f6;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
  }
  & .qb__collapsed-thumbs {
    display: flex;
    align-items: center;
  }
  & .qb__collapsed-thumb {
    width: 28px;
    height: 28px;
    outline: 2px solid #f6f6f6;
  }
  & .qb__collapsed-thumb + .qb__collapsed-thumb {
    margin-inline-start: -10px;
  }

  /* Progressive gifts */
  & .qb__pgifts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 6px;
  }
  & .qb__pgifts-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  & .qb__pgifts-title {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
  }
  & .qb__pgifts-subtitle {
    color: var(--qbc-muted);
  }
  & .qb__pgifts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
  }
  & .qb__pgift {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--qbc-border);
    text-align: center;
  }
  & .qb__pgift[data-unlocked="true"] {
    border-color: var(--qbc-accent);
  }
  & .qb__pgift-badge {
    position: absolute;
    top: 6px;
    inset-inline-start: 6px;
    z-index: 1;
    display: inline-flex;
    gap: 4px;
    padding: 2px 6px;
    background: var(--qbc-accent);
    color: var(--qbc-accent-text);
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
  }
  & .qb__pgift-image,
  & .qb__pgift-locked {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
  & .qb__pgift-locked {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border: 1px dashed var(--qbc-radio);
    color: var(--qbc-muted);
    font-size: 11px;
  }
  & .qb__pgift-lock {
    display: flex;
    width: 24px;
    height: 24px;
  }
  & .qb__pgift-title {
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
  }
  & .qb__pgift .qb__select {
    max-width: 100%;
  }

  /* Subscription */
  & .qb__subscription {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  & .qb__subscription-title {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
  }
  & .qb__purchase-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  & .qb__subscription[data-layout="SUB_SPLIT"] .qb__purchase-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  & .qb__purchase {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px var(--qbc-pad-x);
    border: 1px solid var(--qbc-border);
  }
  & .qb__purchase[data-selected="true"] {
    border-color: var(--qbc-accent);
  }
  & .qb__purchase-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    min-height: 24px;
    cursor: pointer;
  }
  & .qb__purchase-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
  }
  & .qb__plan-badge {
    padding: 2px 6px;
    border: 1px solid var(--qbc-save);
    color: var(--qbc-save);
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
  }
  & .qb__purchase-price {
    margin-inline-start: auto;
  }
  & .qb__highlights {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--qbc-muted);
  }
  & .qb__highlights[data-alignment="INLINE"] {
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 14px;
  }
  & .qb__highlight {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  & .qb__highlight-icon {
    display: flex;
    flex: none;
    width: 16px;
    height: 16px;
  }

  /* Quantity stepper */
  & .qb__quantity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  & .qb__quantity-label {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
  }
  & .qb__stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--qbc-ink);
  }
  & .qb__stepper-btn {
    width: 44px;
    height: 44px;
    font-size: 16px;
    text-align: center;
  }
  & .qb__stepper-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
  }
  & .qb__stepper-value {
    min-width: 32px;
    text-align: center;
  }

  /* Footer + own Add to Cart */
  & .qb__footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px;
  }
  & .qb__atc {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    padding: 12px 20px;
    background: var(--qbc-accent);
    color: var(--qbc-accent-text);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
  }
  & .qb__atc:disabled {
    opacity: 0.45;
    cursor: not-allowed;
  }
  & .qb__atc[aria-busy="true"] {
    cursor: progress;
  }
  & .qb__atc[aria-busy="true"] .qb__atc-label {
    visibility: hidden;
  }
  & .qb__atc[aria-busy="true"]::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: bundle-spin-goldie-1-boy-tee-buy-box-stack-your-colors-53684 0.7s linear infinite;
  }
  & .qb__note {
    font-size: 11px;
    color: var(--qbc-muted);
    text-align: center;
    white-space: pre-line;
  }

  /* Phones */
  @media (max-width: 480px) {
    & {
      --qbc-pad-x: 12px;
    }
    & .qb__layout {
      padding: 10px;
    }
    & .qb__tier-head {
      gap: 10px;
    }
    & .qb__slots {
      padding: 2px var(--qbc-pad-x) 6px;
    }
    & .qb__slot--open {
      grid-template-columns: 40px minmax(0, 1fr);
      grid-template-rows: auto auto auto;
      grid-template-areas:
        "image head"
        "options options"
        "error error";
      align-items: center;
    }
    & .qb__slot--open .qb__slot-image {
      width: 40px;
      height: auto;
    }
    & .qb__slot--open .qb__slot-options {
      margin-top: 6px;
    }
    & .qb__slot-action {
      min-height: 44px;
    }
    & .qb__choice {
      min-width: 44px;
      height: 44px;
    }
    & .qb__choice--swatch,
    & .qb__choice--swatch[data-selected="true"],
    & .qb__choice--swatch[data-unavailable="true"] {
      width: 44px;
      min-width: 44px;
      height: 44px;
    }
    & .qb__choices[data-kind="swatch"] {
      gap: 0;
      margin: 6px -8px 0;
    }
    & .qb__choice--swatch[data-unavailable="true"]::after {
      left: 12px;
      right: 12px;
    }
    & .qb__subscription[data-layout="SUB_SPLIT"] .qb__purchase-options {
      grid-template-columns: minmax(0, 1fr);
    }
    & .qb__select {
      min-height: 44px;
      font-size: 16px;
    }
  }

  /* Reduced motion */
  @media (prefers-reduced-motion: reduce) {
    & *,
    & *::before,
    & *::after {
      transition-duration: 0.001ms !important;
    }
  }
}

/* Spinner */
@keyframes bundle-spin-goldie-1-boy-tee-buy-box-stack-your-colors-53684 {
  to { transform: rotate(360deg); }
}