
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}


header {
    background-color: #fff;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    padding: 15px 5%;
    background: #fff;
    border-bottom: 1px solid #eee;
    max-width: 1200px;
    margin: 0 auto;   
}


.search-box {
    display: flex;
    flex: 0 1 400px; 
    margin: 0 20px;
    border: 1px solid #ddd;
    border-radius: 20px; 
    overflow: hidden;
}

.search-box input {
    width: 100%;
    padding: 8px 15px;
    border: none;
    outline: none;
    font-size: 14px;
}

.search-box button {
    background-color: #f8f8f8;
    border: none;
    padding: 0 15px;
    cursor: pointer;
    border-left: 1px solid #ddd;
    transition: 0.3s;
}

.search-box button:hover {
    background-color: #eee;
}


.icons {
    display: flex;
    gap: 20px;
    white-space: nowrap;
}

.icons span {
    cursor: pointer;
    font-weight: 500;
}
header .logo {
    font-size: 24px;
    letter-spacing: 2px;
}

header .logo strong {
    color: #000;
}

header .icons span {
    margin-left: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.3s;
}

header .icons span:hover {
    color: #ff4757;
}



.menu > li {
    position: relative;
}

.menu > li > a {
    display: block;
    padding: 15px 25px;
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
}
.menu li {
    position: relative;
    padding: 10px 20px;
}

.submenu li a {
    color: #333;
    padding: 10px 20px;
    display: block;
    text-decoration: none;
    text-align: left;
    transition: 0.3s;
}

.dropdown:hover .submenu {
    display: block;
}
.submenu {
   display: none;      
    position: absolute;     
    top: 100%;         
    left: 50%;
    transform: translateX(-50%); 
    background-color: #fff;
    min-width: 200px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    padding: 10px 0;
    list-style: none;
    z-index: 1000;
}

.submenu li {
    padding: 8px 20px;
}

.submenu li a:hover {
    background-color: #f1f1f1;
    color: #ff4757; 
}

.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Chia cột tự động */
    gap: 30px;
    padding: 20px 5%;
}

.product {
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    display: flex;
    flex-direction: column; 
    height: 100%; 
    transition: all 0.3s ease;
}


.product img {
    width: 100%;
    aspect-ratio: 3 / 4; 
    object-fit: cover; 
    object-position: center;
    border-radius: 4px;
    margin-bottom: 15px;
}

.product .name {
    font-weight: bold;
    font-size: 16px;
    height: 45px; 
    overflow: hidden;
    margin-bottom: 10px;
}

.product .price {
    color: #d63031;
    font-weight: 700;
    margin-top: auto; 
}

.banner {
    width: 100%;            
    display: flex;          
    justify-content: center;
    background-color: #000; 
    overflow: hidden;     
}

.banner img {
    width: 100%;           
    max-width: 1200px;      
    height: 450px;         
    object-fit: cover;      
    display: block;
    margin: 0 auto;       
}


nav {
    background-color: #ce7b7b;
    width: 100%;
}

.menu {
    max-width: 1200px;      
    margin: 0 auto;        
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
}


@media (max-width: 992px) {
    .product-list {
        grid-template-columns: repeat(3, 1fr); 
        gap: 15px;
    }
    
    .search-box {
        flex: 0 1 30px; /* Thu nhỏ thanh tìm kiếm */
    }
}


@media (max-width: 768px) {
    header {
        flex-direction: column; 
        gap: 15px;
        text-align: center;
    }

    .search-box {
        width: 100%;
        margin: 0;
    }

    .menu {
        flex-wrap: wrap;
    }

    .menu > li > a {
        padding: 10px 15px;
        font-size: 12px;
    }

    .banner img {
        height: 200px; 
    }

    .product-list {
        grid-template-columns: repeat(4, 1fr); 
    }
}


@media (max-width: 480px) {
    .product-list {
        grid-template-columns: 4fr;
    }
    
    .logo {
        font-size: 20px;
    }
}
