
/* ==============================================
   Detail Card Modal Styles
   ============================================== */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Dark overlay */
    z-index: 10000; /* High z-index */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: #fff;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 12px;
    position: relative;
    display: flex;
    flex-direction: row; /* Side by side layout */
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    color: #333;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--primary-blue);
}

.modal-image-col {
    flex: 0 0 45%;
    position: relative;
    overflow: hidden;
    background-color: #f4f5f8;
}

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

.modal-text-col {
    flex: 1;
    padding: 40px;
    overflow-y: auto; /* Allow scroll if text is long */
}

.modal-title {
    font-size: 28px;
    color: var(--dark-text);
    margin-bottom: 20px;
    font-weight: 700;
    padding-right: 20px; /* Space for close button */
}

.modal-desc {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 30px;
}

.modal-text-col .spec-list {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

/* Mobile Responsiveness for Modal */
@media (max-width: 768px) {
    .modal-content {
        flex-direction: column;
        width: 95%;
        max-height: 95vh;
        overflow-y: auto;
    }

    .modal-image-col {
        flex: 0 0 250px; /* Fixed height for image on mobile */
        width: 100%;
    }

    .modal-text-col {
        padding: 25px;
    }

    .modal-title {
        font-size: 24px;
    }

    .modal-close {
        top: 10px;
        right: 15px;
        color: #fff; /* White close button on image */
        background: rgba(0,0,0,0.3);
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
