* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
}

/* 1. HEADER & LOGO */
.main-header {
    background-color: #d32f2f;
    padding: 12px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

/* SỬA LOGO: TO RÕ & BỎ VIỀN NỀN TRẮNG DÍNH XUNG QUANH */
.site-logo {
    height: 68px;
    width: auto;
    object-fit: contain;
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    color: #ffeb3b;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1;
}

.brand-subtitle {
    color: #ffffff;
    font-size: 12px;
    margin-top: 4px;
}

/* Ô TÌM KIẾM */
.search-box form {
    display: flex;
}

.search-box input {
    width: 320px;
    padding: 9px 14px;
    border: none;
    border-radius: 4px 0 0 4px;
    outline: none;
    font-size: 14px;
}

.search-box button {
    background-color: #ffeb3b;
    color: #000;
    border: none;
    padding: 9px 18px;
    font-weight: bold;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* 2. BANNER: ĐÃ BỎ HOÀN TOÀN GIỚI HẠN CHIỀU CAO VÀ VIỀN TRẮNG */
.banner-container {
    max-width: 980px;
    margin: 20px auto;
    padding: 0 15px;
    background: transparent;
}

.main-banner-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
    display: block;
}

/* 3. NỘI DUNG SẢN PHẨM */
.main-content {
    max-width: 1200px;
    margin: 0 auto 40px auto;
    padding: 0 15px;
}

.section-title {
    font-size: 20px;
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 4px solid #d32f2f;
    color: #222;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}

.product-card:hover {
    transform: translateY(-3px);
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}

.product-card h3 {
    font-size: 15px;
    margin-bottom: 8px;
    color: #333;
}

.product-card .price {
    color: #d32f2f;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
}

.btn-buy {
    background-color: #d32f2f;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
}

.no-products {
    color: #666;
    font-style: italic;
}

/* 4. FOOTER */
.main-footer {
    background-color: #111;
    color: #ccc;
    padding: 30px 20px;
    margin-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 12px;
    font-size: 14px;
}

.footer-col p, .footer-col ul {
    font-size: 13px;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
}

/* 5. TỐI ƯU HIỂN THỊ MÀN HÌNH ĐIỆN THOẠI (MOBILE RESPONSIVE) */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 12px;
    }

    .brand-logo {
        width: 100%;
        justify-content: center;
    }

    .site-logo {
        height: 50px;
    }

    .brand-title {
        font-size: 22px;
    }

    .search-box {
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    .banner-container {
        margin: 10px auto;
        padding: 0 10px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-card {
        padding: 10px;
    }

    .product-card img {
        height: 130px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
}

/* =========================================================
   GIAO DIỆN NHÓM NÚT CÔNG CỤ HEADER & POPUP TƯ VẤN
   ========================================================= */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.consult-wrapper {
    position: relative;
}

/* NÚT TƯ VẤN & TRA CỨU DOANH HÀNG */
.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 8px 14px;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.action-btn:hover {
    border-color: #2563eb;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-icon.blue-bg {
    background-color: #2563eb;
}

.btn-icon.gray-bg {
    background-color: #f1f5f9;
}

.btn-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.btn-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.btn-sub {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

.btn-sub.blue {
    color: #2563eb;
    font-weight: 600;
}

/* POPUP DROPDOWN TƯ VẤN (ẢNH 2) */
.consult-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 230px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    padding: 16px;
    display: none;
    z-index: 999;
    border: 1px solid #f1f5f9;
}

.consult-dropdown.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-title {
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background-color: #f8fafc;
}

/* NÚT GIỎ HÀNG */
.cart-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #2563eb;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s;
}

.cart-btn:hover {
    background-color: #1d4ed8;
}

.cart-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-title {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
}

.cart-price {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
}

/* TỐI ƯU TRÊN MÀN HÌNH ĐIỆN THOẠI */
@media (max-width: 992px) {
    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 10px;
    }
}