/* Luxeraamdecor — Gordijn Configurator (frontend) */
:root {
    --lrd-navy: #0e2c54;
    --lrd-navy-dark: #091d3a;
    --lrd-navy-soft: #e8edf4;
    --lrd-orange: #ef7f1a;
    --lrd-orange-hover: #d96e10;
    --lrd-orange-soft: #fff4e8;
    --lrd-bg: #f6f7fa;
    --lrd-surface: #ffffff;
    --lrd-border: #e3e6ec;
    --lrd-border-strong: #c8ced9;
    --lrd-text: #1e2230;
    --lrd-muted: #6b7280;
    --lrd-green: #16a34a;
    --lrd-shadow: 0 4px 24px rgba(14, 44, 84, 0.08);
    --lrd-shadow-lg: 0 12px 40px rgba(14, 44, 84, 0.15);
}

/* Utility — global because the sticky bar lives outside .lrd-configurator */
.lrd-configurator [hidden],
.lrd-sticky-bar [hidden],
.lrd-configurator .is-hidden,
.lrd-sticky-bar .is-hidden,
.lrd-sticky-bar.is-hidden { display: none !important; }

/* On LRD single product pages, give the configurator the full width. */
body.lrd-single-product .woocommerce-notices-wrapper + div,
body.lrd-single-product .product { background: var(--lrd-bg); }
body.lrd-single-product .lrd-configurator { clear: both; }

.lrd-configurator {
    color: var(--lrd-text);
    /* Inherit container width from theme/builder — no max-width, no auto-margin. */
    width: 100%;
    margin: 32px 0;
    padding: 0;
    box-sizing: border-box;
}
.lrd-configurator *,
.lrd-configurator *::before,
.lrd-configurator *::after { box-sizing: border-box; }

/* HEAD */
.lrd-head { margin-bottom: 24px; }
.lrd-eyebrow {
    color: var(--lrd-orange);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
}
.lrd-tier-chip {
    display: inline-block;
    background: var(--lrd-navy);
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    letter-spacing: 0.8px;
}
.lrd-product-title {
    margin: 6px 0 16px !important;
    color: var(--lrd-navy) !important;
    font-size: 32px !important;
    font-weight: 800 !important;
    line-height: 1.15;
    letter-spacing: -0.5px;
}

/* Progress */
.lrd-progress {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--lrd-surface);
    border: 1px solid var(--lrd-border);
    border-radius: 10px;
    margin-bottom: 20px;
}
.lrd-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--lrd-navy-soft);
    border-radius: 3px;
    overflow: hidden;
}
.lrd-progress-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--lrd-orange), #f9a85f);
    transition: width 0.35s ease;
}
.lrd-progress-label {
    font-size: 13px;
    color: var(--lrd-muted);
    font-weight: 500;
    min-width: 170px;
    text-align: right;
}
.lrd-progress.is-complete .lrd-progress-label { color: var(--lrd-green); font-weight: 700; }

/* GRID — v3: gallery left, steps right, sticky footer with checkout */
.lrd-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}
.lrd-grid--v3 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
    /* Reserve space at the bottom so the sticky bar never covers content. */
    padding-bottom: 140px;
}
@media (max-width: 960px) {
    .lrd-grid,
    .lrd-grid--v3 { grid-template-columns: 1fr; }
    .lrd-grid--v3 { padding-bottom: 220px; gap: 18px; }
}

