.gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 99999999;
    display: none;
    background: rgba(10, 5, 12, .94);
    backdrop-filter: blur(6px);
}

.gallery-modal[data-state=open] {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: gallery-fade .35s ease
}

@keyframes gallery-fade {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.gallery-stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden
}

.gallery-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity .6s ease, transform .6s ease;
    pointer-events: none;
    padding: 4rem 5rem;
    box-sizing: border-box
}

.gallery-slide[data-state=active] {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto
}

.gallery-slide img {
    max-width: 100%;
    max-height: 86vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .55)
}

.gallery-close,
.gallery-nav {
    position: absolute;
    background: #16081A;
    border: solid 2px rgba(255, 255, 255, .9);
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .25s;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .6);
    z-index: 5
}

.gallery-close:hover,
.gallery-nav:hover {
    background: #b89b5e;
    border-color: #fff;
    color: #16081A
}

.gallery-nav {
    width: 52px;
    height: 52px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem
}

.gallery-prev {
    left: 2rem
}

.gallery-next {
    right: 2rem
}

.gallery-close {
    width: 44px;
    height: 44px;
    top: 1.75rem;
    right: 2rem;
    font-size: 1.1rem
}

.gallery-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: .6rem;
    padding: .7rem 1rem;
    background: rgba(22, 8, 26, .85);
    border-radius: 30px;
    z-index: 5
}

.gallery-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .45);
    border: 0;
    padding: 0;
    cursor: pointer;
    transition: .25s
}

.gallery-dot[data-state=active] {
    background: #b89b5e;
    transform: scale(1.35)
}

.gallery-counter {
    position: absolute;
    top: 2rem;
    left: 2rem;
    color: #fff;
    background: rgba(22, 8, 26, .85);
    padding: .45rem .9rem;
    border-radius: 20px;
    font-size: .85rem;
    letter-spacing: .1em;
    z-index: 5
}

body[data-gallery=open] {
    overflow: hidden
}

@media (max-width:768px) {
    .gallery-slide {
        padding: 4rem 1rem
    }

    .gallery-nav {
        width: 42px;
        height: 42px
    }

    .gallery-prev {
        left: .5rem
    }

    .gallery-next {
        right: .5rem
    }

    .gallery-close {
        right: 1rem
    }
}
