/*
 * BSS Advanced Combo Products — set builder, drawer and cart groups.
 * Colours, type and radius come from the host theme's tokens; the fallbacks keep it readable on themes without them.
 */
.acp,
.acp-drawer,
.acp-cart-set {
    --acp-ink: var(--text-primary, #1f1b19);
    --acp-ink-soft: var(--text-secondary, #4a4340);
    --acp-muted: var(--text-light, #6c625d);
    --acp-line: var(--border, #ddd3cc);
    --acp-line-soft: color-mix(in srgb, var(--acp-line) 55%, transparent);
    --acp-surface: var(--white, #fff);
    --acp-surface-alt: var(--bg-primary, #f5f1ee);
    --acp-accent: var(--primary, #2b2421);
    --acp-accent-hover: var(--primary-dark, #000);
    --acp-accent-ink: var(--white, #fff);
    --acp-accent-soft: var(--bg-secondary, #efe3dd);
    --acp-warn: var(--error, #9c3f2c);
    --acp-ok: var(--success, #2a7a4b);
    --acp-radius: var(--radius-base, 6px);
    --acp-radius-lg: calc(var(--acp-radius) * 2);
    --acp-font: var(--font-body, inherit);
    --acp-font-heading: var(--font-heading, inherit);
    --acp-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --acp-ease-io: cubic-bezier(0.77, 0, 0.175, 1);
    --acp-ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
    --acp-chip: 56px;
    --acp-gap: 12px;
    --acp-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 5.5 15.5 12 9 18.5' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    font-family: var(--acp-font);
    color: var(--acp-ink);
}

.acp *,
.acp-drawer * {
    box-sizing: border-box;
}

.acp-visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ------------------------------------------------------------------ builder */

.acp {
    position: relative;
    display: grid;
    gap: 14px;
    margin: 20px 0;
    padding: 20px 0;
    border-block: 1px solid var(--acp-line);
    min-width: 0;
}

.acp__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.acp__heading {
    min-width: 0;
}

@media (max-width: 767.98px) {
    .acp__head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 12px;
    }

    .acp__heading {
        display: contents;
    }

    .acp__hint {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

.acp__title {
    margin: 0;
    font-family: var(--acp-font-heading);
    font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.7rem);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: 0;
    text-wrap: balance;
    color: var(--acp-ink);
}

.acp__hint {
    margin: 6px 0 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--acp-muted);
    max-width: 60ch;
}

.acp__meta {
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.acp__count {
    flex: none;
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--acp-ink-soft);
    white-space: nowrap;
}

.acp__meter {
    height: 2px;
    background: var(--acp-line-soft);
    overflow: hidden;
    border-radius: 2px;
}

.acp__meter span {
    display: block;
    height: 100%;
    background: var(--acp-accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 320ms var(--acp-ease-out);
}

[dir="rtl"] .acp__meter span {
    transform-origin: right center;
}

.acp__meter span.is-over {
    background: var(--acp-warn);
}

/* The ordered preview: the base product, then the positions, each joined to the next by a chevron. */
.acp-strip {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

/* The base heads the strip at the size of the pieces after it, set apart by a double ring: the piece the rest
   goes onto. Its media layer clips the picture so the remove mark can sit over the corner. */
.acp-strip__base {
    position: relative;
    flex: none;
    display: block;
    margin: 0;
    /* Level with the pieces, which sit below the room the track keeps for their position tabs. */
    margin-block-start: 9px;
    padding: 0;
    width: var(--acp-chip);
    height: var(--acp-chip);
    border: 0;
    border-radius: var(--acp-radius);
    background: none;
    color: var(--acp-muted);
    font: inherit;
}

.acp-strip__base-media,
figure.acp-strip__base {
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: var(--acp-radius);
    background: var(--acp-surface-alt);
    box-shadow: 0 0 0 1px var(--acp-accent), 0 0 0 3px var(--acp-surface), 0 0 0 4px var(--acp-line);
}

.acp-strip__base-media {
    width: 100%;
    height: 100%;
    transition: box-shadow 160ms ease;
}

.acp-strip__base img {
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: opacity 160ms ease;
}

.acp-strip__base img[hidden],
.acp-strip__base:not(.is-empty) .acp-strip__base-media > i {
    display: none;
}

/* No base chosen yet: an empty place that points to the base tab. */
.acp-strip__base.is-empty .acp-strip__base-media {
    border: 1px dashed var(--acp-line);
    background: var(--acp-surface);
    box-shadow: none;
    font-size: 1.125rem;
}

/* The tile fills the base's place; the remove mark beside it is the pieces' own. */
.acp-strip__base-tile {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: var(--acp-radius);
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: color 160ms ease, transform 160ms var(--acp-ease-out);
}

.acp-strip__base-tile:active {
    transform: scale(0.95);
}

.acp-strip__base-tile:focus-visible {
    outline: none;
}

.acp-strip__base-tile:focus-visible .acp-strip__base-media {
    box-shadow: 0 0 0 1px var(--acp-accent), 0 0 0 3px var(--acp-surface), 0 0 0 5px var(--acp-accent);
}

.acp-strip__base .acp-pos__remove[hidden] {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .acp-strip__base.is-empty .acp-strip__base-tile:hover {
        color: var(--acp-accent);
    }

    .acp-strip__base.is-empty .acp-strip__base-tile:hover .acp-strip__base-media {
        border-color: var(--acp-accent);
    }
}

/* The chevron that reads "then": between the base and the first piece, and between every two pieces. */
.acp-strip__sep,
.acp-pos + .acp-pos::before {
    width: 12px;
    height: 12px;
    background-color: var(--acp-muted);
    -webkit-mask: var(--acp-chevron) center / contain no-repeat;
    mask: var(--acp-chevron) center / contain no-repeat;
}

.acp-strip__sep {
    flex: none;
    align-self: flex-start;
    margin-block-start: calc(9px + var(--acp-chip) / 2 - 6px);
}

.acp-pos + .acp-pos::before {
    content: "";
    position: absolute;
    top: calc(var(--acp-chip) / 2 - 6px);
    inset-inline-start: calc(var(--acp-strip-gap) / -2 - 6px);
    pointer-events: none;
}

[dir="rtl"] .acp-strip__sep,
[dir="rtl"] .acp-pos + .acp-pos::before {
    transform: scaleX(-1);
}

.acp-pos.is-leaving::before,
.acp-pos.is-leaving + .acp-pos::before,
.acp-strip__track.is-sorting .acp-pos::before {
    opacity: 0;
}

.acp-strip__scroller {
    position: relative;
    flex: 1;
    min-width: 0;
    --acp-fade-start: 0px;
    --acp-fade-end: 0px;
}

.acp-strip__scroller.has-before {
    --acp-fade-start: 44px;
}

.acp-strip__scroller.has-after {
    --acp-fade-end: 44px;
}

/* One row in assembly order; longer sets scroll sideways instead of wrapping, so the line stays one line.
   The edges fade only on the side that has more to show. */
.acp-strip__track {
    --acp-strip-gap: 24px;
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    /* Room for the chevron, and for one chip's remove mark and the next chip's position tab never to touch. */
    gap: var(--acp-strip-gap);
    margin: 0;
    /* Room for the position tabs that sit over each chip's top corner; the scroll edge would clip them. */
    padding-block: 9px 4px;
    padding-inline: 9px 12px;
    list-style: none;
    min-width: 0;
    overflow-x: auto;
    /* A sideways row only: with auto here a lifted chip made it scroll up and down, out of its place. */
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--acp-fade-start), #000 calc(100% - var(--acp-fade-end)), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 var(--acp-fade-start), #000 calc(100% - var(--acp-fade-end)), transparent 100%);
}

[dir="rtl"] .acp-strip__track {
    -webkit-mask-image: linear-gradient(270deg, transparent 0, #000 var(--acp-fade-start), #000 calc(100% - var(--acp-fade-end)), transparent 100%);
    mask-image: linear-gradient(270deg, transparent 0, #000 var(--acp-fade-start), #000 calc(100% - var(--acp-fade-end)), transparent 100%);
}

/* With the mouse, a longer row is dragged like a sheet. */
@media (hover: hover) and (pointer: fine) {
    .acp-strip__scroller:is(.has-before, .has-after) .acp-strip__track {
        cursor: grab;
    }
}

.acp-strip__track.is-panning,
.acp-strip__track.is-sorting {
    cursor: grabbing;
    scroll-snap-type: none;
}

/* In the drawer the row only ever travels sideways; a vertical swipe on it must not drag the sheet's
   contents, the dialog or the page behind it. */
.acp-strip--compact .acp-strip__track,
.acp-strip--compact .acp-pos {
    touch-action: pan-x;
    overscroll-behavior: contain;
}

.acp-strip__track.is-panning .acp-pos {
    pointer-events: none;
}

.acp-strip__nav {
    position: absolute;
    z-index: 3;
    top: calc(9px + var(--acp-chip) / 2);
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--acp-line);
    border-radius: 50%;
    background: var(--acp-surface);
    color: var(--acp-ink);
    box-shadow: 0 4px 12px -4px rgb(0 0 0 / 0.22);
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--acp-ease-out), opacity 180ms ease;
}

.acp-strip__nav[hidden] {
    display: none;
}

/* A finger-sized target around a compact disc. */
.acp-strip__nav::before {
    content: "";
    position: absolute;
    inset: -6px;
}

.acp-strip__nav--back {
    inset-inline-start: 0;
}

.acp-strip__nav--forward {
    inset-inline-end: 0;
}

[dir="rtl"] .acp-strip__nav i {
    transform: scaleX(-1);
}

.acp-strip__nav:active {
    transform: translateY(-50%) scale(0.92);
}

.acp-strip__nav:focus-visible {
    outline: 2px solid var(--acp-accent);
    outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
    .acp-strip__nav:hover {
        background: var(--acp-ink);
        color: var(--acp-surface);
    }
}

@media (pointer: coarse) {
    .acp-strip__nav {
        width: 34px;
        height: 34px;
    }
}

/* Phones: the arrows leave the row and sit beside the count, where they cover no piece. Both stay while the row
   scrolls; the one with nothing further to show dims. */
.acp-strip-arrows {
    display: none;
    flex: none;
    gap: 6px;
}

.acp-strip-arrows .acp-strip__nav {
    position: relative;
    top: auto;
    transform: none;
    width: 30px;
    height: 30px;
    box-shadow: none;
}

.acp-strip-arrows .acp-strip__nav:active {
    transform: scale(0.92);
}

.acp-strip-arrows .acp-strip__nav:disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.acp-drawer__head .acp-strip-arrows {
    grid-area: arrows;
    align-self: center;
}

/* The drawer's row is compact: arrows over its ends would cover a piece. They sit in the head beside the close
   button at every width, as on phones. */
.acp-drawer .acp-strip-arrows:not([hidden]) {
    display: flex;
}

.acp-drawer .acp-strip__scroller .acp-strip__nav {
    display: none;
}

@media (max-width: 767.98px) {
    .acp-strip-arrows:not([hidden]) {
        display: flex;
    }

    .acp-strip__scroller .acp-strip__nav {
        display: none;
    }
}

.acp-strip__track::-webkit-scrollbar {
    display: none;
}


.acp-pos {
    position: relative;
    flex: none;
    scroll-snap-align: start;
    width: var(--acp-chip);
    min-height: var(--acp-chip);
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 2px;
    list-style: none;
    border-radius: var(--acp-radius);
    outline: none;
    touch-action: pan-x pan-y;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    cursor: pointer;
}

.acp-pos.is-arranged {
    cursor: grab;
}

.acp-pos__media {
    position: relative;
    display: block;
    width: var(--acp-chip);
    height: var(--acp-chip);
    border-radius: var(--acp-radius);
    background: var(--acp-surface-alt);
    border: 1px solid var(--acp-line);
    overflow: hidden;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.acp-pos__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.acp-pos__num {
    position: absolute;
    top: -7px;
    inset-inline-start: -7px;
    z-index: 1;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    box-shadow: 0 0 0 2px var(--acp-surface);
    background: var(--acp-accent);
    color: var(--acp-accent-ink);
    font-size: 0.6875rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.acp-pos__num:empty {
    display: none;
}

.acp-pos__label {
    max-width: calc(var(--acp-chip) + 16px);
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    color: var(--acp-ink-soft);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acp-pos__label:empty,
.acp-pos__qty:empty {
    display: none;
}

/* Bottom end corner: the top end belongs to the remove button. */
.acp-pos__qty {
    position: absolute;
    top: calc(var(--acp-chip) - 13px);
    inset-inline-end: -7px;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 0 0 2px var(--acp-surface);
    background: var(--acp-ink);
    color: var(--acp-surface);
    font-size: 0.6875rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.acp-pos__flag {
    display: none;
    position: absolute;
    bottom: 14px;
    inset-inline-end: -4px;
    color: var(--acp-warn);
    background: var(--acp-surface);
    border-radius: 50%;
    font-size: 1rem;
    line-height: 1;
}

.acp-pos.has-error .acp-pos__flag {
    display: block;
}

.acp-pos.has-error .acp-pos__media {
    border-color: var(--acp-warn);
}

/* A piece past what the chosen base holds: dashed like an empty place and faded, with the warning flag, so the
   shopper sees which ones no longer fit. Its remove mark stays at full strength. */
.acp-pos.is-over .acp-pos__media {
    border-style: dashed;
    border-color: var(--acp-warn);
}

.acp-pos.is-over .acp-pos__media img {
    opacity: 0.45;
}

.acp-pos.is-over .acp-pos__flag {
    display: block;
}

.acp-pos:focus-visible .acp-pos__media {
    box-shadow: 0 0 0 2px var(--acp-surface), 0 0 0 4px var(--acp-accent);
}

.acp-pos.is-grabbed .acp-pos__media,
.acp-pos.is-dragging .acp-pos__media {
    border-color: var(--acp-accent);
    box-shadow: 0 10px 24px -8px rgb(0 0 0 / 0.35);
}

.acp-pos.is-dragging {
    z-index: 5;
    cursor: grabbing;
    transition: none;
}

/* While one chip is dragged, the others step aside into their new places. */
.acp-strip__track.is-sorting .acp-pos:not(.is-dragging) {
    transition: transform 220ms var(--acp-ease-out);
}

.acp-strip__track.is-sorting {
    cursor: grabbing;
}

/* Remove sits on the chip's top end corner, opposite the position number. */
.acp-pos__remove {
    position: absolute;
    top: -6px;
    inset-inline-end: -6px;
    z-index: 2;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--acp-surface);
    color: var(--acp-ink);
    box-shadow: 0 0 0 1px var(--acp-line), 0 2px 4px -1px rgb(0 0 0 / 0.16);
    font-size: 0.8125rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--acp-ease-out);
}

/* A finger-sized target around a small mark. It grows outwards, never towards the middle of the tile it sits on, so
   a tap on a small tile (48px on narrow phones) opens the tile instead of removing it. */
.acp-pos__remove::before {
    content: "";
    position: absolute;
    inset-block: -10px -2px;
    inset-inline: -2px -10px;
}

.acp-pos__remove:active {
    transform: scale(0.9);
}

.acp-pos__remove:focus-visible {
    outline: 2px solid var(--acp-accent);
    outline-offset: 2px;
}

.acp-pos.is-dragging .acp-pos__remove,
.acp-strip__track.is-sorting .acp-pos__remove {
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    .acp-pos__remove:hover {
        background: var(--acp-ink);
        color: var(--acp-surface);
    }
}

@media (pointer: coarse) {
    .acp-pos__remove {
        width: 22px;
        height: 22px;
    }
}

.acp-pos--empty {
    cursor: default;
}

.acp-pos__open {
    position: relative;
    width: var(--acp-chip);
    height: var(--acp-chip);
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px dashed var(--acp-line);
    border-radius: var(--acp-radius);
    background: var(--acp-surface);
    color: var(--acp-muted);
    font-size: 1.125rem;
    cursor: pointer;
    transition: border-color 160ms ease, color 160ms ease, transform 160ms var(--acp-ease-out);
}

.acp-pos__open .acp-pos__num {
    background: var(--acp-surface-alt);
    color: var(--acp-muted);
}

.acp-pos__open:active {
    transform: scale(0.95);
}

.acp-pos__open:focus-visible {
    outline: 2px solid var(--acp-accent);
    outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
    .acp-pos:hover .acp-pos__media {
        border-color: var(--acp-ink-soft);
    }

    .acp-pos__open:hover {
        border-color: var(--acp-accent);
        color: var(--acp-accent);
    }
}

.acp__tip {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: -4px 0 0;
    font-size: 0.75rem;
    color: var(--acp-muted);
}

/* Empty lines leave no row behind: the builder's gap would otherwise double up around them. */
.acp__tip[hidden],
.acp__status[hidden],
.acp__breakdown[hidden],
.acp__breakdown:empty {
    display: none;
}

.acp__status {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--acp-ink-soft);
}

.acp__status[data-tone="warn"] {
    color: var(--acp-warn);
}

/* "Choose your base to continue": after a blocked add to cart the line shakes with the base tab and is briefly lit. */
.acp__status.is-calling {
    justify-self: start;
    margin-inline: -8px;
    padding: 2px 8px;
    border-radius: var(--acp-radius);
    font-weight: 600;
    animation:
        acp-shake 420ms var(--acp-ease-out),
        acp-status-light 1400ms ease-out;
}

@keyframes acp-status-light {
    from {
        background: color-mix(in srgb, var(--acp-warn) 14%, transparent);
    }

    to {
        background: color-mix(in srgb, var(--acp-warn) 0%, transparent);
    }
}

.acp__included {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--acp-ink-soft);
}

.acp__included-label {
    font-weight: 600;
}

.acp__included-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.acp__included-list li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px 2px 2px;
    border: 1px solid var(--acp-line);
    border-radius: var(--acp-radius);
    background: var(--acp-surface);
}

.acp__included-list img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
}

/* "Add a note" and "Browse all" share one row; the note opens underneath it. */
/* The extra top margin matches the builder's bottom padding, so the row sits centred between the cards and the rule. */
.acp__tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin-top: 6px;
}

.acp__browse {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    padding-inline: 18px;
    overflow: hidden;
    isolation: isolate;
}

.acp__browse::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(105deg,
            transparent 30%,
            color-mix(in srgb, var(--acp-surface) 70%, transparent) 50%,
            transparent 70%);
    transform: translateX(-110%);
    pointer-events: none;
}

.acp__browse.is-cueing::after {
    animation: acp-sheen 1200ms var(--acp-ease-io);
}

.acp__browse.is-cueing .acp__browse-arrow {
    animation: acp-nudge 1200ms var(--acp-ease-out);
}

@keyframes acp-sheen {
    to {
        transform: translateX(110%);
    }
}

@keyframes acp-nudge {
    0%,
    100% {
        translate: 0;
    }

    35% {
        translate: 4px;
    }

    55% {
        translate: 0;
    }

    75% {
        translate: 2px;
    }
}

[dir="rtl"] .acp__browse::after {
    transform: translateX(110%);
}

[dir="rtl"] .acp__browse.is-cueing .acp__browse-arrow {
    animation: none;
}

[dir="rtl"] .acp__browse.is-cueing::after {
    animation-name: acp-sheen-rtl;
}

@keyframes acp-sheen-rtl {
    to {
        transform: translateX(-110%);
    }
}

/* Stacked on narrow screens, "Browse all" comes first: it is the way to every item, the note is optional. */
@media (max-width: 575.98px) {
    .acp__browse {
        order: -1;
    }
}

@media (min-width: 576px) {
    .acp__browse {
        flex: 0 1 auto;
        min-width: 240px;
        margin-inline-start: auto;
    }

    .acp__browse:only-child {
        flex: 1 1 auto;
    }
}

.acp__browse-label {
    flex: 1;
    min-width: 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acp__browse-icon,
.acp__browse-arrow {
    flex: none;
    font-size: 1.125rem;
    line-height: 1;
}

.acp__browse-arrow {
    transition: transform 200ms var(--acp-ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .acp__browse:hover .acp__browse-arrow {
        transform: translateX(3px);
    }

    [dir="rtl"] .acp__browse:hover .acp__browse-arrow {
        transform: scaleX(-1) translateX(3px);
    }
}

[dir="rtl"] .acp__browse-arrow {
    transform: scaleX(-1);
}

.acp__note-toggle {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--acp-ink-soft);
    cursor: pointer;
    transition: color 160ms ease;
}

.acp__note-toggle span {
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: text-decoration-color 160ms ease;
}

.acp__note-toggle[aria-expanded="true"] {
    color: var(--acp-ink);
}

.acp__note-toggle:focus-visible {
    outline: 2px solid var(--acp-accent);
    outline-offset: 2px;
    border-radius: 2px;
}

@media (hover: hover) and (pointer: fine) {
    .acp__note-toggle:hover {
        color: var(--acp-ink);
    }

    .acp__note-toggle:hover span {
        text-decoration-color: currentColor;
    }
}

.acp__note[hidden] {
    display: none;
}

.acp__note-field {
    width: 100%;
    min-height: 84px;
    padding: 10px 12px;
    border: 1px solid var(--acp-line);
    border-radius: var(--acp-radius);
    background: var(--acp-surface);
    color: var(--acp-ink);
    font: inherit;
    font-size: 0.9375rem;
    line-height: 1.5;
    resize: vertical;
}

.acp__note-field:focus {
    outline: none;
    border-color: var(--acp-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--acp-accent) 15%, transparent);
}

.acp__note-count {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--acp-muted);
    text-align: end;
    font-variant-numeric: tabular-nums;
}

.acp__breakdown {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--acp-muted);
    font-variant-numeric: tabular-nums;
}

.acp__actions {
    display: flex;
    gap: 10px;
}

.acp__actions .acp__add {
    flex: 1;
}

.acp.is-updating .acp__breakdown,
.acp.is-updating .acp__count {
    opacity: 0.6;
    transition: opacity 160ms ease;
}

/* ------------------------------------------------------------------ cards */

.acp-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--acp-gap);
}

/* The page previews one row; every item is one tap away in "Browse all". Without the slider the markup carries up
   to four. The base options all show (they are the first choice), in the same columns as the item row under them.
   Phones swipe these rows sideways (see the page row slider). */
@media (min-width: 768px) {
    .acp-grid--featured,
    .acp-grid--base {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Laptops put the builder in the narrow second column of the product page: three cards keep them legible. */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .acp-grid--featured,
    .acp-grid--base {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .acp-grid--featured:not(.acp-grid--rail) > .acp-card:nth-child(n + 4) {
        display: none;
    }
}

.acp-card {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 8px;
    min-width: 0;
    padding: 8px 8px 10px;
    border: 1px solid var(--acp-line-soft);
    border-radius: var(--acp-radius);
    background: var(--acp-surface);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.acp-card[hidden] {
    display: none;
}

/* Cards size their controls to their own width: a narrow column (4 across at 1024px, 2 on a small phone)
   would otherwise push a long label such as "Toevoegen" out of its button. */
.acp-card {
    container-type: inline-size;
}

@container (max-width: 124px) {
    .acp-card .acp-card__add {
        gap: 4px;
        padding-inline: 4px;
        font-size: 11px;
        letter-spacing: 0.02em;
    }

    .acp-card .acp-card__add i {
        display: none;
    }

    .acp-card .acp-step {
        grid-template-columns: 32px 1fr 32px;
    }
}

.acp-card.is-picked {
    border-color: var(--acp-accent);
}

.acp-card.is-soldout .acp-card__media img {
    opacity: 0.45;
    filter: grayscale(1);
}

/* A card that cannot take another pick reads as unavailable: faded picture, muted text, and its button names the
   limit in place of "Add". */
.acp-card.is-blocked {
    cursor: not-allowed;
    border-color: var(--acp-line-soft);
    box-shadow: none;
}

.acp-card.is-blocked .acp-card__media img {
    opacity: 0.4;
    filter: grayscale(1);
    transform: none;
}

.acp-card.is-blocked .acp-card__media-link {
    pointer-events: none;
}

.acp-card.is-blocked :is(.acp-card__name, .acp-card__price, .acp-card__variant) {
    color: var(--acp-muted);
}

.acp-card.is-blocked .acp-card__add:disabled {
    border-style: dashed;
    background: var(--acp-surface-alt);
    font-weight: 500;
}

.acp-card__media {
    position: relative;
    aspect-ratio: 1;
    border-radius: calc(var(--acp-radius) - 2px);
    background: var(--acp-surface-alt);
    overflow: hidden;
}

.acp-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 400ms var(--acp-ease-out), opacity 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .acp-card:not(.is-soldout):hover .acp-card__media img {
        transform: scale(1.04);
    }

    .acp-card:not(.is-picked):hover {
        border-color: var(--acp-line);
        box-shadow: 0 6px 18px -10px rgb(0 0 0 / 0.25);
    }
}

.acp-card__badge {
    position: absolute;
    top: 6px;
    inset-inline-end: 6px;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--acp-accent);
    color: var(--acp-accent-ink);
    font-size: 0.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.acp-card__badge.is-check::before {
    content: "";
    width: 10px;
    height: 6px;
    border-inline-start: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-1px) rotate(-45deg);
}

.acp-card__badge[hidden] {
    display: none;
}

.acp-card__info {
    display: grid;
    align-content: start;
    gap: 2px;
    min-width: 0;
}

.acp-card__name {
    margin: 0;
    font-family: var(--acp-font);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--acp-ink);
    /* Two lines are always reserved, so prices and buttons line up across a row. */
    min-height: 2.7em;
    max-height: 2.7em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.acp-card__name a {
    color: inherit;
    text-decoration: none;
}

.acp-card__name a:focus-visible {
    outline: 2px solid var(--acp-accent);
    outline-offset: 2px;
    border-radius: 2px;
}

.acp-card__media-link {
    display: block;
    width: 100%;
    height: 100%;
}

@media (hover: hover) and (pointer: fine) {
    .acp-card__name a:hover {
        text-decoration: underline;
        text-decoration-thickness: 1px;
        text-underline-offset: 3px;
    }
}

.acp-card__variant,
.acp-card__price {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--acp-muted);
    font-variant-numeric: tabular-nums;
}

.acp-card__price {
    color: var(--acp-ink-soft);
    font-weight: 600;
}

.acp-card__cta {
    min-width: 0;
}

.acp-card__add,
.acp-step {
    width: 100%;
    min-height: 40px;
    border-radius: var(--acp-radius);
}

.acp-card__add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid var(--acp-ink);
    background: transparent;
    color: var(--acp-ink);
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--acp-ease-out), border-color 160ms ease;
}

.acp-card__add[aria-pressed="true"] {
    background: var(--acp-accent);
    border-color: var(--acp-accent);
    color: var(--acp-accent-ink);
}

.acp-card__add:active:not(:disabled) {
    transform: scale(0.97);
}

.acp-card__add:disabled {
    border-color: var(--acp-line);
    color: var(--acp-muted);
    cursor: not-allowed;
}

.acp-card__add:focus-visible,
.acp-step__btn:focus-visible {
    outline: 2px solid var(--acp-accent);
    outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
    .acp-card__add:hover:not(:disabled):not([aria-pressed="true"]) {
        background: var(--acp-ink);
        color: var(--acp-surface);
    }
}

.acp-card__add[hidden],
.acp-step[hidden] {
    display: none;
}

.acp-step {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    border: 1px solid var(--acp-accent);
    background: var(--acp-accent);
    color: var(--acp-accent-ink);
    overflow: hidden;
}

.acp-step__btn {
    height: 100%;
    min-height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 160ms ease, transform 120ms var(--acp-ease-out);
}

.acp-step__btn:active:not(:disabled) {
    transform: scale(0.92);
}

.acp-step__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

@media (hover: hover) and (pointer: fine) {
    .acp-step__btn:hover:not(:disabled) {
        background: rgb(255 255 255 / 0.12);
    }
}

.acp-step__value {
    text-align: center;
    font-size: 0.875rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.acp-card__soldout {
    display: grid;
    place-items: center;
    min-height: 40px;
    border: 1px dashed var(--acp-line);
    border-radius: var(--acp-radius);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--acp-muted);
}

/* An item that needs a choice opens across the whole row, picture beside the options. */
.acp-card.is-picking {
    grid-column: 1 / -1;
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    align-content: start;
    align-items: start;
    gap: 12px;
    padding: 12px;
    border-color: var(--acp-accent);
    box-shadow: 0 12px 28px -18px rgb(0 0 0 / 0.4);
    z-index: 2;
}

.acp-card.is-picking .acp-card__cta {
    display: none;
}

.acp-card.is-picking .acp-picker {
    grid-column: 1 / -1;
}

@media (min-width: 426px) {
    .acp-card.is-picking .acp-picker {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .acp-card.is-picking .acp-card__info {
        grid-column: 1;
    }
}

.acp-picker {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.acp-picker[hidden] {
    display: none;
}

.acp-picker__fields {
    display: grid;
    gap: 12px;
}

.acp-field {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.acp-field__label {
    padding: 0;
    margin-bottom: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--acp-ink);
}

.acp-field__req {
    color: var(--acp-warn);
    margin-inline-start: 2px;
}

.acp-guide {
    margin: -2px 0 10px;
    font-size: 0.75rem;
}

.acp-guide__toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 28px;
    font-weight: 600;
    color: var(--acp-ink-soft);
    cursor: pointer;
    list-style: none;
}

.acp-guide__toggle span {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.acp-guide__toggle::-webkit-details-marker {
    display: none;
}

.acp-guide__toggle:focus-visible {
    outline: 2px solid var(--acp-accent);
    outline-offset: 2px;
    border-radius: 2px;
}

.acp-guide__caret {
    transition: transform 200ms var(--acp-ease-out);
}

.acp-guide[open] .acp-guide__caret {
    transform: rotate(180deg);
}

/* Merchant-written HTML at the card's own scale. Editors write inline sizes and spacing for a full page,
   so those are reset here; colours, weights and rules are left as written. */
.acp-guide__body {
    max-height: 240px;
    margin-top: 6px;
    padding: 10px 12px;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--acp-line) transparent;
    border: 1px solid var(--acp-line-soft);
    border-radius: var(--acp-radius);
    background: var(--acp-surface-alt);
    color: var(--acp-ink-soft);
    font-size: 0.75rem;
    line-height: 1.5;
}

.acp-guide__body:focus-visible {
    outline: 2px solid var(--acp-accent);
    outline-offset: 2px;
}

.acp-guide__body * {
    font-size: inherit !important;
    line-height: inherit !important;
}

.acp-guide__body :where(p, div, ul, ol, table, h1, h2, h3, h4, h5, h6, figure, blockquote) {
    margin: 0 0 8px !important;
}

.acp-guide__body > :last-child,
.acp-guide__body > :last-child > :last-child {
    margin-bottom: 0 !important;
}

.acp-guide__body :where(h1, h2, h3, h4, h5, h6) {
    font-family: inherit;
    font-weight: 600;
    color: var(--acp-ink);
}

.acp-guide__body table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.acp-guide__body :where(th, td) {
    padding: 5px 8px 5px 0 !important;
    text-align: start;
    vertical-align: top;
    white-space: nowrap;
}

.acp-guide__body th {
    font-size: 0.6875rem !important;
}

.acp-guide__body :where(img, video, iframe) {
    max-width: 100%;
    height: auto;
}

.acp-field.has-error .acp-options,
.acp-field.has-error .acp-input {
    outline: 1px solid var(--acp-warn);
    outline-offset: 3px;
    border-radius: var(--acp-radius);
}

.acp-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.acp-option {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin: 0;
    cursor: pointer;
}

.acp-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.acp-option__face {
    min-width: 40px;
    min-height: 40px;
    padding: 0 10px;
    display: grid;
    place-items: center;
    border: 1px solid var(--acp-line);
    border-radius: var(--acp-radius);
    background: var(--acp-surface);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--acp-ink);
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 120ms var(--acp-ease-out);
}

.acp-option:active .acp-option__face {
    transform: scale(0.94);
}

.acp-option input:checked + .acp-option__face {
    background: var(--acp-accent);
    border-color: var(--acp-accent);
    color: var(--acp-accent-ink);
}

.acp-option input:focus-visible + .acp-option__face {
    outline: 2px solid var(--acp-accent);
    outline-offset: 2px;
}

.acp-option__face--swatch {
    width: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 50%;
    background: var(--acp-swatch);
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08);
}

.acp-option input:checked + .acp-option__face--swatch {
    background: var(--acp-swatch);
    box-shadow: 0 0 0 2px var(--acp-surface), 0 0 0 4px var(--acp-accent);
}

.acp-option__face--image {
    width: 52px;
    height: 52px;
    padding: 2px;
    overflow: hidden;
}

.acp-option__face--image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--acp-radius) - 2px);
}

