@charset "utf-8";
body { 
            background-color: #f4f7f6; 
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
            padding-top: 110px; 
        }
        
        /* ================= HEADER & TOP BAR ================= */
        .top-header { background: #3147b6; padding: 10px 0; }
        .logo img { height: 46px; }
        
        .search-box { position: relative; flex-grow: 1; max-width: 600px; margin: 0 15px; }
        .search-box input { width: 100%; border-radius: 20px; border: none; padding: 10px 30px 10px 15px; font-size: 15px; outline: none; }
        .clear-search { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #999; cursor: pointer; display: none; }
        
        .header-actions { display: flex; gap: 20px; align-items: center; }
        .cart-icon { position: relative; color: white; font-size: 1.3rem; cursor: pointer; }
        .cart-badge { position: absolute; top: -5px; right: -8px; background: #ea4335; color: white; font-size: 10px; font-weight: bold; padding: 2px 5px; border-radius: 10px; }
        
        /* ================= UNIFIED MENU ================= */
        .unified-menu-bar { background-color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
        .unified-menu-bar .nav-link { color: #333; font-weight: 500; padding: 12px 20px; transition: all 0.3s ease; }
        .unified-menu-bar .nav-link i { color: #6c757d; margin-right: 0px; width: 20px; text-align: center; display: inline-block; }
        .dropdown-submenu { position: relative; }
		/* ================= USER DROPDOWN (Đã đăng nhập) ================= */
        .user-dropdown-toggle {
            background-color: #fff;
            color: #1646a7;
            border-radius: 50px;
            padding: 5px 15px 5px 5px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
            border: 1px solid #e0e0e0;
            text-decoration: none;
            box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        }
        .user-dropdown-toggle .avatar-icon {
            background-color: #1646a7;
            color: white;
            border-radius: 50%;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
        }
        .user-menu {
            border: none;
            box-shadow: 0 5px 20px rgba(0,0,0,0.15);
            border-radius: 12px;
            padding: 10px 0;
            min-width: 250px;
            margin-top: 1px !important;
        }
        .user-menu .dropdown-item {
            padding: 6px 15px;
            color: #555;
            font-size: 14.5px;
            font-weight: 500;
            border-bottom: 1px dashed #dcdcdc;
            display: flex;
            align-items: center;
            gap: 12px;
            transition: 0.2s;
        }
        .user-menu .dropdown-item:last-child {
            border-bottom: none;
        }
        .user-menu .dropdown-item:hover {
            background-color: #f4f7f6;
            color: #1646a7;
        }
        .user-menu .dropdown-item i {
            font-size: 1.1rem;
            color: #666;
            width: 20px;
            text-align: center;
        }
        .fxx{display: block;
    position: fixed;
    background: url(../popup/overlay.png) repeat 0 0;
    width: 100%;
    height: 100%; 
    z-index: 100;
    opacity: 0.7;}
#ttop { position: relative; z-index:6;}
.show_c { opacity: 1 !important; visibility: inherit !important;} 

:root {
            --primary-blue: #2b6be6;
            --light-gray: #f0f4f9;
            --text-color: #333;
        }
  /* Lớp phủ nền đen mờ */
        #cookie-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8); /* Màu đen với opacity 0.8 */
            display: none; /* Ẩn mặc định */
            z-index: 9998; /* Thấp hơn box thông báo */
        }

        /* Box thông báo chính */
        #cookie-banner {
            position: fixed;
            bottom: 30px; /* Cách đáy một chút để đẹp hơn khi có overlay */
            left: 50%;
            transform: translateX(-50%);
            width: 90%;
            max-width: 1100px;
            background: #fff;
            box-shadow: 0 10px 40px rgba(0,0,0,0.3);
            border-radius: 12px;
            padding: 20px 30px;
            display: none; 
            z-index: 9999; /* Cao nhất */
            align-items: center;
            justify-content: space-between;
            border: 1px solid #ddd;
        }

        .cookie-content { flex: 1; margin-right: 20px; }
        .cookie-text { font-size: 14px; color: var(--text-color); line-height: 1.5; margin-bottom: 15px; }

        /* Group các nút gạt */
        .cookie-settings { display: flex; gap: 40px; flex-wrap: wrap; }
        .setting-item { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-color); }

        /* Toggle Switch */
        .switch { position: relative; display: inline-block; width: 44px; height: 22px; }
        .switch input { opacity: 0; width: 0; height: 0; }
        .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
        .slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
        input:checked + .slider { background-color: var(--primary-blue); }
        input:checked + .slider:before { transform: translateX(22px); }

        /* Nút bấm */
        .cookie-actions { display: flex; flex-direction: column; gap: 10px; min-width: 160px; }
        .btn { padding: 10px 20px; border-radius: 25px; border: none; cursor: pointer; font-weight: bold; font-size: 14px; transition: 0.3s; text-align: center; }
        .btn-accept { background-color: var(--primary-blue); color: white; }
        .btn-decline { background-color: var(--light-gray); color: var(--primary-blue); }

        /* Nút đóng X */
        .close-x { position: absolute; top: 0px; right: 7px; cursor: pointer; font-size: 35px; color: #666; font-weight: bold; }
.contact-area { width:100%; position:relative; overflow:hidden;}
        @media (max-width: 768px) {
            #cookie-banner { flex-direction: column; align-items: flex-start; bottom: 10px; }
            .cookie-actions { width: 100%; margin-top: 15px; }
        }
		
        @media (min-width: 992px) {
            .unified-menu-bar .nav-link:hover, .unified-menu-bar .nav-link.active { color: #3147b6; border-bottom: 3px solid #3147b6; background-color: #f8f9fa; }
            .unified-menu-bar .nav-link:hover i { color: #3147b6; }
            .unified-menu-bar .dropdown-menu { display: none; margin-top: 0; border: 1px solid #eee; border-top: 3px solid #3147b6; border-radius: 0 0 8px 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); min-width: 240px; }
            .unified-menu-bar .dropdown:hover > .dropdown-menu { display: block; }
            .unified-menu-bar .dropdown-submenu > .dropdown-menu { top: 0; left: 100%; margin-top: -3px; border-radius: 8px; }
            .unified-menu-bar .dropdown-submenu:hover > .dropdown-menu { display: block; }
            .unified-menu-bar .dropdown-item { padding: 10px 20px; font-weight: 400; border-bottom: 1px solid #f9f9f9; }
            .unified-menu-bar .dropdown-item:hover { background-color: #f4f7f6; color: #3147b6; }
            .unified-menu-bar .dropdown-submenu > a::after { content: "\F285"; font-family: bootstrap-icons !important; float: right; font-size: 12px; margin-top: 2px; color: #999; }
            body { padding-top: 105px; }
        }

        @media (max-width: 991px) {
            .unified-menu-bar .nav-link { border-bottom: 1px solid #eee; padding: 15px; }
            .unified-menu-bar .dropdown-menu { border: none; background: #f8f9fa; margin: 0; padding: 0; box-shadow: none; border-radius: 0; display: none; }
            .unified-menu-bar .dropdown-menu.show { display: block; }
            .unified-menu-bar .dropdown-item { padding: 12px 15px 12px 40px; border-bottom: 1px solid #eee; font-size: 14px; }
            .unified-menu-bar .dropdown-submenu .dropdown-menu { background: #e9ecef; }
            .unified-menu-bar .dropdown-submenu .dropdown-item { padding-left: 60px; font-size: 13px; color: #555; }
            .unified-menu-bar .dropdown-toggle::after { float: right; margin-top: 5px; }
            body { padding-top: 60px; }
			.search-box input {
    width: 100%;
    border-radius: 20px;
    border: none;
    padding: 6px 30px 6px 15px;
    font-size: 15px;
    outline: none;
}
        }

        /* ================= BANNER ================= */
        #mainBanner .carousel-inner img { width: 100%; height: auto; object-fit: cover; border-radius: 0; }
.carousel-control-prev-icon, .carousel-control-next-icon { background-size:40%;}
        /* ================= SẢN PHẨM BÁN CHẠY (SLIDER CSS ĐÃ CẬP NHẬT) ================= */
        .best-seller-section {
            background-color: transparent; /* Bỏ nền hồng */
            padding: 35px 0px 20px; 
            margin: 50px auto 20px; max-width: 1350px; position: relative;
        }
        .best-seller-header {
    background-color: #e3001b; 
    color: white; 
    font-weight: bold; 
    font-size: 1.2rem; 
    text-transform: uppercase; 
    padding: 6px 40px; 
    border-radius: 30px;
    position: absolute; 
    top: -18px; 
    left: 50%; 
    transform: translateX(-50%);
    box-shadow: 0 4px 6px rgba(0,0,0,0.15); 
    z-index: 2;
    white-space: nowrap; /* Bắt buộc chữ nằm trên 1 dòng, không rớt dòng */
}
        .bs-wrapper { position: relative; display: flex; align-items: center; }
        .bs-slider {
            display: flex; gap: 11px; overflow-x: auto; scroll-behavior: smooth;
            padding: 10px 5px; scroll-snap-type: x mandatory; width: 100%;
			cursor: grab;
            -webkit-overflow-scrolling: touch; /* Cho phép vuốt mượt trên mobile */
			scroll-snap-type: none; 
            
            /* Ngăn chặn việc chọn văn bản khi kéo thả */
            user-select: none;
        }
		.bs-slider:active {
            cursor: grabbing; /* Thêm dòng này để đổi con trỏ khi đang nhấn giữ chuột */
			scroll-behavior: auto;
        }
        .bs-slider::-webkit-scrollbar { display: none; }
        .bs-item {
            background: #fff; border-radius: 12px; padding: 15px; 
            /* Cấu hình để hiển thị đủ 6 item trên màn hình 1350px (tính cả gap) */
            min-width: calc((100% - 50px) / 6); 
            max-width: calc((100% - 50px) / 6);
            flex-shrink: 0; scroll-snap-align: start; position: relative;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08); display: flex; flex-direction: column;
            border: 1px solid #eee;
			scroll-snap-align: none;
			-webkit-user-drag: none;
        }
		.bs-item a{ text-decoration:none;}
		.bs-item a:hover{ color:#069;}
        /* Phản hồi màn hình nhỏ */
        @media (max-width: 1200px) { .bs-item { min-width: 200px; max-width: 200px; } }
        
        .bs-badge-discount {
            position: absolute; top: 10px; right: 10px; background: #e3001b; color: white;
            font-size: 11px; font-weight: bold; padding: 2px 6px; border-radius: 10px; z-index: 2;
        }
        .bs-icon-hot {
            position: absolute; top: -10px; left: -10px; width: 35px; height: 35px; z-index: 3;
            background: url('https://cdn-icons-png.flaticon.com/512/7286/7286129.png') no-repeat center;
            background-size: contain;
        }
        .bs-flag { font-size: 11px; color: #666; margin-bottom: 5px; display: flex; align-items: center; gap: 5px;}
        .bs-img { width: 100%; height: 120px; object-fit: contain; margin-bottom: 10px; }
        
        /* Tiêu đề tiếng Anh & tiếng Việt */
        .bs-title-en { font-size: 14px; font-weight: bold; color: #2c3e50; line-height: 1.3; margin-bottom: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-decoration:none;}
        .bs-title-vi { font-size: 12px; color: #6c757d; font-weight: normal; margin-bottom: 12px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;}
        
        .bs-price { color: #ff0000; font-size: 16px; font-weight: 600; margin-bottom: 15px;}
        
        .bs-btn-add { background: #ea4335; color: white; border: none; padding: 8px 0; border-radius: 8px; font-size: 13px; font-weight: 600; text-transform: uppercase; margin-top: auto; transition: 0.2s;}
        .btn-buy-bc:hover { background: #1a3cb3; }
        .btn-buy:hover { background: #1a3cb3; }
        /* Nút Slide */
        .slide-btn {
            position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
            background: white; border: 1px solid #ddd; width: 40px; height: 40px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center; cursor: pointer;
            box-shadow: 0 3px 8px rgba(0,0,0,0.15); color: #333; transition: 0.2s;
        }
        .slide-btn:hover { background: #f8f9fa; color: #e3001b; }
        .slide-prev { left: -20px; }
        .slide-next { right: -20px; }
        
        @media (max-width: 991px) {
            .slide-prev, .slide-next { display: none; }
            .best-seller-section { 
                padding: 35px 0 15px; /* Chuyển padding trái/phải về 0 để tràn viền */
                margin: 20px 0; 
            }
            
            .bs-slider {
                padding: 10px 15px; /* Bù padding vào trong thanh trượt để item đầu/cuối không sát viền */
				scroll-snap-type: x mandatory;
            }
            
            .bs-item { 
                /* Thu nhỏ kích thước thẻ trên Mobile để hiển thị cân đối và nhìn thấy một phần thẻ tiếp theo */
                min-width: 160px; 
                max-width: 180px; scroll-snap-align: start;
            }
        }

        /* ================= MAIN CATEGORIES & PRODUCT LIST ================= */
        .main-container { max-width: 1350px; margin: 0 auto; padding: 20px 15px; }
        .category-block { margin-bottom: 40px; }
        
        .category-title { 
            display: flex; align-items: center; font-size: 1.3rem; font-weight: 800; 
            color: #1e3a8a; margin-bottom: 25px; position: relative; padding-bottom: 12px; 
            text-transform: uppercase; letter-spacing: 0.5px;
        }
        .category-title::before { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: #e2e8f0; }
        .category-title::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 80px; background: #e50027; border-radius: 3px; }
        .category-title i {
            background: #dbeafe; color: #2563eb; width: 38px; height: 38px; display: flex; 
            align-items: center; justify-content: center; border-radius: 8px; margin-right: 12px; font-size: 1.2rem;
        }
        
        .product-card { background: white; border-radius: 12px; padding: 12px; height: 100%; display: flex; flex-direction: row; gap: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border: 1px solid #eee; transition: transform 0.2s; }
        .product-card:active { transform: scale(0.98); }
        .product-img { width: 100px; min-width: 100px; height: 100px; object-fit: contain; border-radius: 8px; background: #fff; padding: 5px; border: 1px solid #eaeaea; }
        .product-content { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
        .product-title { font-size: 14px; font-weight: bold; margin-bottom: 4px; color: #2c3e50; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
        .product-info { font-size: 12px; color: #6c757d; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .price-action-wrapper { margin-top: auto; }
        .product-price { font-size: 15px; color: #e74c3c; font-weight: 900; margin-bottom: 6px; display:none; }
        .btn-group-custom { display: flex; gap: 8px; }
        .btn-add { flex: 1; background: #e8f0fe; color: #3147b6; border: none; border-radius: 6px; font-size: 15px; display: flex; align-items: center; justify-content: center; }
        .btn-buy { flex: 1; background: #ea4335; color: white; border: none; padding: 6px 0; border-radius: 6px; font-size: 13px; font-weight: 600; text-transform: uppercase; }
		.btn-add-bc { flex: 1; background: #e8f0fe; color: #3147b6; border: none; border-radius: 6px; font-size: 15px; display: flex; align-items: center; justify-content: center; }
        .btn-buy-bc { flex: 3; background: #ea4335; color: white; border: none; padding: 6px 0; border-radius: 6px; font-size: 13px; font-weight: 600; text-transform: uppercase; }

        /* ================= SCROLL TO TOP BUTTON ================= */
        #btnScrollToTop {
            position: fixed; bottom: 30px; right: 30px; z-index: 999;
            background-color: #3147b6; color: white; width: 45px; height: 45px;
            border-radius: 50%; display: none; align-items: center; justify-content: center;
            font-size: 22px; border: none; box-shadow: 0 4px 10px rgba(0,0,0,0.3);
            cursor: pointer; transition: 0.3s;
        }
        #btnScrollToTop:hover { background-color: #ea4335; transform: translateY(-3px); }

        /* ================= FOOTER ================= */
        .footer { background: #3147b6; color: #fff; padding: 40px 0; margin-top: 40px; text-align: left; }
        .footer-container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; max-width: 1350px; margin: 0 auto; padding: 0 15px; }
        .footer-col { /*flex: 1;*/ min-width: 250px; }
        .footer-col h5 { font-weight: bold; margin-bottom: 20px; font-size: 16px; text-transform: uppercase; border-bottom: 2px solid rgba(255,255,255,0.2); padding-bottom: 10px; display: inline-block; }
        .footer-col p { margin-bottom: 10px; line-height: 1.6; color: #e0e0e0; }
        .footer-col ul { list-style: none; padding: 0; margin: 0; }
        .footer-col ul li { margin-bottom: 10px; }
        .footer-col ul li a { color: #e0e0e0; text-decoration: none; transition: color 0.2s; }
        .footer-col ul li a:hover { color: #fff; text-decoration: underline; }
        .footer-bottom { text-align: center; margin: 30px auto 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); width: 100%; max-width: 1350px; color: #b0b0b0; }
		
		/* Tối ưu khối Sản phẩm bán chạy trên Mobile */
@media (max-width: 767px) {
    .best-seller-header {
        font-size: 15px; /* Thu nhỏ cỡ chữ */
        padding: 6px 20px; /* Giảm khoảng cách 2 bên để vừa màn hình */
        top: -15px;
    }
    .best-seller-section {
        padding-top: 45px; /* Đẩy các thẻ sản phẩm xuống thấp hơn */
        margin-top: 30px; /* Tạo khoảng trống phía trên khối */
    }
}