/* STEPS */
.lrd-steps { display: grid; gap: 16px; }
.lrd-step {
    background: var(--lrd-surface);
    border: 1px solid var(--lrd-border);
    border-radius: 12px;
    padding: 22px 24px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.lrd-step.is-complete { border-color: var(--lrd-green); }
.lrd-step-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.lrd-step-head h3 {
    margin: 0 !important;
    color: var(--lrd-navy) !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    flex: 1;
}
.lrd-optional {
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--lrd-muted) !important;
    letter-spacing: 0;
    margin-left: 4px;
}
.lrd-num {
    display: inline-flex;
    width: 30px; height: 30px;
    background: var(--lrd-navy);
    color: #fff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}
.lrd-step.is-complete .lrd-num { background: var(--lrd-green); }
.lrd-step-chosen {
    color: var(--lrd-muted);
    font-size: 13px;
    font-weight: 500;
}
.lrd-step.is-complete .lrd-step-chosen { color: var(--lrd-navy); font-weight: 600; }

/* STEP 1 — swatches */
.lrd-swatch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}
.lrd-swatch {
    border: 2px solid transparent;
    border-radius: 8px;
    background: transparent;
    padding: 4px;
    cursor: pointer;
    text-align: center;
    font: inherit;
    color: inherit;
    transition: transform 0.15s, border-color 0.15s;
}
.lrd-swatch:hover { transform: translateY(-2px); }
.lrd-swatch-img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--lrd-border);
    box-shadow: inset 0 0 0 2px #fff, 0 1px 3px rgba(0,0,0,0.06);
}
.lrd-swatch-label {
    display: block;
    font-size: 11px;
    padding: 6px 2px 2px;
    font-weight: 500;
    color: var(--lrd-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lrd-swatch:hover .lrd-swatch-img { border-color: var(--lrd-border-strong); }
.lrd-swatch.is-selected { border-color: var(--lrd-orange); }

/* STEP 2 — dimensions */
.lrd-dim-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.lrd-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.lrd-field-label {
    font-weight: 700;
    font-size: 13px;
    color: var(--lrd-navy);
    letter-spacing: 0.2px;
}
.lrd-field-input {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1.5px solid var(--lrd-border);
    border-radius: 8px;
    overflow: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.lrd-field-input:focus-within {
    border-color: var(--lrd-orange);
    box-shadow: 0 0 0 3px rgba(239, 127, 26, 0.14);
}
.lrd-field-input input {
    flex: 1;
    border: 0;
    outline: 0;
    padding: 12px 14px;
    font-size: 16px;
    font-weight: 600;
    color: var(--lrd-text);
    background: transparent;
    min-width: 0;
    font-family: inherit;
}
.lrd-field-input input::-webkit-outer-spin-button,
.lrd-field-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.lrd-field-input input[type=number] { -moz-appearance: textfield; }
.lrd-unit {
    padding: 0 14px;
    font-size: 13px;
    color: var(--lrd-muted);
    font-weight: 600;
    border-left: 1px solid var(--lrd-border);
    height: 100%;
    display: flex;
    align-items: center;
}
.lrd-range-hint { font-size: 12px; color: var(--lrd-muted); }

/* STEPS 3/4 — option cards */
.lrd-option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}
.lrd-option-grid--icons {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.lrd-option-card {
    position: relative;
    display: block;
    padding: 14px 16px;
    background: #fff;
    border: 1.5px solid var(--lrd-border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s;
}
.lrd-option-card:hover { border-color: var(--lrd-border-strong); }
.lrd-option-card input { position: absolute; opacity: 0; pointer-events: none; }
.lrd-option-card-body { display: flex; align-items: center; gap: 10px; }
.lrd-option-card-body::before {
    content: '';
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 2px solid var(--lrd-border-strong);
    flex-shrink: 0;
    transition: border-color 0.15s, background 0.15s;
    background: #fff;
}
.lrd-option-card input:checked ~ .lrd-option-card-body::before {
    border-color: var(--lrd-orange);
    background: radial-gradient(circle, var(--lrd-orange) 45%, #fff 50%);
}
.lrd-option-card:has(input:checked) { border-color: var(--lrd-orange); }
.lrd-option-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--lrd-text);
}

/* Icon-style option card (used for pleats) */
.lrd-option-card--icon {
    padding: 14px 12px 12px;
    text-align: center;
}
.lrd-option-card--icon .lrd-option-card-body {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}
.lrd-option-card--icon .lrd-option-card-body::before {
    display: none; /* Hide the radio dot — icon + border communicates selection */
}
.lrd-option-icon {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0 0 8px;
    border-radius: 6px;
    overflow: hidden;
    background: #f4f5f7;
    aspect-ratio: 1 / 1.3;
    transition: transform 0.2s ease;
}
.lrd-option-icon img,
.lrd-option-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}
.lrd-option-card--icon:hover .lrd-option-icon { transform: scale(1.02); }
.lrd-option-card--icon .lrd-option-title { text-align: center; }

/* Unequal panel */
.lrd-unequal {
    margin-top: 14px;
    padding: 16px;
    background: var(--lrd-navy-soft);
    border-radius: 8px;
    border: 1px solid #d8dee8;
}
.lrd-unequal-intro { margin: 0 0 12px; font-size: 13px; color: var(--lrd-navy); font-weight: 500; }
.lrd-unequal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* STEP 5 — room */
.lrd-room {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 1.5px solid var(--lrd-border);
    border-radius: 8px;
    background: #fff;
    color: var(--lrd-text);
    font-family: inherit;
    cursor: pointer;
}
.lrd-room:focus {
    outline: 0;
    border-color: var(--lrd-orange);
    box-shadow: 0 0 0 3px rgba(239, 127, 26, 0.14);
}

/* SUMMARY (right rail) — light theme, conversion focused */
.lrd-summary {
    position: sticky;
    top: 20px;
}
.lrd-summary-inner {
    background: #fff;
    color: var(--lrd-text);
    border-radius: 14px;
    padding: 24px;
    border: 1px solid var(--lrd-border);
    box-shadow: var(--lrd-shadow);
}
.lrd-chosen-swatch {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--lrd-bg);
    border: 1px solid var(--lrd-border);
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 18px;
}
.lrd-chosen-img {
    width: 56px; height: 56px;
    border-radius: 8px;
    border: 1px solid var(--lrd-border);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}
.lrd-chosen-label { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--lrd-muted); font-weight: 700; }
.lrd-chosen-name { font-weight: 700; font-size: 15px; margin-top: 2px; color: var(--lrd-navy); }

