@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

/* Header & Nav */
header {
    background: linear-gradient(135deg, #002d5b 0%, #0056b3 100%);
    color: #fff;
    padding: 60px 20px;
    text-align: center;
}

nav {
    background: #fff;
    padding: 15px 0;
    text-align: center;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul li {
    display: inline-block;
    margin: 0 20px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
}

/* Bố cục trang web thực thụ */
.page-container {
    max-width: 1400px; /* Tăng độ rộng trang web */
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 300px; /* Nội dung chính 1 phần, Sidebar 300px */
    gap: 30px;
}

/* Danh sách sản phẩm cố định 3 cột */
.product-grid {
    display: grid;
    /* Ép hiển thị đúng 3 cột bằng nhau */
    grid-template-columns: repeat(3, 1fr); 
    gap: 35px;
}

/* Đảm bảo trên màn hình nhỏ (máy tính bảng/điện thoại) vẫn xem được */
@media (max-width: 1100px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cột cho máy tính bảng */
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr; /* 1 cột cho điện thoại */
    }
}

.product-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    transition: 0.3s;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    margin-bottom: 15px;
}

.product-card h2 {
    font-size: 1.2rem;
    color: #002d5b;
    margin-bottom: 10px;
    min-height: 2.8rem;
}

.product-card p {
    font-size: 0.95rem;
    color: #666;
    flex-grow: 1; /* Đẩy giá và nút xuống đáy đều nhau */
    margin-bottom: 15px;
}

.price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0056b3;
    margin-bottom: 15px;
}

.buy-btn {
    background: #0056b3;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.buy-btn:hover { background: #003d80; }

/* Sidebar */
.sidebar-widget {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #eee;
}

.social-links a {
    display: block;
    padding: 10px;
    margin-bottom: 8px;
    background: #f8f9fa;
    text-decoration: none;
    color: #0056b3;
    border-radius: 6px;
    text-align: center;
}

/* Footer */
footer {
    background: #1c1e21;
    color: #fff;
    padding: 50px 0;
    margin-top: 40px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .page-container { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: 1fr; }
}