/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff8c6b; 
    --secondary-color: #f7e1d7; 
    --accent-color: #8bb4a0; 
    --text-color: #333;
    --light-text-color: #fff;
    --border-color: #eee;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 2px 5px var(--shadow-medium);
}

header h1 {
    font-size: 2.8em;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px var(--shadow-medium);
}

/* Navigation */
nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
}

nav ul li a {
    color: var(--light-text-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: color 0.3s ease, transform 0.3s ease;
}

nav ul li a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 3fr; /* Sidebar 1 phần, content 3 phần */
    gap: 30px;
    padding: 30px 0;
}

/* Sidebar */
.sidebar {
    background-color: var(--light-text-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-light);
}

.sidebar h3 {
    color: var(--primary-color);
    font-size: 1.5em;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 5px;
}

.sidebar ul {
    list-style: none;
    margin-bottom: 25px;
}

.sidebar ul li a {
    display: block;
    padding: 8px 0;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px dashed var(--border-color);
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.sidebar ul li:last-child a {
    border-bottom: none;
}

.sidebar ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-icons a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-color);
}

.social-icons i {
    margin-right: 8px;
    color: var(--accent-color);
}

/* Product Grid */
.product-grid {
    padding: 0;
}

.product-grid h2 {
    font-size: 2.2em;
    color: var(--primary-color);
    margin-bottom: 25px;
    text-align: center;
    text-shadow: 1px 1px 1px var(--shadow-light);
}

.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive 3 cột */
    gap: 25px;
}

.product-card {
    background-color: var(--light-text-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 10px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden; /* Đảm bảo ảnh không tràn ra ngoài */
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px var(--shadow-medium);
}

.product-card img {
    max-width: 100%;
    height: 200px; /* Chiều cao cố định cho ảnh */
    object-fit: cover; /* Đảm bảo ảnh không bị méo */
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

.product-card h3 {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.product-card .description {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 15px;
    min-height: 45px; /* Giúp các card có chiều cao đồng đều hơn */
}

.product-card .price {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 20px;
}

/* Custom Button Style (thay thế btn btn-primary của Bootstrap) */
.button {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-decoration: none; /* Đảm bảo không có gạch chân nếu dùng thẻ a */
    display: inline-block;
}

.button:hover {
    background-color: #e07050; 
    transform: translateY(-2px);
}

/* Footer */
footer {
    background-color: #333;
    color: var(--light-text-color);
    padding: 40px 0 20px;
    margin-top: 50px;
    box-shadow: 0 -2px 5px var(--shadow-medium);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-item h3 {
    color: var(--primary-color);
    font-size: 1.6em;
    margin-bottom: 15px;
}

.footer-item p, .footer-item ul {
    font-size: 0.95em;
    color: #ccc;
}

.footer-item ul {
    list-style: none;
}

.footer-item ul li {
    margin-bottom: 8px;
}

.footer-item ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-item ul li a:hover {
    color: var(--primary-color);
}

.footer-item ul li i {
    margin-right: 10px;
    color: var(--accent-color);
}

.copyright {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85em;
    color: #aaa;
}

/* Responsive Design */
@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr; /* Sidebar và nội dung xếp chồng lên nhau */
    }

    .sidebar {
        order: 2; /* đặt sidebar xuống dưới trên tablet */
    }

    .product-grid {
        order: 1; /* đặt sản phẩm lên trên */
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    .sidebar {
        display: none; /* Ẩn sidebar trên mobile để tiết kiệm không gian */
    }

    .product-list {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Giảm kích thước minmax cho mobile */
    }

    .main-content {
        grid-template-columns: 1fr; /* Đảm bảo vẫn là 1 cột */
        padding: 20px 0;
    }

    .product-card {
        padding: 15px;
    }

    .product-card h3 {
        font-size: 1.5em;
    }

    .product-card .price {
        font-size: 1.1em;
    }

    .button {
        padding: 10px 20px;
        font-size: 1em;
    }

    .footer-grid {
        grid-template-columns: 1fr; /* Footer xếp chồng trên mobile */
        text-align: center;
    }

    .footer-item ul {
        padding-left: 0;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8em;
    }

    nav ul {
        gap: 8px;
    }

    nav ul li a {
        font-size: 1em;
    }

    .product-list {
        grid-template-columns: 1fr; /* 1 cột trên màn hình điện thoại rất nhỏ */
    }
}