.rt-konfigurator-gallery { margin-bottom: 1rem; }
/* Hauptbild wandert mit: beim Scrollen durch die Optionsliste bleibt die Galerie im
   Sichtfeld (Desktop). Der Vaterartikel wird bewusst nicht angezeigt. */
@media (min-width: 992px) {
    .rt-konfigurator-gallery {
        position: sticky;
        top: 90px;
    }
}
.rt-konfigurator-gallery__main {
    position: relative;
    border: 1px solid #e2e5e9;
    background: var(--k-img-bg, #fff); overflow: hidden;
}
.rt-konfigurator-gallery__main-btn {
    display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; cursor: zoom-in;
}
.rt-konfigurator-gallery__img {
    display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain;
    transition: opacity .15s ease;
}
.rt-konfigurator-gallery__empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .6rem; aspect-ratio: 1 / 1; width: 100%;
    background: linear-gradient(160deg, #f7f8fa, #eef0f3);
    color: #8b929c;
}
.rt-konfigurator-gallery__empty-mark {
    width: 3.2rem; height: 3.2rem; border: 2px dashed #c3c9d1; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; line-height: 1; font-weight: 400;
}
.rt-konfigurator-gallery__empty-text { font-size: .85rem; }
.rt-konfigurator-gallery__hint {
    position: absolute; top: .6rem; left: .6rem; z-index: 2;
    background: rgba(22, 24, 27, .88); color: #fff; font-size: .72rem; font-weight: 500;
    padding: .15rem .5rem; pointer-events: none; letter-spacing: .01em;
}
.rt-konfigurator-gallery__hint:empty { display: none; }

/* gemeinsame Lightbox — auch von configurator.js für Options-Bilder genutzt */
.rt-konfigurator-lightbox {
    position: fixed; inset: 0; z-index: 100000;
    display: none; align-items: center; justify-content: center;
}
.rt-konfigurator-lightbox.is-open { display: flex; }
.rt-konfigurator-lightbox__backdrop {
    position: absolute; inset: 0; background: rgba(0, 0, 0, .8);
}
.rt-konfigurator-lightbox__body {
    position: relative; z-index: 1; max-width: min(90vw, 900px); max-height: 90vh;
    display: flex; flex-direction: column; align-items: center;
}
.rt-konfigurator-lightbox__img {
    max-width: 100%; max-height: 80vh; object-fit: contain;
    background: #fff; border-radius: 6px;
}
.rt-konfigurator-lightbox__caption {
    color: #fff; margin-top: .6rem; font-size: .9rem; text-align: center;
}
.rt-konfigurator-lightbox__close {
    position: absolute; top: -2.2rem; right: 0;
    background: none; border: 0; color: #fff; font-size: 2rem; line-height: 1; cursor: pointer;
}

/* Bildebenen (F-5): transparente PNG/WebP der gewählten Optionen über dem Hauptbild */
.rt-konfigurator-gallery__layers {
    position: absolute; inset: 0; pointer-events: none;
}
.rt-konfigurator-gallery__layer {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
}
.rt-konfigurator-gallery__img[hidden] { display: none; }

/* Vorschaubilder der Auswahl (U-8) */
.rt-konfigurator-gallery__thumbs {
    display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem;
}
.rt-konfigurator-gallery__thumbs[hidden] { display: none; }
.rt-konfigurator-gallery__thumb {
    width: 3.4rem; height: 3.4rem; padding: 2px; border: 1px solid #e2e5e9; background: var(--k-img-bg, #fff); cursor: zoom-in;
}
.rt-konfigurator-gallery__thumb:hover, .rt-konfigurator-gallery__thumb:focus-visible { border-color: #16181b; }
.rt-konfigurator-gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }

/* 0.10.1: Miniaturen wie die Standardgalerie — fünf quadratische Felder je Reihe, oben alle Bilder des Artikels */
.rt-konfigurator-gallery__roots,
.rt-konfigurator-gallery__thumbs {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; margin-top: .6rem;
}
.rt-konfigurator-gallery__roots { margin-top: .75rem; }
.rt-konfigurator-gallery__roots[hidden],
.rt-konfigurator-gallery__thumbs[hidden] { display: none; }
.rt-konfigurator-gallery__roots .rt-konfigurator-gallery__thumb,
.rt-konfigurator-gallery__thumbs .rt-konfigurator-gallery__thumb { width: 100%; height: auto; aspect-ratio: 1; }
.rt-konfigurator-gallery__thumb.is-current { border-color: #16181b; box-shadow: inset 0 0 0 1px #16181b; }


/* 0.11.2: Slider wie die NOVA-Galerie — Pfeile am Hauptbild, eine Miniaturzeile mit fünf sichtbaren Bildern */
.rt-konfigurator-gallery__arrow {
    position: absolute; top: 50%; z-index: 3; transform: translateY(-50%);
    display: flex; align-items: center; justify-content: center;
    width: 2.6rem; height: 2.6rem; padding: 0; border: 1px solid #e2e5e9; border-radius: 50%;
    background: rgba(255, 255, 255, .92); color: #16181b; cursor: pointer;
    box-shadow: 0 2px 8px rgba(22, 24, 27, .12);
    opacity: 0; transition: opacity .15s ease, background .15s ease;
}
.rt-konfigurator-gallery__arrow--prev { left: .6rem; }
.rt-konfigurator-gallery__arrow--next { right: .6rem; }
.rt-konfigurator-gallery__arrow[hidden] { display: none; }
.rt-konfigurator-gallery__main:hover .rt-konfigurator-gallery__arrow,
.rt-konfigurator-gallery__arrow:focus-visible { opacity: 1; }
.rt-konfigurator-gallery__arrow:hover { background: #fff; }
.rt-konfigurator-gallery__arrow svg,
.rt-konfigurator-gallery__strip-arrow svg {
    width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2.2;
    stroke-linecap: round; stroke-linejoin: round;
}
@media (hover: none) {
    .rt-konfigurator-gallery__arrow { opacity: 1; }   /* Touch: Pfeile immer sichtbar, zusätzlich Wischen */
}
.rt-konfigurator-gallery__main-btn { touch-action: pan-y; }

/* Bildwechsel gleitet in Blätterrichtung herein */
@keyframes rtKonfiguratorSlideIn {
    from { opacity: 0; transform: translateX(var(--rt-slide-from, 0)); }
    to   { opacity: 1; transform: none; }
}
.rt-konfigurator-gallery__img.is-from-right { --rt-slide-from: 2rem; animation: rtKonfiguratorSlideIn .28s ease; }
.rt-konfigurator-gallery__img.is-from-left  { --rt-slide-from: -2rem; animation: rtKonfiguratorSlideIn .28s ease; }
@media (prefers-reduced-motion: reduce) {
    .rt-konfigurator-gallery__img.is-from-right,
    .rt-konfigurator-gallery__img.is-from-left { animation: none; }
}

/* Miniaturzeile: eine Reihe, seitlich blätterbar (ersetzt das Raster aus 0.10.1) */
.rt-konfigurator-gallery__nav {
    display: flex; align-items: center; gap: .4rem; margin-top: .6rem;
}
.rt-konfigurator-gallery__nav[hidden] { display: none; }
.rt-konfigurator-gallery__nav .rt-konfigurator-gallery__roots {
    flex: 1 1 auto; min-width: 0; margin: 0;
    display: flex; gap: .5rem; overflow-x: auto; scroll-snap-type: x proximity;
    scrollbar-width: none; -ms-overflow-style: none;
}
.rt-konfigurator-gallery__nav .rt-konfigurator-gallery__roots::-webkit-scrollbar { display: none; }
.rt-konfigurator-gallery__nav .rt-konfigurator-gallery__roots .rt-konfigurator-gallery__thumb {
    flex: 0 0 calc((100% - 2rem) / 5); width: auto; height: auto; aspect-ratio: 1;
    scroll-snap-align: start; cursor: pointer;
}
.rt-konfigurator-gallery__strip-arrow {
    flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
    width: 1.8rem; height: 1.8rem; padding: 0; border: 1px solid #e2e5e9; border-radius: 50%;
    background: #fff; color: #16181b; cursor: pointer;
}
.rt-konfigurator-gallery__strip-arrow[hidden] { display: none; }
.rt-konfigurator-gallery__strip-arrow:disabled { opacity: .35; cursor: default; }
.rt-konfigurator-gallery__strip-arrow:not(:disabled):hover { border-color: #16181b; }
