/* Overlay background */
.prodafric-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* Active class for animation */
.prodafric-popup-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* Popup container */
.prodafric-popup-container {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.prodafric-popup-overlay.is-active .prodafric-popup-container {
    transform: scale(1);
}

/* Close button */
.prodafric-popup-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 36px;
    height: 36px;
    background: #fff;
    color: #333;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: background 0.2s, transform 0.2s;
    /* Adjust for absolute positioning outside the container */
    margin: 25px;
}

.prodafric-popup-close:hover {
    background: #f1f1f1;
    transform: scale(1.1);
}

/* Image content */
.prodafric-popup-content {
    display: block;
    line-height: 0;
}

.prodafric-popup-content img {
    max-width: 100vw;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    border-radius: 12px;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .prodafric-popup-content img {
        max-width: 800px;
    }
}