/* Summary list — plooi/opdeling/ruimte/afmeting rows under the chosen swatch */
.lrd-chosen-list { margin: 0 0 18px; padding: 0; }
.lrd-chosen-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 9px 0;
    border-bottom: 1px dashed var(--lrd-border);
    font-size: 13px;
    gap: 10px;
}
.lrd-chosen-row:last-child { border-bottom: 0; }
.lrd-chosen-row dt {
    color: var(--lrd-muted);
    font-weight: 500;
    margin: 0;
    flex-shrink: 0;
}
.lrd-chosen-row dd {
    color: var(--lrd-navy);
    font-weight: 600;
    margin: 0;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.lrd-chosen-row dd span:empty::after {
    content: '—';
    color: var(--lrd-muted);
    font-weight: 400;
}

.lrd-price-block {
    padding: 4px 0 20px;
    text-align: center;
    border-bottom: 1px solid var(--lrd-border);
    margin-bottom: 16px;
}
.lrd-price-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--lrd-muted);
    font-weight: 700;
    margin-bottom: 6px;
}
.lrd-price-amount {
    font-size: 44px;
    font-weight: 800;
    line-height: 1;
    color: var(--lrd-navy);
    letter-spacing: -1.5px;
    margin: 4px 0;
}
.lrd-price-amount.is-ready { color: var(--lrd-orange); }
.lrd-price-note { font-size: 12px; color: var(--lrd-muted); margin-top: 6px; }

.lrd-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    background: var(--lrd-orange);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(239, 127, 26, 0.25);
}
.lrd-cta-btn:hover:not(:disabled) { background: var(--lrd-orange-hover); box-shadow: 0 6px 18px rgba(239, 127, 26, 0.35); }
.lrd-cta-btn:active:not(:disabled) { transform: translateY(1px); }
.lrd-cta-btn:disabled { background: var(--lrd-bg); color: var(--lrd-muted); cursor: not-allowed; box-shadow: none; border: 1px solid var(--lrd-border); }

