/* --- VARIABLES --- */
:root {
    --primary: #00b4fc;
    --primary-dark: #0077ff;
    --accent: #ffd500;
    --bg-light: #f8fafc;
    --text-main: #1f2937;
    --text-muted: #64748b;
    --price-color: #e11d48;
    --white: #ffffff;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 300px; /* Sidebar cố định kích thước sẽ đẹp hơn */
}

/* --- LAYOUT COMPONENTS --- */
header {
    background: linear-gradient(to right, #fffbb6, #fffde7);
    color: var(--primary);
    padding: 40px 20px;
    text-align: center;
    grid-column: 1 / -1;
}

nav {
    background-color: var(--accent);
    padding: 0;
    grid-column: 1 / -1;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
}

nav ul li a {
    display: block;
    padding: 15px 25px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: var(--transition);
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--primary-dark);
}

/* --- PRODUCT SECTION --- */
.product-list {
    padding: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--white);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.03);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 15px;
}

.product-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3rem;
}

.product-card .price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--price-color);
    margin: 10px 0;
}

.product-card button {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.product-card button:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(0, 180, 252, 0.3);
}

/* --- SIDEBAR --- */
.sidebar {
    background-color: #73a3e0;
    color: white;
    padding: 40px 25px;
}

.social-icons a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-icons a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(5px);
}

/* --- FOOTER --- */
.footer {
    background-color: #0f172a;
    color: #94a3b8;
    padding: 60px 20px;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-item h4 {
    color: white;
    margin-bottom: 15px;
}

/* --- UTILS --- */
.button {
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    body {
        grid-template-columns: 1fr;
    }
    .sidebar {
        order: 2; /* Đưa sidebar xuống dưới list sản phẩm trên tablet */
    }
}

@media (max-width: 576px) {
    .product-list {
        padding: 20px;
        grid-template-columns: 1fr;
    }
    .footer {
        grid-template-columns: 1fr;
        text-align: left;
    }
}