/*
 * Frontend-Produktbühne und native Bildergalerie
 * Eingeführt mit Softwarestand 2.05.50.
 * Native Galerie ab Softwarestand 2.05.64.
 *
 * Einzelbilder und das erste Galeriebild werden bereits serverseitig sichtbar
 * ausgegeben. Die Galerie benötigt keine Legacy-Slider-Wrapper mehr.
 */

#konfiguration .configuration-product-stage {
    grid-area: media;
    position: relative;
    inset: auto;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    align-self: start;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
    margin: 0;
    padding: clamp(16px, 2vw, 28px);
    overflow: hidden;
    border: 1px solid var(--fe-line);
    border-radius: var(--fe-radius-lg, 15px);
    background: var(--fe-surface, #fff);
    box-shadow: none;
    box-sizing: border-box;
}

#konfiguration.configuration-page--highend .configuration-product-stage {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: 4 / 3;
}

#konfiguration .configuration-product-stage.is-loading::before {
    content: "Produktbild wird geladen …";
    position: absolute;
    inset: 50% auto auto 50%;
    z-index: 0;
    color: var(--fe-muted);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
    white-space: nowrap;
    transform: translate(-50%, -50%);
}

#konfiguration .configuration-product-stage > * {
    position: relative;
    z-index: 1;
}

#konfiguration .configuration-gallery {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
}

#konfiguration .configuration-gallery__viewport {
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

#konfiguration .configuration-gallery__slide {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    visibility: hidden;
}

#konfiguration .configuration-gallery__slide.is-active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

#konfiguration .configuration-gallery__frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
}

#konfiguration .configuration-gallery__image {
    position: static;
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    object-fit: contain;
    opacity: 1;
    visibility: visible;
    transform: none;
}

#konfiguration .configuration-gallery__controls {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border: 1px solid var(--fe-line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 4px 16px rgba(19, 32, 43, .08);
}

#konfiguration .configuration-gallery__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--fe-line);
    border-radius: 10px;
    background: var(--fe-surface, #fff);
    color: var(--fe-text, #13202b);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

#konfiguration .configuration-gallery__button:hover,
#konfiguration .configuration-gallery__button:focus-visible {
    border-color: var(--fe-accent, #1fadba);
    color: var(--fe-accent, #1fadba);
    outline: none;
}

#konfiguration .configuration-gallery__status {
    min-width: 42px;
    color: var(--fe-muted);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

#konfiguration .configuration-gallery__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    min-height: 180px;
    color: var(--fe-muted);
    text-align: center;
}

#konfiguration .configuration-gallery__empty-mark {
    color: rgba(31, 173, 186, .24);
    font: 900 clamp(56px, 8vw, 96px)/1 Arial, Helvetica, sans-serif;
    letter-spacing: .04em;
}

#konfiguration .configuration-gallery__empty-text {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .04em;
}

@media (max-width: 900px) {
    #konfiguration .configuration-product-stage,
    #konfiguration.configuration-page--highend .configuration-product-stage {
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: none;
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 560px) {
    #konfiguration .configuration-product-stage {
        padding: 14px;
        border-radius: 15px;
    }

    #konfiguration .configuration-gallery__controls {
        right: 6px;
        bottom: 6px;
    }
}
