/* General reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body and background */
body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f4f4f4;
}
/*sidebar*/


.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin: 10px 0;
}

.sidebar ul li a {
    text-decoration: none;
    font-size: 18px;
    color: #333;
}

.sidebar ul li a:hover {
    background-color: #000000; /* Màu nền khi hover */
    color: #fff; /* Màu chữ khi hover */
    border-radius: 10px;
    text-decoration: none;
}
.sidebar .h3{
    font-family: 'Montserrat', sans-serif;  
    font-size: 20px;
    color: #333;
    text-align: center;
}
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    z-index: 1001;
}
/* Header */

header {
    overflow-x: hidden; /* Ngăn việc tràn ra ngoài */
    background-color: #ffffff;
    color: white;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: 'Montserrat', sans-serif;
}
nav {
    border-bottom: 1px solid #dbd9d9; /* Đường kẻ viền dưới của thanh header */
    padding-bottom: 30px; /* Khoảng cách giữa đường kẻ viền và các mục menu */
}


header .logo h1 {
    font-size: 28px;
    margin: 0;
}
header .logo{
    font-size: 35px;
    text-align: left;
    margin-left: 50px;
}
header .logo a{
    text-decoration: none;
    color: #796e6e;
}
header nav ul {
    list-style-type: none;
    display: flex;
    justify-content: center;  /* Căn giữa các mục trong thanh menu */
    margin-top: -30px;
    margin-right: -20px;
}

header nav ul li {
    margin: 0 10px;
}

header nav ul li a {
    color: #333;
    text-decoration: none;
    font-size: 13px;
    padding: 10px;
}

header nav ul li a:hover {
    background-color: #000000; /* Màu nền khi hover */
    color: #fff; /* Màu chữ khi hover */
    border-radius: 20px;
    text-decoration: none;
}

/* Main content */
main {
    overflow-x: hidden; /* Ngăn việc tràn ra ngoài */
    padding: 40px 10px;
    text-align: center;
    background-color: white;
    color: white;
}

h2 {
    font-size: 30px;
    margin-bottom: 30px;
    color: #333;
}
/* Product list */
.product-list {
    position: relative;
    top: -1px; /* Dịch lên 1px nếu vẫn còn khoảng cách */
    flex-direction: column;
    gap: 50px;  /* Khoảng cách giữa các sản phẩm */
    align-items: center; 
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px;
}

.product {
    background-color: white;
    width: 100%;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: auto;
    object-fit: cover;
    margin-bottom: 20px;
    margin-top: -50px;
    border-bottom: 1px solid #dbd9d9; /* Đường kẻ viền dưới của thanh header */
    padding-bottom: 30px; /* Khoảng cách giữa đường kẻ viền và các mục menu */
    
}

.product img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 20px;
    transition: transform 0.3s ease-in-out; /* Thêm hiệu ứng mượt mà */

}
.product img:hover{
    transform: scale(1.03); /* Phóng to ảnh lên 10% */

}

.product h2 {
    font-family: 'Montserrat', sans-serif;
   color: #514e4e;
   font-size: 30px;
   margin-bottom: 30px;
   margin-top: 30px;
   font-weight: 100;
}
.product h1{
    font-family: 'Montserrat', sans-serif;
    color: #746f6f;
    font-size:17px ;
    margin-top: 20px;
    width: 100%;
    margin: 0 auto; /* Căn giữa phần chứa */
    font-weight: 100;
    margin-bottom: 10px;
}
.product .h3{
    font-family: 'Montserrat', sans-serif;
    font-size: 30px;
    margin-bottom: 30px;
    color: #ac7676;
    font-weight: 100;
}
.product .price {
    font-size: 18px;
    color: #4CAF50;
    margin: 10px 0;
    border-radius: 20px;
}

.product button {
    background-color: white;
    color: white;
    border: none;
    margin-top: 10px;
    width: 150px;
    cursor: pointer;
    border-radius: 20px;
    margin-bottom: 30px;
    font-family: 'Montserrat', sans-serif;
    border: 2px solid #877f7f;
}

