/* 1. Reset & Cài đặt chung */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif; /* Font chữ hiện đại hơn */
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* Container chính bao quanh toàn bộ trang */
.container {
    display: grid;
    grid-template-columns: 75% 25%; /* Tỉ lệ Main/Sidebar hợp lý hơn */
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

/* 2. Header & Nav (Trải dài 2 cột) */
header {
    background-color: #c7cc19;
    color: #fff;
    padding: 30px;
    text-align: center;
    grid-column: 1 / span 2;
}

nav {
    background-color: #ffa486;
    padding: 15px;
    text-align: center;
    grid-column: 1 / span 2;
    position: sticky; /* Menu dính khi cuộn trang */
    top: 0;
    z-index: 1000;
}

nav ul {
    list-style: none;
}

nav ul li {
    display: inline;
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
}

/* 3. Danh sách sản phẩm (Cột 1) */
.product-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 cột sản phẩm */
    gap: 25px;
    padding: 30px;
    grid-column: 1;
}

.product-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease; /* Hiệu ứng mượt mà */
}

/* Hiệu ứng Hover cho sản phẩm - Rất quan trọng cho thẩm mỹ */
.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: #ffa486;
}

.product-card img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 15px;
}

.product-card h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.product-card a {
    text-decoration: none;
    color: #333;
}

.product-card p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

/* 4. Sidebar (Cột 2) */
.sidebar {
    background-color: #fff;
    padding: 30px;
    grid-column: 2;
    border-left: 1px solid #eee;
}

.sidebar h3 {
    border-bottom: 2px solid #199cff;
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: #199cff;
}

.social-icons a {
    color: #199cff;
    text-decoration: none;
    display: block;
    margin-bottom: 15px;
    padding: 8px;
    border: 1px solid #199cff;
    border-radius: 5px;
    text-align: center;
    transition: 0.3s;
}

.social-icons a:hover {
    background: #199cff;
    color: white;
}

/* 5. Footer (Trải dài 2 cột) */
.footer {
    background-color: #333;
    color: #fff;
    padding: 40px 20px;
    grid-column: 1 / span 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 cột footer */
    gap: 30px;
}

.footer-item h3 {
    color: #ffa486;
    margin-bottom: 15px;
}

/* 6. Buttons */
.button {
    border: none;
    color: white;
    padding: 12px 20px;
    text-align: center;
    display: inline-block;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.button4 {
    background-color: #04AA6D;
    border-radius: 12px;
    width: 100%; /* Nút rộng bằng thẻ sản phẩm */
}

.button4:hover {
    background-color: #038d5b;
}

.button1 {
    background-color: #ffa486;
    border-radius: 4px;
}

/* 7. Responsive (Mobile & Tablet) */
@media (max-width: 992px) {
    .product-list {
        grid-template-columns: repeat(2, 1fr); /* 2 cột trên tablet */
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr; /* Sidebar nhảy xuống dưới */
    }
    
    .product-list, .sidebar, .footer {
        grid-column: 1 / span 1;
    }

    .footer {
        grid-template-columns: 1fr;
    }
    
    .product-list {
        grid-template-columns: 1fr; /* 1 cột trên mobile */
    }
}