/* Reset va khung */
* { 
    box-sizing: border-box; 
}

html { 
    scroll-behavior: smooth; 
    scroll-padding-top: 50px; 
}

.container { 
    width: 80%; 
    margin: 0 auto; 
    max-width: 1200px; 
}

body { 
    margin: 0; 
    font-family: Arial, sans-serif; 
    background-color: #f9f9f9; 
    position: relative; 
    min-height: 100vh; 
    padding-bottom: 60px; 
}

body > center, 
body > a[href*="somee.com"], 
body > div[style*="z-index: 999999"] {
    position: absolute !important; 
    bottom: 10px !important; 
    left: 50% !important; 
    transform: translateX(-50%) !important; 
    z-index: 9999 !important;
}

#top-bar { 
    background-color: green; 
    color: white; 
    height: 40px; 
    line-height: 40px; 
}

.top-content { 
    display: flex; 
    justify-content: space-between; 
    font-size: 14px; 
}

.top-right a { 
    color: white; 
    text-decoration: none; 
    font-weight: bold; 
}

.top-right a:hover { 
    color: orange; 
}

#menu { 
    width: 100%; 
    background-color: #800000; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
}

#menu ul { 
    list-style: none; 
    margin: 0; 
    padding: 0; 
    display: flex; 
    justify-content: center; 
}

#menu li a { 
    display: block; 
    color: white; 
    padding: 15px 25px; 
    text-decoration: none; 
    font-weight: bold; 
    font-size: 16px; 
    text-transform: uppercase; 
    transition: 0.3s; 
}

#menu li a:hover { 
    background-color: green; 
    color: white; 
}

.top-section { 
    display: flex; 
    gap: 20px; 
    margin-top: 20px; 
}

#list-cate { 
    width: 25%; 
    background-color: white; 
    border: 1px solid #ddd; 
    border-radius: 8px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
}

#list-cate h1 { 
    font-size: 18px; 
    background-color: green; 
    color: white; 
    margin: 0; 
    padding: 15px; 
    border-top-left-radius: 7px; 
    border-top-right-radius: 7px; 
    text-align: center; 
}

#list-cate ul { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}

#list-cate li { 
    border-bottom: 1px dashed #eee; 
}

#list-cate li a { 
    display: block; 
    padding: 12px 20px; 
    color: #333; 
    text-decoration: none; 
    transition: 0.2s; 
    font-weight: 500; 
}

#list-cate li a:hover { 
    background-color: #f5f5f5; 
    color: green; 
    padding-left: 25px; 
}

#slideshow { 
    width: 75%; 
    height: 443px; 
    border-radius: 8px; 
    overflow: hidden; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
}

#slideshow img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.banner-mid { 
    width: 100%; 
    margin: 30px 0; 
    display: flex; 
    justify-content: space-between; 
    gap: 15px; 
}

.banner-mid img { 
    width: 32%; 
    height: auto; 
    border-radius: 8px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
}

.cate { 
    margin-top: 40px; 
}

.cate-title { 
    font-size: 24px; 
    color: #333; 
    border-left: 5px solid green; 
    padding-left: 15px; 
    margin-bottom: 20px; 
    text-transform: uppercase; 
}

.list-product { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 20px; 
}

.product { 
    width: calc(25% - 15px); 
    background-color: white; 
    border: 1px solid #eee; 
    border-radius: 8px; 
    padding: 15px; 
    text-align: center; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.02); 
    transition: 0.3s; 
}

.product:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
    border-color: green; 
}

.product img { 
    width: 100%; 
    height: 180px; 
    object-fit: cover; 
    border-radius: 5px; 
}

.product .name { 
    font-size: 16px; 
    color: #333; 
    margin: 15px 0 8px 0; 
    height: 40px; 
    overflow: hidden; 
}

.product .price { 
    font-size: 18px; 
    color: orange; 
    font-weight: bold; 
    margin-bottom: 15px; 
}

.product button { 
    background-color: green; 
    color: white; 
    border: none; 
    padding: 10px 20px; 
    border-radius: 5px; 
    cursor: pointer; 
    font-weight: bold; 
    width: 100%; 
    transition: 0.2s; 
}

.product button:hover { 
    background-color: darkgreen; 
}

#footer { 
    background-color: #800000; 
    color: #fff; 
    padding: 40px 0; 
    text-align: center; 
    margin-top: 60px; 
    border-top: 4px solid green; 
}

#footer h2 { 
    color: white; 
    margin-bottom: 15px; 
}

.modal { 
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.5); 
}

.modal-content { 
    background-color: white; 
    margin: 10% auto; 
    padding: 30px; 
    border-radius: 10px; 
    width: 50%; 
    max-width: 600px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); 
    position: relative; 
    animation: slideDown 0.3s ease; 
}

@keyframes slideDown { 
    from { transform: translateY(-50px); opacity: 0; } 
    to { transform: translateY(0); opacity: 1; } 
}

.close { 
    position: absolute; 
    right: 20px; 
    top: 15px; 
    color: #aaa; 
    font-size: 28px; 
    font-weight: bold; 
    cursor: pointer; 
}