.acp-option input:checked + .acp-option__face--image {
    background: var(--acp-surface);
    box-shadow: 0 0 0 2px var(--acp-accent);
}

.acp-option__adj {
    font-size: 0.6875rem;
    color: var(--acp-muted);
    font-variant-numeric: tabular-nums;
}

.acp-input {
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--acp-line);
    border-radius: var(--acp-radius);
    background: var(--acp-surface);
    color: var(--acp-ink);
    font: inherit;
    font-size: 16px;
}

.acp-input:focus {
    outline: none;
    border-color: var(--acp-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--acp-accent) 15%, transparent);
}

.acp-picker__error {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--acp-warn);
}

.acp-picker__error[hidden] {
    display: none;
}

.acp-picker__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ------------------------------------------------------------------ buttons */

.acp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: var(--button-radius, var(--acp-radius));
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms var(--acp-ease-out);
}

.acp-btn:active {
    transform: scale(0.97);
}

.acp-btn:focus-visible {
    outline: 2px solid var(--acp-accent);
    outline-offset: 2px;
}

.acp-btn--sm {
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.8125rem;
}

.acp-btn--primary {
    background: var(--acp-accent);
    color: var(--acp-accent-ink);
}

.acp-btn--primary[aria-disabled="true"] {
    opacity: 0.55;
}

