/**
 * ZD Banner Slider for Creative Elements - front styles
 */
.zdbs {
    position: relative;
    width: 100%;
    overflow: hidden;
    --zdbs-speed: 600ms;
}

.zdbs-viewport {
    width: 100%;
    overflow: hidden;
}

.zdbs-track {
    display: flex;
    width: 100%;
}

.zdbs-slide {
    position: relative;
    flex: 0 0 100%;
    min-width: 100%;
}

.zdbs-slide[hidden] {
    display: none;
}

.zdbs-slide img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* Themes commonly round every image in the shop. The banner must stay square
   at the media level; the rounding of the slider is the job of the "Radio del
   borde" control, which applies it to the outer box (it has overflow hidden).
   !important is deliberate here: the theme rule is unknown and often wins. */
.zdbs img,
.zdbs picture,
.zdbs .zdbs-video,
.zdbs iframe {
    border-radius: 0 !important;
    box-shadow: none !important;
}

.zdbs-slide a {
    display: block;
    line-height: 0;
}

/* ============================================================
   One size for the whole slider
   The box is defined once on the viewport, and every slide -
   image or video - fills it, so rotating never resizes the banner.
   ============================================================ */

.zdbs-size-ratio .zdbs-viewport {
    aspect-ratio: var(--zdbs-ratio, 16 / 9);
}

/* exact size of the uploaded banners: the box takes their own proportions, so
   nothing is cropped and it still scales with the screen */
.zdbs-ratio-custom.zdbs-size-ratio .zdbs-viewport {
    aspect-ratio: var(--zdbs-rw, 1920) / var(--zdbs-rh, 600);
}

.zdbs-size-height .zdbs-viewport {
    height: var(--zdbs-height, 420px);
}

.zdbs-size-ratio .zdbs-track,
.zdbs-size-height .zdbs-track {
    height: 100%;
}

.zdbs-size-ratio .zdbs-slide,
.zdbs-size-height .zdbs-slide {
    height: 100%;
    overflow: hidden;
}

.zdbs-size-ratio .zdbs-slide a,
.zdbs-size-height .zdbs-slide a,
.zdbs-size-ratio .zdbs-slide picture,
.zdbs-size-height .zdbs-slide picture {
    display: block;
    width: 100%;
    height: 100%;
}

.zdbs-size-ratio .zdbs-slide img,
.zdbs-size-height .zdbs-slide img {
    width: 100%;
    height: 100%;
    object-fit: var(--zdbs-image-fit, cover);
    object-position: center;
}

/* the intrinsic video ratio no longer drives the height */
.zdbs-size-ratio .zdbs-video,
.zdbs-size-height .zdbs-video {
    height: 100%;
}

.zdbs-size-ratio .zdbs-video::before,
.zdbs-size-height .zdbs-video::before {
    display: none;
}

/* ---- video slides ---- */
.zdbs-video {
    position: relative;
    width: 100%;
    background-color: #000;
}

.zdbs-video::before {
    content: '';
    display: block;
    padding-top: 56.25%;
}

.zdbs-ratio-21-9::before {
    padding-top: 42.857%;
}

.zdbs-ratio-4-3::before {
    padding-top: 75%;
}

.zdbs-ratio-1-1::before {
    padding-top: 100%;
}

.zdbs-ratio-9-16::before {
    padding-top: 177.777%;
}

/* Always centred. "Contain" is these values as they are: the iframe fills the
   box and the provider letterboxes the video inside it. For "cover" the script
   measures the box and sets a larger width/height here, because CSS alone
   cannot grow a replaced element to cover a box of unknown proportions. */
.zdbs-video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    max-width: none;
    border: 0;
}

/* a fixed slider height overrides the intrinsic video ratio */
.zdbs-slide[data-type="video"] .zdbs-video {
    height: 100%;
}

/* clean mode: the player must never receive a mouse event, because that hover
   is exactly what makes YouTube reveal its title, share and watch-later bar */
.zdbs-video.is-clean iframe {
    pointer-events: none;
}

/* an invisible layer on top keeps the click available for play/pause */
.zdbs-video-shield {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.zdbs-video-shield:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -4px;
}

/* ---- how the video sits inside the banner box ----
   The fit is chosen separately for desktop and mobile, and the script reads
   these classes to decide whether to size the iframe for "cover". The old
   pure-CSS approach (min-width/min-height + aspect-ratio) silently collapsed
   back to "contain" whenever the box was taller than the video, which is
   exactly the case on mobile. ---- */

/* ============================================================
   Optional text layer over the banner
   Layers, bottom to top: media (1) - stretched link (2) -
   video shield (3) - darkening overlay (4) - content (5).
   ============================================================ */

.zdbs-slide-link {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
}

.zdbs-overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 4;
    width: 100%;
    height: 100%;
    pointer-events: none;
    --zdbs-ov-color: #000;
    --zdbs-ov-alpha: 0.45;
}

/* the colour is a plain colour and the strength a separate number, so both
   stay independently editable; color-mix keeps them combined */
.zdbs-ov-solid {
    background-color: color-mix(in srgb, var(--zdbs-ov-color) calc(var(--zdbs-ov-alpha) * 100%), transparent);
}

