.new-swiper.zwsb-enabled {
    position: relative;
}

.zwsb-web-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
    border-radius: inherit;
    background-color: transparent;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    isolation: isolate;
}

.zwsb-web-layer.is-loading {
    background-color: #000;
}

.zwsb-web-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transform: translate3d(0, 0, 0);
    transition-property: transform;
    transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.zwsb-web-fallback,
.zwsb-web-frame {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: none;
    transform: translate3d(0, 0, 0);
    will-change: transform, opacity;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    background: transparent;
}

/* Keep the iframe in the rendering tree while transparent. Chromium may
 * throttle requestAnimationFrame in a visibility:hidden iframe, which would
 * prevent the ready handshake from ever reaching the parent. */
.zwsb-web-frame {
    visibility: visible;
}

.zwsb-web-fallback {
    z-index: 0;
    background-color: #111;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.zwsb-web-fallback.is-placeholder {
    background-color: #151820;
    background-image: linear-gradient(110deg, #151820 20%, #252a36 38%, #151820 56%);
    background-size: 300% 100%;
    animation: zwsb-placeholder 1.5s ease-in-out infinite;
}

@keyframes zwsb-placeholder {
    from {
        background-position: 100% 50%;
    }

    to {
        background-position: 0 50%;
    }
}

.zwsb-web-frame {
    z-index: 1;
}

.zwsb-web-frame.is-active.is-first-reveal {
    animation: zwsb-frame-reveal .8s cubic-bezier(.22, .75, .3, 1) both;
}

@keyframes zwsb-frame-reveal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.zwsb-web-fallback.is-active,
.zwsb-web-frame.is-active {
    opacity: 1;
    visibility: visible;
}

/* Slide transitions are driven by the existing Swiper instance so the HTML
 * background moves with the theme's slides. Other effects retain a fade. */
.new-swiper.zwsb-enabled:not(.zwsb-effect-slide) .zwsb-web-fallback,
.new-swiper.zwsb-enabled:not(.zwsb-effect-slide) .zwsb-web-frame {
    transition: opacity .35s ease, visibility .35s ease;
}

.header-slider-container.zwsb-enabled .header-slider-search,
.header-slider-container.zwsb-enabled .header-slider-card {
    /* Keep the theme's original position/margins; raise only the layer. */
    z-index: 3;
}

@media (prefers-reduced-motion: reduce) {
    .zwsb-web-fallback.is-placeholder {
        animation: none;
    }

    .zwsb-web-frame.is-active.is-first-reveal {
        animation-duration: .2s;
    }

    .zwsb-web-frame {
        transition: none;
    }
}
