/* --- LIGHTBOX STYLES --- */
.lightBox {
    display: flex; 
    height: 100vh; /* Restrict to viewport height */
    width: 100vw;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    background-color: whitesmoke; 
    opacity: 0;
    visibility: hidden; 
    transition: opacity 0.5s ease, visibility 0.5s ease;
    overflow: hidden; /* Prevent scrolling entirely */
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Center everything vertically */
}
.lightBox.active { opacity: 1; visibility: visible; }

.contentContainer {
    display: flex;
    flex-direction: column;
    width: 90%;
    max-width: 1100px;
    max-height: 95vh; /* Ensure container never exceeds the screen */
    background-color: whitesmoke;
    padding: 15px 20px; /* Tighter padding */
    border-radius: 8px;
    transform: translateY(30px);
    opacity: 0;
    transition: transform 0.4s ease 0.2s, opacity 0.4s ease 0.2s;
}
.lightBox.active .contentContainer { transform: translateY(0); opacity: 1; }

.mainImg img {
    width: 100%;
    max-height: 42vh; /* Reduced from 60vh to save vertical space */
    object-fit: contain;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.imgContainer {
    display: flex;
    gap: 10px;
    margin: 10px 0; /* Tighter margin */
    justify-content: center;
    flex-wrap: wrap;
}
.imgContainer img {
    width: 60px; /* Slightly smaller thumbs */
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}
.imgContainer img:hover { border-color: #7b9c98; }

.textArea { 
    color: black; 
    padding: 0; 
    font-family: 'Cairo', sans-serif; 
    text-align: center;
}

.textArea h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.textArea p {
    font-size: 0.95rem;
    margin-bottom: 5px;
}

/* Total Price & Cart Styling */
.total-box {
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 10px;
    border-top: 2px solid #ddd;
    border-bottom: 2px solid #ddd;
}
.original-price {
    text-decoration: line-through;
    color: #888;
    font-size: 0.9rem;
}
.discount-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #e67e22;
    margin-left: 10px;
}

.close { 
    color: #333; 
    position: absolute; 
    top: 15px; 
    right: 25px; 
    font-size: 40px; 
    cursor: pointer; 
    z-index: 1001; 
}

/* Add to Cart Button Specifics */
.lightBox .modal-actions {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 5px;
}

.lightBox .btn-cart {
    width: 100%;
    max-width: 300px;
    padding: 12px; /* Slightly slimmer button */
    font-weight: bold;
    font-size: 0.95em;
    cursor: pointer;
    background-color: white; 
    color: #0e0e24; 
    border: 2px solid #0e0e24; 
    transition: 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lightBox .btn-cart:hover {
    background-color: #0e0e24;
    color: white;
}