.zdbs-ov-bottom {
    background-image: linear-gradient(
        to top,
        color-mix(in srgb, var(--zdbs-ov-color) calc(var(--zdbs-ov-alpha) * 100%), transparent) 0%,
        transparent 75%
    );
}

.zdbs-ov-top {
    background-image: linear-gradient(
        to bottom,
        color-mix(in srgb, var(--zdbs-ov-color) calc(var(--zdbs-ov-alpha) * 100%), transparent) 0%,
        transparent 75%
    );
}

.zdbs-ov-sides {
    background-image: linear-gradient(
        to right,
        color-mix(in srgb, var(--zdbs-ov-color) calc(var(--zdbs-ov-alpha) * 100%), transparent) 0%,
        transparent 45%,
        transparent 55%,
        color-mix(in srgb, var(--zdbs-ov-color) calc(var(--zdbs-ov-alpha) * 100%), transparent) 100%
    );
}

/* browsers without color-mix still get a readable overlay */
@supports not (background-color: color-mix(in srgb, #000 50%, transparent)) {
    .zdbs-ov-solid {
        background-color: rgba(0, 0, 0, 0.45);
    }

    .zdbs-ov-bottom {
        background-image: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, transparent 75%);
    }

    .zdbs-ov-top {
        background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65) 0%, transparent 75%);
    }

    .zdbs-ov-sides {
        background-image: linear-gradient(to right, rgba(0, 0, 0, 0.65) 0%, transparent 45%, transparent 55%, rgba(0, 0, 0, 0.65) 100%);
    }
}

.zdbs-content {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 24px;
    /* clicks fall through to the link or to the video play/pause underneath;
       only the button and links inside stay interactive */
    pointer-events: none;
}

.zdbs-content-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 70%;
    text-align: center;
}

.zdbs-content a,
.zdbs-content .zdbs-btn {
    pointer-events: auto;
}

.zdbs-eyebrow {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
    color: #fff;
}

.zdbs-heading {
    margin: 0;
    font-size: clamp(1.75rem, 5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.05;
    color: #fff;
}

.zdbs-text {
    font-size: clamp(0.95rem, 1.6vw, 1.15rem);
    line-height: 1.55;
    color: #fff;
}

.zdbs-btn {
    display: inline-block;
    padding: 16px 32px;
    border: 1px solid transparent;
    background-color: #fff;
    color: #111;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.zdbs-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: currentColor;
    text-decoration: none;
}

/* ---- layout 2: card ---- */
.zdbs-layout-card .zdbs-content-inner {
    padding: clamp(20px, 4vw, 44px);
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* ---- layout 3: editorial ---- */
.zdbs-layout-editorial .zdbs-content {
    align-items: flex-end;
}

.zdbs-layout-editorial .zdbs-content-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: clamp(16px, 3vw, 40px);
    width: 100%;
    max-width: 100%;
    text-align: left;
}

.zdbs-layout-editorial .zdbs-eyebrow,
.zdbs-layout-editorial .zdbs-heading,
.zdbs-layout-editorial .zdbs-text {
    flex: 1 1 320px;
    min-width: 0;
}

.zdbs-layout-editorial .zdbs-heading {
    flex-basis: 100%;
}

.zdbs-layout-editorial .zdbs-btn {
    flex: 0 0 auto;
    align-self: flex-end;
}

@media (max-width: 767px) {
    .zdbs-layout-editorial .zdbs-content-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .zdbs-layout-editorial .zdbs-btn {
        align-self: flex-start;
    }

    .zdbs-content-inner {
        max-width: 100%;
    }
}

/* ---- effect: slide ---- */
.zdbs-fx-slide .zdbs-track {
    transition: transform var(--zdbs-speed) ease;
}

/* ---- effects: fade / zoom (stacked slides) ---- */
.zdbs-fx-fade .zdbs-track,
.zdbs-fx-zoom .zdbs-track {
    display: block;
    position: relative;
}

.zdbs-fx-fade .zdbs-slide,
.zdbs-fx-zoom .zdbs-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    transition: opacity var(--zdbs-speed) ease;
}

.zdbs-fx-fade .zdbs-slide.is-active,
.zdbs-fx-zoom .zdbs-slide.is-active {
    position: relative;
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
}

.zdbs-fx-fade .zdbs-slide img,
.zdbs-fx-zoom .zdbs-slide img {
    height: 100%;
    object-fit: var(--zdbs-image-fit, cover);
}

.zdbs-fx-zoom .zdbs-slide img {
    transition: transform calc(var(--zdbs-speed) * 2) ease;
    transform: scale(1.06);
}

.zdbs-fx-zoom .zdbs-slide.is-active img {
    transform: scale(1);
}

/* ---- arrows ---- */
.zdbs-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.35);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.zdbs-arrow:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.zdbs-arrow:disabled {
    opacity: 0.35;
    cursor: default;
}

.zdbs-prev {
    left: 12px;
}

.zdbs-prev svg {
    transform: scaleX(-1);
}

.zdbs-next {
    right: 12px;
}

/* ---- dots ---- */
.zdbs-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.zdbs-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.zdbs-dot.is-active {
    background-color: #fff;
    transform: scale(1.2);
}
