/* PDP Gallery — unified mobile slider + desktop grid (CSS-driven, без JS-слайдера) */

.nc-gallery {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    aspect-ratio: 2 / 3;
}
.nc-gallery::-webkit-scrollbar { display: none; }

.nc-gallery__item {
    display: block;             /* <picture> по умолчанию inline */
    flex: 0 0 100%;
    scroll-snap-align: start;
    aspect-ratio: 2 / 3;
    overflow: hidden;
}
.nc-gallery__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}
.nc-gallery__item--video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nc-gallery__dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 8px 0;
}
.nc-gallery__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ccc;
    transition: background 0.2s;
    cursor: pointer;
}
.nc-gallery__dot.is-active { background: #000; }

.nc-gallery__labels {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    pointer-events: none;
}

@media (min-width: 768px) {
    .nc-gallery {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        overflow: visible;
        aspect-ratio: auto;
    }
    .nc-gallery__item {
        flex: initial;
        aspect-ratio: 2 / 3;
    }
    /* Третья картинка / видео-слот занимает обе колонки.
       Если в галерее всего одна картинка — она тоже full-width. */
    .nc-gallery__item:nth-child(3),
    .nc-gallery__item--video,
    .nc-gallery__item:only-child {
        grid-column: span 2;
    }
    .nc-gallery__dots { display: none; }
}
