/* ==========================================
   PREMIUM PRODUCT MODAL COMPONENT (DARK V2)
   ========================================== */

.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.product-modal.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

/* Backdrop */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85); /* Much darker */
    backdrop-filter: blur(10px);
    z-index: 1;
}

/* Modal Content Container - Dark Mode */
.modal-content.premium-modal {
    background: #111; /* Dark Background */
    width: 90%;
    max-width: 1100px;
    height: 85vh;
    border-radius: 8px;
    position: relative;
    z-index: 2;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.08); /* Subtle highlight */
    animation: modalScaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
    from { transform: scale(0.95) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

/* --- SPLIT LAYOUT --- */
.modal-body-split {
    display: grid;
    grid-template-columns: 55% 45%;
    height: 100%;
}

/* LEFT: Visual Side */
.modal-visual {
    position: relative;
    height: 100%;
    background: #1a1a1a; /* Dark Gray */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.5s ease;
    opacity: 0.9; /* Slight dim */
}

.modal-visual:hover img {
    transform: scale(1.05);
    opacity: 1;
}

/* Badge overlay */
.visual-badge {
    position: absolute;
    top: 30px;
    left: 30px;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px 16px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    font-weight: 600;
    color: var(--color-sand);
    border: 1px solid var(--color-sand);
    backdrop-filter: blur(4px);
}

/* RIGHT: Content Side - Dark */
.modal-info-panel {
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: #111; /* Match container */
    position: relative;
}

/* Header Group */
.modal-category {
    display: block;
    font-family: var(--font-body);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 15px;
}

.modal-info-panel h2 {
    font-family: 'Oranienbaum', serif;
    font-size: 2.8rem;
    line-height: 1.1;
    color: white; /* White Title */
    margin-bottom: 20px;
}

.modal-meta-row {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 30px;
}

.modal-divider {
    color: #444;
}

/* Price */
.modal-price-large {
    font-family: 'Oranienbaum', serif;
    font-size: 2.5rem;
    color: var(--color-sand); /* Gold Price */
    margin-bottom: 30px;
    display: flex;
    align-items: flex-start;
    line-height: 1;
}

.modal-price-large .currency {
    font-size: 1.2rem;
    margin-top: 5px;
    margin-right: 5px;
    font-family: var(--font-body);
    opacity: 0.7;
}

.modal-divider-line {
    width: 60px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

/* Description Narrative */
.product-narrative {
    flex-grow: 1;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7); /* Light Text */
    margin-bottom: 40px;
}

.product-narrative p {
    margin-bottom: 20px;
}

.product-narrative h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--color-sand);
    margin-top: 30px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Actions Footer */
.modal-actions-footer {
    display: flex;
    gap: 20px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

/* Quantity Button Style (Dark) */
.quantity-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    height: 55px;
}

.quantity-wrapper .qty-btn {
    width: 45px;
    height: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    color: white;
    transition: color 0.2s;
}

.quantity-wrapper .qty-btn:hover {
    color: var(--color-sand);
    background: rgba(255,255,255,0.05);
}

.quantity-wrapper .qty-input {
    width: 50px;
    text-align: center;
    border: none;
    font-weight: 500;
    font-size: 1rem;
    color: white;
    background: transparent;
}

/* Premium Add Button */
.btn-premium-add {
    flex-grow: 1;
    background: var(--color-marsala);
    color: white;
    border: none;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.btn-premium-add:hover {
    background: #4a1a21;
    padding-right: 25px;
    box-shadow: 0 0 20px rgba(100, 36, 46, 0.6);
}

.btn-premium-add i {
    transition: transform 0.3s;
}

.btn-premium-add:hover i {
    transform: translateX(5px);
}

/* Close Button Override */
.modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    border: none;
    z-index: 10;
    cursor: pointer;
    transition: transform 0.3s, color 0.3s;
}

.modal-close:hover {
    transform: rotate(90deg) scale(1.1);
    color: white;
}


/* Scrollbar Dark */
.modal-info-panel::-webkit-scrollbar {
    width: 6px;
}
.modal-info-panel::-webkit-scrollbar-track {
    background: #111;
}
.modal-info-panel::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}
.modal-info-panel::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive */
@media (max-width: 900px) {
    .modal-content.premium-modal {
        width: 100%;
        height: 100%;
        max-width: none;
        border-radius: 0;
    }
    
    .modal-body-split {
        grid-template-columns: 1fr;
        grid-template-rows: 40vh 1fr;
    }
    
    .modal-visual {
        height: 40vh;
    }
    
    .modal-info-panel {
        padding: 30px 25px 100px 25px;
    }
    
    .modal-info-panel h2 {
        font-size: 2rem;
    }
    
    .modal-actions-footer {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #111; /* Dark footer on mobile */
        padding: 20px;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
        z-index: 10;
    }
    
    .modal-close {
        top: 20px;
        right: 20px;
        background: rgba(0,0,0,0.5);
        border-radius: 50%;
        width: 36px;
        height: 36px;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
