

.cp-photobox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    user-select: none;
}

.cp-photobox-overlay.active {
    opacity: 1;
    visibility: visible;
}


.cp-photobox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 100001;
    transition: background 0.2s;
}

.cp-photobox-close:hover {
    background: rgba(255, 255, 255, 0.25);
}


.cp-photobox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 100001;
    transition: background 0.2s;
}

.cp-photobox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.cp-photobox-prev { left: 20px; }
.cp-photobox-next { right: 20px; }


@media (max-width: 768px) {
    .cp-photobox-nav { display: none; }
}


.cp-photobox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}


.cp-photobox-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
   
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.cp-photobox-img.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}


.cp-photobox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 12px;
    border-radius: 20px;
    z-index: 100001;
}