/* CTA dual label — desktop keeps "Bestel nu →", mobile bar shows "Afrekenen". */
.lrd-cta-text--mobile { display: none; }

/* Thumbnail inside the mobile sticky checkout row — hidden on desktop. */
.lrd-summary-thumb { display: none; }

.lrd-error {
    margin-top: 12px;
    padding: 10px 12px;
    background: #b00020;
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
}

/* Inline error at a step — softer than the sticky-bar red */
.lrd-step-error {
    margin: 0 0 12px;
    padding: 10px 14px;
    background: #fff4e8;
    border: 1px solid var(--lrd-orange);
    border-left: 4px solid var(--lrd-orange);
    color: var(--lrd-navy);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.lrd-inactive {
    padding: 20px;
    background: var(--lrd-orange-soft);
    border: 1px dashed var(--lrd-orange);
    border-radius: 8px;
    text-align: center;
    color: var(--lrd-navy);
    max-width: 600px;
    margin: 20px auto;
}

/* Impreza grid_filter — layout="ver" is set on the shortcode (native vertical mode).
   Just give the kleur swatches slightly more presence in the vertical list. */
.w-filter .w-filter-item.with_color_swatch .w-color-swatch {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
}

/* Photo gallery (3D photos of this color) — LEFT column */
.lrd-gallery {
    background: var(--lrd-surface);
    border: 1px solid var(--lrd-border);
    border-radius: 12px;
    overflow: hidden;
    position: sticky;
    top: 20px;
}
.lrd-gallery-main {
    width: 100%;
    background: var(--lrd-bg);
    overflow: hidden;
    position: relative;
    /* No fixed aspect-ratio — let the image dictate its own height. */
}
.lrd-gallery-main-img {
    width: 100%;
    height: auto;
    display: block;
    /* Default state (= zoom OUT): slower, more graceful settle. */
    transition: transform 0.75s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
    transform-origin: center center;
}
/* Desktop: hover with cursor-tracked magnifier (2x). */
@media (hover: hover) and (pointer: fine) {
    .lrd-gallery-main { cursor: zoom-in; }
    .lrd-gallery-main.is-zooming .lrd-gallery-main-img {
        transform: scale(2);
        /* Zoom IN: snappier than zoom out. */
        transition: transform 0.3s cubic-bezier(0.33, 1, 0.68, 1);
    }
}
/* Touch devices: tap-to-zoom at touch point (2.5x). */
@media (hover: none), (pointer: coarse) {
    .lrd-gallery-main { cursor: pointer; }
    .lrd-gallery-main.is-zooming .lrd-gallery-main-img {
        transform: scale(2.5);
        transition: transform 0.3s cubic-bezier(0.33, 1, 0.68, 1);
    }
}

/* Fullscreen view trigger button (top-right corner of main image) */
.lrd-gallery-main { position: relative; }
.lrd-gallery-fullscreen-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    padding: 0;
    background: rgba(255, 255, 255, 0.92);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lrd-navy);
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: background 0.15s, transform 0.15s;
}
.lrd-gallery-fullscreen-btn:hover {
    background: #fff;
    transform: scale(1.08);
}
.lrd-gallery-fullscreen-btn svg {
    width: 18px;
    height: 18px;
}

