.ortobalance-gallery,
.gallery {
    width: 100%;
}

.gallery-stage,
.gallery-main {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface-blue);
}

.gallery-main img,
.gallery-stage img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.gallery-thumbs {
    display: flex;
    gap: 9px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.gallery-thumb {
    width: 66px;
    height: 66px;
    flex: 0 0 66px;
    padding: 3px;
    border: 2px solid transparent;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.gallery-thumb.is-active,
.gallery-thumb:hover {
    border-color: var(--brand);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    border-radius: 9px;
    object-fit: cover;
}

.ortobalance-lightbox,
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 160;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(5, 27, 42, 0.92);
}

.lightbox-image {
    max-width: min(100%, 1120px);
    max-height: calc(100vh - 48px);
    object-fit: contain;
    border-radius: 18px;
}

.lightbox-close,
.lightbox-nav {
    position: fixed;
    z-index: 2;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 24px;
}

.lightbox-close {
    top: 16px;
    right: 16px;
}

.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-nav.prev {
    left: 12px;
}

.lightbox-nav.next {
    right: 12px;
}

@media (min-width: 768px) {
    .gallery-thumb {
        width: 76px;
        height: 76px;
        flex-basis: 76px;
    }

    .lightbox-nav.prev {
        left: 24px;
    }

    .lightbox-nav.next {
        right: 24px;
    }
}

@media (min-width: 1280px) {
    .gallery-stage,
    .gallery-main {
        border-radius: 26px;
    }
}