.acp-btn--ghost {
    background: transparent;
    border-color: var(--acp-line);
    color: var(--acp-ink);
}

/* A clear second action that still yields to the dark add-to-cart. */
.acp-btn--soft {
    background: var(--acp-accent-soft);
    color: var(--acp-ink);
}

@media (hover: hover) and (pointer: fine) {
    .acp-btn--primary:hover {
        background: var(--acp-accent-hover);
        color: var(--acp-accent-ink);
    }

    .acp-btn--ghost:hover {
        border-color: var(--acp-ink);
    }

    .acp-btn--soft:hover {
        background: color-mix(in srgb, var(--acp-ink) 8%, var(--acp-accent-soft));
    }
}

.acp-icon-btn {
    flex: none;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--acp-ink);
    font-size: 1.375rem;
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms var(--acp-ease-out);
}

.acp-icon-btn:active {
    transform: scale(0.94);
}

.acp-icon-btn:focus-visible {
    outline: 2px solid var(--acp-accent);
}

@media (hover: hover) and (pointer: fine) {
    .acp-icon-btn:hover {
        background: var(--acp-surface-alt);
    }
}

.acp-qty {
    display: grid;
    grid-template-columns: 44px 52px 44px;
    align-items: center;
    border: 1px solid var(--acp-line);
    border-radius: var(--button-radius, var(--acp-radius));
    background: var(--acp-surface);
}

