/* ============================================================== */
/* FINAL - STACKED POPUP STYLES FOR ALL SCREENS (REPLACE OLD CSS) */
/* ============================================================== */

/* --- 1. The Dark Background Overlay --- */
.product-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.product-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- 2. The Main Popup Container --- */
/* --- 2. The Main Popup Container --- */
.popup-content {
    width: auto;
    max-width: 800px; 
    height: auto; 
    max-height: 90vh; 
    background: #1e1e1e;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    
    /* --- NEW LINES ADDED BELOW --- */
    padding: 40px; /* This creates the background space around the content */
    box-sizing: border-box; /* Ensures padding is included in the max-width */
}

.product-popup-overlay.active .popup-content {
    transform: scale(1.1);
}

/* --- 3. The Image Panel (Top) --- */
.popup-image {
    width: 100%;
    height: 60vh; /* Give image a good height on large screens */
    max-height: 500px; /* Set a max pixel height */
    line-height: 0;
    margin-bottom: 15px; /* --- THIS SETS THE GAP TO 15px --- */
}

.popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- 4. The Text Panel (Bottom) --- */
/* --- 4. The Text Panel (Bottom) --- */
.popup-text {
    overflow-y: auto;
    color: #fff;
    text-align: center;
    /* Padding is now controlled by the parent .popup-content */
}

.popup-heading {
    color: #c8a97e;
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.popup-description {
    background: #ffffff; /* White background for the description box */
    border-radius: 8px;
    padding: 20px;
    color: #333; /* Dark text for readability on white */
    font-size: 1rem;
    line-height: 1.7;
    text-align: left; /* Left-align text inside the white box */
    margin: 0;
}

.popup-description .highlight-label {
    color: #c8a97e;
    font-weight: 600;
}

/* --- 5. The Close Button --- */
.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10; /* Ensure it's above the image */
}

.popup-close svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

.popup-close:hover {
    background-color: #c8a97e;
    transform: rotate(90deg);
}

.popup-close:hover svg {
    fill: #1e1e1e;
}


/* --- 6. RESPONSIVE ADJUSTMENTS --- */
/* Smaller adjustments for mobile */
@media (max-width: 576px) {
    .product-popup-overlay {
        padding: 10px;
    }
    .popup-image {
        height: 250px; /* Shorter image height on small phones */
    }
    .popup-text {
        padding: 15px 20px 25px 20px;
    }
    .popup-heading {
        font-size: 1.5rem;
    }
    .popup-description {
        font-size: 0.9rem;
        padding: 15px;
    }
}