/* Reset CSS để loại bỏ các mặc định của trình duyệt */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Thiết lập font chung cho trang web */
body {
    font-family: Arial, sans-serif;
    background-color: #f2f2f2;
    display: grid;
    grid-template-columns: 70% 30%;
    /* Chia trang thành hai cột */
    max-width: 1200px;
    /* Độ rộng tối đa của trang web */
    margin: 0 auto;
    /* Canh giữa trang web trên màn hình */
}

/* Phần tiêu đề trang web */
header {
    background-color: #c7cc19;
    color: #fff;
    padding: 20px;
    text-align: center;
    grid-column: 1 / span 2;
    /* Trải đều qua cả hai cột */
}

nav {
    background-color: #ffa486;
    color: #fff;
    text-align: center;
    padding: 10px;
    grid-column: 1 / span 2;
    /* Trải đều qua cả hai cột */
}

nav ul {
    list-style: none;
}

nav ul li {
    display: inline;
    margin-right: 20px;
}

/* Phần danh sách sản phẩm */
.product-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Hiển thị 3 sản phẩm trên mỗi hàng */
    gap: 20px;
    /* Khoảng cách giữa các sản phẩm */
    padding: 20px;
    grid-column: 1;
    /* Chỉ nằm ở cột đầu tiên */
}

.product-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    width: 100%;
    text-align: center; /* Canh giữa nội dung trong sản phẩm */
}

.product-card img {
    max-width: 100%;
    height: auto;
}

/* Phần sidebar */
.sidebar {
    background-color: #199cff;
    color: #fff;
    padding: 10px;
    grid-column: 2;
    /* Chỉ nằm ở cột thứ hai */
}

.social-icons {
    margin-top: 20px;
}

.social-icons a {
    color: #fff;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
}

/* Chỉnh lại bố cục cho màn hình thiết bị di động */
@media (max-width: 576px) {
    .product-list {
        grid-template-columns: 1fr;
        /* Hiển thị một sản phẩm trên mỗi hàng */
    }

    .product-card {
        width: 100%;
        margin-bottom: 20px;
    }

    .sidebar {
        grid-column: 1 / span 2;
        /* Trải đều qua cả hai cột */
    }

    /* Chỉnh lại bố cục cho phần footer */
    .footer {
        grid-template-columns: 1fr;
        /* 1 cột xếp chồng lên nhau trên màn hình di động */
    }
}

/* Phần footer */
.footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px;
    grid-column: 1 / span 2;
    /* Trải đều qua cả hai cột */
    display: grid;
}

/* Cột trong phần footer */
.footer-item {
    padding: 10px;
}

/* Chỉnh layout cho máy tính */
@media (min-width: 768px) {
    .footer {
        grid-template-columns: repeat(3, 1fr);
        /* 3 cột trên máy tính */
    }
}

.button {
    background-color: #04AA6D;
    border: none;
    color: white;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
}

.button1 {
    border-radius: 2px;
}

.button3 {
    border-radius: 8px;
}

.button4 {
    border-radius: 12px;
}

.button5 {
    border-radius: 50%;
}
/* CSS cho trang chi tiết sản phẩm (sp1.html) */
.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Chia thành 2 cột */
    gap: 30px;
    padding: 30px;
    background-color: #fff;
    margin: 20px auto;
    max-width: 1000px; /* Giới hạn chiều rộng */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    grid-column: 1 / span 2; /* Để container này trải dài qua cả hai cột chính của body */
}

.product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-info h2 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 15px;
}

.product-info .description {
    font-size: 1.1em;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.product-info .price {
    font-size: 1.8em;
    color: #e44d26; /* Màu cam nổi bật */
    font-weight: bold;
    margin-bottom: 15px;
}

.product-info .price span {
    font-size: 1.2em; /* Giá trị số lớn hơn */
}

.product-info .availability {
    font-size: 1em;
    color: #28a745; /* Màu xanh lá cho "Còn hàng" */
    font-weight: bold;
    margin-bottom: 30px;
}

.product-info .button {
    margin-right: 15px;
    padding: 15px 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.product-info .add-to-cart {
    background-color: #007bff; /* Màu xanh dương cho "Thêm vào giỏ hàng" */
}

.product-info .add-to-cart:hover {
    background-color: #0056b3;
}

.product-info .buy-now {
    background-color: #28a745; /* Màu xanh lá cho "Mua ngay" */
}

.product-info .buy-now:hover {
    background-color: #218838;
}

/* Responsive cho trang chi tiết sản phẩm */
@media (max-width: 768px) {
    .product-detail-container {
        grid-template-columns: 1fr; /* Một cột trên màn hình nhỏ */
        padding: 20px;
    }

    .product-image {
        margin-bottom: 20px;
    }

    .product-info h2 {
        font-size: 2em;
    }

    .product-info .price {
        font-size: 1.5em;
    }

    .product-info .button {
        display: block; /* Nút hiển thị trên một hàng riêng */
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
}
/* Style cho trang danh sách toàn bộ sản phẩm */
.all-products-container {
    grid-column: 1 / span 2; /* Chiếm toàn bộ chiều rộng, không để sidebar */
    padding: 40px 20px;
}

.filter-bar {
    background: #fff;
    padding: 15px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-text {
    color: #e44d26;
    font-weight: bold;
    font-size: 1.2rem;
    margin: 10px 0;
}

/* Hiệu ứng hover cho thẻ sản phẩm */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.product-card img {
    border-radius: 5px 5px 0 0;
}
/* Style cho trang Liên Hệ */
.contact-container {
    grid-column: 1 / span 2;
    display: flex;
    justify-content: center;
    padding: 50px 20px;
    background-color: #f9f9f9;
}

.contact-card {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 500px;
}

.contact-card h2 {
    margin-bottom: 10px;
    color: #333;
}

.contact-card p {
    margin-bottom: 25px;
    color: #666;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #444;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: #04AA6D; /* Màu xanh giống nút bấm của bạn */
    box-shadow: 0 0 5px rgba(4, 170, 109, 0.2);
}