.acp-qty__btn {
    height: 46px;
    border: 0;
    background: none;
    color: var(--acp-ink);
    cursor: pointer;
}

.acp-qty__input {
    width: 100%;
    border: 0;
    background: none;
    text-align: center;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    color: var(--acp-ink);
}

/* Fingers need 44px; a mouse keeps the denser grid. */
@media (pointer: coarse) {
    .acp-card__add,
    .acp-step,
    .acp-step__btn,
    .acp-btn--sm,
    .acp-tab,
    .acp-option__face {
        min-height: 44px;
    }

    /* A finger-sized target that leaves the header bar its own height. */
    .bss-acp-lines__edit {
        margin-block: -12px;
        padding-block: 12px;
    }

    .acp-option__face {
        min-width: 44px;
    }

    .acp-option__face--swatch {
        width: 44px;
        min-width: 44px;
        min-height: 44px;
    }

    .acp-step {
        grid-template-columns: 44px 1fr 44px;
    }
}

/* ------------------------------------------------------------------ drawer */

.acp-drawer {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    /* clip, not hidden: a hidden box can still be scrolled by focus, which cancels the slide-in. */
    overflow: hidden;
    overflow: clip;
    color: var(--acp-ink);
}

/* Same motion and scrim as the theme's flyout cart, so the two drawers feel like one family. */
.acp-drawer::backdrop {
    background: rgb(0 0 0 / 0.5);
    opacity: 0;
    transition: opacity 150ms linear;
}

