.vts-light-gallery {
    position: relative;
    float: left;
    width: 48%;
    margin: 0 4% 2rem 0;
    box-sizing: border-box;
}

.vts-light-gallery *,
.vts-light-gallery *::before,
.vts-light-gallery *::after {
    box-sizing: border-box;
}

.vts-light-gallery__stage {
    position: relative;
    width: 100%;
    aspect-ratio: var(--vts-gallery-ratio, 1 / 1);
    overflow: hidden;
    background: #fff;
}

.vts-light-gallery__main-link {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.vts-light-gallery__main-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.vts-light-gallery__arrow,
.vts-light-gallery__expand,
.vts-light-gallery__lightbox-close {
    appearance: none;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #222;
    cursor: pointer;
    line-height: 1;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.18);
}

.vts-light-gallery__arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 42px;
    height: 42px;
    transform: translateY(-50%);
    font-size: 24px;
}

.vts-light-gallery__arrow--previous {
    left: 10px;
}

.vts-light-gallery__arrow--next {
    right: 10px;
}

.vts-light-gallery__expand {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    width: 40px;
    height: 40px;
    font-size: 22px;
}

.vts-light-gallery__thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    padding-bottom: 4px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
}

.vts-light-gallery__thumb {
    flex: 0 0 82px;
    width: 82px;
    height: 82px;
    padding: 3px;
    border: 2px solid transparent;
    background: #fff;
    cursor: pointer;
}

.vts-light-gallery__thumb.is-active {
    border-color: currentColor;
}

.vts-light-gallery__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vts-light-gallery__thumb:focus-visible,
.vts-light-gallery__arrow:focus-visible,
.vts-light-gallery__expand:focus-visible,
.vts-light-gallery__lightbox-close:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 2px;
}

.vts-light-gallery__lightbox[hidden] {
    display: none;
}

.vts-light-gallery__lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(0, 0, 0, 0.9);
}

.vts-light-gallery__lightbox-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
}

.vts-light-gallery__lightbox-close {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 2;
    width: 46px;
    height: 46px;
    font-size: 34px;
}

body.vts-light-gallery-is-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .vts-light-gallery {
        float: none;
        width: 100%;
        margin-right: 0;
    }

    .vts-light-gallery__arrow {
        width: 38px;
        height: 38px;
    }

    .vts-light-gallery__lightbox {
        padding: 16px;
    }
}
