﻿/* --- 1. Cấu hình chung --- */
body {
    font-family: 'Times New Roman', Times, serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

/* --- 2. Header & Search Box --- */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    background: #fff;
}

.search-box input {
    padding: 8px;
    width: 300px;
    border: 1px solid #ddd;
}

.search-box button {
    padding: 8px 15px;
    background: #e67e22;
    color: white;
    border: none;
    cursor: pointer;
}

/* --- 3. Navigation Bar & Dropdown --- */
.nav-bar {
    background: linear-gradient(to right, #f1c40f, #e67e22);
    display: flex;
    padding: 0 5%;
    position: relative;
    z-index: 1000;
}

.nav-item {
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
}

    .nav-item:hover {
        background: rgba(255, 255, 255, 0.2);
    }

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 250px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    border-top: 2px solid #e67e22;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.menu-columns {
    display: flex;
    padding: 10px;
}

.column {
    flex: 1;
    padding: 10px;
}

    .column h4 {
        color: #e67e22;
        border-bottom: 1px solid #eee;
        padding-bottom: 5px;
        font-size: 14px;
    }

    .column a {
        display: block;
        color: #666;
        padding: 5px 0;
        text-decoration: none;
        font-size: 13px;
    }

/* --- 4. Danh sách sản phẩm (Grid) --- */
.product-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 0;
    justify-content: flex-start;
}

.product-card {
    width: 230px;
    padding: 15px;
    border: 1px solid #eee;
    text-align: center;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Đẩy nút xuống dưới cùng */
    transition: transform 0.3s, box-shadow 0.3s;
}

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

/* --- 5. Khống chế hình ảnh sản phẩm --- */
.product-image-wrapper {
    width: 100%;
    height: 200px; /* Cố định chiều cao khung ảnh */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #fdfdfd;
}

    .product-image-wrapper img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain; /* Giữ nguyên tỷ lệ, không bị méo */
    }

/* --- 6. Thông tin sản phẩm --- */
.product-card h3 {
    font-size: 15px;
    color: #333;
    height: 40px; /* Cố định 2 dòng tên */
    margin: 10px 0;
    overflow: hidden;
}

.current-price {
    color: #e67e22;
    font-weight: bold;
    font-size: 18px;
    margin: 5px 0;
}

.old-price {
    color: #999;
    text-decoration: line-through;
    font-size: 13px;
}

.discount-tag {
    position: absolute;
    top: 0;
    left: 0;
    background: #e67e22;
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

/* --- 7. Nút bấm --- */
.btn-add-cart {
    display: inline-block;
    padding: 10px;
    background: #fff;
    color: #3498db;
    border: 1px solid #3498db;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    margin-top: 10px;
}

    .btn-add-cart:hover {
        background: #3498db;
        color: #fff;
    }

/* --- 8. Thông báo (Notify) chuẩn --- */
.notify-wrapper {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.cart-notify {
    background-color: rgba(0, 0, 0, 0.85); /* Nền đen mờ chuyên nghiệp */
    color: #fff;
    padding: 15px 40px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    text-align: center;
    min-width: 250px;
}

    /* Ẩn hoàn toàn ô đen khi nhãn trống */
    .cart-notify:empty {
        display: none !important;
    }

/* --- 9. Giỏ hàng (Gridview) --- */
.cart-table {
    border-collapse: collapse;
    margin-top: 20px;
}

    .cart-table th {
        background: #f1c40f;
        padding: 10px;
        text-align: left;
    }

    .cart-table td {
        padding: 15px 10px;
        border-bottom: 1px solid #eee;
    }