.acp-drawer.is-open::backdrop {
    opacity: 1;
}

.acp-drawer.is-closing::backdrop {
    opacity: 0;
}

.acp-drawer__panel {
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: min(520px, 100%);
    display: flex;
    flex-direction: column;
    background: var(--acp-surface);
    box-shadow: -18px 0 48px -24px rgb(0 0 0 / 0.35);
    transform: translateX(100%);
    transition: transform 300ms ease-in-out;
}

[dir="rtl"] .acp-drawer__panel {
    transform: translateX(-100%);
}

.acp-drawer.is-open .acp-drawer__panel {
    transform: translateX(0);
}

.acp-drawer.is-closing .acp-drawer__panel {
    transition-duration: 300ms;
}

.acp-drawer__grip {
    display: none;
}

.acp-drawer__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
        "title arrows close"
        "count . .";
    align-items: center;
    column-gap: 8px;
    padding: 18px 20px 10px;
}

.acp-drawer__head .acp-drawer__title {
    grid-area: title;
}

.acp-drawer__head .acp-drawer__count {
    grid-area: count;
}

.acp-drawer__head [data-acp-close] {
    grid-area: close;
    margin-inline-end: -10px;
}

.acp-drawer__title {
    margin: 0;
    font-family: var(--acp-font-heading);
    font-size: 1.375rem;
    font-weight: 500;
    line-height: 1.2;
    text-wrap: balance;
}

