/* 1. Reset & General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background-color: #f4f7f6; /* Màu nền trung tính, dịu mắt */
    color: #333;
    display: grid;
    grid-template-columns: 75% 25%; /* Điều chỉnh lại tỉ lệ cho cân đối */
    max-width: 1300px;
    margin: 0 auto;
    gap: 0; 
}

/* 2. Header & Navigation */
header {
    background: linear-gradient(135deg, #1a237e, #0d47a1); /* Màu xanh sâu chuyên nghiệp */
    color: #ffffff;
    padding: 40px 20px;
    text-align: center;
    grid-column: 1 / span 2;
}

nav {
    background-color: #ffffff;
    padding: 15px 0;
    grid-column: 1 / span 2;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* Tạo hiệu ứng nổi nhẹ */
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 20px;
}

nav ul li a {
    text-decoration: none;
    color: #555;
    font-weight: 600;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #0d47a1;
}

/* 3. Main Product List */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Tự động co giãn số cột */
    gap: 25px;
    padding: 30px;
    grid-column: 1;
}

.product-card {
    background-color: #ffffff;
    border: none; /* Bỏ viền thô */
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.product-card:hover {
    transform: translateY(-8px); /* Hiệu ứng bay bổng khi di chuột */
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.product-card img {
    max-width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* 4. Sidebar */
.sidebar {
    background-color: #ffffff;
    border-left: 1px solid #eee;
    padding: 30px 20px;
    grid-column: 2;
}

.sidebar h2 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #1a237e;
    border-left: 4px solid #1a237e;
    padding-left: 10px;
}

.social-icons a {
    color: #555;
    text-decoration: none;
    display: block;
    padding: 10px 15px;
    margin-bottom: 8px;
    background: #f9f9f9;
    border-radius: 6px;
    transition: all 0.2s;
}

.social-icons a:hover {
    background: #0d47a1;
    color: white;
    padding-left: 20px;
}

/* 5. Buttons */
.button {
    background-color: #00c853; /* Xanh lá tươi hiện đại */
    border: none;
    color: white;
    padding: 10px 5px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 10px;
    transition: opacity 0.3s;
    width: 100%;
}

.button:hover {
    opacity: 0.85;
}

.button1 { border-radius: 4px; }
.button3 { border-radius: 25px; }
.button4 { border-radius: 25px; } /* Bo tròn kiểu viên thuốc */
.button5 { width: 50px; height: 50px; border-radius: 50%; padding: 0; } /* Hình tròn chuẩn */

/* 6. Footer */
.footer {
    background-color: #1a1a1a;
    color: #aaa;
    padding: 50px 20px;
    grid-column: 1 / span 2;
    display: grid;
    gap: 20px;
}

/* 7. Responsive */
@media (max-width: 992px) {
    body {
        grid-template-columns: 1fr; /* Sidebar nhảy xuống dưới trên máy tính bảng */
    }
    .sidebar {
        grid-column: 1;
        border-left: none;
        border-top: 1px solid #eee;
    }
}

@media (max-width: 576px) {
    .product-list {
        grid-template-columns: 1fr;
        padding: 15px;
    }
}

/* Layout cho trang chi tiết sản phẩm */
.container-detail {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Chia 2 cột: Ảnh và Thông tin */
    gap: 40px;
    max-width: 1100px;
    margin: 30px auto;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.product-image-large img {
    width: 100%;
    border-radius: 10px;
    object-fit: contain;
    border: 1px solid #f0f0f0;
}

.product-title {
    font-size: 28px;
    color: #333;
    margin-bottom: 15px;
}

.product-price-detail {
    font-size: 24px;
    color: #d32f2f;
    font-weight: bold;
    margin-bottom: 20px;
}

.specs h3 {
    border-bottom: 2px solid #2a5298;
    display: inline-block;
    margin-bottom: 10px;
}

.specs ul {
    list-style: none;
    padding-left: 0;
}

.specs li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.description-text {
    margin: 20px 0;
    line-height: 1.6;
    color: #666;
}

.button-group-detail {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.back-home {
    display: block;
    text-decoration: none;
    color: #2a5298;
    font-weight: bold;
    margin-top: 10px;
}

/* Khi xem trên điện thoại, ảnh sẽ nằm trên, thông tin nằm dưới */
@media (max-width: 768px) {
    .container-detail {
        grid-template-columns: 1fr;
    }
}