/* RESET BẢN CHẤT & BIẾN MÀU SẮC */
:root {
    --primary-blue: #4a86c6;
    --dark-blue: #35679c;
    --red-discount: #e63946;
    --bg-light: #f8f9fa;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Arial', sans-serif; }

html { scroll-behavior: smooth; } 

body { background-color: #fff; color: #333; }

/* --- HEADER --- */
header { border-bottom: 2px solid var(--primary-blue); position: sticky; top: 0; background: #fff; z-index: 100; }

.header-top { display: flex; justify-content: space-between; align-items: center; padding: 15px 50px; }

.logo h2 { color: var(--primary-blue); font-size: 24px; }

.search-bar { display: flex; width: 40%; border: 1px solid #ccc; border-radius: 20px; overflow: hidden; }
.search-bar input { flex: 1; padding: 10px 15px; border: none; outline: none; }
.search-bar button { padding: 10px 20px; background: #fff; border: none; cursor: pointer; color: #555; }

.header-actions .action-btn { 
    background: var(--red-discount); color: white; border: none; 
    padding: 10px 15px; margin-left: 10px; border-radius: 5px; cursor: pointer; font-weight: bold; position: relative;
}
.header-actions .login-btn { background: #f1f1f1; color: #333; border: 1px solid #ddd; }
#cartCount {
    position: absolute; top: -5px; right: -5px; background: #ffb703; color: #000;
    width: 20px; height: 20px; border-radius: 50%; font-size: 12px; display: flex; justify-content: center; align-items: center;
}

/* --- NAV & MEGA MENU --- */
nav { background: var(--primary-blue); padding: 0 50px; }
.main-menu { list-style: none; display: flex; }
.main-menu > li > a { display: block; color: white; text-decoration: none; padding: 15px 20px; font-weight: bold; font-size: 14px;}
.main-menu > li > a.active, .main-menu > li:hover > a { background: var(--dark-blue); }

.has-mega-menu { position: relative; }
.mega-menu {
    position: absolute; top: 100%; left: 0; width: 600px; background: white; border: 1px solid #ddd;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); display: none; padding: 20px; justify-content: space-between; z-index: 200;
}
.has-mega-menu:hover .mega-menu { display: flex; } 
.mega-column a { display: block; color: #333; text-decoration: none; padding: 8px 0; font-size: 14px; border-bottom: 1px dashed #eee; }
.mega-column a:hover { color: var(--primary-blue); }

/* --- BANNER (ĐÃ SỬA) --- */
.banner { width: 100%; display: flex; justify-content: center; }
.banner-img { width: 100%; max-width: 1920px; /* Tùy chỉnh độ rộng tối đa */ height: auto; display: block; }

/* --- MAIN & PRODUCT GRID --- */
main { padding: 40px 50px; }

.product-section { 
    margin-bottom: 50px; 
    scroll-margin-top: 130px; 
}

.section-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--primary-blue); padding-bottom: 10px; margin-bottom: 20px; }
.section-header h2 { color: var(--primary-blue); text-transform: uppercase; }
.view-more { text-decoration: none; color: #666; font-size: 14px; }

.product-grid { display: flex; gap: 20px; flex-wrap: wrap; }
.product-card { 
    width: calc(25% - 15px); border: 1px solid #eee; padding: 15px; text-align: center; 
    position: relative; transition: 0.3s; display: flex; flex-direction: column; justify-content: space-between;
}
.product-card:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.1); border-color: #ddd; }

.product-card img { width: 100%; height: 200px; object-fit: contain; margin-bottom: 15px; }

.product-title { font-size: 14px; color: var(--primary-blue); margin-bottom: 10px; font-weight: normal; }

.price { margin-bottom: 10px; }
.price .main-price { font-weight: bold; color: var(--red-discount); font-size: 18px; }

.add-to-cart { 
    margin-top: auto; width: 100%; padding: 10px; background: white; border: 1px solid var(--primary-blue); 
    color: var(--primary-blue); cursor: pointer; font-weight: bold; transition: 0.3s; 
}
.add-to-cart:hover { background: var(--primary-blue); color: white; }

/* --- FOOTER --- */
footer { border-top: 1px solid #eee; }
.brands-bar { text-align: center; padding: 20px; font-weight: bold; font-size: 24px; color: #c4c4c4; border-bottom: 1px solid #eee; }
.brands-bar span { color: var(--red-discount); margin: 0 15px; }
.footer-columns { display: flex; justify-content: space-between; padding: 40px 50px; background: #fff; }
.footer-columns .col h3 { font-size: 16px; margin-bottom: 15px; }
.footer-columns .col ul { list-style: none; }
.footer-columns .col ul li a { text-decoration: none; color: #555; line-height: 2; font-size: 14px; }
.footer-bottom { background: #3fa1cc; color: white; text-align: center; padding: 15px; font-size: 14px; }

/* --- NÚT NỔI (FLOATING) --- */
.floating-contact { position: fixed; right: 20px; bottom: 80px; z-index: 99; }
.floating-contact .icon { 
    width: 45px; height: 45px; border-radius: 50%; color: white; display: flex; justify-content: center; 
    align-items: center; margin-top: 10px; cursor: pointer; font-size: 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.messenger { background: #0084FF; }
.zalo { background: #0068FF; font-weight: bold; font-family: sans-serif; font-size: 14px !important;}
.phone { background: #34A853; }
.scroll-to-top { 
    position: fixed; left: 20px; bottom: 20px; width: 40px; height: 40px; border: 2px solid #333; 
    color: #333; display: flex; justify-content: center; align-items: center; text-decoration: none; background: white;
}

/* --- MODALS (ĐĂNG NHẬP & GIỎ HÀNG) --- */
.modal-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.6); display: none; justify-content: center; align-items: center; z-index: 1000; 
}
.modal-content { background: white; padding: 30px; width: 400px; border-radius: 8px; position: relative; }
.cart-content { width: 600px; max-height: 80vh; overflow-y: auto; }
.close-btn { position: absolute; top: 10px; right: 15px; font-size: 24px; cursor: pointer; color: #888; }
.modal-input { width: 100%; padding: 12px; margin-top: 15px; border: 1px solid #ccc; border-radius: 4px; }
.modal-submit { width: 100%; padding: 12px; margin-top: 20px; background: var(--primary-blue); color: white; border: none; font-weight: bold; cursor: pointer; border-radius: 4px;}
.toggle-auth { text-align: center; margin-top: 15px; font-size: 14px; }
.toggle-auth span { color: var(--primary-blue); cursor: pointer; font-weight: bold; }

/* Chi tiết list giỏ hàng */
.cart-item { display: flex; justify-content: space-between; border-bottom: 1px solid #eee; padding: 10px 0; align-items: center;}
.cart-item h4 { font-size: 14px; width: 50%; }
.cart-total { margin-top: 20px; text-align: right; border-top: 2px solid #333; padding-top: 10px; color: var(--red-discount); }