/*
 * TKA-PDP-BUYBOX-03 · One Buybox (v3). Linked by the v3 template only, so a product page that is not on v3 never loads it.
 * Plain CSS on purpose: it does not depend on a rebuild of the tracked Tailwind file.
 * Tokens (04b section 7): price #A84F10, sticky price #1F1D1A, control borders #8C8479 (3:1 on white), text 14 px and up
 * (badge 13 px), targets 44 x 44 px, min-height never a fixed height, visible focus.
 */
.bb3 {
    --bb3-ink: #1F1D1A;
    --bb3-ink-2: #3F3A33;
    --bb3-muted: #5C564E;
    --bb3-border: #E6E1D9;
    --bb3-control: #8C8479;
    --bb3-price: #A84F10;
    --bb3-green: #1E7A3C;
    --bb3-card: #FAF8F4;
    --bb3-focus: #1F1D1A;
    color: var(--bb3-ink);
}
.bb3 [hidden] { display: none !important; }
.bb3 :focus-visible { outline: 3px solid var(--bb3-focus); outline-offset: 2px; }

/* separators of 10 px between the rows of the card */
.bb3-card { margin-top: 10px; padding: 16px; border: 1px solid var(--bb3-border); border-radius: 12px; background: var(--bb3-card); }
.bb3-row { margin-top: 10px; }
.bb3-row:first-child { margin-top: 0; }
@media (min-width: 768px) { .bb3-card { padding: 24px; } }

.bb3-badge { display: inline-block; margin-bottom: 12px; padding: 4px 12px; border: 1px solid var(--bb3-ink-2); border-radius: 999px; color: var(--bb3-ink-2); font-size: 13px; line-height: 20px; }

/* 2 price: the price block of the theme keeps its markup, only the colour is the token */
.bb3-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.bb3-price .price, .bb3-price .price-wrapper .price { color: var(--bb3-price); }
/* 04b row 2: the theme price box always prints "Voor"; in v3 it shows only next to a real old price */
.bb3-price .price-box:not(:has(.old-price)) .final-price > .price:first-child { display: none; }
.bb3-price__vat, .bb3-price__unit { font-size: 14px; line-height: 20px; color: var(--bb3-muted); }
.bb3-price__main { margin: 0; font-size: 28px; line-height: 34px; font-weight: 700; color: var(--bb3-price); }
.bb3-price__unit { flex-basis: 100%; margin: 0; }