.close:hover { 
    color: black; 
}

.cart-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 12px 0; 
    border-bottom: 1px solid #eee; 
}

.remove-btn { 
    background-color: #ff4d4d; 
    color: white; 
    border: none; 
    padding: 5px 10px; 
    border-radius: 3px; 
    cursor: pointer; 
}

.remove-btn:hover { 
    background-color: #ff1a1a; 
}

.big-title-header {
    background: linear-gradient(90deg, #ff9900, #ffcc00);
    text-align: center;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 3px dashed #b30000;
}

.big-title-header h1 {
    color: #b30000;
    font-size: 32px;
    margin: 0;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px white;
}

.auth-box-top {
    background-color: white;
    padding: 5px 15px;
    border-radius: 20px;
    border: 2px solid orange;
    display: inline-block;
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.5);
}

.auth-box-top a {
    color: green !important;
    font-weight: bold;
    text-decoration: none;
    font-size: 15px;
    transition: 0.3s;
}

.auth-box-top a:hover {
    color: orange !important;
}

/* Hieu ung mo dan luon phien cho anh nho va to */
.animated-banner img, 
.slideshow-dong {
    transition: opacity 0.3s ease-in-out;
}

/* CSS danh cho trang dang nhap va dang ky */
.page-wrapper { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    min-height: calc(100vh - 60px); 
    padding: 20px; 
}

.auth-container { 
    background: white; 
    width: 100%; 
    max-width: 800px; 
    display: flex; 
    border-radius: 20px; 
    box-shadow: 0 15px 30px rgba(106, 27, 154, 0.2); 
    overflow: hidden; 
    flex-wrap: wrap; 
}

.form-box { 
    flex: 1; 
    padding: 40px; 
    min-width: 250px; 
}

.login-box { 
    background-color: #ffffff; 
}

.register-box { 
    background-color: #8e44ad; 
    color: white; 
}

.form-box h2 { 
    text-align: center; 
    margin-bottom: 20px; 
    color: #8e44ad; 
}

.register-box h2 { 
    color: white; 
}

.input-group { 
    margin-bottom: 15px; 
}

.input-group label { 
    display: block; 
    margin-bottom: 5px; 
    font-weight: bold; 
}

.input-group input { 
    width: 100%; 
    padding: 10px; 
    border: 1px solid #ccc; 
    border-radius: 8px; 
    box-sizing: border-box; 
    outline: none; 
}

.input-group input:focus { 
    border-color: #8e44ad; 
}

.login-btn { 
    background-color: #8e44ad; 
    color: white; 
    width: 100%; 
    padding: 12px; 
    border: none; 
    border-radius: 8px; 
    font-size: 16px; 
    font-weight: bold; 
    cursor: pointer; 
    transition: 0.3s; 
}

.login-btn:hover { 
    background-color: #6c3483; 
}

.register-btn { 
    background-color: white; 
    color: #8e44ad; 
    width: 100%; 
    padding: 12px; 
    border: none; 
    border-radius: 8px; 
    font-size: 16px; 
    font-weight: bold; 
    cursor: pointer; 
    transition: 0.3s; 
}

.register-btn:hover { 
    background-color: #f1f1f1; 
}

.back-home { 
    display: block; 
    text-align: center; 
    margin-top: 20px; 
    color: #8e44ad; 
    text-decoration: none; 
    font-weight: bold; 
}

.register-box .back-home { 
    color: white; 
}

.forgot-pass { 
    text-align: right; 
    margin-bottom: 15px; 
}

.forgot-pass a { 
    color: #8e44ad; 
    font-size: 14px; 
    text-decoration: none; 
    font-style: italic; 
}

.forgot-pass a:hover { 
    text-decoration: underline; 
}

/* hiển thị tối ưu trên điện thoại */
@media (max-width: 768px) {
    .container { 
        width: 92%; 
    }
    #top-content { 
        flex-direction: column; 
        text-align: center; 
        gap: 10px; 
    }
    #header #banner { 
        flex-direction: column; 
        text-align: center; 
    }
    #deliver, #support, #time { 
        justify-content: center; 
        width: 100%; 
    }
    #cart { 
        text-align: center; 
        width: 100%; 
    }
    #menu ul { 
        flex-wrap: nowrap; 
        overflow-x: auto; 
        justify-content: flex-start; 
    }
    #menu li { 
        flex: 0 0 auto; 
    }
    .top-section { 
        flex-direction: column; 
    }
    #list-cate { 
        width: 100%; 
    }
    #slideshow { 
        width: 100%; 
        height: 200px; 
    }
    .product { 
        width: calc(50% - 10px); 
    }
    .modal-content { 
        width: 90%; 
        margin: 20% auto; 
    }
    .big-title-header h1 { 
        font-size: 20px; 
    }
    .banner-mid {
        display: none !important; 
    }
}

@media (max-width: 480px) {
    .product { 
        width: calc(50% - 10px); 
    }
}