/* Bundle & Save — tier picker. Theme language: hairline rings, ink type,
   the purple accent for savings. Geometry follows the reference layout:
   colour rows, one shared size row, then the tier cards. */

.bundle-tiers { display: block; }

.bt-row { margin-bottom: 14px; }

.bt-row__label {
    font-size: var(--fs-small);
    font-weight: 600;
    color: #15140F;
    margin-bottom: 7px;
}

.bt-row__value {
    font-weight: 400;
    color: #6E6A61;
    text-transform: capitalize;
}

.bt-swatches { display: flex; flex-wrap: wrap; column-gap: 2px; row-gap: 6px; }

/* Same chip geometry as the PDP colour swatches: 34px circle, 1px ring that is
   transparent until selected, so the row does not shift on selection. */
.bt-swatch {
    width: 42px;
    height: 42px;
    padding: 3px;
    border: 1px solid transparent;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

/* The chip is a child rather than the button's own background so the selection
   ring (the button's border) stays clear of the fill. --swatch-bg is set by the
   theme's resolver; the fallback covers a colour name it cannot map. */
.bt-swatch__chip {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--swatch-bg, #E0E0E0) center/cover no-repeat;
    box-shadow: inset 0 0 0 1px rgba(21, 20, 15, 0.1);
}

.bt-swatch__chip--image { background-color: #F1EEE6; }

.bt-swatch.is-selected { border-color: #15140F; }

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

.bt-size {
    min-width: 54px;
    padding: 10px 12px;
    font-size: var(--fs-small);
    font-weight: 500;
    color: #15140F;
    background: #FFFFFF;
    border: 1px solid rgba(21, 20, 15, 0.18);
    border-radius: 6px;
    cursor: pointer;
}

.bt-size.is-selected { border-color: #15140F; box-shadow: inset 0 0 0 1px #15140F; }

.bt-size.is-unavailable {
    color: rgba(21, 20, 15, 0.3);
    cursor: not-allowed;
    border-color: rgba(21, 20, 15, 0.12);
    /* background-IMAGE, so the white ground set above survives under the rule. */
    background-image: linear-gradient(
        to top left,
        transparent calc(50% - 1px),
        rgba(21, 20, 15, 0.18) 50%,
        transparent calc(50% + 1px)
    );
}

.bt-quantity {
    margin: 18px 0 8px;
    font-size: var(--fs-small);
    color: #4E4A40;
}

.bt-quantity strong { color: #15140F; font-weight: 600; }

.bt-tiers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 8px;
}

.bt-tier {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 14px 8px 12px;
    background: #FFFFFF;
    border: 1px solid rgba(21, 20, 15, 0.16);
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
}

.bt-tier.is-selected { border-color: #15140F; box-shadow: inset 0 0 0 1px #15140F; }

.bt-tier__flag {
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 8px;
    background: #15140F;
    color: #FFFFFF;
    font-size: 8.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    border-radius: 999px;
    white-space: nowrap;
}

.bt-tier__buy { font-size: var(--fs-micro); font-weight: 600; color: #4E4A40; }
.bt-tier__price { font-size: 19px; font-weight: 600; color: #15140F; line-height: 1.15; }
.bt-tier__cap { font-size: var(--fs-micro); color: #6E6A61; }

.bt-tier__rule {
    width: 100%;
    height: 1px;
    margin: 7px 0 5px;
    background: rgba(21, 20, 15, 0.12);
}

.bt-tier__save { font-size: var(--fs-small); font-weight: 600; color: #675A88; }
.bt-tier__total { font-size: var(--fs-micro); color: #6E6A61; }
.bt-tier__ship { font-size: var(--fs-micro); color: #4E4A40; margin-top: 2px; }

/* Flex with a gap rather than spaces in the string: the label, the separator
   and the two prices were running together, and letter-spacing on an uppercase
   run made it worse. */
.bt-atc {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8.8px;
    width: 100%;
    margin-top: 14px;
    padding: 15px 18px;
    font-size: var(--fs-small);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* The dot is decoration between two ideas, so it sits quieter than either. */
.bt-atc__dot {
    opacity: 0.45;
    letter-spacing: 0;
}

.bt-atc__was {
    opacity: 0.55;
    font-weight: 400;
    /* the gap already separates it from the price that follows */
    margin: 0;
}
.bt-atc[disabled] { opacity: 0.55; cursor: not-allowed; }

.bt-note {
    margin-top: 8px;
    font-size: var(--fs-micro);
    color: #B3261E;
}

/* The theme's own variant picker and buy button stand down only once the widget
   has initialised, so a script failure leaves the normal PDP fully usable. */
.bt-active .product__info-container .product-variant-picker,
.bt-active .product__info-container .product-form__buttons {
    display: none;
}

@media screen and (max-width: 749px) {
    .bt-tier { padding: 13px 4px 10px; }
    .bt-tier__price { font-size: 17px; }
    .bt-swatch { width: 38px; height: 38px; }
}

/* A colourway with fewer photos hides the surplus slides. `hidden` alone is not
   enough: the slide classes set their own `display`, which beats the user-agent
   `[hidden] { display: none }` rule, so the slides stayed laid out — the
   carousel kept ~1980px of scroll for four slides and paged into blank space.
   !important because the winning rules are the theme's own slider classes. */
.product__media-item[hidden],
.thumbnail-list__item[hidden],
product-modal img[data-media-id][hidden] {
    display: none !important;
}
