/* =====================================================
   Barnwoodweb Option Styles
   Applied on top of Expivi's original fullscreen layout.
   NO layout overrides here — only option panel styling.
   Source of truth: live in /var/www/magento2/app/code/Barnwood/Theme/view/frontend/web/css/configurator.css
   ===================================================== */

/* Load Lato (panel body font) + Poppins (heading accents) per Figma. Move to
   <link rel=preload> in production for better perf. */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Poppins:wght@400;500;600;700&display=swap');

/* =====================================================
   BASE TYPOGRAPHY — Lato across the whole options panel per Figma (brand body
   font). Vuetify's .v-application sets Roboto on every descendant, so option
   labels (Enkel), selected-name captions (✓ Wit 9003), subtitles (Op maat),
   prices, inputs and buttons were all falling back to Roboto. One
   container-level override flips the panel to Lato; the Poppins rules below
   keep owning the heading accents (section labels, step names, rich-card
   primary titles). No icon-font elements live in this panel (icons are inline
   SVG), so glyphs are safe. */
.xpv-app-container {
    font-family: 'Lato', sans-serif !important;
}

/* =====================================================
   POPPINS HEADING ACCENTS — primary title of a "rich" card (title + subtitle
   + price), e.g. Verzendtijd "Binnen 18 werkweken" or Maatwerk "Uit 1 stuk".
   Simple single-line option titles (Enkel, Op maat) stay Lato. The :has()
   branch covers native Vuetify cards that pair a title with a subtitle;
   browsers without :has() simply leave those titles Lato (graceful). */
.bw-radio-card .v-list-item__content:has(.v-list-item__subtitle) .v-list-item__title {
    font-family: 'Poppins', sans-serif !important;
}

/* =====================================================
   SECTION LABELS — h4 (Staal kleur) + .v-label (Aantal, Vakverdeling,
   Verzendtijd, Glas kleur, ...). Same look across all attribute headings:
   Poppins 12px / 600 / #A39D9D / UPPERCASE. */