/* Full-screen lightbox overlay */
.lrd-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999999998 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
    cursor: zoom-out;
}
.lrd-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.25s ease, visibility 0s linear 0s;
}
.lrd-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    box-shadow: 0 12px 60px rgba(0,0,0,0.6);
    cursor: default;
}
.lrd-lightbox-close,
.lrd-lightbox-prev,
.lrd-lightbox-next {
    position: fixed;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    z-index: 9999999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
.lrd-lightbox-close {
    top: 18px;
    right: 24px;
    width: 44px;
    height: 44px;
    font-size: 24px;
    line-height: 1;
}
.lrd-lightbox-prev,
.lrd-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    font-size: 28px;
    line-height: 1;
}
.lrd-lightbox-prev { left: 20px; }
.lrd-lightbox-next { right: 20px; }
.lrd-lightbox-close:hover,
.lrd-lightbox-prev:hover,
.lrd-lightbox-next:hover {
    background: rgba(255,255,255,0.22);
}
/* Hide prev/next when only 1 photo */
.lrd-lightbox.is-single .lrd-lightbox-prev,
.lrd-lightbox.is-single .lrd-lightbox-next { display: none; }
@media (max-width: 600px) {
    .lrd-lightbox-prev, .lrd-lightbox-next { width: 40px; height: 40px; font-size: 22px; }
    .lrd-lightbox-prev { left: 8px; }
    .lrd-lightbox-next { right: 8px; }
}
.lrd-gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: var(--lrd-bg);
    border-top: 1px solid var(--lrd-border);
    overflow-x: auto;
}
.lrd-gallery-thumb {
    flex: 0 0 auto;
    width: 76px;
    height: 76px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s, transform 0.15s;
}
.lrd-gallery-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* clicks bubble to the button */
}
.lrd-gallery-thumb:hover { border-color: var(--lrd-border-strong); }
.lrd-gallery-thumb.is-active { border-color: var(--lrd-orange); }
@media (max-width: 960px) {
    .lrd-gallery { position: static; }
}

/* "Andere kleuren" — inside the steps column now, as a step-like block */
.lrd-step--colors .lrd-step-head h3 { font-size: 15px !important; }
.lrd-other-colors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 10px;
}
.lrd-other-color {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.15s;
    text-align: center;
}
.lrd-other-color-img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    border: 1.5px solid var(--lrd-border);
    transition: border-color 0.15s;
}
.lrd-other-color-label {
    display: block;
    font-size: 11px;
    color: var(--lrd-muted);
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lrd-other-color:hover { transform: translateY(-2px); }
.lrd-other-color:hover .lrd-other-color-img { border-color: var(--lrd-orange); }
.lrd-other-color:hover .lrd-other-color-label { color: var(--lrd-navy); }

/* STICKY FOOTER BAR — replaces the right sidebar.
   Set with !important on positioning so it escapes any theme container that
   might constrain position:fixed (transformed/contained ancestors). */
.lrd-sticky-bar {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    z-index: 9999999999 !important;
    background: #fff;
    border-top: 1px solid var(--lrd-border);
    box-shadow: 0 -6px 24px rgba(14, 44, 84, 0.10);
    padding-bottom: env(safe-area-inset-bottom, 0);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    color: var(--lrd-text);
    visibility: visible !important;
    opacity: 1 !important;
}
.lrd-sticky-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
    display: grid;
    /* color | rows | price | cta */
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 18px;
    position: relative;
}

.lrd-sticky-color {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-width: 0;
}
.lrd-sticky-color-img {
    width: 46px; height: 46px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--lrd-border);
    flex-shrink: 0;
}
.lrd-sticky-color-info { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.lrd-sticky-color-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--lrd-muted); font-weight: 700; }
.lrd-sticky-color-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--lrd-navy);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lrd-sticky-rows {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 14px;
    margin: 0;
    padding: 0;
    min-width: 0;
}
.lrd-sticky-row {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}
.lrd-sticky-row dt {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--lrd-muted);
    font-weight: 700;
    margin: 0;
}
.lrd-sticky-row dd {
    font-size: 13px;
    color: var(--lrd-navy);
    font-weight: 600;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lrd-sticky-row dd span:empty::after {
    content: '—';
    color: var(--lrd-muted);
    font-weight: 400;
}

.lrd-sticky-price { text-align: right; line-height: 1.1; flex-shrink: 0; }
.lrd-sticky-price .lrd-price-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--lrd-muted);
    font-weight: 700;
    margin: 0;
}
.lrd-price-row {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 6px;
    margin: 2px 0 0;
}
.lrd-price-original {
    font-size: 12px;
    color: var(--lrd-muted);
    text-decoration: line-through;
    font-weight: 500;
    opacity: 0.75;
}
.lrd-sticky-price .lrd-price-amount {
    /* Clean navy (no aggressive orange swap) — let the strikethrough communicate the saving. */
    font-size: 22px;
    font-weight: 700;
    color: var(--lrd-navy);
    letter-spacing: -0.4px;
    margin: 0;
}
.lrd-sticky-price .lrd-price-amount.is-ready { color: var(--lrd-navy); }
.lrd-price-discount {
    display: block;
    margin-top: 4px;
    padding: 3px 8px;
    background: var(--lrd-orange);
    color: #fff;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-align: center;
    white-space: nowrap;
}
.lrd-sticky-price .lrd-price-discount {
    display: inline-block;
    margin-left: auto;
}