.product button:hover {
    
         background-color: #000000; /* Màu nền khi hover */
        color: #fff; /* Màu chữ khi hover */
        border-radius: 20px;
        text-decoration: none;
}
.product button a{
    display: block;
    text-align: center;  /* Căn giữa văn bản */
    line-height: 40px;  /* Căn giữa văn bản theo chiều dọc */
    border-radius: 50px;
    transition: all 0.3s ease;  /* Thêm hiệu ứng chuyển động */
    width: 150px;
    height: 40px;
    text-decoration: none;
    color: #000;
}
.product button a:hover{
    background-color: #000000; /* Màu nền khi hover */
    color: #fff; /* Màu chữ khi hover */
    border-radius: 50px;
    text-decoration: none;
}
footer {
    font-size: 13px;
    font-family: 'Montserrat', sans-serif;
    background-color: #efefef;
    color: rgb(88, 86, 86);
   text-align: right;
    padding: 20px;
    position: relative;
    right:0;
    bottom: 0;
    width: 100%;
    border-top: 1px solid #dbd9d9; /* Đường kẻ viền dưới của thanh header */
   margin-left: -20px;
    
}
.sidebar .list{
    color: #000000;
    border: none;
    margin-top: 20px;
    width: 150px;
    cursor: pointer;
    border-radius: 20px;
    font-family: 'Montserrat', sans-serif;
    border: 0.5px solid #877f7f;
    height: 50px;
    
}
.sidebar .list a{
    display: block;
    text-align: center;  /* Căn giữa văn bản */
    line-height: 50px;  /* Căn giữa văn bản theo chiều dọc */
    border-radius: 30px;
    transition: all 0.3s ease;  /* Thêm hiệu ứng chuyển động */
    width: 150px;
    height: 50px;
    text-decoration: none;
    color: #000;
    margin-top: -10px;
    
}
.sidebar .list:hover{
    background-color: #000000; /* Màu nền khi hover */
    color: #fff; /* Màu chữ khi hover */
    border-radius: 20px;
    text-decoration: none;
}
.hamburger {
    position: relative;
    top: 2px;
    width: 6px;
    height: 17px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    cursor: pointer;

}

