/* --- RESET STYLE --- */
html {
    scroll-behavior: smooth;
}
{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f6f9; /* Nền web màu xám trắng nhẹ */
    color: #333333;
}

.container-80 {
    width: 90%; 
    margin: 0 auto;
}

/* --- FLEXBOX HELPER --- */
.flex-container {
    display: flex;
    gap: 40px;
}

.flex-1 {
    flex: 1;
}

/* --- TOP BAR --- */
#top-bar {
    width: 100%;
    min-height: 48px;
    background-color: #1a365d; /* Đổi sang màu Xanh Navy sang trọng */
    color: #ffffff;
    font-size: 14px;
    display: flex;
    align-items: center;
}

#top-bar .container-80 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
}

#top-left {
    width: auto;
}

#top-right {
    width: auto;
    text-align: right;
}

#top-right a {
    color: #ffffff;
    text-decoration: none;
}

#top-right a:hover {
    color: #eab308; /* Vàng ánh kim */
}

/* --- HEADER --- */
#header {
    width: 100%;
    min-height: 160px;
    background-color: #ffffff; /* Nền trắng để giấu viền logo/icon */
    padding: 20px 0;
    border-bottom: 1px solid #e5e7eb;
}

#header .flex-container {
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

#logo {
    display: flex;
    justify-content: flex-start;
}

#logo img {
    max-width: 150px;
    height: auto;
    display: block;
}

.feature-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}

.feature-icon {
    width: 40px;
    height: 40px;
}

.feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 5px;
}

.feature-text {
    font-size: 13px;
    line-height: 1.4;
    color: #1a365d; /* Chữ xanh Navy trên nền trắng */
    font-weight: 500;
}

#btn-cart {
    width: 180px;
    height: 50px;
    display: block;
    background-color: #eab308; /* Nút giỏ hàng màu vàng */
    color: #1a365d; /* Chữ màu xanh Navy đậm */
    border-radius: 8px; 
    line-height: 50px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: 0.3s;
}

#btn-cart:hover {
    background-color: #ca8a04;
    color: #ffffff;
}

/* --- MAIN MENU (GIAO DIỆN MÁY TÍNH) --- */
#main-menu {
    width: 100%;
    height: 48px;
    background-color: #1a365d; /* Menu màu Xanh Navy */
}

/* Mặc định ẩn nút bấm hamburger trên máy tính */
#menu-toggle {
    display: none;
}

#main-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

#main-menu > div > ul > li {
    position: relative;
}

#main-menu a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    display: block;
    line-height: 48px;
    padding: 0 25px;
    transition: all 0.3s;
}

#main-menu > div > ul > li:hover > a {
    background-color: #eab308; 
    color: #1a365d;
}

/* --- SUB MENU --- */
#main-menu .sub-menu {
    display: none; 
    position: absolute;
    top: 48px;
    left: 0;
    background-color: #ffffff;
    width: 250px;
    z-index: 1000;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    padding: 0; 
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-top: none;
}

#main-menu li.dropdown:hover .sub-menu {
    display: flex; 
}

#main-menu .sub-menu li {
    border-bottom: 1px solid #f3f4f6;
    width: 100%;
}

#main-menu .sub-menu li:last-child {
    border-bottom: none;
}

#main-menu .sub-menu a {
    color: #1a365d;
    padding: 12px 20px;
    line-height: normal;
    font-weight: normal;
    text-transform: none;
    text-align: left;
}

#main-menu .sub-menu a:hover {
    background-color: #f8fafc;
    color: #ca8a04;
    padding-left: 25px;
}

/* --- THÂN TRANG (WRAPPER) --- */
#wrapper {
    width: 100%;
    padding-bottom: 50px;
}

.top-content {
    width: 100%;
    height: 350px; 
    margin-top: 40px;
    display: flex;
    gap: 20px;
    align-items: stretch; 
}

/* ===================================================
   DANH MỤC DÒNG XE BÊN TRÁI (THAY CHO Ô TÌM KIẾM)
   =================================================== */
#category-sidebar {
    width: 23%;
    height: 100%;
    background-color: #ffffff;
    border-radius: 12px; 
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.05); 
    border: 1px solid #fceef3; 
    display: flex;
    flex-direction: column;
    overflow: hidden; 
}