/* 3 availability: one slot, may wrap */
.bb3-avail { display: flex; align-items: flex-start; gap: 8px; }
.bb3-avail__text { margin: 0; font-size: 16px; line-height: 24px; font-weight: 700; overflow-wrap: anywhere; }
.bb3-avail__sub { margin: 0 0 0 20px; font-size: 14px; line-height: 20px; color: var(--bb3-ink-2); }
/* STICKY-ATC-02: stock counter, calm amber (7:1 on white), no icon, no animation */
.bb3-avail__sub.bb3-counter { color: #92400e; }
.bb3-avail__sub a { text-decoration: underline; }
.bb3-counter-bar { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: #92400e; }
.bb3-dot { box-sizing: border-box; flex: none; width: 12px; height: 12px; margin-top: 6px; border-radius: 999px; }
.bb3-dot--solid { background: var(--bb3-green); }
.bb3-dot--ring { border: 3px solid var(--bb3-price); background: #fff; }
.bb3-dot--hollow { border: 2px solid var(--bb3-control); background: transparent; }

/* 4 delivery and pickup: two short sub-lines */
.bb3-lines { margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 20px; color: var(--bb3-ink-2); }
.bb3-lines li + li { margin-top: 2px; }

/* 5 choose: tile calculator */
.bb3-field { display: block; margin: 0 0 6px; font-size: 14px; line-height: 20px; font-weight: 700; }
.bb3-input { box-sizing: border-box; min-height: 44px; min-width: 0; padding: 8px 12px; border: 1px solid var(--bb3-control); border-radius: 8px; background: #fff; color: var(--bb3-ink); font-size: 16px; line-height: 24px; }
.bb3-input--area { width: 8.5rem; text-align: center; }
.bb3-input--qty { width: 4.5rem; text-align: center; -moz-appearance: textfield; }
.bb3-input--qty::-webkit-outer-spin-button, .bb3-input--qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bb3-fieldset { margin: 12px 0 0; padding: 0; border: 0; min-width: 0; }
.bb3-legend { padding: 0; margin-bottom: 6px; font-size: 14px; line-height: 20px; font-weight: 700; }
.bb3-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bb3-chip { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 6px 14px; border: 1px solid var(--bb3-control); border-radius: 8px; background: #fff; font-size: 14px; line-height: 20px; cursor: pointer; }
.bb3-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.bb3-chip:has(input:checked) { border-color: var(--bb3-ink); box-shadow: 0 0 0 2px var(--bb3-ink); font-weight: 700; }
.bb3-chip:has(input:checked)::before { content: "\2713"; margin-right: 6px; }
.bb3-chip:has(input:focus-visible) { outline: 3px solid var(--bb3-focus); outline-offset: 2px; }
.bb3-chip small { display: block; font-size: 14px; color: var(--bb3-muted); }
.bb3-stepper { display: flex; align-items: center; gap: 8px; }
.bb3-step { min-height: 44px; min-width: 44px; border: 1px solid var(--bb3-control); border-radius: 8px; background: #fff; color: var(--bb3-ink); font-size: 20px; line-height: 24px; cursor: pointer; }
.bb3-result { margin: 8px 0 0; min-height: 22px; font-size: 14px; line-height: 22px; font-weight: 700; }
.bb3-error { margin: 6px 0 0; font-size: 14px; line-height: 20px; color: #B00020; }
.bb3-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; line-height: 20px; color: var(--bb3-ink); text-decoration: underline; }

/* 6 buy: one grid, the stepper in column 1, the button in column 2, the payment marks in column 2 under the button only.
   TKA-PDP-HOTFIX-WINDSOR-01 (B1). No stepper (tiles) = one column, the marks full width under the button. Below 360 px
   everything is one column. 8 px between the button and the marks. */
.bb3 .bb3-buy { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; align-items: center; }
.bb3 .bb3-buy--single { grid-template-columns: minmax(0, 1fr); }
.bb3 .bb3-buy__qty { min-width: 0; }
.bb3 .bb3-buy__cta { min-width: 0; }
.bb3 .bb3-buy .bb3-pay { grid-column: 2; margin: 0; }
.bb3 .bb3-buy--single .bb3-pay { grid-column: 1; }
@media (max-width: 359px) {
    .bb3 .bb3-buy { grid-template-columns: minmax(0, 1fr); }
    .bb3 .bb3-buy .bb3-pay { grid-column: 1; }
}
/* TKA-HOTFIX-PAYMARKS-02: on phones and tablets the column under the button is too narrow for six marks: the row takes
   the whole width under stepper and button, so it stays one line without cutting a logo */
@media (max-width: 1023px) {
    .bb3 .bb3-buy .bb3-pay--marks { grid-column: 1 / -1; }
}
.bb3 #product-addtocart-button-regular { height: auto; min-height: 48px; text-transform: none; letter-spacing: 0; }
.bb3-pay { margin: 8px 0 0; font-size: 14px; line-height: 20px; color: var(--bb3-ink-2); }
.bb3-pay--marks { display: flex; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 4px 6px; min-height: 18px; padding: 0; list-style: none; }
.bb3-pay--marks li { display: flex; margin: 0; }
.bb3-pay--marks img { display: block; height: 18px; width: auto; }
@media (min-width: 640px) {
    .bb3-pay--marks { column-gap: 8px; }
    .bb3-pay--marks img { height: 20px; }
}
/* 12 px between the payment row (or the button) and the trust row */
.bb3 .tka-trustrow { margin-top: 12px; }
/* quantity stepper of the buy box (B6): 44 x 48 px buttons, 48 px input, visible focus ring */
.bb3 .bb3-qty-btn { width: 44px; min-width: 44px; height: 48px; }
.bb3 .bb3-qty-input { height: 48px; }
.bb3 .bb3-qty-btn:focus-visible, .bb3 .bb3-qty-input:focus-visible { outline: 3px solid var(--bb3-focus); outline-offset: 2px; }
.bb3-notice { margin: 0; font-size: 14px; line-height: 20px; color: var(--bb3-ink-2); }
.bb3-wa { display: flex; align-items: center; justify-content: center; min-height: 48px; width: 100%; padding: 8px 16px; border: 1px solid var(--bb3-ink-2); border-radius: 8px; font-size: 16px; font-weight: 700; color: var(--bb3-ink); }

/* 7 trust 2 x 2, one column on a narrow screen */
.bb3-trust { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--bb3-border); list-style: none; }
.bb3-trust li { display: flex; align-items: center; gap: 8px; min-height: 44px; min-width: 0; font-size: 14px; line-height: 20px; color: var(--bb3-ink-2); }
.bb3-trust a { color: var(--bb3-ink-2); text-decoration: underline; }
.bb3-trust svg { flex: none; width: 22px; height: 22px; }
@media (max-width: 479px) { .bb3-trust { grid-template-columns: 1fr; } }

/* 8 why */
.bb3-why h2 { margin: 0 0 8px; font-size: 14px; line-height: 20px; font-weight: 700; }
.bb3-why ul { margin: 0; padding: 0; list-style: none; }
.bb3-why li { display: flex; align-items: flex-start; gap: 8px; margin-top: 6px; font-size: 15px; line-height: 22px; }
.bb3-why li:first-child { margin-top: 0; }
.bb3-why svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--bb3-green); }

/* 9 quote */
.bb3-quote { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; padding: 8px 16px; border: 1px solid var(--bb3-ink-2); border-radius: 8px; background: transparent; color: var(--bb3-ink); font-size: 15px; line-height: 22px; font-weight: 600; cursor: pointer; }

/* sticky bar of v2, kept for parity until STICKY-ATC-01 replaces it */
.bb3-sticky-price { color: #1F1D1A; }
.bb3-sticky-cta { min-height: 48px; }
/* one sticky CTA: below md the v3 bar replaces the theme's sticky bar (addtocart-scroll.phtml); md and up keep the theme bar */
@media (max-width: 767.98px) {
    [x-data="stickyAddToCartComponent()"] > [x-data="{ sticky: false }"] { display: none !important; }
}
.bb3-field--spaced { margin-top: 12px; }