.hamburger .line {
    width: 20px;
    height: 2px;
    background-color: #a5a5a5;
    border-radius: 5px;
}
.product-list {
    width: 50%; /* Extends product list by 20% on large screens */
    margin-left: 23%; /* Shift the container to the left to center it properly */
}
@media screen and (min-width: 1200px) {
    /* Thanh điều hướng */
    header nav ul {
        justify-content: flex-end; /* Các mục thanh menu nằm ngang */
        flex-direction: row; /* Đảm bảo các mục nằm ngang trên màn hình máy tính */
        
    }
    .close-btn {
        display: none; /* Ẩn dấu X trên màn hình máy tính */
    }
    header nav ul li {
        margin: 0 20px;
        margin-top: 0;
    }

    header nav ul li a {
        margin-top: 20px;
        font-size: 14px;
    }

    header h1 {
        font-size: 28px;
    }

    main p {
        font-size: 14px;
    }

    button {
        font-size: 14px;
    }

    .sidebar {
        width: 250px; /* Đặt width cho sidebar */
        height: 630px; /* Đảm bảo thanh sidebar chiếm hết chiều cao */
        position: fixed; /* Sidebar cố định trên màn hình */
        border: 1px solid #4d4b4b; /* Đường kẻ viền dưới của thanh header */
        left: 2; /* Sidebar sẽ nằm ở bên phải */
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1); /* Thêm bóng cho thanh sidebar */
        padding: 10px;
        margin-top: -50px;
        z-index: 10;
        border-radius: 30px;

    }

    .sidebar ul {
        list-style: none;
        padding: 0px;

    }

    .sidebar ul li {
        margin: 10px 0;
    }

    .sidebar ul li a {
        text-decoration: none;
        font-size: 18px;
        color: #333;
        
    }

    .sidebar ul li a:hover {
        background-color: #000000; 
        color: #fff; 
        border-radius: 10px;
        text-decoration: none;
    }

    /* Các sản phẩm */
    .product-list {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        width: calc(80% - 100px); /* Sản phẩm chiếm không gian còn lại sau khi thanh sidebar chiếm 300px */
    }

    .product {
        width: 100%; /* Mỗi sản phẩm chiếm 48% chiều rộng của container */
        margin-bottom: 20px;
    }

    .product h2 {
        font-size: 18px;
    }

    .product h1 {
        font-size: 16px;
    }

    .product button {
        font-size: 14px;
    }
    .hamburger {
        display: none; /* Ẩn hamburger menu trên máy tính */
    }


}
/* Media query cho màn hình điện thoại ở chế độ dọc */
@media screen and (max-width: 1200px) {
   
/* Header adjustments for mobile */
    body > header {
        padding: 0.5rem 0;
        margin-bottom: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    body > header .logo {
        font-size: 1.5rem;
        text-align: center;
        margin: 0;
        padding: 0.5rem 15px;
        width: 100%;
    }

    body > header nav {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 0.5rem;
        border-bottom: 1px solid #dbd9d9;
        padding-bottom: 10px;
    }

    body > header nav ul {
        position: relative;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0 60px 0 20px;  /* Adjust padding to move items left */
        margin: 0;
        gap:10px;
    }

    body > header nav ul li:not(.hamburger-container) {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 0;
    }

    .hamburger-container {
        position: absolute;  /* Change from fixed to absolute */
        right: 10px;
        top: 40%;          /* Center vertically relative to its container */
        transform: translateY(-50%);z
        z-index: 1000;
    }

    body > header nav ul li a {
        font-size: 0.9rem;
        padding: 0.8rem 0.6rem;
        display: inline-block;
        white-space: nowrap;
        color: #333;
        text-align: center;
    }

    /* Main content adjustments for mobile */
    body > main {
        margin-top: 0;
        width: 100%;
        overflow-x: hidden;
    }

    header h1 {
        font-size: 18px; /* Giảm kích thước của tiêu đề */
    }

    main p {
        font-size: 12px;
    }

    button {
        font-size: 12px;
    }

    header nav ul li a {
        font-size: 12px;
    }

    .product-list {
        display: flex;
        flex-wrap: wrap; /* Cho phép các sản phẩm tự động xuống dòng khi hết chỗ */
        justify-content: space-between; /* Các sản phẩm cách đều nhau */
        padding: 0 10px; /* Thêm khoảng cách cho các phần tử trong container */
        width: 100%; /* Đảm bảo container chiếm toàn bộ chiều rộng màn hình */
        box-sizing: border-box;
        text-align:center;
        margin-left:0px;
    }

    .product {
        width: 100%; /* Mỗi sản phẩm chiếm 48% chiều rộng của container để có 2 sản phẩm mỗi dòng */
        margin-bottom: 20px; /* Khoảng cách giữa các sản phẩm */
        box-sizing: border-box; /* Đảm bảo padding và border không ảnh hưởng đến chiều rộng */
    }

    .product img {
        width: 100%; /* Đảm bảo hình ảnh chiếm toàn bộ chiều rộng của sản phẩm */
        height: auto; /* Giữ tỷ lệ ảnh */
        object-fit: cover; /* Đảm bảo hình ảnh không bị bóp méo */
        border-radius: 5px; /* Làm tròn các góc của hình ảnh */
    }

    .product h2 {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .product h1 {
        font-size: 12px;
      
    }

    header .logo {
        font-size: 30px;
        text-align: center;
        margin-bottom: 5px;
        margin-left: 10px;
    }

    /* Ẩn sidebar khi ở chế độ dọc trên điện thoại */
    .sidebar {
        display: none;
    }

    /* Khi nhấn vào hamburger, menu sẽ hiện */
    .sidebar.active {
        display: block;
        transform: translateX(0);
    }

    footer {
        font-family: 'Montserrat', sans-serif;
        font-size: 13px;
    }

    /* Sidebar */
    .sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 70%;
        height: 100%;
        background-color: #fff;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
        z-index: 9999;
        overflow-y: auto;
        padding-top: 60px;
        transition: transform 0.3s ease;
        transform: translateX(-100%);
    }

    .sidebar ul {
        list-style: none;
        padding: 0;
        text-align: center;
    }

    .sidebar ul li {
        margin: 10px 0;
    }

    .sidebar ul li a {
        text-decoration: none;
        font-size: 18px;
        color: #333;
        display: block;
        padding: 10px 0;
    }

    .sidebar .list {
        color: #000000;
        border: none;
        margin-top: 10px;
        width: 170px;
        cursor: pointer;
        border-radius: 20px;
        margin-bottom: 5px;
        font-family: 'Montserrat', sans-serif;
        border: 0.5px solid #877f7f;
        height: 50px;
    }

    .sidebar .list a {
        display: block;
        text-align: center;
        line-height: 30px;
        border-radius: 30px;
        transition: all 0.3s ease;
        width: 170px;
        height: 50px;
        text-decoration: none;
        color: #000;
        margin-top: -10px;
    }
}
@media screen and (min-width: 2000px) {
    .sidebar {
        top: 50%; /* Position at 50% from the top */
        transform: translateY(-50%); /* Move up by half of its height */
        margin-top: 0; /* Remove the previous margin-top */
                right: 85%;
    }
}