.acp-drawer__count {
    margin: 4px 0 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--acp-ink-soft);
    font-variant-numeric: tabular-nums;
}

.acp-strip--compact {
    --acp-chip: 44px;
    padding: 4px 20px 12px;
    border-bottom: 1px solid var(--acp-line-soft);
}

.acp-strip--compact .acp-pos__label {
    display: none;
}

.acp-drawer__tools {
    display: grid;
    gap: 10px;
    padding: 12px 20px;
}

/* A sideways scroller clips vertically too: the block padding (taken back by the margin) keeps the pills'
   borders, rounding and focus ring inside it on every device's pixel rounding. */
.acp-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    margin-block: -4px;
    margin-inline: -20px;
    padding-block: 4px;
    padding-inline: 20px;
}

.acp-tabs::-webkit-scrollbar {
    display: none;
}

.acp-tab {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--acp-line);
    border-radius: 999px;
    background: var(--acp-surface);
    color: var(--acp-ink-soft);
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.acp-tab.is-active {
    background: var(--acp-ink);
    border-color: var(--acp-ink);
    color: var(--acp-surface);
}

.acp-tab:focus-visible {
    outline: 2px solid var(--acp-accent);
    outline-offset: 2px;
}

/* The base tab leads the row: a round picture slot no other tab has, a chevron after it ("then the pieces"),
   and a soft fill until a base is chosen. Once chosen it carries that base's picture and name. */
.acp-tab--base {
    gap: 8px;
    max-width: min(62%, 260px);
    padding-inline: 4px 14px;
    border-style: dashed;
    border-color: var(--acp-accent);
    background: var(--acp-accent-soft);
    color: var(--acp-ink);
}

.acp-tab--base.is-done {
    border-style: solid;
    border-color: var(--acp-line);
    background: var(--acp-surface);
    color: var(--acp-ink-soft);
}

.acp-tab--base.is-active {
    border-style: solid;
    border-color: var(--acp-ink);
    background: var(--acp-ink);
    color: var(--acp-surface);
}

.acp-tab__thumb {
    position: relative;
    flex: none;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--acp-surface);
    color: var(--acp-accent);
    font-size: 0.9375rem;
    overflow: hidden;
}

.acp-tab__thumb img {
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.acp-tab__thumb img[hidden],
.acp-tab--base.is-done .acp-tab__thumb i {
    display: none;
}

.acp-tab__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acp-tabs__sep {
    flex: none;
    align-self: center;
    width: 12px;
    height: 12px;
    background-color: var(--acp-muted);
    -webkit-mask: var(--acp-chevron) center / contain no-repeat;
    mask: var(--acp-chevron) center / contain no-repeat;
}

[dir="rtl"] .acp-tabs__sep {
    transform: scaleX(-1);
}

/* "Choose the base first": the tab rings out twice when a locked add to cart sends the shopper to it. */
.acp-tab--base.is-calling {
    animation:
        acp-call 620ms var(--acp-ease-out) 2,
        acp-shake 420ms var(--acp-ease-out);
}

@keyframes acp-shake {
    0%,
    100% {
        transform: none;
    }

    20% {
        transform: translateX(-5px);
    }

    40% {
        transform: translateX(4px);
    }

    60% {
        transform: translateX(-3px);
    }

    80% {
        transform: translateX(2px);
    }
}

@keyframes acp-call {
    from {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--acp-accent) 45%, transparent);
    }

    to {
        box-shadow: 0 0 0 10px color-mix(in srgb, var(--acp-accent) 0%, transparent);
    }
}

@media (prefers-reduced-motion: reduce) {
    .acp-tab--base.is-calling,
    .acp__status.is-calling {
        animation: none;
        outline: 2px solid var(--acp-accent);
        outline-offset: 2px;
    }
}

.acp-tab__count {
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    opacity: 0.75;
}

.acp-tab__count.is-full {
    opacity: 1;
}

.acp-search {
    position: relative;
    display: block;
}

.acp-search i {
    position: absolute;
    top: 50%;
    inset-inline-start: 12px;
    transform: translateY(-50%);
    color: var(--acp-muted);
    pointer-events: none;
}

.acp-search input {
    width: 100%;
    min-height: 44px;
    padding: 0 12px 0 38px;
    border: 1px solid var(--acp-line);
    border-radius: 999px;
    background: var(--acp-surface-alt);
    color: var(--acp-ink);
    font: inherit;
    font-size: 16px;
}

[dir="rtl"] .acp-search input {
    padding: 0 38px 0 12px;
}

.acp-search input:focus {
    outline: none;
    border-color: var(--acp-accent);
    background: var(--acp-surface);
}

.acp-drawer__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px 20px 24px;
    -webkit-overflow-scrolling: touch;
}

.acp-drawer__body .acp-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.acp-section + .acp-section {
    margin-top: 24px;
}

/* Product page with several slots: one tab per slot, one row of its items under it. */
.acp-slots {
    display: grid;
    gap: 12px;
    min-width: 0;
}

/* Page tabs line up with the cards; only the drawer's run edge to edge. Inline padding keeps the focus ring. */
.acp-tabs--page {
    margin-inline: -4px;
    padding-inline: 4px;
}