.cat-title {
    background-color: #1a365d; 
    color: #ffffff;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    padding: 18px 10px;
    text-transform: uppercase;
    margin: 0;
}

.cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.cat-list li {
    border-bottom: 1px solid #fceef3; 
}

.cat-list li:last-child {
    border-bottom: none; 
}

.cat-list a {
    display: block;
    padding: 16px 20px;
    color: #4b5563; 
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s;
}

.cat-list a:hover {
    background-color: #fdf2f8; 
    color: #1a365d; 
    padding-left: 25px; 
}

/* --- CẤU HÌNH BANNER LƯỚT MƯỢT MÀ --- */
#slideshow {
    width: 77%;
    height: 100%;
    overflow: hidden; 
    border-radius: 16px;
    position: relative;
}

.slider-wrapper {
    display: flex;
    width: 400%; 
    height: 100%;
    transition: transform 0.8s ease-in-out; 
}

.slider-wrapper img {
    width: 25%; 
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- BANNER KHUYẾN MÃI (GIAO DIỆN MÁY TÍNH) --- */
.ad-banners {
    width: 100%;
    height: 156px;
    margin-top: 40px;
}

.ad-banners img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* --- DANH MỤC & SẢN PHẨM --- */
.cate {
    width: 100%;
    margin-top: 50px;
}

.cate-title {
    background-color: #1a365d;
    color: #ffffff;
    display: inline-block;
    padding: 0 30px;
    line-height: 40px;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
}

.list-product {
    width: 100%;
    margin-top: 20px;
}

.product {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    transition: box-shadow 0.3s, transform 0.3s;
    border-radius: 16px; 
    overflow: hidden;    
}

.product:hover {
    box-shadow: 0 8px 20px rgba(26, 54, 93, 0.1);
    transform: translateY(-5px);
}

.product img {
    width: 100%;
    height: 160px; 
    object-fit: contain;
    border-radius: 20px; 
}

.product .name {
    color: #1a365d;
    margin-top: 15px;
    font-size: 18px;
    min-height: 44px; 
}

.product .price {
    color: #ca8a04; 
    margin-top: 10px;
    font-size: 18px;
    font-weight: bold;
}

.btn-add-to-cart {
    background-color: #f3f4f6;
    color: #1a365d;
    border: 1px solid #d1d5db;
    padding: 8px 20px;
    margin-top: 15px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-add-to-cart:hover {
    background-color: #1a365d;
    color: #ffffff;
    border-color: #1a365d;
}

/* --- FOOTER --- */
#footer {
    width: 100%;
    margin-top: 50px;
}

.footer-main {
    background-color: #1a365d; 
    color: #e2e8f0;
    padding-top: 50px;
    padding-bottom: 30px;
}

.footer-links h3 {
    font-size: 16px;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: #eab308;
}

.footer-links p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.footer-links ul {
    list-style: none;
    font-size: 14px;
    line-height: 2.4;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
}

.footer-links a:hover {
    color: #eab308;
}

.footer-bottom {
    background-color: #0f2442; 
    padding: 20px 0;
    color: #94a3b8;
}

.bottom-bar {
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.bottom-menu a {
    color: #94a3b8;
    text-decoration: none;
    margin-left: 20px;
}

.bottom-menu a:hover {
    color: #eab308;
}

/* ===================================================
   BỘ CODE TỐI ƯU GIAO DIỆN TRÊN ĐIỆN THOẠI (RESPONSIVE)
   =================================================== */
@media screen and (max-width: 768px) {
    .container-80 {
        width: 95%;
    }

    .flex-container {
        flex-direction: column;
        gap: 15px;
    }

    #top-bar {
        height: auto;
        padding: 8px 0;
    }
    
    #top-bar .container-80 {
        flex-direction: column;
        gap: 6px;
    }
    
    #top-left, #top-right {
        text-align: center;
        font-size: 12px;
    }

    #header {
        padding: 10px 0;
        min-height: auto;
    }

    #header .flex-container {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    #logo {
        justify-content: center;
        margin-bottom: 5px;
    }
    
    #logo img {
        max-width: 130px;
    }
    
    .feature-box {
        display: none !important; 
    }
    
    #cart {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    #btn-cart {
        width: 100%;
        max-width: 280px;
        height: 40px;
        line-height: 40px;
        font-size: 14px;
        margin: 0 auto;
    }

    #main-menu {
        height: auto;
        background-color: #1a365d;
        position: relative;
    }
    
    #menu-toggle {
        display: block !important; 
        width: 100%;
        background-color: #1a365d;
        color: #ffffff;
        border: none;
        padding: 12px 0;
        font-size: 16px;
        font-weight: bold;
        cursor: pointer;
        text-align: center;
        letter-spacing: 1px;
    }

    #menu-toggle:hover {
        color: #eab308;
    }

    #main-menu ul {
        flex-direction: column;
        display: none; 
        width: 100%;
    }
    
    #main-menu ul.open {
        display: flex !important;
    }
    
    #main-menu a {
        line-height: 40px;
        text-align: center;
        font-size: 14px;
        border-bottom: 1px solid #2a4a7f;
        padding: 0;
        width: 100%;
    }

    #main-menu .sub-menu {
        position: static;
        width: 100%;
        background-color: #ffffff;
        border: none;
    }

    .top-content {
        flex-direction: column;
        height: auto;
        gap: 15px;
        margin-top: 20px;
    }
    
    /* 100% chiều rộng cho Danh Mục trên điện thoại */
    #category-sidebar {
        width: 100%;
        height: auto;
    }
    
    #slideshow {
        width: 100%;
        height: 200px; 
    }
    
    #slideshow img {
        height: 100%;
        object-fit: cover;
    }

    .ad-banners {
        display: flex !important; 
        flex-direction: row !important; 
        gap: 10px; 
        height: auto;
        margin-top: 20px;
        width: 100%;
    }
    
    .ad-banners img {
        flex: 1; 
        width: 33.33%; 
        height: 75px; 
        object-fit: cover; 
        margin-bottom: 0;
        border-radius: 6px; 
    }

    .list-product {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 15px;
    }
    
    .product {
        padding: 10px;
        border-radius: 6px;
    }
    
    .product img {
        height: 100px;
    }
    
    .product .name {
        font-size: 14px;
        margin-top: 8px;
        min-height: 36px;
        line-height: 1.3;
    }
    
    .product .price {
        font-size: 14px;
        margin-top: 5px;
    }

    .btn-add-to-cart {
        padding: 6px 12px;
        font-size: 12px;
        margin-top: 8px;
        width: 100%;
    }

    .footer-main {
        padding-top: 30px;
    }

    .footer-links h3 {
        margin-bottom: 10px;
        font-size: 15px;
    }

    .footer-links p, .footer-links ul {
        font-size: 13px;
    }

    .footer-bottom {
        padding: 15px 0;
    }

    .bottom-bar {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .bottom-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .bottom-menu a {
        margin-left: 0;
        font-size: 12px;
    }

    div[style*="z-index: 9999999;"],
    center:has(a[href*="somee.com"]),
    a[href*="somee.com"] {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        position: absolute !important;
        top: -9999px !important;
        left: -9999px !important;
    }
    
    div[style*="z-index: 2147483647"] {
        display: none !important;
    }
} 

/* ===================================================
   NÚT CHAT VỚI SHOP (FLOATING BUTTON) 
   =================================================== */
#chat-shop-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #1a365d; 
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 50px; 
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0px 8px 20px rgba(26, 54, 93, 0.3); 
    z-index: 9999;
    transition: all 0.3s ease;
}

#chat-shop-btn:hover {
    transform: translateY(-5px); 
    background-color: #eab308; 
    color: #1a365d; 
    box-shadow: 0px 12px 25px rgba(234, 179, 8, 0.4); 
}

#chat-shop-btn:hover .icon-chat {
    fill: #1a365d; 
}

.icon-chat {
    width: 22px;
    height: 22px;
    fill: #ffffff;
    transition: fill 0.3s ease;
}

/* --- Tối ưu kích thước nút chat trên điện thoại --- */
@media screen and (max-width: 768px) {
    #chat-shop-btn {
        bottom: 20px;
        right: 20px;
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .icon-chat {
        width: 18px;
        height: 18px;
    }
}