/* контейнер */

.carousel-outer-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.wp-block-gallery.is-carousel {
    touch-action: pan-x;
    -ms-touch-action: pan-x;
}

/* сама галерея */

.carousel-outer-wrapper .wp-block-gallery.is-carousel {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.carousel-outer-wrapper .wp-block-gallery.is-carousel::-webkit-scrollbar {
    display: none;
}


/* слайды */

.carousel-outer-wrapper .wp-block-image {
    flex: 0 0 100% !important;
    scroll-snap-align: start !important;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* картинки */

.carousel-outer-wrapper img {
    max-height: 70vh;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* вертикальные */

.carousel-outer-wrapper img.vertical-image {
    max-width: 60%;
}


/* стрелки */

/* базовый размер — десктоп */
.carousel-outer-wrapper .gallery-prev,
.carousel-outer-wrapper .gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 64px;
    height: 64px;
    font-size: 34px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 30;
    user-select: none;
    opacity: 0.7;
    transition: opacity .25s ease, background .25s ease, transform .25s ease;
}

/* hover */
.carousel-outer-wrapper .gallery-prev:hover,
.carousel-outer-wrapper .gallery-next:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.08);
}

/* планшет / мобильные экраны */
@media (max-width: 1024px) {

    .carousel-outer-wrapper .gallery-prev,
    .carousel-outer-wrapper .gallery-next {
        width: 48px;
        height: 48px;
        font-size: 26px;
    }
}

/* мобильные маленькие экраны */
@media (max-width: 600px) {

    .carousel-outer-wrapper .gallery-prev,
    .carousel-outer-wrapper .gallery-next {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
}

/* увеличенная зона клика */

.carousel-outer-wrapper .gallery-prev::before,
.carousel-outer-wrapper .gallery-next::before {

    content: "";

    position: absolute;

    width: 120px;
    height: 120px;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

}

/* положение */

.carousel-outer-wrapper .gallery-prev {
    left: 12px;
}

.carousel-outer-wrapper .gallery-next {
    right: 12px;
}


/* hover эффект */

.carousel-outer-wrapper .gallery-prev:hover,
.carousel-outer-wrapper .gallery-next:hover {

    opacity: 1;

    background: rgba(0, 0, 0, 0.8);

    transform: translateY(-50%) scale(1.08);

}


/* градиенты по краям */

/*.carousel-outer-wrapper::before,
.carousel-outer-wrapper::after {

    content: "";

    position: absolute;

    top: 0;

    width: 40px;

    height: 100%;

    z-index: 5;

    pointer-events: none;

}

.carousel-outer-wrapper::before {

    left: 0;

    background: linear-gradient(to right, rgba(0, 0, 0, 0.25), transparent);

}

.carousel-outer-wrapper::after {

    right: 0;

    background: linear-gradient(to left, rgba(0, 0, 0, 0.25), transparent);

}*/


/* touch поведение */

.wp-block-gallery.is-carousel {
    touch-action: pan-y;
}

.carousel-outer-wrapper .wp-block-image {
    cursor: pointer;
}



.gallery-dots {

    display: flex;
    justify-content: center;
    gap: 10px;

    padding: 12px 0;

    user-select: none;
}

/* сама точка */

.gallery-dot {

    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: rgba(0, 0, 0, 0.45);

    cursor: pointer;

    transition:
        transform .18s ease,
        background .18s ease,
        opacity .18s ease;

    /* увеличиваем зону клика */
    position: relative;
}

/* увеличенная зона нажатия */

.gallery-dot::before {

    content: "";
    position: absolute;

    inset: -6px;

}

/* hover для десктопа */

.gallery-dot:hover {

    background: rgba(0, 0, 0, 0.65);
    transform: scale(1.15);

}

/* активная точка */

.gallery-dot.active {

    background: #2A2A2B;
    transform: scale(1.35);

}


.gallery-dots {
    flex-wrap: wrap;
}