/* ═══ NIO Hero Zoom — закреплённая секция со скролл-таймлайном ═══ */

.nio-zoom{ position: relative; width: 100%; box-sizing: border-box; }
.nio-zoom *, .nio-zoom *::before, .nio-zoom *::after{ box-sizing: border-box; }

/* пин делает JS (position:fixed во время активной фазы) */
.nio-zoom__stage{
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: #000;
}

/* ── Слайды (1–2) — кросс-фейд ── */
.nio-zoom__slides{ position: absolute; inset: 0; z-index: 1; }
.nio-zoom__slide{
    position: absolute; inset: 0;
    opacity: 0;
    transition: opacity .6s ease;
}
.nio-zoom__slide.is-active{ opacity: 1; }
.nio-zoom__slide picture{ position: absolute; inset: 0; display: block; }
.nio-zoom__slide img{
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transform: scale(var(--nz-zoom, .9));
    transform-origin: center center;
    will-change: transform;
    -webkit-user-drag: none;
}
.nio-zoom__video{
    position: absolute; inset: 0; z-index: 2;
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transform: scale(var(--nz-zoom, .9));
    transform-origin: center center;
    will-change: transform;
}

/* ── Затенение снизу (как у NIO) — выезжает через --nz-shade ── */
.nio-zoom__shade{
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
    height: 360px;
    background: linear-gradient(180deg, rgba(34,38,48,0) 0%, #000 100%);
    transform: translateY(var(--nz-shade, 100%));
    will-change: transform;
    pointer-events: none;
}

/* ── Оверлей: заголовок сверху, подпись+кнопки снизу ── */
.nio-zoom__overlay{
    position: absolute; inset: 0; z-index: 4;
    display: flex; flex-direction: column; justify-content: space-between;
    text-align: center;
    padding: 8vh 20px 5vh;
    opacity: var(--nz-text, 0);
    will-change: opacity;
    pointer-events: none;
}
.nio-zoom__top{ display: flex; flex-direction: column; align-items: center; }
.nio-zoom__title{
    margin: 0; color: #fff;
    font-size: clamp(22px, 2.4vw, 34px); font-weight: 500; line-height: 1.2;
}
.nio-zoom__subtitle{
    margin: 14px 0 0; color: #cfcfcf;
    font-size: clamp(12px, 1vw, 15px); line-height: 1.6;
    max-width: 620px;
}
.nio-zoom__bottom{ display: flex; flex-direction: column; align-items: center; }

/* подписи — стопка для смены вместе с переключателем */
.nio-zoom__captions{ position: relative; }
.nio-zoom__caption{
    margin: 0; color: #e6e6e6;
    font-size: clamp(12px, 1vw, 15px); line-height: 1.6;
    max-width: 540px;
}
.nio-zoom--two .nio-zoom__caption{
    position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
    width: max-content; max-width: 70vw;
    opacity: 0; transition: opacity .4s ease; pointer-events: none;
}
.nio-zoom--two .nio-zoom__caption.is-active{ position: relative; left: auto; transform: none; opacity: 1; }

/* кнопки-переключатели */
.nio-zoom__tabs{
    display: inline-flex; align-items: stretch;
    margin-top: 18px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 6px; overflow: hidden;
    pointer-events: auto;          /* кликабельны даже когда оверлей pointer-events:none */
}
.nio-zoom__tab{
    -webkit-appearance: none; appearance: none;
    padding: 16px 16px; border: 0; margin: 0;
    background: rgba(0,0,0,.35); color: #fff;
    font-size: 13px; line-height: 1.2; white-space: nowrap;
    cursor: pointer; transition: background-color .25s ease, color .25s ease;
}
.nio-zoom__tab.is-active{ background: #fff; color: #111; }

/* ── ≤1024 — статично, текст НА фото, видео скрыто, кнопки работают ── */
@media (max-width: 1024px){
    .nio-zoom{ height: auto !important; }
    .nio-zoom__stage{ position: relative; height: auto; }
    .nio-zoom__slides{ position: relative; }
    /* первый слайд держит высоту по натуральному фото; остальные — оверлеем */
    .nio-zoom__slide{ position: absolute; inset: 0; }
    .nio-zoom__slide.nz-first{ position: relative; }
    .nio-zoom__slide.nz-first picture{ position: relative; }
    .nio-zoom__slide.nz-first img{ position: relative; height: auto; }
    .nio-zoom__slide img{ transform: none !important; }
    .nio-zoom__video{ display: none !important; }
    .nio-zoom__shade{ transform: none !important; height: 192px; }
    .nio-zoom__overlay{ opacity: 1 !important; }   /* текст НА фото */
}
