﻿.no_scroll {
    overflow: hidden;
}

.popupframe {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #00000091;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-modal {
    background-color: var(--white);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    max-width: 950px;
    width: 100%;
    padding: 30px 40px 50px 40px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.modal-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

    .modal-header p {
        color: var(--mcolor);
        font-size: 28px;
        font-weight: 700;
        margin: 0;
        text-align: center;
    }

.close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: var(--mcolor);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s;
}

/*.close-button:hover {
            background-color: var(--dark-red);
        }*/

.modal-content {
    display: flex;
    gap: 30px;
}

.left-column {
    flex: 0 0 30%; /* Cố định chiều rộng cột trái */
}

.image-container {
    background-color: var(--primary-red);
    border-radius: 15px;
    padding: 15px;
}

    .image-container img {
        width: 100%;
        display: block;
        border-radius: 10px;
    }

.notes-container {
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 15px;
    margin-top: 20px;
}

    .notes-container h3 {
        font-size: 16px;
        font-weight: bold;
        margin-bottom: 10px;
    }

    .notes-container p {
        font-size: 12px;
        color: #666;
        line-height: 1.5;
    }

.right-column {
    flex: 1; /* Cột phải chiếm phần không gian còn lại */
}

    .right-column h2 {
        font-size: 22px;
        line-height: 1.4;
        font-weight: bold;
        color: var(--mcolor);
        text-transform: uppercase;
    }

.product-code {
    display: inline-block;
    background-color: var(--mcolor);
    color: #fff;
    padding: 6px 18px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 500;
    margin: 10px 0 20px;
}

.product-description {
    max-height: 350px; /* Đặt chiều cao tối đa, bạn có thể thay đổi số này */
    overflow-y: auto; /* Tự động thêm thanh cuộn khi cần */
    padding-right: 15px; /* Tạo khoảng trống cho thanh cuộn */
}

    .product-description p {
        line-height: 1.4;
        margin-bottom: 1.2em;
        color: #000;
        font-size: 15px;
    }

.action-buttons {
    position: absolute;
    bottom: 10px;
    right: 40px;
    display: flex;
    gap: 10px;
}

.action-button {
    background-color: var(--mcolor);
    color: var(--white);
    width: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 19px;
    transition: transform 0.3s;
}

    .action-button:hover {
        transform: scale(1.1);
    }

/* Tùy chỉnh thanh cuộn cho đẹp hơn (hoạt động trên Chrome, Edge, Safari) */
.product-description::-webkit-scrollbar {
    width: 8px;
}

.product-description::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.product-description::-webkit-scrollbar-thumb {
    background: #c9c9c9;
    border-radius: 10px;
}

    .product-description::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }
/* ----- KẾT THÚC PHẦN THAY ĐỔI ----- */
/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        flex-direction: column;
    }

    .left-column, .right-column {
        flex: 1 1 100%; /* Cả hai cột chiếm toàn bộ chiều rộng */
    }

    .action-buttons {
        position: static; /* Gỡ bỏ định vị tuyệt đối */
        justify-content: flex-end; /* Đẩy về bên phải */
        margin-top: 20px;
    }

    .product-modal {
        width: 95%;
        height: 95%;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .modal-header p {
        font-size: 18px;
    }

    .product-modal {
        height: 85%;
    }

    .modal-content {
        display: block;
    }

    .modal-header {
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .image-container {
        width: 50%;
        margin: 0 auto 20px;
    }

    .right-column {
        overflow: hidden;
    }

        .right-column h2 {
            font-size: 18px;
        }

    .close-button {
        top: 20px;
        right: 15px;
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .product-code {
        font-size: 13px;
        padding: 4px 15px;
    }

    .product-description {
        max-height: 240px;
    }

    .action-buttons {
        margin-top: 10px;
    }
}

@media (max-width: 400px) {
    .image-container {
        margin: 0 auto 0;
    }

    .product-description {
        max-height: 170px;
    }

        .product-description p {
            margin-bottom: 15px;
            font-size: 14px;
        }

    .action-button {
        width: 25px;
    }
}