.lrd-sticky-bar .lrd-cta-btn {
    padding: 14px 22px;
    font-size: 14px;
    width: auto;
    white-space: nowrap;
}

/* Details toggle is hidden — at narrow widths the details rows collapse
   away entirely. The details remain visible in the main configurator above. */
.lrd-sticky-toggle { display: none !important; }
.lrd-sticky-toggle-chevron { display: inline-block; transition: transform 0.2s; margin-left: 4px; }

/* Mobile: tighter step padding + 2-column pleat/division grids */
@media (max-width: 760px) {
    .lrd-configurator { margin: 16px auto; padding: 0 12px; }
    .lrd-step { padding: 16px; }
    .lrd-step-head h3 { font-size: 15px !important; }
    .lrd-num { width: 26px; height: 26px; font-size: 13px; }
    .lrd-progress { padding: 10px 14px; margin-bottom: 14px; }
    .lrd-progress-label { font-size: 12px; min-width: 110px; }
    .lrd-option-grid--icons { grid-template-columns: 1fr 1fr; }
    .lrd-other-colors-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
    .lrd-other-color-label { font-size: 10px; }
    .lrd-dim-row { grid-template-columns: 1fr 1fr; gap: 10px; }
    .lrd-field-input input { font-size: 15px; padding: 10px 12px; }
    .lrd-gallery-thumb { width: 64px; height: 64px; }
}

/* Tablet / narrow desktop (< 1100px): hide the details rows entirely.
   The bar shows just color + price + CTA — clean, no toggle, no cramping. */
@media (max-width: 1100px) {
    .lrd-sticky-bar-inner {
        grid-template-columns: 1fr auto auto;
        gap: 12px;
    }
    .lrd-sticky-rows { display: none; }
}

/* Mobile: tighter spacing + smaller fonts. */
@media (max-width: 760px) {
    .lrd-sticky-bar-inner {
        grid-template-columns: 1fr auto auto;
        gap: 8px;
        padding: 10px 12px 12px;
    }
    .lrd-sticky-color-img { width: 38px; height: 38px; }
    .lrd-sticky-color-label { font-size: 9px; }
    .lrd-sticky-color-name { font-size: 12px; max-width: 80px; }
    .lrd-sticky-price .lrd-price-amount { font-size: 17px; }
    .lrd-sticky-price .lrd-price-label { font-size: 9px; }
    .lrd-price-original { font-size: 11px; }
    .lrd-sticky-bar .lrd-cta-btn { padding: 10px 14px; font-size: 13px; }
}

/* Desktop: toggle is hidden, details always visible */
.lrd-summary-toggle { display: none; }
.lrd-summary-details,
.lrd-summary-checkout { display: block; }

/* ===========================================================
   MOBILE STICKY BAR
   On narrow screens the right-rail summary becomes a fixed
   bottom bar with a compact price + CTA always visible, and
   a collapsible details panel that slides up on tap.
   =========================================================== */
