html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box; 
}

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #fcfcfc;
}

#top {
    width: 100%;
    height: 40px;
    background-color: #FFF0F2;
    border-bottom: 1px solid #FFE0E5;
}

#top-content {
    width: 85%;
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #555;
}

#top-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

#anhlogo {
    height: 28px;
    width: auto;
}

#top-right a {
    color: #C21E56;
    text-decoration: none;
    font-weight: bold;
}

#top-right a:hover {
    text-decoration: underline;
}

#header {
    width: 100%;
    height: 140px;
    background-color: white;
}

#banner {
    width: 85%;
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
}

.banner-left img {
    max-height: 90px;
    width: auto;
    object-fit: contain;
    display: block;
}

.banner-center {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.policy-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.policy-icon img {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.policy-text {
    display: flex;
    flex-direction: column;
    font-size: 13px;
}

.policy-text b {
    color: #333;
    margin-bottom: 2px;
}

.policy-text span {
    color: #777;
    font-size: 12px;
}

#cart-content {
    width: 150px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #C21E56;
    color: #FFF;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(194, 30, 86, 0.2);
}

#cart-content:hover {
    background-color: #A01443;
    transform: translateY(-2px);
}

#menu {
    width: 100%;
    height: 50px;
    background-color: #C21E56;
}

#menu-content {
    width: 85%;
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
}

#menu-content ul {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 30px;
}

#menu-content li {
    padding: 0 15px;
    position: relative;
}

#menu-content li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s ease;
    line-height: 50px;
    display: block;
}

#menu-content li a:hover {
    color: #FFE0E5;
}

#menu-content li .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 200px;
    background-color: #FFFFFF;
    padding: 0;
    margin: 0;
    list-style: none;
    display: none;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(194, 30, 86, 0.15);
    border: 1px solid #FFE0E5;
    border-radius: 0 0 8px 8px;
    height: auto !important;
    min-height: fit-content;
}

#menu-content li .dropdown li {
    width: 100%;
    padding: 0;
    border-bottom: 1px solid #FFF0F2;
}

#menu-content li .dropdown li:last-child {
    border-bottom: none;
}

#menu-content li .dropdown li a {
    color: #444444 !important;
    font-size: 14px;
    line-height: 45px;
    padding-left: 20px;
    text-align: left;
    display: block;
    font-weight: normal;
    text-decoration: none;
    transition: all 0.2s ease;
}

#menu-content li .dropdown li a:hover {
    background-color: #FFF0F2;
    color: #C21E56 !important;
    padding-left: 25px;
}

#menu-content li:hover .dropdown {
    display: block !important;
}

#wrapper {
    width: 100%;
    background-color: #fcfcfc;
    padding: 40px 0;
}

#container {
    width: 85%;
    max-width: 1200px;
    min-height: 100vh;
    margin: 0 auto;
}

#list {
    width: 100%;
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

#list-cate {
    width: 250px;
    flex-shrink: 0;
    background-color: #FFFFFF;
    border: 1px solid #FFE0E5;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(194, 30, 86, 0.05);
}

#list-cate h1 {
    padding: 0; 
    background-color: #C21E56;
    color: #FFF;
    line-height: 45px;
    font-size: 16px;
    text-align: center;
    margin: 0;
    text-transform: uppercase;
}

#list-cate ul {
    margin: 0; 
    padding: 0;
    list-style: none;
}

#list-cate li {
    border-bottom: 1px solid #FFF0F2;
}

#list-cate li:last-child {
    border-bottom: none;
}

#list-cate li a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #444;
    font-size: 15px;
    transition: all 0.3s ease;
}

#list-cate li a:hover {
    background-color: #FFF0F2;
    color: #C21E56;
    padding-left: 25px;
}

#slideshow {
    flex: 1;
    height: 450px;
}

#slideshow img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.home-products {
    width: 100%;
    margin-top: 60px;
    scroll-margin-top: 20px;
}

.section-title {
    text-align: center;
    color: #C21E56;
    font-size: 24px;
    text-transform: uppercase;
    margin-bottom: 40px;
}

.section-title::after {
    content: "";
    display: block;
    width: 80px;
    height: 3px;
    background-color: #C21E56;
    margin: 10px auto 0;
}

.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.product-item {
    width: calc((100% - 60px) / 4); 
    background: #ffffff;
    border: 1px solid #FFF0F2;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.product-item:hover {
    box-shadow: 0 8px 25px rgba(194, 30, 86, 0.15);
    transform: translateY(-8px);
    border-color: #FFE0E5;
}

.product-img {
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-item:hover .product-img img {
    transform: scale(1.1); 
}

.product-name {
    font-size: 15px;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 22px;
    height: 44px;
    overflow: hidden;
}

.product-price {
    font-size: 17px;
    color: #C21E56;
    font-weight: bold;
    margin: 0 0 15px 0;
}

.btn-buy {
    width: 100%;
    background-color: #FFF0F2;
    color: #C21E56;
    border: 1px solid #FFE0E5;
    padding: 10px 0;
    border-radius: 25px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-buy:hover {
    background-color: #C21E56;
    color: #ffffff;
}

#footer {
    width: 100%;
    background-color: #2c2c2c;
    color: #e0e0e0;
    padding-top: 50px;
    margin-top: 60px;
}

#footer-inner {
    width: 85%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between; 
    gap: 50px;
    padding-bottom: 40px;
}

