.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .8);
    opacity: 0;
    visibility: hidden;
    transition: .3s;
    z-index: 9999;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup {
    width: 80%;
    height: 80vh;
    margin: 5vh auto;
    background: #000;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    border-radius: 50%;
    border: none;
    background: #ff6600;
    color: white;
    cursor: pointer;
    z-index: 20;
    transition: .3s ease;
}

.close:hover {
    background: #ff4605;
    border-color: #ff6600;
    transform: translateY(-3px);
    box-shadow: 0 5px 13px rgba(255, 107, 53, 0.4);
}

/* Swiper overrides for Modal */
.modalSwiper {
    width: 100%;
    height: 100%;
}

.modalSwiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

.modalSwiper .swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
}

/* Custom Navigation Buttons Position */
.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 80px;
    border-radius: 10px;
    font-size: 2.5rem;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    border: none;
    cursor: pointer;
    z-index: 50;
    /* Higher than Swiper default */
    display: flex;
    align-items: center;
    justify-content: center;
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

/* Swiper disables buttons automatically, we can style them if needed */
.nav.swiper-button-disabled {
    opacity: 0.35;
    cursor: auto;
    pointer-events: none;
}

@media (max-width: 700px) {
    .popup {
        width: 95%;
        height: 70vh;
    }
}