.xpv-app-container h4,
.xpv-app-container .v-label {
    font-family: 'Poppins', sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #A39D9D !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* =====================================================
   PRODUCT TITLE — heading-1 ("Schuifdeur Staal en Glas 3 vaks").
   Expivi renders the product name but nothing ever styled it, so it was still
   inheriting the Luma default — this is the header title that was missed in the
   figma round.

   Figma heading-1: SemiBold, line-height 125%, letter-spacing -1.25%, lining +
   proportional numerals. Two tokens do not resolve in the export:
     - heading/h1/font-family -> Poppins, per the established split in this file
       (Poppins for heading accents, Lato for panel body).
     - responsive/font-size/heading-1 -> 36px, derived from the frame: the title
       box is 508x90 hug over two lines, so 90 / 2 / 1.25 = 36.
   Colour is deliberately NOT set: the spec did not give one and the title
   already renders in the right tone.

   ⚠️ The size token is responsive, so there is a smaller mobile value we do not
   have. Until the mobile-XS frame gives it, the mobile block below only keeps
   its existing padding and the size cascades from here. */
.xpv-product-name {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 600 !important;
    font-size: 36px !important;
    line-height: 1.25 !important;
    letter-spacing: -0.0125em !important;
    font-variant-numeric: lining-nums proportional-nums !important;
}

/* SECTION LABEL → OPTIONS GAP = 8px everywhere (Figma).
   Each option container type sits a different natural distance below its label
   (Vuetify nests the .v-label as position:relative, so a label margin doesn't
   push reliably — the gap must be set on the options container instead):
   - "Staal kleur" is the only <h4>; it carries Magento's ~21px heading margin
     (gap was 23) → trim to 6px (+2px inline padding = 8 to the swatch row).
   - Radio lists (Aantal, Zijpanelen, Draairichting, …) were 2px → +6.
   - Image-tile lists (Slotkeuze) were 4px → +4.
   - Tile-card .row (Vakverdeling) was 6px (Vuetify negative gutters) → +2 padding.
   :has() targets each list by the class the overlay adds to its items; browsers
   without :has() simply keep the deployed (tighter) spacing — never worse. */
.xpv-app-container h4 {
    margin-bottom: 6px !important;
}
.xpv-app-container .v-stepper__content .v-list:has(.bw-radio-card) {
    margin-top: 6px !important;
}
.xpv-app-container .v-stepper__content .v-list:has(.bw-image-tile) {
    margin-top: 4px !important;
}
.xpv-app-container .v-stepper__content .row:has(.tile-card) {
    padding-top: 2px !important;
}


/* =====================================================
   PROGRESS BAR - Linear green bar below stepper
   ===================================================== */
.bw-progress-bar {
    width: 100%;
    height: 4px;
    background: #e5e5e5;
    border-radius: 2px;
    margin: 8px 0 16px;
    overflow: hidden;
}

.bw-progress-fill {
    height: 100%;
    background: #617F2B;
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

/* =====================================================
   COLOR SWATCHES
   ===================================================== */
.bw-color-swatch-container .inline-items-container {
    gap: 8px !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
    /* 2px inner padding so the active swatch's 2px outset shadow (#1a1a1a)
       on the first swatch fits inside the parent .v-stepper__wrapper which
       has overflow:hidden for collapse animation. Without this, the left
       edge of the active outer ring on the first column gets clipped. */
    padding: 2px !important;
}

.bw-color-swatch-container .horizontal-scroll-tiles {
    overflow: visible !important;
}

.bw-color-swatch-container .mb-4 {
    margin: 0 !important;
    padding: 0 !important;
    width: 68px !important;
    min-width: 68px !important;
    flex: 0 0 68px !important;
}

.bw-color-swatch-container .thumbnail-item {
    width: 68px !important;
    height: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    max-height: 68px !important;
    position: relative;
    overflow: hidden;
    border-radius: 2px;
    cursor: pointer !important;
}

.bw-color-swatch-container .mb-4,
.bw-color-swatch-container .mb-4 * {
    cursor: pointer !important;
}

.bw-color-swatch {
    width: 68px !important;
    height: 68px !important;
    min-width: 68px !important;
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.bw-swatch-color {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    border-radius: inherit;
}

.bw-color-swatch-container .thumbnail-item .v-image {
    width: 68px !important;
    height: 68px !important;
    max-width: 68px !important;
    max-height: 68px !important;
}

.bw-color-swatch-container .thumbnail-item .active-overlay {
    display: none !important;
}

/* Active swatch: white inset ring + dark outset ring per Figma.
   The outset 2px no longer gets clipped because step-content is now indented
   by margin-left:32 + padding-left:24, so the first swatch starts at x=57,
   well inside the panel. */
.bw-color-swatch.active {
    box-shadow: inset 0 0 0 3px #fff, 0 0 0 2px #1a1a1a;
}

/* Full-width caption shown BELOW the row that contains the active swatch.
   Injected by overlay.hideSwatchNames(). Breaks to a new flex line via
   flex-basis: 100%, so 2-row swatch lists move the caption to whichever
   row currently holds the selection. */
.bw-row-selected-name {
    flex-basis: 100% !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: #1B1A1A !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    margin-top: 0 !important;
}

/* Kleur step (Figma): only 8px between the last swatch row and the caption.
   The caption sits INSIDE the inline-items-container whose 8px flex gap already
   provides exactly that, so no extra margin-top here.
   (Tile-card .row + caption and image-tile .v-list + caption keep 28px below.) */
.bw-color-swatch-container .bw-row-selected-name {
    margin-top: 0 !important;
}

.xpv-app-container .row + .bw-row-selected-name,
.xpv-app-container .v-list + .bw-row-selected-name {
    margin-top: 28px !important;
}

/* Outlined 16×16 check icon (circle stroke + check stroke, both #756E6E). */
.bw-row-selected-name__check {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.bw-row-selected-name__text {
    color: #1B1A1A;
}

.bw-color-swatch.active .bw-swatch-color {
    top: 3px;
    left: 3px;
    width: calc(100% - 6px);
    height: calc(100% - 6px);
}

.bw-selected-color-name {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

/* =====================================================
   STANDAARD LABEL
   ===================================================== */
.bw-standaard-label {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 400;
    text-transform: capitalize;
    color: #A39D9D;
    letter-spacing: 0;
    margin-left: auto;
    flex-shrink: 0;
}

.v-list-item__title {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Option label text (Enkel, Op maat, Linksdraaiend, Lisse, …) = 16px per Figma.
   Vuetify renders the list title at ~10px by default. Scoped to radio-card
   titles; image-tile and tile titles are hidden (their ✓caption shows the name
   at 16px instead), and the .bw-standaard-label keeps its own smaller size. */
.bw-radio-card .v-list-item__title {
    font-size: 16px !important;
}

/* When the radio-card item shows a Standaard secondary label, stack name
   above the label (column) instead of inline. Drop margin-left:auto so the
   label sits flush-left under the name, not pushed to the right edge. */
.bw-radio-card .v-list-item__title:has(.bw-standaard-label) {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
}

.bw-radio-card .v-list-item__title .bw-standaard-label {
    margin-left: 0 !important;
}

.tile-title .bw-standaard-label {
    margin-left: 8px;
}

.tile-card,
.tile-card * {
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Tile thumbnails (Vakverdeling, Glas, ...) — Vuetify ships .col-6 (2 per row);
   Figma wants 3 per row with 16px gap between tiles + 1px border #B9B5B5 default
   and 2px #756E6E when active (use box-sizing:border-box so the extra px does
   NOT shift neighboring tiles). */
.xpv-app-container .row:has(> .col > .tile-card) {
    margin: 0 !important;
    gap: 16px !important;
    flex-wrap: wrap !important;
}

.xpv-app-container .row:has(> .col > .tile-card) > .col.col-6 {
    padding: 0 !important;
    flex-basis: 139.67px !important;
    max-width: 139.67px !important;
    width: 139.67px !important;
}

.xpv-app-container .tile-card {
    width: 139.67px !important;
    height: 139.67px !important;
    min-height: 139.67px !important;
    max-height: 139.67px !important;
    padding: 0 !important;
    border: 1px solid #B9B5B5 !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
}

/* The image inside fills the entire square tile area. We override the
   .image-tile's percentage-based padding-top (Expivi's aspect-ratio trick
   ~50% padding-top) which would otherwise force a 2:1 portrait shape. */
.xpv-app-container .tile-card .image-tile {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    background-size: cover !important;
    background-position: center !important;
}

/* Vuetify marks the selected tile with the class .tile-card-active (NOT .active).
   It paints a gray #EFEFEF background directly on the .tile-card. Per Figma
   the only selection cue is the 2px brand border — kill the gray bg. */
.xpv-app-container .tile-card.tile-card-active,
.xpv-app-container .tile-card.active,
.xpv-app-container .tile-card:focus,
.xpv-app-container .tile-card:focus-within {
    background: transparent !important;
    background-color: transparent !important;
    border: 2px solid #756E6E !important;
    outline: none !important;
}

/* Vuetify .v-card--hover renders a ::before overlay (black with opacity
   transitions on hover/focus) — kill it so the only selected indicator is
   the 2px brand border. Also blocks the "line below" the focused tile that
   the overlay creates. */
.xpv-app-container .tile-card.v-card--hover::before,
.xpv-app-container .tile-card.v-card--link::before,
.xpv-app-container .tile-card::before {
    background: transparent !important;
    opacity: 0 !important;
}

/* Vuetify also injects a sibling .active-tile element inside the selected
   tile that paints a 1px grey underline at the bottom — kill it so the 2px
   brand border is the only selection cue. */
.xpv-app-container .tile-card .active-tile {
    display: none !important;
}

/* =====================================================
   CLIENT STATIC OPTION DESCRIPTIONS / PRICES
   Data-driven text painted by renderOptionDescriptions(), opted-in per option
   via the Expivi option Key (data-xpv-attribute-option-key), matched by prefix:
     bw-desc-price…     -> subtitle + green "+€{price}" (GRATIS if 0)
     bw-desc-standaard… -> subtitle + lighter-green "STANDAARD" (price hidden)
     bw-desc…           -> subtitle only
   Figma: full-width stacked rows, gray subtitle, Poppins-500 right label.
   ===================================================== */

/* Full-width single-column list (overrides the 2-per-row radio grid) whenever a
   list carries client descriptions — matches the Afmetingen / Type rail figma. */
.v-list.bw-opt-wide {
    gap: 12px !important;
}
.v-list.bw-opt-wide > .v-list-item.bw-radio-card {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    height: auto !important;
    min-height: 54px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* Hide the native inline price ($30.00) Expivi prints in the option title —
   we render our own static price (or none) instead. */
.bw-opt-desc-item .v-list-item__title span.grey--text {
    display: none !important;
}

/* Description subtitle (the value's Description field), under the option name. */
.bw-opt-sub {
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #A39D9D;
    line-height: 1.35;
    margin-top: 2px;
}

/* Right-hand slot — figma tokens.
   Price / GRATIS: Poppins 500, 12px (text-xs), 150% line, brand green #719733. */
.bw-opt-price {
    margin-left: auto;
    align-self: center;
    flex-shrink: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: 0;
    color: #719733;
    text-align: center;
    white-space: nowrap;
}
/* STANDAARD label: Poppins 500, 10px, uppercase, right-aligned, lighter green. */
.bw-opt-price.bw-opt-standaard {
    font-size: 10px;
    color: #9BCA63;
    text-align: right;
    text-transform: uppercase;
    font-variant-numeric: lining-nums proportional-nums;
}

/* =====================================================
   STEP STYLING - 32x32 squares
   ===================================================== */
.v-stepper__step {
    padding-left: 16px !important;
    padding-right: 16px !important;
}

.v-stepper__step .v-stepper__step__step {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.v-stepper__step.active-step .v-stepper__step__step {
    background-color: #617F2B !important;
    color: #fff !important;
}

.v-stepper__step.bw-completed .v-stepper__step__step {
    background-color: #617F2B !important;
    color: #fff !important;
}

.v-stepper__step:not(.active-step):not(.bw-completed) .v-stepper__step__step {
    background-color: #FFFFFF !important;
    color: #1B1A1A !important;
    border: 1px solid #E5E5E5 !important;
    font-size: 14px !important;
}

.v-stepper__step .v-stepper__label {
    color: #000000 !important;
}

/* Step header label text (e.g. "Kies model", "Zijpanelen", "Verzendtijd") —
   shown to the right of the step-number square. */
.v-stepper__step .step-header-name {
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #000000 !important;
}

/* Step header layout: name on the left grows; disclaimer (info) icon and
   chevron sit on the right with an 8px gap between them. */
.step-header-container {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
}

.step-header-name-container {
    margin-right: auto !important;
}

/* Disclaimer / info icon — 20×20, flush with the chevron via the parent gap. */
.step-header-icon,
.step-header-icon .info-icon,
.step-header-icon svg {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
}

.bw-step-chevron {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.v-stepper__step.active-step .bw-step-chevron {
    transform: rotate(180deg);
}

/* =====================================================
   RADIO CARDS
   ===================================================== */
/* Vuetify's .x-p-v wraps the configurator and steals 15px on the right for
   its own vertical scrollbar — neutralise it so the panel-level scrollbar
   (bw-sandbox-options) is the only one and the tiles can use the full width. */
.x-p-v {
    overflow-y: visible !important;
    overflow-x: visible !important;
}

/* Expanded step body — Figma layout:
   the green vertical line ("step-leader") must run through the CENTER of each
   step-number square continuously from step 1 down to the last step, passing
   BEHIND the step-number squares. We render it as an absolute pseudo-element
   on .v-stepper--vertical so it spans the full height (the border-left on
   each .v-stepper__content alone would break visually at every step header).
   Step number = 32px wide at padding-left 16 → its center is at x=32. */
.v-stepper--vertical {
    position: relative;
}

.v-stepper--vertical::before {
    content: '';
    position: absolute;
    left: 32px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #617F2B;
    z-index: 0;
    pointer-events: none;
}

/* Step number sits on top of the line so the line "tucks" behind the square. */
.v-stepper__step,
.v-stepper__step .v-stepper__step__step {
    position: relative;
    z-index: 1;
}

/* Step body indented so its left edge sits at x=32 (where the line is) plus
   24px inner padding to keep the tiles 24px to the right of the line. */
.v-stepper--vertical .v-stepper__content {
    margin-left: 32px !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    border-left: none !important;
    width: calc(100% - 32px) !important;
    max-width: calc(100% - 32px) !important;
}

.v-stepper__wrapper .v-list {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* When a v-list contains our bw-radio-cards (Aantal, Zijpanelen, Maatwerk,
   Draairichting, Deurgreep, Dempstrip), render 2 per row with 16px gap
   instead of Vuetify's vertical stack. */
.v-list:has(> .v-list-item.bw-radio-card) {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    margin: 0 !important;
}

/* Vuetify inserts <hr class="v-divider"> between v-list-items. In our flex
   layout each <hr> takes the full row width and forces the next item to wrap.
   Hide them so radio cards can sit side by side. */
.v-list:has(> .v-list-item.bw-radio-card) > .v-divider {
    display: none !important;
}

/* Inline items container (used by Staal kleur / swatches): drop internal 4px padding
   so the row gets the full step-content interior width. */
.inline-items-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* DO NOT set .v-stepper__wrapper { overflow: visible } — Vuetify uses
   overflow:hidden + height:0 to hide collapsed step bodies. If we make
   the wrapper visible, every collapsed step spills its content on top
   of the next step (chaotic stacking of all bodies). Keep Vuetify's
   default and handle active-swatch clipping with internal padding below. */

.bw-radio-card {
    width: 217.5px !important;
    flex: 0 0 217.5px !important;
    border: 1px solid #B9B5B5 !important;
    border-radius: 0 !important;
    padding: 0 16px !important;
    margin: 0 !important;
    height: 54px !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
}

/* When the list has exactly ONE radio card (no sibling radio card),
   stretch it to full width per Figma. The :not(:has(... ~ ...)) detects
   the absence of a second sibling .bw-radio-card. */
.v-list:has(> .v-list-item.bw-radio-card):not(:has(> .v-list-item.bw-radio-card ~ .v-list-item.bw-radio-card)) > .v-list-item.bw-radio-card {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
}

/* =====================================================
   IMAGE TILES (Slotkeuze etc.)
   100.75 × 100.75 square tiles with the image filling the tile, 4 per row,
   16px gap, active state same as the color swatch (white inset + dark outset).
   ===================================================== */
.v-list:has(> .v-list-item.bw-image-tile) {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    /* 2px inner padding so the active tile's 2px outset shadow on the first
       column doesn't get clipped by the .v-stepper__wrapper's overflow:hidden.
       Bottom is 0 so the caption (a sibling AFTER the v-list) keeps its 28px
       margin-top intact (otherwise the padding-bottom adds an extra 2px). */
    padding: 2px 2px 0 2px !important;
    margin: 0 !important;
}

.v-list:has(> .v-list-item.bw-image-tile) > .v-divider {
    display: none !important;
}

.bw-image-tile {
    width: 100.75px !important;
    height: 100.75px !important;
    flex: 0 0 100.75px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #B9B5B5 !important;
    box-sizing: border-box !important;
    position: relative !important;
    overflow: hidden !important;
    background: transparent !important;
    cursor: pointer !important;
}

.bw-image-tile .v-list-item__avatar {
    height: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    flex: 1 1 100% !important;
}

.bw-image-tile .v-list-item__avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Hide the radio circle/dot, the title-content column, and the action svg —
   the image alone communicates the option (caption added below the grid). */
.bw-image-tile .bw-radio-circle,
.bw-image-tile .v-list-item__content,
.bw-image-tile .v-list-item__action {
    display: none !important;
}

/* Active state: 2px brand-grey border (matches the Vakverdeling tile-cards).
   box-sizing:border-box keeps the tile 66.5/100.75 so it never clips. */
.bw-image-tile.bw-image-tile-selected {
    border: 2px solid #756E6E !important;
    box-shadow: none !important;
}

/* If any sibling in the v-list has a STANDAARD label, all cards grow to 72 so
   the row height matches; otherwise the cards stay at 54. */
.v-list:has(.bw-standaard-label) > .v-list-item.bw-radio-card {
    height: 72px !important;
}

.bw-radio-card.bw-radio-selected {
    border-color: #617F2B !important;
}

.bw-radio-card .v-list-item__action {
    display: none !important;
}

.bw-radio-circle {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border-radius: 50%;
    border: 2px solid #B9B5B5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
}

.bw-radio-selected .bw-radio-circle {
    border-color: #756E6E;
}

.bw-radio-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1B1A1A;
    display: none;
}

.bw-radio-selected .bw-radio-dot {
    display: block;
}

/* =====================================================
   NAVIGATION BUTTONS - VORIGE / VOLGENDE
   ===================================================== */
.bw-btn-vorige svg,
.bw-btn-volgende svg {
    width: 10px;
    height: 16px;
    flex-shrink: 0;
}

.xpv-app-container button.bw-btn-volgende.bw-btn-volgende {
    width: 134px !important;
    height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    background: #719733 !important;
    border: 1px solid #719733 !important;
    color: #FFFFFF !important;
    border-radius: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.xpv-app-container button.bw-btn-vorige.bw-btn-vorige {
    width: 113px !important;
    height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    background: transparent !important;
    border: 1px solid #719733 !important;
    color: #1B1A1A !important;
    border-radius: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =====================================================
   PRODUCT PRICE
   Expivi renders this as .xpv-product-price with its own default: blue, Lato.
   Figma has no price in the configurator panel, so the client picked the
   treatment: brand orange, in Poppins like every other price on their site.
   ===================================================== */
.xpv-product-info .xpv-product-price {
    font-family: 'Poppins', sans-serif !important;
    color: #FF8315 !important;
    font-weight: 600 !important;
}

/* =====================================================
   ADD-TO-CART CONFIRMATION MODAL
   Expivi ships this modal (#xpv-success-modal) with its own defaults: blue
   primary button, 4px radii, Lato. Reported by the client as "still Expivi's
   default layout". Restyled with the tokens already used by the step buttons
   above — green primary, outlined secondary, square corners.
   ===================================================== */
.xpv-modal {
    border-radius: 0 !important;
}

.xpv-modal-message {
    font-family: 'Poppins', sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1B1A1A !important;
}

/* min-height, not height: these labels are long in Dutch ("Bekijk en bewerk
   winkelwagen") and wrap to two lines, which a fixed 40px clips. */
.xpv-modal-button {
    font-family: 'Poppins', sans-serif !important;
    min-height: 40px !important;
    height: auto !important;
    border-radius: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.xpv-modal-button.primary {
    background: #719733 !important;
    border: 1px solid #719733 !important;
    color: #FFFFFF !important;
}

.xpv-modal-button.secondary {
    background: transparent !important;
    border: 1px solid #719733 !important;
    color: #1B1A1A !important;
}

/* =====================================================
   OPTIONS PANEL WIDTH — match Figma / sandbox (540px).
   Expivi's default .xpv-options-container is flex:0 0 400px; the Barnwoodweb
   design requires a 540px options panel. This is also what gives the
   Vakverdeling tiles enough room to sit 3 per row. The viewer (flex:1) absorbs
   the remaining width. (The sandbox faked this via .bw-sandbox-options:540px,
   which is excluded from the server CSS — so it must be set explicitly here.)
   ===================================================== */
.xpv-configurator-content .xpv-options-container {
    flex: 0 0 540px !important;
    width: 540px !important;
    max-width: 540px !important;
    /* Hide the panel's vertical scrollbar so it doesn't steal ~15px from the
       content width (which would shrink the tile row to 445px and force the
       Vakverdeling tiles to 2-per-row instead of 3). Scrolling still works via
       wheel/touch. Mirrors the sandbox's .bw-sandbox-options scrollbar hide. */
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* legacy Edge/IE */
}

.xpv-configurator-content .xpv-options-container::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none;
}

/* The viewer (sibling of the options panel) absorbs the remaining width so the
   wider options panel doesn't overflow the configurator content row. */
.xpv-configurator-content .xpv-viewer-container,
.xpv-configurator-content > [class*="viewer"] {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

/* =====================================================
   ADD TO CART button — Barnwood brand (Figma node 92-39936)
   Default Luma button is blue (#1979C3) with a fixed 350px width. The design
   wants the brand orange, full width, no border. All states pinned so it never
   flashes back to Luma blue on hover/focus. (Scoped to Barnwood: this CSS only
   loads on the Barnwood configurator/standalone.)
   ===================================================== */
#xpv-add-to-cart-btn,
#xpv-add-to-cart-btn:hover,
#xpv-add-to-cart-btn:focus,
#xpv-add-to-cart-btn:active,
.xpv-add-to-cart-button {
    background-color: #F57700 !important;
    border: none !important;
    border-radius: 0 !important;
    color: #FFFFFF !important;
    /* 4px gap from the options panel bottom (mobile, button sits at the bottom). */
    margin-bottom: 4px !important;
    /* Full width WITHIN the button's own 20px side margins (Luma default). Using
       width:100% added to those 20px margins (=panel + 40px) and overflowed the
       options panel by 40px (right edge ran off-screen, asymmetric gutter). calc
       keeps a symmetric 20px gutter on both sides and never overflows. */
    width: calc(100% - 40px) !important;
    margin-left: 20px !important;
    margin-right: 20px !important;
    /* Cart icon + "Toevoegen" label centered with an 8px gap; 16px inner padding. */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    text-transform: uppercase !important;
}
#xpv-add-to-cart-btn svg {
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px !important;
    fill: #FFFFFF !important;
}

/* =====================================================
   PROMO block above Add-to-Cart (Figma node 92-39936)
   Outer box (210.5x40, pale orange) = "15% KORTING" (brand orange, Poppins 600)
   + an inner white box with the static promo code "GLASHELDER" + a copy icon
   (copies to clipboard on click). Injected by the overlay JS before the
   add-to-cart button. Inner code box has square corners (no radius).
   ===================================================== */
.bw-promo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 7px 12px;
    box-sizing: border-box;
    background: rgba(255, 131, 21, 0.10);
    border-radius: 0;
    /* 8px gap above (from the progress bar) + 10px below (toward the button);
       20px left to align with the Add-to-Cart button's left gutter. */
    margin: 8px 0 10px 20px;
}
.bw-promo-korting {
    color: #FF8315;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}
.bw-promo-code {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 26px;
    padding: 7px 12px;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #1B1A1A;
    background: #FFFFFF;
    border: 0.75px solid #FF8315;
    border-radius: 0;
    cursor: pointer;
}
.bw-promo-code svg {
    width: 11px;
    height: 12px;
    flex: 0 0 11px;
    fill: #1B1A1A;
}
.bw-promo-code:hover { background: #FFF7F0; }

/* Row wrapping the promo + (mobile-only) "Vanaf {price}" block. On desktop it is
   a transparent wrapper (price hidden, promo keeps its own margins). */
.bw-promo-price { display: none; }

/* =====================================================================
   MOBILE (<= 600px) — 2026-06-15
   ---------------------------------------------------------------------
   The whole Figma layout above is fixed-width DESKTOP and the file had NO
   media queries, so on a phone everything overflowed to the right. The ROOT
   cause is the 540px options panel (rule above): on a ~390px viewport the
   panel alone overflows by 150px, dragging every fixed-width grid off-screen.

   Fix strategy: let the options panel be FULL WIDTH on mobile; the existing
   fixed-width grids then wrap on their own — verified live at 390px:
     - STAAL KLEUR swatches (68px, flex-wrap already) -> 4 per row
     - Vakverdeling / Glas tile-cards (139.67px)       -> 2 per row
     - Slotkeuze image-tiles (100.75px)                -> 2 per row
   Only the radio-cards need an explicit rule (to fill the row width).

   ALL rules are inside this media query, so DESKTOP IS UNTOUCHED. They also
   live in configurator.css (loaded via <link> in the body) so they win the
   load-order tie against Expivi's runtime-appended app.css, same as the rest
   of this file.
   ===================================================================== */
@media (max-width: 600px) {
    /* Viewport-lock the overlay. Expivi uses position:absolute, so a window
       scroll (scrollIntoView) slides it away and the Magento footer — in-flow
       under the header because the overlay is out of flow — covers the builder. */
    .xpv-configurator-container {
        position: fixed !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
    }

    /* ROOT — options panel full WIDTH (was 540px fixed -> overflowed the phone).
       CRITICAL: only override width/max-width, NOT flex. On mobile the parent
       .xpv-configurator-content switches to flex-direction:COLUMN, where
       flex-basis is the HEIGHT. The base rule's `flex:0 0 540px` therefore gives
       the options panel a 540px HEIGHT (it scrolls internally, body is
       overflow:hidden) and leaves the rest of the viewport to the 3D viewer.
       Forcing `flex:0 0 100%` here made flex-basis = 100% HEIGHT, so the options
       ate the whole column and collapsed the viewer to 0px (3D invisible + no
       scroll). Width is the cross-axis in a column, so width:100% alone fixes the
       horizontal overflow without touching the vertical split. */
    .xpv-configurator-content .xpv-options-container {
        width: 100% !important;
        max-width: 100% !important;
        /* Fill the leftover column height (after the viewer) and SCROLL inside.
           The base flex:0 0 540px gave a fixed 540px height, and the container's
           overflow-y was HIDDEN -> the ~2478px of option content was clipped with
           no way to scroll (body itself is overflow:hidden in the standalone
           layout). flex:1 1 auto + min-height:0 lets the panel take the remaining
           height and shrink enough to scroll; overflow-y:auto enables the scroll. */
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-y: auto !important;
    }

    /* Viewer: pin to a fixed share of the viewport height on mobile. The base
       rule is flex:1 1 auto, which would fight the now-flexible options panel for
       space; give the viewer a fixed 40vh so it never collapses (the bug where
       flex-basis:100% on the options had squeezed it to 0) and the options get
       the rest of the column. */
    .xpv-configurator-content .xpv-viewer-container,
    .xpv-configurator-content > [class*="viewer"] {
        flex: 0 0 388px !important;
        height: 388px !important;
        min-height: 0 !important;
    }

    /* Radio cards (Aantal / Maatwerk / Welke deur / Deurgreep / Dempstrip /
       Draairichting / Zijpanelen): the 217.5px fixed width only fits 1 per row
       on mobile but leaves a dead gap on the right. Make them fill the row. */
    .bw-radio-card {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* ----- Mobile XS Figma (375px, node 337-99070) — explicit grid sizing ----- */
    /* Reduce the green-line step-content indent (desktop is margin-left:32 +
       padding:24 = 56px, leaving only ~295px usable -> e.g. only 5 swatches fit).
       Keep the 32px margin (clears the step-number column); cut the 24px padding
       to 8 -> ~327px usable so the Figma row counts below fit. */
    .v-stepper--vertical .v-stepper__content {
        /* Mobile green-line layout: line at the 24px square's center (x=20),
           content 24px to the right of the line (=44px), 8px right gutter. */
        margin-left: 20px !important;
        padding-left: 24px !important;
        /* 16px right gutter so every full-width component (radio cards, nav
           buttons, dimension inputs, Verzendtijd, Slotkeuze) ends 16px from the
           edge — matching the tile blocks. */
        padding-right: 16px !important;
        /* The base rule pins width to calc(100% - 32px) for the desktop 32px
           margin; with the mobile 20px margin that left the content 12px short on
           the right (only 5 swatches / 2 tiles fit). Match the width to the 20px
           margin so the content fills to the edge -> 6 swatches / 3 tiles fit. */
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
    }

    /* Step-number squares: 24x24, 12px font, 8px left gutter, 12px gap to title. */
    .v-stepper__step { padding-left: 8px !important; }
    .v-stepper__step .v-stepper__step__step {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        font-size: 12px !important;
        margin-right: 12px !important;
    }
    .v-stepper__step:not(.active-step):not(.bw-completed) .v-stepper__step__step {
        font-size: 12px !important;
    }
    /* Green leader line through the 24px square centers (8 + 24/2 = 20). */
    .v-stepper--vertical::before { left: 20px !important; }

    /* Progress bar: 2px line on mobile. */
    .bw-progress-bar,
    .bw-progress-fill { height: 2px !important; }

    /* STAAL KLEUR swatches: 6 per row, 45.67x45.67, 8px gap. The base 2px side
       padding is dropped on mobile to reclaim the 4px the 6th swatch needs to fit
       within the 16px-gutter content (the active-swatch ring still renders fine). */
    .bw-color-swatch-container .inline-items-container {
        gap: 8px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .bw-color-swatch-container .mb-4 {
        width: 45.67px !important;
        min-width: 45.67px !important;
        flex: 0 0 45.67px !important;
    }
    .bw-color-swatch-container .thumbnail-item,
    .bw-color-swatch,
    .bw-color-swatch-container .thumbnail-item .v-image {
        width: 45.67px !important;
        height: 45.67px !important;
        min-width: 45.67px !important;
        max-width: 45.67px !important;
        max-height: 45.67px !important;
    }

    /* Vakverdeling / Glas tile-cards: 3 per row, 94x94, 16px gap. */
    .xpv-app-container .row:has(> .col > .tile-card) { gap: 16px !important; }
    .xpv-app-container .row:has(> .col > .tile-card) > .col.col-6 {
        flex-basis: 94px !important;
        max-width: 94px !important;
        width: 94px !important;
    }
    .xpv-app-container .tile-card {
        width: 94px !important;
        height: 94px !important;
        min-height: 94px !important;
        max-height: 94px !important;
    }

    /* Deurgreep / Slotkeuze image-tiles: 4 per row, 66.5x66.5, 16px gap. */
    .bw-image-tile {
        flex: 0 0 66.5px !important;
        max-width: 66.5px !important;
        width: 66.5px !important;
        height: 66.5px !important;
    }
    /* The image-tile list has a 2px side padding (active-ring guard) that shrank
       the row to 311px and wrapped the 4th tile; drop it on mobile so 4 fit. */
    .xpv-app-container .v-stepper__content .v-list:has(.bw-image-tile) {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    /* Selected swatch: the base ring uses a 2px OUTSET that clips the rightmost
       swatch against the 16px gutter. Draw it inset on mobile (2px dark + 3px
       white gap, inside the swatch) so no swatch's ring is cut. */
    .bw-color-swatch.active {
        box-shadow: inset 0 0 0 2px #1a1a1a, inset 0 0 0 5px #fff !important;
    }

    /* ----- Sticky-bottom promo + price (mobile) ----- */
    /* Promo box on the left, "Vanaf {price}" on the right. Tighter vertical gaps
       between progress bar, this row and the Add-to-Cart button. The promo keeps
       its left edge aligned with the button (20px); 20px right gutter too. */
    .bw-promo-row {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        /* 8px gap to the progress bar (above) and 8px to the Add-to-Cart button
           (below). The progress bar's 16px margin-bottom and the button's 20px
           Luma margin-top are zeroed below so these 8px are the actual gaps. */
        margin: 8px 0 8px 20px !important;
        padding-right: 20px !important;
    }
    .bw-progress-bar { margin-bottom: 0 !important; }
    #xpv-add-to-cart-btn { margin-top: 0 !important; }
    .bw-promo { margin: 0 !important; }
    .bw-promo-price {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        line-height: 1.3 !important;
    }
    .bw-promo-vanaf {
        color: #A39D9D !important;
        font-family: 'Poppins', sans-serif !important;
        font-weight: 500 !important;
        font-size: 12px !important;
        line-height: 1.3 !important;
    }
    .bw-promo-amount {
        color: #1B1A1A !important;
        font-family: 'Poppins', sans-serif !important;
        font-weight: 600 !important;
        font-size: 15px !important;
        line-height: 1.3 !important;
        white-space: nowrap !important;
    }
    /* Top price moves to the bottom row on mobile -> hide the product-info one. */
    .xpv-product-info .xpv-product-price { display: none !important; }

    /* Product title ("Lighter"): 8px above, 16px below. */
    .xpv-product-name {
        padding-top: 8px !important;
        padding-bottom: 16px !important;
    }
}