@media (max-width: 960px) {
    /* Prevent the sticky bar from covering the last page content. */
    body:has(.lrd-configurator) {
        padding-bottom: 150px;
    }

    /* The sidebar stops being in-flow and sticks to the viewport bottom. */
    .lrd-summary {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        z-index: 9998;
        margin: 0;
    }
    .lrd-summary-inner {
        border-radius: 14px 14px 0 0;
        padding: 0;
        box-shadow: 0 -10px 30px rgba(14, 44, 84, 0.15);
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
    }

    /* Details panel: collapsed by default, expands to show chosen info. */
    .lrd-summary-details {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        padding: 0 16px;
    }
    .lrd-summary.is-open .lrd-summary-details {
        max-height: 60vh;
        overflow-y: auto;
        padding: 16px 16px 4px;
    }
    .lrd-summary-details .lrd-chosen-swatch { margin-bottom: 14px; }

    /* Handle / toggle bar between details and checkout. */
    .lrd-summary-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        padding: 14px 16px 8px;
        background: transparent;
        border: 0;
        border-bottom: 1px solid var(--lrd-border);
        cursor: pointer;
        color: var(--lrd-muted);
        font-size: 13px;
        font-weight: 600;
        font-family: inherit;
        position: relative;
    }
    .lrd-summary-toggle-grip {
        position: absolute;
        top: 6px;
        left: 50%;
        width: 44px;
        height: 4px;
        border-radius: 2px;
        background: var(--lrd-border-strong);
        transform: translateX(-50%);
    }
    .lrd-summary-toggle-chevron {
        display: inline-block;
        font-size: 10px;
        line-height: 1;
        transition: transform 0.25s ease;
    }
    .lrd-summary.is-open .lrd-summary-toggle-chevron {
        transform: rotate(180deg);
    }

    /* Compact checkout row: [thumb] [price] [CTA]. */
    .lrd-summary-checkout {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 14px;
        padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0));
    }
    .lrd-summary-thumb {
        display: block;
        width: 56px;
        height: 56px;
        border-radius: 8px;
        border: 1px solid var(--lrd-border);
        background-color: var(--lrd-bg);
        background-size: cover;
        background-position: center;
        flex-shrink: 0;
    }
    .lrd-summary-thumb.is-hidden {
        display: block !important;
        background-image: none;
    }
    .lrd-summary-checkout .lrd-price-block {
        padding: 0;
        margin: 0;
        border: 0;
        text-align: left;
    }
    .lrd-summary-checkout .lrd-price-label {
        font-size: 13px;
        letter-spacing: 0;
        text-transform: none;
        font-weight: 500;
        color: var(--lrd-muted);
        margin-bottom: 2px;
    }
    .lrd-summary-checkout .lrd-price-amount {
        font-size: 26px;
        letter-spacing: -0.5px;
        margin: 0;
        color: var(--lrd-navy);
    }
    .lrd-summary-checkout .lrd-price-note { display: none; }

    /* Mobile CTA: navy "Afrekenen" — matches reference. */
    .lrd-summary-checkout .lrd-cta-btn {
        padding: 14px 22px;
        font-size: 15px;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        background: var(--lrd-navy);
        box-shadow: none;
        border-radius: 6px;
        width: auto;
    }
    .lrd-summary-checkout .lrd-cta-btn:hover:not(:disabled) {
        background: var(--lrd-navy-dark);
        box-shadow: none;
    }
    .lrd-summary-checkout .lrd-cta-btn:disabled {
        background: var(--lrd-bg);
        color: var(--lrd-muted);
        border: 1px solid var(--lrd-border);
    }
    .lrd-cta-text--desktop { display: none; }
    .lrd-cta-text--mobile { display: inline; }

    .lrd-summary-checkout .lrd-error {
        grid-column: 1 / -1;
        margin-top: 8px;
    }
}

@media (max-width: 420px) {
    .lrd-summary-checkout {
        gap: 10px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0));
    }
    .lrd-summary-thumb {
        width: 48px;
        height: 48px;
    }
    .lrd-summary-checkout .lrd-cta-btn {
        padding: 12px 14px;
        font-size: 13px;
        letter-spacing: 0.3px;
    }
    .lrd-summary-checkout .lrd-price-amount {
        font-size: 22px;
    }
    .lrd-summary-checkout .lrd-price-label {
        font-size: 12px;
    }
}