.acp-slots__panel {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.acp-slots__panel[hidden] {
    display: none;
}

.acp-slots__panel .acp-section__hint {
    margin-top: -6px;
}

.acp-section__rule {
    transition: color 200ms ease;
}

.acp-group.is-short .acp-section__rule {
    color: var(--acp-warn);
}

.acp-section[hidden],
.acp-empty[hidden] {
    display: none;
}

.acp-section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 12px;
    margin-bottom: 12px;
}

.acp-section__title {
    margin: 0;
    font-family: var(--acp-font-heading);
    font-size: 1.125rem;
    font-weight: 500;
}

.acp-section__rule {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--acp-muted);
}

.acp-section__hint {
    flex-basis: 100%;
    margin: 0;
    font-size: 0.8125rem;
    color: var(--acp-muted);
}

.acp-empty {
    margin: 32px 0;
    text-align: center;
    color: var(--acp-muted);
    font-size: 0.875rem;
}

.acp-drawer__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--acp-line);
    background: var(--acp-surface);
}

.acp-drawer__total {
    display: grid;
    min-width: 0;
}

.acp-drawer__total-value {
    font-size: 1.0625rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.acp-drawer__total-note {
    font-size: 0.75rem;
    color: var(--acp-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acp-drawer__buttons {
    display: flex;
    gap: 8px;
    flex: none;
}

/* Phones: a bottom sheet the thumb can reach, dismissed by dragging it down. */
@media (max-width: 767.98px) {
    .acp-drawer__panel {
        inset: auto 0 0 0;
        width: 100%;
        height: min(92dvh, 100%);
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -18px 48px -24px rgb(0 0 0 / 0.35);
        transform: translateY(100%);
    }

    [dir="rtl"] .acp-drawer__panel {
        transform: translateY(100%);
    }

    .acp-drawer.is-open .acp-drawer__panel {
        transform: translateY(0);
    }

    .acp-drawer__grip {
        display: grid;
        place-items: center;
        height: 22px;
        touch-action: none;
        cursor: grab;
    }

    .acp-drawer__grip span {
        width: 40px;
        height: 4px;
        border-radius: 2px;
        background: var(--acp-line);
    }

    .acp-drawer__head {
        padding-top: 2px;
        touch-action: none;
    }

    .acp-drawer__buttons .acp-btn--ghost {
        display: none;
    }
}

@media (max-width: 374.98px) {
    .acp {
        --acp-chip: 48px;
        --acp-gap: 8px;
    }

    .acp-drawer__head,
    .acp-drawer__tools,
    .acp-drawer__body,
    .acp-drawer__foot {
        padding-inline: 14px;
    }

    .acp-strip--compact {
        padding-inline: 14px;
    }

    .acp-drawer .acp-tabs {
        margin-inline: -14px;
        padding-inline: 14px;
    }

    .acp-card.is-picking {
        grid-template-columns: 64px minmax(0, 1fr);
    }
}

/* ------------------------------------------------------------------ chip menu */

.acp-menu {
    position: absolute;
    z-index: 30;
    min-width: 200px;
    display: grid;
    padding: 6px;
    border: 1px solid var(--acp-line);
    border-radius: var(--acp-radius-lg);
    background: var(--acp-surface);
    box-shadow: 0 16px 40px -16px rgb(0 0 0 / 0.35);
}

.acp-menu[hidden] {
    display: none;
}

.acp-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--acp-radius);
    background: none;
    color: var(--acp-ink);
    font: inherit;
    font-size: 0.875rem;
    text-align: start;
    cursor: pointer;
}

.acp-menu button[hidden] {
    display: none;
}

.acp-menu button:focus-visible,
.acp-menu button:hover {
    background: var(--acp-surface-alt);
    outline: none;
}

.acp-menu .is-danger {
    color: var(--acp-warn);
}

.acp-ghost {
    position: fixed;
    z-index: 2147483000;
    margin: 0;
    object-fit: contain;
    pointer-events: none;
    background: var(--acp-surface, #fff);
    transform-origin: top left;
    will-change: transform;
}

/* ------------------------------------------------------------------ product box, quick view */

/* The product box rules live in advanced-combo-box.css; the product page needs only these two for its price. */
.acp-price-hidden {
    display: none !important;
}

.acp-price-words {
    font-weight: 500;
    font-variant-numeric: normal;
}

/* While the rule's price line shows, the product's catalogue old price beside it means nothing. */
.acp-price-display .old-product-price {
    display: none;
}

.acp-quickview {
    display: grid;
    gap: 10px;
    margin: 12px 0;
    padding: 14px 16px;
    border: 1px solid var(--border, #ddd3cc);
    border-radius: var(--radius-base, 6px);
}

.acp-quickview__text {
    margin: 0;
    font-size: 0.875rem;
}

/* ------------------------------------------------------------------ cart sets */

.bss-acp-lines__label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bss-acp-lines__edit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-inline-start: auto;
    font-weight: 600;
    color: var(--text-primary, #1f1b19);
    text-decoration: none;
    white-space: nowrap;
}

/* Only the words carry the underline, not the pen in front of them. */
.bss-acp-lines__edit-text {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.acp-cart-set__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin-top: 6px;
    font-size: 0.8125rem;
}

.acp-cart-set__edit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    color: var(--acp-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.acp-cart-set__position {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    margin-inline-end: 6px;
    border-radius: 10px;
    background: var(--acp-accent);
    color: var(--acp-accent-ink);
    font-size: 0.6875rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
    .acp *,
    .acp-drawer *,
    .acp-drawer::backdrop {
        transition-duration: 1ms !important;
        animation-duration: 1ms !important;
    }

    /* No sliding: the sheet is simply there, fading in. */
    .acp-drawer__panel,
    [dir="rtl"] .acp-drawer__panel {
        transform: none !important;
        opacity: 0;
        transition: opacity 160ms ease !important;
    }

    .acp-drawer.is-open .acp-drawer__panel {
        opacity: 1;
    }
}

/* ------------------------------------------------------------------ page row slider */

/* A row that holds more cards than fit scrolls sideways, a whole card at a time, with arrows over its pictures.
   The padding keeps the cards' hover shadow and focus ring inside the scroll box. */
.acp-rail {
    position: relative;
    min-width: 0;
}

.acp-grid--rail {
    --acp-cols: 3;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - (var(--acp-cols) - 1) * var(--acp-gap)) / var(--acp-cols));
    margin: -4px -3px -14px;
    padding: 4px 3px 14px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 3px;
    scrollbar-width: none;
}

.acp-grid--rail::-webkit-scrollbar {
    display: none;
}

.acp-grid--rail > .acp-card {
    scroll-snap-align: start;
}

@media (min-width: 768px) {
    .acp-grid--rail {
        --acp-cols: 4;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .acp-grid--rail {
        --acp-cols: 3;
    }
}

/* Phones: every page row swipes, slider on or off, with two and a half cards in view; the cut card says there is
   more. A card that opens its options takes the row on its own, as in a slider row. */
@media (max-width: 767.98px) {
    .acp-grid--featured,
    .acp-grid--base {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: calc((100% - 2 * var(--acp-gap)) / 2.5);
        margin: -4px -3px -14px;
        padding: 4px 3px 14px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 3px;
        scrollbar-width: none;
    }

    .acp-grid--featured::-webkit-scrollbar,
    .acp-grid--base::-webkit-scrollbar {
        display: none;
    }

    .acp-grid--featured > .acp-card,
    .acp-grid--base > .acp-card {
        scroll-snap-align: start;
    }

    .acp-grid:is(.acp-grid--featured, .acp-grid--base):has(> .acp-card.is-picking) {
        grid-auto-flow: row;
        grid-template-columns: minmax(0, 1fr);
        overflow: visible;
        scroll-snap-type: none;
    }

    .acp-grid:is(.acp-grid--featured, .acp-grid--base):has(> .acp-card.is-picking) > .acp-card:not(.is-picking) {
        display: none;
    }
}

.acp-rail__nav {
    position: absolute;
    top: var(--acp-rail-y, 38%);
    z-index: 3;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--acp-line);
    border-radius: 50%;
    background: var(--acp-surface);
    color: var(--acp-ink);
    box-shadow: 0 6px 16px -6px rgb(0 0 0 / 0.3);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--acp-ease-out), opacity 180ms ease;
}

.acp-rail__nav[hidden] {
    display: none;
}

.acp-rail__nav::before {
    content: "";
    position: absolute;
    inset: -6px;
}

.acp-rail__nav--back {
    inset-inline-start: -12px;
}

.acp-rail__nav--forward {
    inset-inline-end: -12px;
}

[dir="rtl"] .acp-rail__nav i {
    transform: scaleX(-1);
}

.acp-rail__nav:active {
    transform: translateY(-50%) scale(0.92);
}

.acp-rail__nav:focus-visible {
    outline: 2px solid var(--acp-accent);
    outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
    .acp-rail__nav:hover {
        background: var(--acp-ink);
        color: var(--acp-surface);
    }
}

/* Phones: the arrows sit on the cards' pictures, inside the screen's gutter. */
@media (max-width: 767.98px) {
    .acp-rail__nav {
        width: 30px;
        height: 30px;
        font-size: 1.125rem;
    }

    .acp-rail__nav--back {
        inset-inline-start: -6px;
    }

    .acp-rail__nav--forward {
        inset-inline-end: -6px;
    }
}

/* Options open across the row: while a card of a sliding row shows them, the row stands still as that card alone. */
.acp-rail.has-picker .acp-grid--rail {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
    scroll-snap-type: none;
}

.acp-rail.has-picker .acp-card:not(.is-picking),
.acp-rail.has-picker .acp-rail__nav {
    display: none;
}

/* ------------------------------------------------------------------ phone cards */

/* Phones: the card's add button turns into a round button on the picture's corner, so a card is a picture, a name
   and a price. A blocked card's button grows into a pill that names the limit; a repeat item's stepper spans the
   bottom of the picture. */
@media (max-width: 767.98px) {
    .acp-card:not(.is-picking) {
        grid-template-rows: auto 1fr;
        gap: 6px;
        padding: 6px 6px 8px;
    }

    /* Placed explicitly: an auto-placed picture would skip the cell the button takes and drop a row. */
    .acp-card:not(.is-picking) .acp-card__media {
        grid-row: 1;
        grid-column: 1;
    }

    .acp-card:not(.is-picking) .acp-card__info {
        grid-row: 2;
        grid-column: 1;
    }

    .acp-card:not(.is-picking) .acp-card__cta {
        grid-row: 1;
        grid-column: 1;
        align-self: end;
        justify-self: end;
        z-index: 1;
        display: flex;
        margin: 6px;
        min-width: 0;
    }

    .acp-card:not(.is-picking) .acp-card__cta:has(> .acp-step:not([hidden])) {
        justify-self: stretch;
    }

    .acp .acp-card .acp-card__add,
    .acp-drawer .acp-card .acp-card__add {
        width: 34px;
        min-height: 34px;
        height: 34px;
        gap: 0;
        padding: 0;
        border-color: transparent;
        border-radius: 50%;
        background: var(--acp-surface);
        box-shadow: 0 4px 12px -4px rgb(0 0 0 / 0.32);
        font-size: 1.125rem;
    }

    .acp .acp-card .acp-card__add i,
    .acp-drawer .acp-card .acp-card__add i {
        display: block;
    }

    .acp-card__add [data-acp-add-text] {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .acp .acp-card .acp-card__add[aria-pressed="true"],
    .acp-drawer .acp-card .acp-card__add[aria-pressed="true"] {
        background: var(--acp-accent);
        color: var(--acp-accent-ink);
    }

    /* The round button turns into the tick, so the corner badge would be a second one. Counts still show. */
    .acp-card:not(.is-picking) .acp-card__badge.is-check {
        display: none;
    }

    .acp .acp-card.is-blocked .acp-card__add,
    .acp-drawer .acp-card.is-blocked .acp-card__add {
        width: auto;
        max-width: 100%;
        min-height: 26px;
        height: 26px;
        padding: 0 9px;
        border: 1px dashed var(--acp-line);
        border-radius: 13px;
        background: color-mix(in srgb, var(--acp-surface) 92%, transparent);
        box-shadow: none;
        font-size: 0.6875rem;
        letter-spacing: 0;
    }

    .acp-card.is-blocked .acp-card__add i {
        display: none !important;
    }

    .acp-card.is-blocked .acp-card__add [data-acp-add-text] {
        position: static;
        width: auto;
        height: auto;
        overflow: hidden;
        clip: auto;
        text-overflow: ellipsis;
    }

    .acp-card:not(.is-picking) .acp-step {
        min-height: 32px;
        grid-template-columns: 30px 1fr 30px;
        border-radius: 16px;
        box-shadow: 0 4px 12px -4px rgb(0 0 0 / 0.32);
    }

    .acp-card:not(.is-picking) .acp-step__btn {
        min-height: 32px;
        font-size: 0.9375rem;
    }

    .acp-card:not(.is-picking) .acp-step__value {
        font-size: 0.8125rem;
    }

    .acp-card:not(.is-picking) .acp-card__soldout {
        min-height: 24px;
        padding: 0 8px;
        border-radius: 12px;
        background: color-mix(in srgb, var(--acp-surface) 92%, transparent);
        font-size: 0.625rem;
    }
}

@media (max-width: 374.98px) {
    .acp-card:not(.is-picking) .acp-card__cta {
        margin: 4px;
    }

    .acp-card:not(.is-picking) .acp-step {
        grid-template-columns: 24px 1fr 24px;
    }

    .acp .acp-card .acp-card__add,
    .acp-drawer .acp-card .acp-card__add {
        width: 30px;
        min-height: 30px;
        height: 30px;
    }
}

/* ------------------------------------------------------------------ base lock */

/* The theme's own add-to-cart while no base is chosen: it reads as waiting, and a click leads to step 1. */
.acp-is-locked {
    opacity: 0.62;
}

/* Doubled to outrank the theme's and Bootstrap's pointer cursor on enabled buttons. */
.acp-is-locked.acp-is-locked:not(:disabled) {
    cursor: not-allowed;
}

/* A product with a set builder is bought through it. A BSS Combo Products rule on the same product would add a
   second builder and a second buy panel (moved into the theme's floating bar too); the set builder owns the page. */
body:has([data-acp-root]) :is([data-combo-root], [data-combo-actions], .add-to-cart-panel[data-combo-scope]) {
    display: none;
}
