.gallery button.brando-box.gallery-item {
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
    font: inherit;
    margin: 0;
    text-align: inherit;
}

.gallery .gallery-item:focus-visible,
.lightbox-close:focus-visible,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible,
.lightbox-thumbnail:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

.lightbox-bg {
    display: flex;
    position: fixed;
    z-index: 999999;
    inset: 0;
    width: 100%;
    height: 100dvh;
    overflow: hidden;
    align-items: center;
    justify-content: center;
}

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

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(calc(100vw - 48px), 1400px);
    max-height: calc(100dvh - 48px);
    margin: auto;
    padding: 72px 72px 104px;
}

.lightbox-inner {
    position: relative;
    width: 100%;
    display: flex;
    flex-flow: nowrap column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.lightbox-img {
    display: block;
    max-width: 100%;
    max-height: calc(100dvh - 220px);
    margin: auto;
    box-shadow: var(--mainshadow);
}

.lightbox-caption {
    margin: 0;
    color: var(--white);
    text-align: center;
    max-width: min(900px, 100%);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next,
.lightbox-thumbnail {
    -webkit-appearance: none;
    appearance: none;
    border: 0;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    box-shadow: var(--mainshadow);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
}

.lightbox-close:after {
    content: "";
    display: block;
    width: 30px;
    height: 30px;
    background: url("/wp-content/themes/brando_flex/assets/close.svg") center/contain no-repeat;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    width: 50px;
    height: 50px;
    transform: translateY(-50%);
}

.lightbox-prev {
    left: 16px;
}

.lightbox-next {
    right: 16px;
}

.lightbox-next:after,
.lightbox-prev:after {
    content: "";
    display: block;
    width: 25px;
    height: 25px;
    background: url("/wp-content/themes/brando_flex/assets/arrow.svg") center/contain no-repeat;
}

.lightbox-next:after {
    transform: rotate(180deg);
}

.lightbox-prev[disabled],
.lightbox-next[disabled] {
    opacity: .4;
    cursor: default;
}

.lightbox-thumbnails {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    flex-wrap: wrap;
}

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

.lightbox-thumbnail {
    padding: 0;
    cursor: pointer;
    opacity: .55;
    aspect-ratio: 1 / 1;
    filter: grayscale(1);
    transition: all ease .25s;
    background: none;
    box-shadow: none;
}

.lightbox-thumbnail:hover,
.lightbox-thumbnail:focus-visible,
.lightbox-thumbnail.active {
    opacity: 1;
    filter: grayscale(0);
}

.lightbox-thumbnail img {
    display: block;
    width: 56px;
    height: 56px;
    object-fit: cover;
}

@media only screen and (max-width: 768px) {
    .lightbox-content {
        width: calc(100vw - 24px);
        max-height: calc(100dvh - 24px);
        padding: 72px 16px 88px;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }

    .lightbox-close:after {
        width: 24px;
        height: 24px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 35px;
        height: 35px;
    }

    .lightbox-next:after,
    .lightbox-prev:after {
        width: 15px;
        height: 15px;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }

    .lightbox-img {
        max-height: calc(100dvh - 200px);
    }
}
