.soves-detail-gallery {
    display: grid;
    gap: 14px;
}

.soves-detail-gallery__main {
    position: relative;
    min-height: 430px;
    border-radius: 8px;
    overflow: hidden;
    background: #eef3f9;
}

.soves-detail-gallery__main [data-gallery-main] {
    width: 100%;
    height: 430px;
    display: block;
    object-fit: cover;
    cursor: zoom-in;
    touch-action: pan-y;
    transition: opacity 160ms ease;
}

.soves-detail-gallery.is-gallery-changing [data-gallery-main] {
    opacity: 0.28;
}

.soves-detail-gallery__main button {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    color: var(--soves-text, #172033);
    transform: translateY(-50%);
    cursor: pointer;
}

.soves-detail-gallery__main button:hover,
.soves-detail-gallery__main button:focus-visible,
.soves-detail-gallery__main a:hover,
.soves-detail-gallery__main a:focus-visible {
    background: var(--soves-primary, #e24a3b);
    color: #ffffff;
    outline: 0;
}

.soves-detail-gallery__main button:first-of-type {
    left: 14px;
}

.soves-detail-gallery__main button:last-of-type {
    right: 14px;
}

.soves-detail-gallery__main a {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    border-radius: 999px;
    background: #ffffff;
    color: var(--soves-text, #172033);
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.soves-detail-gallery__thumbs-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    user-select: none;
    touch-action: pan-x;
}

.soves-detail-gallery__thumbs-viewport::-webkit-scrollbar {
    display: none;
}

.soves-detail-gallery__thumbs-viewport.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.soves-detail-gallery__thumbs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 30px) / 4);
    gap: 10px;
}

.soves-detail-gallery__thumbs button {
    height: 88px;
    border: 2px solid transparent;
    border-radius: 7px;
    padding: 0;
    overflow: hidden;
    background: #ffffff;
    cursor: pointer;
}

.soves-detail-gallery__thumbs button.is-active {
    border-color: var(--soves-primary, #e24a3b);
}

.soves-detail-gallery__thumbs img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.soves-detail-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(6px);
}

.soves-detail-lightbox[hidden] {
    display: none;
}

.soves-detail-lightbox img {
    max-width: min(1100px, 94vw);
    max-height: 88vh;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.soves-detail-lightbox__nav,
.soves-detail-lightbox [data-lightbox-close] {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.68);
    color: #ffffff;
    cursor: pointer;
}

.soves-detail-lightbox__nav {
    top: 50%;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
}

.soves-detail-lightbox__nav.is-prev {
    left: 28px;
}

.soves-detail-lightbox__nav.is-next {
    right: 28px;
}

.soves-detail-lightbox [data-lightbox-close] {
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    padding: 0 0 3px;
    font-size: 31px;
    line-height: 1;
    font-weight: 300;
}

.soves-detail-lightbox__nav:hover,
.soves-detail-lightbox__nav:focus-visible,
.soves-detail-lightbox [data-lightbox-close]:hover,
.soves-detail-lightbox [data-lightbox-close]:focus-visible {
    border-color: var(--soves-primary, #e24a3b);
    background: var(--soves-primary, #e24a3b);
    color: #ffffff;
    outline: 0;
}

.soves-detail-lightbox-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .soves-detail-gallery__main,
    .soves-detail-gallery__main [data-gallery-main] {
        min-height: 260px;
        height: 260px;
    }

    .soves-detail-gallery__thumbs {
        grid-auto-columns: calc((100% - 10px) / 2);
    }

    .soves-detail-lightbox {
        padding: 18px;
    }

    .soves-detail-lightbox__nav.is-prev {
        left: 12px;
    }

    .soves-detail-lightbox__nav.is-next {
        right: 12px;
    }

    .soves-detail-lightbox [data-lightbox-close] {
        top: 12px;
        right: 12px;
    }
}