.footer-col {
    flex: 1;
}

.footer-col h3 {
    color: #ffffff;
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.footer-col h3::after {
    content: "";
    display: block;
    width: 50px;
    height: 3px;
    background-color: #C21E56;
    margin-top: 10px;
}

.footer-col p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 15px;
}

.footer-col ul li a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

#footer-bottom {
    width: 100%;
    background-color: #1a1a1a;
    text-align: center;
    padding: 15px 0;
    font-size: 13px;
    color: #888888;
}

#footer-bottom p {
    margin: 0;
}

#chat-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #C21E56;
    color: white;
    border-radius: 50px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    box-shadow: 0 4px 15px rgba(194, 30, 86, 0.4);
    z-index: 9999;
    transition: all 0.3s ease;
}

.chat-icon {
    font-size: 20px;
}

#chat-bubble:hover {
    background-color: #A01443;
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 8px 25px rgba(194, 30, 86, 0.6);
}

#toast-msg {
    position: fixed;
    top: 80px;
    right: -400px;
    background-color: #4CAF50;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 10000;
    transition: right 0.4s ease;
}

#toast-msg.show {
    right: 20px;
}

.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    background-color: #fcfcfc;
    padding: 40px 0;
}

.auth-card {
    background: #ffffff;
    width: 100%;
    max-width: 450px;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(194, 30, 86, 0.1);
    border: 1px solid #FFE0E5;
}

.auth-title {
    text-align: center;
    color: #C21E56;
    font-size: 26px;
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: 30px;
}

.auth-group {
    margin-bottom: 20px;
}

.auth-group label {
    display: block;
    color: #555;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

.auth-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
}

.auth-group input:focus {
    border-color: #C21E56;
    box-shadow: 0 0 5px rgba(194, 30, 86, 0.2);
}

.btn-auth {
    width: 100%;
    background-color: #C21E56;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.btn-auth:hover {
    background-color: #A01443;
}

.auth-links {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

.auth-links a {
    color: #C21E56;
    text-decoration: none;
    font-weight: bold;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   RESPONSIVE DESIGN 
   ========================================================================== */

@media (max-width: 1024px) {
    #top-content, #banner, #menu-content, #container, #footer-inner {
        width: 90%;
    }

    .product-grid {
        gap: 15px;
    }
    
    .product-item {
        width: calc((100% - 30px) / 3); 
    }
}

@media (max-width: 768px) {
    #top {
        height: auto;
        padding: 10px 0;
    }
    
    #top-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    #top-left {
        flex-direction: column;
        gap: 5px;
    }

    #header {
        height: auto;
        padding: 15px 0;
    }
    
    #banner {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .banner-center {
        flex-direction: column;
        gap: 10px;
    }
    
    #cart-content {
        width: 100%;
        max-width: 250px;
    }

    #menu {
        height: auto;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    #menu-content ul {
        justify-content: flex-start;
        padding: 0 10px;
        gap: 15px;
    }
    
    #menu-content li a {
        line-height: 45px;
        font-size: 14px;
    }
    
    #menu-content li:hover .dropdown {
        display: none !important; 
    }

    #list {
        flex-direction: column;
        gap: 20px;
    }
    
    #list-cate {
        width: 100%;
    }
    
    #slideshow {
        width: 100%;
        height: 250px;
    }

    .product-grid {
        gap: 10px;
    }
    
    .product-item {
        width: calc((100% - 10px) / 2);
        padding: 10px;
    }
    
    .product-img {
        height: 160px;
    }
    
    .product-name {
        font-size: 14px;
        height: 40px;
        overflow: hidden;
    }
    
    .product-price {
        font-size: 15px;
    }
    
    .btn-buy {
        padding: 8px 0;
        font-size: 13px;
    }

    #footer-inner {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .footer-col h3::after {
        margin: 10px auto 0 auto;
    }

    #chat-bubble {
        bottom: 15px;
        right: 15px;
        padding: 10px 15px;
    }
    
    .chat-text {
        display: none;
    }
    
    .cart-container {
        width: 95%;
        padding: 15px;
    }
    
    .cart-table th:nth-child(3), .cart-table td:nth-child(3),
    .cart-table th:nth-child(6), .cart-table td:nth-child(6) {
        display: none;
    }
    
    .cart-img {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    #top-content {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 5px;
    }

    #banner {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        padding: 10px 0;
    }

    .banner-left img {
        max-width: 120px;
        height: auto;
    }

    .banner-center {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        font-size: 12px;
    }

    #cart-content {
        width: auto;
        padding: 5px 10px;
    }

    #footer-inner {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 15px;
    }

    .footer-col {
        width: calc(50% - 10px); 
        min-width: 140px;
        text-align: left;
    }

    .footer-col h3 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .footer-col h3::after {
        margin: 5px 0 0 0;
    }
    
    .footer-col ul li a {
        font-size: 13px;
    }
}