body {
    font-family: Arial, sans-serif;
    background: #f8f8f8;
    padding: 20px;
    text-align: center;
    margin: 0;
}

.title {
    margin-bottom: 20px;
    color: #af0d0d;
}

.menu {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

.menu button {
    background: #ddd;
    border: none;
    padding: 10px 18px;
    margin: 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    transition: 0.3s;
}

.menu button:hover {
    background: #ccc;
}

.menu button.active {
    background: #58c6e7;
    color: white;
}

#productTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: white;
}

#productTable th,
#productTable td {
    padding: 12px;
    border-bottom: 1px solid #ccc;
    text-align: left;
    vertical-align: top;
}

#productTable th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.img {
    width: 320px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    transition: 0.2s;
    align-items: center;
}

.img:hover {
    opacity: 0.8;
}

/* --- CSS CHO TÍNH NĂNG XEM ẢNH TO (MODAL) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    animation: zoom 0.3s;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

/* --- RESPONSIVE TABLET & MOBILE --- */

/* Tablet */
@media screen and (max-width: 1024px) {
    body {
        padding: 10px;
    }

    #productTable th,
    #productTable td {
        padding: 8px;
        font-size: 14px;
    }
}

/* Mobile - Chuyển Table thành dạng Thẻ */
@media screen and (max-width: 767px) {
    #productTable thead {
        display: none;
    }

    #productTable,
    #productTable tbody,
    #productTable tr,
    #productTable td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    #productTable tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        background: #fff;
        overflow: hidden;
    }

    #productTable td {
        text-align: left;
        border-bottom: 1px solid #eee;
        padding: 10px 15px;
        position: relative;
    }

    #productTable td:last-child {
        border-bottom: none;
    }

    /* Ẩn STT */
    #productTable td:nth-child(1) {
        display: none;
    }

    /* Ảnh */
    #productTable td:nth-child(2) {
        text-align: center;
        background: #f9f9f9;
        border-bottom: none;
        padding-top: 15px;
    }

    /* Tên sản phẩm */
    #productTable td:nth-child(3) {
        font-size: 18px;
        font-weight: bold;
        color: #0056b3;
        padding-top: 0;
    }

    /* Thành phần */
    #productTable td:nth-child(4)::before {
        content: "Thành phần: ";
        font-weight: bold;
        display: block;
        color: #555;
        margin-bottom: 5px;
    }

    /* Công dụng */
    #productTable td:nth-child(5)::before {
        content: "Công dụng: ";
        font-weight: bold;
        display: block;
        color: #555;
        margin-bottom: 5px;
    }

    /* Quy cách */
    #productTable td:nth-child(6)::before {
        content: "Quy cách: ";
        font-weight: bold;
        display: block;
        color: #555;
        margin-bottom: 5px;
    }

    /* Giá Đại Lý */
    #productTable td:nth-child(7)::before {
        content: "Đơn giá đại lý: ";
        font-weight: bold;
        display: block;
        color: #d32f2f;
        margin-bottom: 5px;
    }
}