/* ==========================================
   PHẦN 1: BIẾN MÀU SẮC & QUY TẮC CHUNG
   ========================================== */
:root {
    --blue-lc: #1250dc;      /* Xanh chủ đạo */
    --dark-blue: #0036a3;   /* Xanh đậm thanh Menu */
    --yellow-lc: #ffc107;   /* Vàng nút tìm kiếm */
    --orange-badge: #f58220;/* Cam thông báo giỏ hàng */
    --white: #ffffff;
}
/* 1. TRỊ BỆNH TRÀN VIỀN NGANG (MŨI TÊN BÊN PHẢI) */
/* Cấm tuyệt đối trình duyệt cuộn ngang và ép mọi thứ tính toán chuẩn Box-Model */

body { 
    margin: 0; 
    padding: 0; 
    font-family: 'Roboto', sans-serif; 
    background: #f4f4f4; 
    line-height: 1.5;
}
/*Chi tiết sản phẩm */
/* BẢO LƯU TOÀN BỘ CSS GỐC CỦA BẠN TỪ BẢN 3 */
    .thumbnail-container-lc { display: flex; gap: 8px; margin-top: 15px; justify-content: center; flex-wrap: nowrap; overflow-x: auto; align-items: center; padding-bottom: 5px; scrollbar-width: none; }
    .thumbnail-container-lc::-webkit-scrollbar {
            display: none; /* Ẩn scrollbar Chrome/Safari */
        }
    .thumb-item, .thumb-more-btn { width: 72px !important; height: 72px !important; border-radius: 12px; border: 1px solid #eee; background: #fff; cursor: pointer; box-sizing: border-box; display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 4px; transition: 0.2s; }
    .thumb-item { position: relative; }
    .thumb-item img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
    .thumb-more-btn { border: 1px solid #ccc; flex-direction: column; color: #1250dc; padding: 2px; }
    .thumb-more-btn svg { width: 20px; height: 20px; margin-bottom: 2px; color: #6c757d; }
    .thumb-more-btn span { font-size: 10px; line-height: 1.2; font-weight: 600; text-align: center; color: #4a4f63; }
    .note-warning-lc { background: #fff9f0; border-radius: 12px; padding: 24px; margin: 20px 0; border: 1px solid #ffe0b2; display: flex; gap: 20px; width: 100%; box-sizing: border-box; }
    .note-icon-lc { width: 40px; display: flex; justify-content: center; color: #ff9800; flex-shrink: 0; }
    .note-content-lc { flex: 1; }
    .note-header-lc { color: #f57c00; font-size: 19px; font-weight: bold; margin-bottom: 12px; }
    .note-text-lc { font-size: 15px; color: #444; line-height: 1.7; }
    .faq-block-lc { background: #fff; border-radius: 12px; padding: 10px 20px; margin-top: 25px; border: 1px solid #eef2ff; }
    .faq-item-lc { border-bottom: 1px solid #f1f4fb; padding: 15px 0;}
    .faq-title-lc { display: flex; align-items: center; cursor: pointer; }
    .faq-q-icon { width: 28px; height: 28px; background: #eef2ff; color: #1250dc; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 14px; margin-right: 15px; flex-shrink: 0; }
    .faq-q-text { flex: 1; font-size: 16px; font-weight: 600; color: #666; line-height: 1.5; }
    .faq-arrow { width: 8px; height: 8px; border-right: 2px solid #999; border-bottom: 2px solid #999; transform: rotate(45deg); margin-left: auto; transition: 0.3s; flex-shrink: 0; margin-top: -4px; }
    .faq-item-lc.active .faq-arrow { transform: rotate(-135deg); border-color: #1250dc; }
    .faq-content-lc { display: none; padding: 15px 15px 5px 43px; color: #555; line-height: 1.8; font-size: 15px; }
    .fs-switcher-group { display: inline-flex; background: #fff; border: 1px solid #dee2e6; border-radius: 25px; padding: 3px; overflow: hidden; }
    .btn-fs-logic { border: none; padding: 6px 20px; border-radius: 20px; cursor: pointer; font-size: 15px; transition: all 0.3s ease; background: transparent; color: #495057; font-weight: 500; }
    .btn-fs-logic.active { background: #1250dc; color: #fff; }
    .product-page-lc { padding: 15px 0px; font-family: Arial, sans-serif; }
    .product-main-card { background: #fff; border-radius: 12px; padding: 25px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); display: flex; flex-wrap: wrap; gap: 30px; }
    .product-gallery-lc { width: 42%; }
    .main-image-lc { border: 1px solid #f0f0f0; border-radius: 12px; height: 450px; display: flex; align-items: center; justify-content: center; position: relative; background: #fff; overflow: hidden; }
    .main-image-lc img { max-width: 90%; max-height: 90%; object-fit: contain; }
    .product-info-lc { width: calc(58% - 30px); }
    .product-price-lc { font-size: 32px; font-weight: bold; color: #1250dc; margin-bottom: 20px; margin-top: 20px; }

    /* BỔ SUNG NHỎ ĐỂ KHỚP VỚI ẢNH BẠN GỬI (Nút bấm, Qty) */
    .policy-row-lc { display: flex; justify-content: space-between; border-top: 1px solid #eee; padding-top: 15px; margin-top: 20px; }
    .policy-item-lc { display: flex; align-items: flex-start; gap: 8px; width: 33%; font-size: 13px; color: #333; line-height: 1.4; }
    .policy-icon-svg { width: 22px; height: 22px; color: #1250dc; flex-shrink: 0; }
    
    .action-row-1 { display: flex; align-items: center; gap: 20px; margin-bottom: 15px; }
    .qty-box-lc { display: flex; align-items: center; border: 1px solid #ddd; border-radius: 20px; height: 38px; background: #fff; overflow: hidden; }
    .qty-box-lc button { background: transparent; border: none; width: 35px; font-size: 18px; color: #555; cursor: pointer; height: 100%; }
    .qty-box-lc input { width: 40px; text-align: center; border: none; font-size: 15px; font-weight: bold; outline: none; }
    
    .btn-add-cart-lc { display: flex; align-items: center; gap: 8px; border: 1px solid #1250dc; background: #fff; color: #1250dc; height: 38px; padding: 0 20px; border-radius: 20px; font-weight: 600; font-size: 14px; cursor: pointer; transition: 0.2s; }
    .btn-add-cart-lc:hover { background: #f0f4ff; }
    
    .action-row-2 { display: flex; gap: 15px; margin-bottom: 25px; }
    .btn-buy-lc { flex: 1; background: #1250dc; color: #fff; border: none; border-radius: 25px; padding: 12px 0; font-size: 15px; font-weight: bold; cursor: pointer; text-transform: uppercase; }
    .btn-store-lc { flex: 1; background: #eef2ff; color: #1250dc; border: none; border-radius: 25px; padding: 12px 0; font-size: 14px; font-weight: bold; cursor: pointer; text-transform: uppercase; }
    /* --- TỐI ƯU KHỐI SẢN PHẨM LIÊN QUAN (VUỐT NGANG GIỐNG LONG CHÂU) --- */
    .related-products-wrapper {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* Hỗ trợ vuốt mượt trên iOS */
        padding-bottom: 10px; /* Tránh thanh cuộn đè lên thẻ */
        scrollbar-width: none; /* Ẩn scrollbar trên Firefox */
    }
    .related-products-wrapper::-webkit-scrollbar {
        display: none; /* Ẩn scrollbar trên Chrome/Safari/Edge */
    }
    .related-product-item {
        flex: 0 0 160px; /* Độ rộng cố định của mỗi thẻ trên mobile để vuốt */
        border: 1px solid #f1f4fb;
        border-radius: 12px;
        padding: 12px;
        text-decoration: none;
        color: inherit;
        display: flex;
        flex-direction: column;
        background: #fff;
        transition: box-shadow 0.3s, border-color 0.3s;
    }
    .related-product-item:hover {
        box-shadow: 0 4px 15px rgba(0,0,0,0.08);
        border-color: #d1dbf0;
    }
    .related-product-item img {
        width: 100%;
        height: 140px;
        object-fit: contain;
        margin-bottom: 12px;
    }
    .rel-pro-name {
        font-size: 14px;
        font-weight: 600;
        color: #333;
        line-height: 1.4;
        height: 40px; /* Giới hạn đúng 2 dòng chữ */
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        margin-bottom: 8px;
    }
    .rel-pro-price {
        color: #1250dc;
        font-weight: 800;
        font-size: 15px;
        margin-top: auto; /* Tự động đẩy giá xuống sát đáy thẻ */
    }
    /* Nút Chọn mua giống UI Long Châu */
    .btn-rel-buy {
        display: block;
        width: 100%;
        background: #1250dc;
        color: #fff;
        text-align: center;
        padding: 8px 0;
        border-radius: 20px;
        font-size: 13px;
        font-weight: 600;
        margin-top: 12px;
        transition: 0.2s;
    }
    .btn-rel-buy:hover { background: #0d3b9e; }

    /* Điều chỉnh nhẹ cho Desktop (nếu màn hình to thì tự động giãn) */

/*Hết Chi tiết sản phẩm */


/* ==========================================
   PHẦN 1: RESET & CHỐNG TRÀN HEADER
   ========================================== */
.header-long-chau, .header-long-chau * {
    box-sizing: border-box !important;
}

.header-long-chau { 
    background-color: var(--blue-lc, #1250dc); 
    background-image: url('images/nen.jpg') !important;
    background-size: cover;
    color: #fff; 
    position: sticky; 
    top: 0; 
    z-index: 1001; 
    width: 100%; /* Cố định chiều rộng, ngăn tràn */
}
/* ==========================================
   PHẦN 2: BỐ CỤC KHUNG & TOP BAR (DESKTOP)
   ========================================== */
/* Khung chuẩn 1200px có khoảng lề an toàn */
.wap, #wap { 
    max-width: 1200px; 
    margin: 0 auto; 
    width: 100%;
    padding: 0 auto; 
}

.top-bar-lc { 
    padding: 8px 0; 
    font-size: 13px; 
     
}
.top-bar-lc b { color: #fff; }
.top-bar-links a { 
    color: #fff; 
    text-decoration: none; 
    margin-left: 20px; 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
}
/* ==========================================
   PHẦN 3: MAIN HEADER (LOGO - SEARCH - ICONS)
   ========================================== */
.header-main-flex { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 20px 0; 
    gap: 20px; /* Duy trì khoảng cách an toàn giữa các khối */
}

.logo-lc img { 
    height: 75px; 
    width: auto; 
    display: block; 
    max-width: 100%; 
}

/* Thanh Tìm Kiếm */
.search-box-lc { flex: 1; max-width: 550px; }
.search-form {
    display: flex; 
    background: #fff; 
    border-radius: 30px; 
    height: 45px;
    align-items: center; 
    padding: 2px 2px 2px 15px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.search-form input { 
    flex: 1; 
    border: none; 
    font-size: 14px; 
    outline: none; 
    color: #333; 
    background: transparent; 
}
.search-form button {
    background: var(--yellow-lc, #ffc107); 
    border: none; 
    height: 40px; 
    padding: 0 25px; 
    border-radius: 20px; 
    font-weight: 700; 
    cursor: pointer; 
    color: #000; 
    transition: 0.2s;
}
.search-form button:hover { opacity: 0.9; }

/* Cụm Nút Phải (User & Cart) */
.header-right-icons {
    display: flex;
    align-items: center;
    gap: 15px;
}
.icon-item-pill {
    display: flex; 
    align-items: center; 
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 18px; 
    border-radius: 25px; 
    color: #fff; 
    text-decoration: none;
    gap: 8px; 
    transition: 0.3s; 
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}
.icon-item-pill:hover { background: rgba(255, 255, 255, 0.3); }
/* ==========================================
   PHẦN 4: DROPDOWN USER & CART BADGE
   ========================================== */
/* Chốt vị trí Dropdown khách hàng */
.user-dropdown-wrapper { 
    position: relative; /* Bắt buộc để menu con canh theo nút này */
    display: flex; 
    align-items: center; 
    height: 100%; 
}

.user-dropdown-menu { 
    position: absolute; 
    top: calc(100% + 10px); 
    right: 0; 
    width: 240px; 
    background: #fff; 
    border-radius: 12px; 
    box-shadow: 0 8px 24px rgba(0,0,0,0.15); 
    opacity: 0; 
    visibility: hidden; 
    transform: translateY(10px); 
    transition: all 0.3s ease; 
    z-index: 999;
    border: 1px solid #eee;
}
/* Mũi tên chỉ lên của menu */
.user-dropdown-menu::before {
    content: ''; 
    position: absolute; 
    top: -6px; 
    right: 25px; 
    width: 12px; 
    height: 12px;
    background: #fff; 
    transform: rotate(45deg); 
    border-left: 1px solid #eee; 
    border-top: 1px solid #eee;
}
.user-dropdown-wrapper:hover .user-dropdown-menu { 
    opacity: 1; 
    visibility: visible; 
    transform: translateY(0); 
}

.dropdown-list { list-style: none; padding: 8px 0; margin: 0; }
.dropdown-list li a { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding: 12px 20px; 
    color: #333; 
    text-decoration: none; 
    font-size: 15px; 
    font-weight: 500; 
    transition: 0.2s; 
}
.dropdown-list li a i { width: 20px; text-align: center; color: #888; font-size: 16px; }
.dropdown-list li a:hover { background: #f0f8ff; color: var(--blue-lc, #1250dc); }
.dropdown-list li a:hover i { color: var(--blue-lc, #1250dc); }

/* Chốt vị trí bong bóng giỏ hàng */
.cart-svg-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cart-badge-pill {
    position: absolute;
    top: -8px; 
    right: -10px; 
    background-color: var(--orange-badge, #ff9800); 
    color: #ffffff;
    font-size: 11px; 
    font-weight: bold;
    width: 18px; 
    height: 18px; 
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3); 
    border: 1px solid #fff;
}
/* .............................................................................................................................. */

/* ==========================================
   PHẦN 5: NAVIGATION MEGA MENU (DESKTOP)
   ========================================== */
.nav-lc { background: var(--dark-blue, #0036a3); width: 100%; }
.menu-ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.menu-ul li a { color: #fff; text-decoration: none; padding: 12px 20px; display: block; font-size: 13px; font-weight: 700; transition: 0.2s; }
.menu-ul li a:hover { background: rgba(255,255,255,0.1); }

.menu_category_fixed { background: #002d8a; position: relative; }
.menu_category_fixed > a { padding-left: 45px !important; }
.menu_category_fixed > a i { position: absolute; left: 18px; top: 14px; font-size: 16px; }
/* Wrapper cấp 1 */
.mega-menu-wrapper {
    position: absolute; 
    top: 100%; 
    left: 0; 
    width: 250px; 
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
    z-index: 999; 
    display: none; /* Mặc định ẩn, hiện khi hover */
}
.menu_category_fixed:hover .mega-menu-wrapper { display: block; }

.mega-list { list-style: none; padding: 0; margin: 0; }
.mega-item { border-bottom: 1px solid #eee; position: relative; }
.mega-item a { display: flex; align-items: center; padding: 12px 15px; color: #333 !important; font-weight: 500; }
.mega-item a:hover { background: #f8f9fa; color: var(--blue-lc, #1250dc) !important; }

/* Sub-menu cấp 2 bật ngang */
.mega-content {
    position: absolute; 
    top: 0; 
    left: 100%; 
    width: 600px; 
    background: #fff;
    min-height: 100%; 
    display: none; 
    box-shadow: 5px 5px 15px rgba(0,0,0,0.1); 
    padding: 20px;
}
.mega-item:hover .mega-content { display: block; }

/* Chỉnh lại ô input cho chuẩn Form hiện đại */
.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dce1e7;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 15px;
    color: #111; /* Màu chữ khi gõ đen đậm và rõ nét */
    font-weight: 500;
    transition: all 0.3s ease;
    background-color: #fff;
    outline: none;
}

/* Màu của chữ mờ (Placeholder) */
.form-control::placeholder {
    color: #9aa3af;
    font-weight: 400;
}

/* Hiệu ứng khi nhấp chuột vào ô */
.form-control:focus {
    border-color: #1250dc;
    box-shadow: 0 0 0 3px rgba(18, 80, 220, 0.1);
}

/* --- TRẠNG THÁI BÁO LỖI CHUẨN --- */
.form-control.input-error {
    border-color: #e02027 !important;
}

.form-control.input-error:focus {
    box-shadow: 0 0 0 3px rgba(224, 32, 39, 0.1) !important;
}

.error-text-msg {
    color: #e02027;
    font-size: 13px;
    margin-top: 6px;
    display: none; /* Mặc định ẩn */
    font-weight: 400; /* Chữ thường giống Long Châu */
}
/* ==========================================
   MEGA MENU - DESKTOP
   ========================================== */
   .mega-menu-container {
    display: none; /* Mặc định ẩn */
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 999;
    width: 250px;
}
.menu_category_fixed:hover .mega-menu-container {
    display: block !important; /* Hiện khi di chuột */
}



/* Thêm vào phần <style> của bạn */
.container-fixed {
    max-width: 1200px; /* Độ rộng chuẩn để không bị tràn hết màn hình */
    margin: 0 auto;    /* Căn giữa toàn bộ nội dung */
    padding: 0 15px;
    box-sizing: border-box;
}

.product-grid {
   display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important; /* 5 cột x 3 hàng = 15 SP */
    gap: 15px !important;
    margin-bottom: 20px;
}
/* Viền đỏ và nền hồng nhạt khi nhập sai */
.input-error {
    border-color: #e02027 !important;
    background-color: #fff1f0 !important;
}

/* Chữ báo lỗi màu đỏ nằm dưới input */
.error-text-msg {
    color: #e02027;
    font-size: 12px;
    margin-top: 5px;
    display: none; /* Mặc định ẩn */
    font-weight: 500;
}
/* 1. Ẩn mặc định icon mobile trên PC */
.mobile-only-toggle {
    display: none !important;
}




/* 2. STYLE PHẦN SẮP XẾP */
.filter-sort-wrapper { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; flex-wrap: wrap; gap: 10px; }
.cat-title { font-size: 20px; font-weight: bold; color: #333; margin: 0; }
.sort-btn { position: relative; padding: 7px 20px; background: #fff; border: 1px solid #ddd; border-radius: 20px; color: #333; text-decoration: none !important; font-size: 13px; transition: 0.2s; overflow: hidden; }
.sort-btn.active { border-color: #1250dc; color: #1250dc; font-weight: bold; }
.sort-btn.active::after { 
    content: "✓"; position: absolute; top: 0; right: 0; width: 18px; height: 18px; 
    background: #1250dc; color: #fff; font-size: 9px; display: flex; justify-content: flex-end; 
    align-items: flex-start; padding: 1px 2px 0 0; clip-path: polygon(100% 0, 0 0, 100% 100%); 
}


/* 4. CARD SẢN PHẨM (GIỮ NGUYÊN STYLE KỲ CÔNG CỦA BẠN) */
.product-card { 
    background: #fff; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; 
    position: relative; border: 1px solid transparent; transition: 0.3s; height: 100%; box-sizing: border-box; 
}
.product-card:hover { border-color: #1250dc; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.p-badge-discount { position: absolute; top: 10px; left: 10px; background: #ff4d4f !important; color: #fff !important; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: bold; z-index: 2; }
.p-img-box { width: 100%; padding-top: 100%; position: relative; margin-bottom: 12px; overflow: hidden; }
.p-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; }
.p-name { font-size: 13px; color: #333; height: 40px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: 10px; }
.p-price { font-size: 15px; font-weight: bold; color: #1250dc; }
.p-old-price { font-size: 12px; color: #999; text-decoration: line-through !important; }
.btn-buy { display: block; width: 100%; padding: 9px 0; background: #1250dc; color: #fff !important; text-align: center; border-radius: 25px; font-size: 13px; font-weight: bold; text-decoration: none !important; }

/* 5. MÔ TẢ DANH MỤC */
.category-desc-wrapper { padding: 30px 0; background: #fff; margin-top: 30px; border-top: 1px solid #eee; text-align: center; }
.category-desc-content { font-size: 15px; line-height: 1.6; color: #444; max-height: 250px; overflow: hidden; position: relative; text-align: left; transition: max-height 0.5s ease; }
.category-desc-content.expanded { max-height: none; }

/*/////////////////////////////////// */

/*Danh Mục sản phẩm */
/* 1. KHUNG CHÍNH & HEADER */
/* RESET BOX-SIZING & NGAN TRÀN NGANG */
.product-grid-container, 
.product-grid-container * {
    box-sizing: border-box;
}
.product-grid-container { 
    background: #f5f7f9; 
    padding-bottom: 30px; 
    width: 100%; 
    max-width: 100vw; /* Ép không du?c vu?t quá vi?n màn hình */
    overflow-x: hidden; 
}
.category-header-row { display: flex; justify-content: space-between; align-items: center; padding: 15px; flex-wrap: wrap; gap: 15px; }
.cat-title { font-size: 20px; font-weight: bold; color: #333; margin: 0; }
.sort-group { display: flex; align-items: center; gap: 12px; }
.sort-label { font-size: 14px; color: #666; }
.sort-options { 
    display: flex; 
    gap: 8px; 
    flex-wrap: wrap; /* R?t quan tr?ng d? không d?y rão layout trên mobile */
}
/* 2. NÚT S?P X?P (FIX TRÀN GÓC CHÉO) */
.sort-btn { 
    position: relative; padding: 7px 20px; background: #fff; border: 1px solid #ddd; 
    border-radius: 20px; color: #333; text-decoration: none !important; font-size: 13px; transition: 0.2s;
    overflow: hidden; /* C?c k? quan tr?ng d? góc tam giác không b? tràn ra ngoài vi?n bo tròn */
}
.sort-btn.active { border-color: #1250dc; color: #1250dc; font-weight: bold; }
.sort-btn.active::after { 
    content: "?"; position: absolute; top: 0; right: 0; width: 18px; height: 18px; 
    background: #1250dc; color: #fff; font-size: 9px; display: flex; justify-content: flex-end; 
    align-items: flex-start; padding: 1px 2px 0 0; clip-path: polygon(100% 0, 0 0, 100% 100%); 
    box-sizing: border-box;
}


/* 4. CARD S?N PH?M */
.product-card { 
    background: #fff; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; 
    position: relative; border: 1px solid transparent; transition: 0.3s; 
    height: auto; min-height: 100%; box-sizing: border-box; /* B?t bu?c d? th? hi?n th? dúng chi?u cao trên Grid */
}
.product-card:hover { border-color: #1250dc; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

/* 5. TAG GI?M GIÁ (FIX MÀU N?N) */
.p-badge-discount { 
    position: absolute; top: 10px; left: 10px; background: #ff4d4f !important; 
    color: #fff !important; padding: 2px 8px; border-radius: 4px; font-size: 12px; 
    font-weight: bold; z-index: 2; 
}

.p-img-box { width: 100%; padding-top: 100%; position: relative; margin-bottom: 12px; overflow: hidden; }
.p-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; }

.p-content { display: flex; flex-direction: column; flex-grow: 1; }
.p-name { 
    font-size: 13px; color: #333; text-decoration: none !important; font-weight: 500; 
    line-height: 1.5; height: 40px; overflow: hidden; display: -webkit-box; 
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: 10px; transition: 0.2s;
}
.p-name:hover { color: #1250dc; }

.p-price-area { margin-bottom: 12px; }
.p-price { font-size: 15px; font-weight: bold; color: #1250dc; margin-bottom: 4px; }
.p-unit { font-size: 12px; color: #888; font-weight: normal; }

/* 6. GIÁ CU (FIX G?CH NGANG) */
.p-old-price { 
    font-size: 12px; color: #999; text-decoration: line-through !important; 
    display: inline-block; margin-top: 2px;
}

.p-action { margin-top: auto; }
.btn-buy { 
    display: block; width: 100%; padding: 9px 0; background: #1250dc; color: #fff !important; 
    text-align: center; border-radius: 25px; font-size: 13px; font-weight: bold; 
    text-decoration: none !important; transition: 0.3s; border: none; cursor: pointer; 
}
.btn-buy:hover { background: #0e3eb3; }

/* 7. MÔ T? DANH M?C (FIX CAN GI?A) */
.category-desc-wrapper { 
    padding: 30px 15px; background: #fff; margin-top: 30px; 
    border-top: 1px solid #eee; text-align: center; /* Can gi?a n?i dung bên trong wrapper */
}
.category-desc-content { 
    font-size: 15px; line-height: 1.6; color: #444; max-height: 250px; 
    overflow: hidden; position: relative; text-align: left; /* Text mô t? gi? nguyên can trái cho d? d?c */
    margin-bottom: 20px; transition: max-height 0.5s ease;
}
.category-desc-content.expanded { max-height: none; }
.btn-readmore-desc { 
    display: inline-block; color: #1250dc; font-weight: bold; cursor: pointer; 
    padding: 10px 30px; border: 1px solid #1250dc; border-radius: 5px; transition: 0.2s;
}
.btn-readmore-desc:hover { background: #1250dc; color: #fff; }


/* Trang CHủ
/* --- BANNER GRID CHUẨN LONG CHÂU --- */
.lc_banner_wrapper { padding: 20px 0; }
.banner_grid { 
    display: grid; 
    grid-template-columns: 1fr 300px; 
    gap: 15px; 
    min-height: 320px; /* Thêm dòng này để giữ khung không bị sập */
}
.slider_left img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Giúp ảnh không bị méo khi tỷ lệ khác nhau */
}
.banner_side { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
}
.sub_item {
    height: calc(50% - 7.5px);
}
.sub_item img { 
    width: 100%; 
    height: 100%; 
    border-radius: var(--lc-radius); 
    object-fit: cover; 
    box-shadow: var(--lc-shadow); 
    transition: 0.3s;
}
.sub_item img:hover { transform: scale(1.02); }
.lc_home_body { background-color: var(--lc-bg); font-family: 'Inter', -apple-system, sans-serif; color: var(--lc-text); padding-bottom: 50px; }
.container_lc { max-width: 1230px; margin: 0 auto; padding: 0 15px; }

/* --- 2. BANNER GRID --- */
.lc_banner_wrapper { padding: 20px 0; }
.banner_grid { display: grid; grid-template-columns: 1fr 300px; gap: 15px; }
.banner_side { display: flex; flex-direction: column; gap: 15px; }
.banner_side img { width: 100%; border-radius: var(--lc-radius); height: calc(50% - 7.5px); object-fit: cover; box-shadow: var(--lc-shadow); }

/* --- 3. DANH MỤC NỔI BẬT --- */
.sec_title_lc { font-size: 22px; font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.cat_grid_lc { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.cat_card_lc { 
    background: #fff; border-radius: 15px;  text-align: center; 
    text-decoration: none; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent; display: flex; flex-direction: column; align-items: center; min-height: 140px;
}
.cat_card_lc:hover { transform: translateY(-5px); box-shadow: 0 10px 25px -5px rgba(18, 80, 220, 0.15);  }
.cat_icon_lc { width: 56px; height: 56px; margin-bottom: 16px; display: flex; align-items: center; justify-content: center; }
.cat_icon_lc img { max-width: 100%; height: auto; }
.cat_name_lc { font-size: 15px; font-weight: 600; color:rgb(34 34 34); margin-bottom: 5px; line-height: 1.3; }
.cat_count_lc { font-size: 13px; color:rgb(34 34 34); }

/* --- 4. KHỐI SẢN PHẨM --- */
.product_section_lc { background: #fff; border-radius: 16px; padding: 25px; margin-top: 30px; box-shadow: var(--lc-shadow); }
.header_flex_lc { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.view_all_lc { color: var(--lc-blue); font-weight: 600; font-size: 14px; text-decoration: none; display: flex; align-items: center; gap: 5px; }

.pro_grid_lc { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.pro_item_lc { position: relative; transition: 0.3s; padding: 10px; border-radius: 12px; border: 1px solid rgb(234 236 240); }
.pro_item_lc:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.05); }

.pro_img_lc { display: block; position: relative; margin-bottom: 15px; border-radius: 8px; overflow: hidden; }
.pro_img_lc img { width: 100%; aspect-ratio: 1/1; object-fit: contain; }
.off_badge_lc { position: absolute; top: 0; left: 0; background: #ef4444; color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 4px; font-weight: 700; }

.p_name_lc { font-size: 14px; font-weight: 500; line-height: 1.4; height: 40px; overflow: hidden; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.p_name_lc a { text-decoration: none; color: var(--lc-text); }
.p_price_lc { font-size: 16px; font-weight: 700; color: var(--lc-blue); margin-bottom: 4px; }
.p_old_lc { font-size: 13px; text-decoration: line-through; color: var(--lc-subtext); }

.btn_buy_lc { 
    width: 100%; background: #1250dc; border: 1.5px solid var(--lc-blue); color: #fff; 
    padding: 9px; border-radius: 25px; font-weight: 700; font-size: 13px; cursor: pointer; margin-top: 15px; transition: 0.3s;
}
.btn_buy_lc:hover { background: #f05d40; color: #fff; box-shadow: 0 4px 10px rgba(18, 80, 220, 0.3); }

/* 2. Tiêu đề và Thanh danh mục (Tags) */
.lc-news-header {
    margin-bottom: 25px;
}

.lc-header-top {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.lc-header-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    object-fit: contain;
}

.lc-header-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--lc-dark);
    margin: 0;
}

.lc-header-sep {
    width: 1px;
    height: 18px;
    background: #cbd5e1;
    margin: 0 15px;
}

.lc-view-all {
    color: var(--lc-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

/* Thanh Tags vuốt ngang trên mobile */
.lc-tags-wrapper {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}
.lc-tags-wrapper::-webkit-scrollbar { display: none; }

.lc-tag-item {
    white-space: nowrap;
    background: var(--lc-bg-tag);
    color: #334155;
    padding: 8px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: 0.3s;
}
.lc-tag-item:hover, .lc-tag-item.active {
    background: #fff;
    color: var(--lc-blue);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 3. Bố cục Grid Tin tức */
.lc-news-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 25px;
}

/* Tin lớn bên trái */
.lc-news-big { text-decoration: none; display: block; }
.lc-news-big-img { width: 100%; height: 380px; border-radius: 12px; overflow: hidden; margin-bottom: 15px; }
.lc-news-big-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.lc-news-big:hover img { transform: scale(1.05); }

.lc-tag-label { color: #94a3b8; font-size: 12px; display: block; margin-bottom: 8px; }
.lc-news-big-title { font-size: 24px; font-weight: 700; color: var(--lc-dark); line-height: 1.3; margin: 0; }

/* Danh sách tin nhỏ bên phải */
.lc-news-list-side { display: flex; flex-direction: column; gap: 18px; }
.lc-news-small-item { display: grid; grid-template-columns: 110px 1fr; gap: 15px; text-decoration: none; align-items: flex-start; }
.lc-news-small-img { width: 110px; height: 75px; border-radius: 8px; overflow: hidden; }
.lc-news-small-img img { width: 100%; height: 100%; object-fit: cover; }
.lc-news-small-title { font-size: 15px; font-weight: 600; color: var(--lc-dark); line-height: 1.4; margin: 0; transition: 0.2s; }
.lc-news-small-item:hover .lc-news-small-title { color: var(--lc-blue); }

/* --- 1. CORE LAYOUT --- */
#boxSearchScroll {
    background: #008dff;
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 2147483647;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    
    /* Hiệu ứng trượt */
    transform: translateY(-100%); /* Giấu lên trên */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Chuyển động mượt */
    display: block !important; /* Luôn luôn hiện trong DOM */
    visibility: hidden;
}
/* Khi có class .is-sticky, thanh search sẽ trượt xuống */
#boxSearchScroll.is-sticky {
    transform: translateY(0);
    visibility: visible;
}
/* --- 2. DESKTOP UI (Màn hình > 1023px) --- */
.header-scroll-wrapper {
    display: flex; align-items: center; justify-content: space-between;
    max-width: 1200px; margin: 0 auto; padding: 10px; gap: 15px;
}
.header-scroll-wrapper .logo-link img { width: 130px; height: auto; max-height: 35px; aspect-ratio: 130/35; }

.scroll-category-container { position: relative; padding-bottom: 10px; margin-bottom: -10px; }
.scroll-category { 
    background: rgba(255,255,255,0.2); color: #fff; padding: 8px 15px; 
    border-radius: 6px; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 14px;
    transition: background 0.2s;
}
.scroll-category:hover { background: rgba(255,255,255,0.3); }

/* Mega Menu Hover Logic */
.scroll-category-container:hover .mega-menu-wrapper { display: flex !important; top: 100% !important; left: 0 !important; }

.header-scroll-wrapper .search_form { 
    background: #fff; border-radius: 25px; display: flex; flex: 1; 
    max-width: 500px; height: 40px; overflow: hidden;
}
.header-scroll-wrapper .input_text { border: none; padding-left: 20px; flex: 1; outline: none; font-size: 14px; color: #333; }
.header-scroll-wrapper .button_search { background: none; border: none; padding-right: 15px; color: #333; cursor: pointer; font-size: 16px; }

.scroll-location { 
    display: flex; align-items: center; color: #fff; background: rgba(255,255,255,0.15); 
    padding: 6px 15px; border-radius: 20px; gap: 8px; font-size: 14px; cursor: pointer;
    border: 1px solid rgba(255,255,255,0.1);
}

/* --- 3. MOBILE UI (Màn hình <= 1023px) --- */
.header-scroll-mobile {
    display: none; align-items: center; justify-content: space-between;
    padding: 6px 12px; gap: 10px; width: 100%; box-sizing: border-box;
}
.btn-mobile-menu-scroll { background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; padding: 0 5px; }
.search-form-mobile { 
    flex: 1; display: flex; align-items: center; background: #fff; 
    border-radius: 30px; padding: 0 5px 0 15px; height: 38px;
}
.search-form-mobile input { flex: 1; border: none; outline: none; font-size: 14px; background: none; color: #333; width: 100%; }
.btn-search-mobi-scroll { background: none; border: none; color: #1250dc; padding: 8px; cursor: pointer; display: flex; }

.btn-mobile-cart { 
    position: relative; color: #fff; font-size: 20px; width: 38px; height: 38px; 
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.2); border-radius: 50%; text-decoration: none;
}
.cart-badge { 
    position: absolute; top: -4px; right: -4px; background: #ff3b30; color: #fff; 
    font-size: 9px; width: 16px; height: 16px; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; font-weight: bold;
}

/* --- 4. SHOWROOM POPUP --- */
.showroom-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); z-index: 2147483647; backdrop-filter: blur(3px);
}
.showroom-popup {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: #fff; width: 92%; max-width: 500px; border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4); overflow: hidden;
}
.popup-header-lc { background: #f8faff; color: #1250dc; font-size: 18px; font-weight: bold; padding: 15px; text-align: center; border-bottom: 1px solid #edf2f9; }
.showroom-list { max-height: 450px; overflow-y: auto; padding: 10px 0; scrollbar-width: thin; }
.showroom-item { background: #fff9f0; border: 1px solid #ffe0b2; padding: 15px; border-radius: 12px; margin: 10px 15px; display: flex; gap: 15px; }
.btn-close-popup { width: calc(100% - 30px); margin: 5px 15px 15px; padding: 12px; background: #1250dc; color: #fff; border: none; border-radius: 10px; font-weight: bold; cursor: pointer; font-size: 15px;}
/* Container bọc icon giỏ hàng phải có position relative */
.cart-svg-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
/* Ép tất cả ảnh trong phần nội dung chi tiết phải co giãn, ghi đè CSS inline của trình soạn thảo */
    #desc-content-target img {
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain;
    }

/* --- 5. RESPONSIVE LOGIC --- */
/* ==========================================
   PHẦN 3: TỐI ƯU CHO MOBILE (DƯỚI 1023PX)
   ========================================== */
@media (max-width: 1023px) {
    
    /* 1. Đảm bảo toàn bộ trang không bị trượt ngang */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        position: relative;
    }
    
     /* 2. Giải phóng padding của lớp bao ngoài để nền xanh chạm mép màn hình */
    #wap, .wap {
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
    }
    /*Chi Tiết Sản Phẩm*/
    .product-gallery-lc, .product-info-lc { width: 100%; }
        .action-row-2 { flex-direction: column; }
        
        /* Xử lý ảnh chính co giãn linh hoạt */
        .main-image-lc { 
            height: auto; 
            aspect-ratio: 1 / 1; /* Ép khung ảnh vuông theo tỷ lệ màn hình */
            max-height: 380px; /* Giới hạn chiều cao tối đa tránh chiếm hết màn hình */
        }
        .main-image-lc img {
            width: 100%; 
            height: 100%; 
            object-fit: contain; 
        }
        
        /* Tối ưu dải ảnh thumbnail vuốt ngang trên mobile */
        .thumbnail-container-lc {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch; /* Hỗ trợ vuốt mượt trên iOS */
            padding-bottom: 8px; /* Tránh lẹm scrollbar */
            scrollbar-width: none; /* Ẩn scrollbar Firefox */
        }
        .thumbnail-container-lc::-webkit-scrollbar {
            display: none; /* Ẩn scrollbar Chrome/Safari */
        }
        .thumb-item, .thumb-more-btn {
            flex-shrink: 0; /* Ngăn thumbnail bị bóp méo */
        }
        
    /*Hết Chi Tiết Sản Phẩm*/
  /* Thông tin khách hàng */
  /* --- TỐI ƯU KHỐI SẢN PHẨM LIÊN QUAN (VUỐT NGANG GIỐNG LONG CHÂU) --- */
    .related-products-wrapper {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* Hỗ trợ vuốt mượt trên iOS */
        padding-bottom: 10px; /* Tránh thanh cuộn đè lên thẻ */
        scrollbar-width: none; /* Ẩn scrollbar trên Firefox */
    }
    .related-products-wrapper::-webkit-scrollbar {
        display: none; /* Ẩn scrollbar trên Chrome/Safari/Edge */
    }
    .related-product-item {
        flex: 0 0 160px; /* Độ rộng cố định của mỗi thẻ trên mobile để vuốt */
        border: 1px solid #f1f4fb;
        border-radius: 12px;
        padding: 12px;
        text-decoration: none;
        color: inherit;
        display: flex;
        flex-direction: column;
        background: #fff;
        transition: box-shadow 0.3s, border-color 0.3s;
    }
    .related-product-item:hover {
        box-shadow: 0 4px 15px rgba(0,0,0,0.08);
        border-color: #d1dbf0;
    }
    .related-product-item img {
        width: 100%;
        height: 140px;
        object-fit: contain;
        margin-bottom: 12px;
    }
    .rel-pro-name {
        font-size: 14px;
        font-weight: 600;
        color: #333;
        line-height: 1.4;
        height: 40px; /* Giới hạn đúng 2 dòng chữ */
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        margin-bottom: 8px;
    }
    .rel-pro-price {
        color: #1250dc;
        font-weight: 800;
        font-size: 15px;
        margin-top: auto; /* Tự động đẩy giá xuống sát đáy thẻ */
    }
    /* Nút Chọn mua giống UI Long Châu */
    .btn-rel-buy {
        display: block;
        width: 100%;
        background: #1250dc;
        color: #fff;
        text-align: center;
        padding: 8px 0;
        border-radius: 20px;
        font-size: 13px;
        font-weight: 600;
        margin-top: 12px;
        transition: 0.2s;
    }
    .btn-rel-buy:hover { background: #0d3b9e; }

    /* Điều chỉnh nhẹ cho Desktop (nếu màn hình to thì tự động giãn) */
    @media (min-width: 768px) {
        .related-products-wrapper { gap: 15px; }
        .related-product-item { flex: 0 0 calc(20% - 15px); min-width: 180px; }
    }
  .container_lc { margin: 0 auto; padding: 0 5px; }
  .product_section_lc {
        background: #fff;
        border-radius: 16px;
        padding: 5px;
        margin-top: 30px;
        box-shadow: var(--lc-shadow);
    }
    
    .cat_grid_lc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
    .cat_card_lc {
    background: #fff;
      text-align: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding:1px;
    min-height: auto;
    border-radius: 10px;}
    .cat_name_lc { font-size: 13px; font-weight: 600; color:rgb(34 34 34); margin-bottom: 5px; line-height: 1.3; }
    .cat_count_lc {display:none;} 
    .cat_icon_lc{margin-bottom:0px;}
    
    .lc-news-grid {
        grid-template-columns: 1fr !important; /* Ép về 1 cột dọc trên giao diện mobile/tablet */
        gap: 15px !important; /* (Tùy chọn) Giảm khoảng cách giữa các bài viết trên mobile cho đỡ trống */
    }
 /* 1. Mở khóa cho Header để không bị cắt bớt phần menu tràn xuống dưới */
    

    /* 2. Ép phần khung chứa Icon User và Menu sổ xuống nổi lên lớp cao nhất */
    /* LƯU Ý: Bạn hãy thay class .user-dropdown-wrapper bằng tên class thật trong code của bạn */
    .user-dropdown-wrapper, .user-menu-box, .dropdown-menu {
        position: revert-layer !important;
        z-index: 99999 !important; 
    }

    /*đặt hàng */
    /* 1. Ép container chính chuyển sang dạng cột dọc */
    .container { 
        display: flex !important;
        flex-direction: column !important; /* Xếp chồng các khối lên nhau */
        padding: 10px !important;
        gap: 15px !important; /* Tạo khoảng cách giữa các khối */
    }

    /* 2. Đảm bảo các khối (Card) luôn chiếm 100% chiều rộng màn hình */
    .main-content, .sidebar, .card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important; /* Giúp padding không làm tràn khối */
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* 3. Sửa lỗi ô nhập liệu bị nhảy hàng (Họ tên & SĐT) */
    .form-row {
        display: flex !important;
        flex-direction: column !important; /* Trên mobile nên để mỗi ô 1 dòng cho dễ nhập */
        gap: 0 !important;
    }

    .form-group {
        width: 100% !important;
    }

    /* 4. Tùy chỉnh nút bấm để không bị tràn */
    .btn-hoantat {
        width: 100% !important;
        box-sizing: border-box;
    }
    
  
/* 3. Header phải luôn chiếm 100% chiều rộng */
    .header-long-chau {
        width: 100% !important;
        margin: 0 !important;
        left: 0 !important;
    }
    /* Grid 2 cột chuẩn Mobile */
   .product-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 cột x 6 hàng = 12 SP */
        gap: 10px !important;
        padding: 0 10px;
    }
.pro_grid_lc {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 cột x 6 hàng = 12 SP */
        gap: 10px !important;
        padding: 0px;
    }
    /* Giữ nguyên cỡ chữ 20px bạn đã thiết kế (nếu bạn thấy ổn) */
    .p-name { font-size: 20px !important; }
    /* Ẩn các thành phần Desktop */
    .top-bar-lc, .nav-lc, .icon-item-pill span:not(.cart-badge-pill) { display: none !important; }

    /* Phần đầu Header Mobile */
                   .d-none-mobile {
                display: none !important;
            }
 /* 1. Mở khóa cho thẻ bao ngoài cùng để không bị cắt bong bóng */
    .header-main .header-right-icons a.icon-item-pill.cart-pill,
    .header-main .header-right-icons .cart-svg-wrapper {
        overflow: visible !important;
        contain: none !important;
    }
    
    /* 2. Ẩn chữ "Giỏ hàng" một cách an toàn (thay vì dùng overflow:hidden để cắt như cũ) */
    .header-main .header-right-icons a.cart-pill > span:not(.cart-badge-pill) {
        display: none !important;
    }
    
    /* 3. Nâng bong bóng lên lớp cao nhất và chỉnh lại tọa độ */
    #header-cart-badge {
        z-index: 99999 !important;
        top: -15px !important;
        right: -15px !important;
        transform: scale(0.9) !important;
    }
    
/* Thông tin khách hàng */

/* Căn chỉnh lại lề và khung chứa */
            .profile-container { margin: 15px auto; padding: 0 10px; flex-direction: column; gap: 15px; }
            .profile-sidebar { width: 100%; max-width: 100%; }
            .profile-main { width: 100%; padding: 20px 15px; box-sizing: border-box; overflow: hidden; }
            .profile-main h2 { font-size: 18px; }

            /* Đồng bộ Menu ngang vuốt được (giống trang Profile) */
            .profile-menu ul { display: flex; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; scroll-behavior: smooth; }
            .profile-menu ul::-webkit-scrollbar { display: none; }
            .profile-menu li { flex: 0 0 auto; }
            .profile-menu li a { padding: 12px 16px; border-bottom: 2px solid transparent; border-left: none !important; font-size: 14px; }
            .profile-menu li.active a { background: transparent; border-bottom-color: #1250dc; color: #1250dc; padding-left: 16px; }

            /* XỬ LÝ LỖI TRÀN BẢNG (TABLE) TRÊN MOBILE */
            .order-table { 
                display: block; 
                width: 100%; 
                overflow-x: auto; /* Cho phép vuốt ngang cái bảng */
                -webkit-overflow-scrolling: touch; 
                white-space: nowrap; /* Ép chữ không rớt dòng làm hỏng form bảng */
                border: 1px solid #eee; /* Tạo viền mờ để khách biết có thể vuốt */
                border-radius: 8px;
            }
            .order-table th, .order-table td { padding: 12px 10px; }

          /* Tối ưu riêng cho trang Chi tiết đơn hàng (Cột thông tin 2 bên) */
            .info-box-wrap { display: block; }
            .info-box-wrap .info-box { margin-bottom: 15px; }

           
    /* 1. Căn chỉnh khung Header tổng thể */
    .header-main-flex {
        padding: 8px 12px !important; /* Giảm padding để header không quá dày */
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
    }

    /* 2. Ép ô tìm kiếm chiếm trọn 100% để tự nhảy xuống hàng riêng */
    .search-box-lc {
        flex: 0 0 100% !important; 
        width: 100% !important;
        max-width: 100% !important;
        order: 4 !important; /* Đảm bảo nó nằm sau Logo và Icon */
        margin: 10px 0 0 0 !important;
    }

    
    /* 2. Logo nằm giữa */
   /* 2. Thu nhỏ Logo (Điểm nhấn quan trọng nhất) */
    .logo-lc {
        order: 2;
        flex: 1;
        text-align: center;
    }
    .logo-lc img {
        height: 50px !important;
        width: auto !important;
        margin: 10px auto;
    }

   /* 3. Biến Icon Đăng nhập & Giỏ hàng thành vòng tròn (Style hiện đại) */
    .header-right-icons {
        order: 3;
        display: flex !important;
        gap: 8px !important;
    }
    .icon-item-pill {
        width: 34px !important;
        height: 34px !important;
        background: rgba(255, 255, 255, 0.2) !important; /* Nền trắng mờ */
        border-radius: 50% !important; /* Biến thành hình tròn */
        padding: 0 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
    }
    
    .icon-item-pill i {
        font-size: 16px !important;
        color: #fff !important;
    }
 
  /* 4. Tinh chỉnh Icon Menu (3 gạch) */
     .mobile-only-toggle {
              order: 1;
              flex: 0 0 40px;
              display: block !important;
          }
    .mobile-only-toggle i {
        font-size: 20px !important;
        color: #fff !important;
    }

    /* 5. Làm đẹp ô Tìm kiếm (Hàng 2) */
    .search-box-lc {
        order: 4;
        flex: 0 0 100% !important;
        margin: 10px 0 2px 0 !important; /* Khoảng cách giữa 2 hàng */
    }
    .search-form {
        height: 40px !important; /* Chiều cao tiêu chuẩn mobile */
        background: #fff !important;
        border-radius: 25px !important; /* Bo tròn mạnh 2 đầu */
        padding: 2px 2px 2px 15px !important;
        border: none !important;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important; /* Tạo độ nổi nhẹ */
    }
    .search-form input {
        font-size: 13px !important;
        color: #333 !important;
    }
    .search-form button {
        height: 36px !important;
        padding: 0 18px !important;
        border-radius: 20px !important; /* Nút tìm kiếm bo tròn */
        background: #ffc107 !important; /* Màu vàng var(--yellow-lc) */
        font-size: 13px !important;
        font-weight: 700 !important;
        color: #000 !important;
        box-shadow: none !important;
    }
    
   /* 6. Fix Badge giỏ hàng (Số lượng) */
    .cart-svg-wrapper {
        position: relative;
    }
    .cart-badge-pill {
        position: absolute;
        top: -10px;
        right: -8px;
        background: #f58220 !important; /* Màu cam var(--orange-badge) */
        color: #fff !important;
        font-size: 10px !important;
        
        border-radius: 10px !important;
        min-width: 16px;
        text-align: center;
    } 
          /* 5. Icon 3 gạch Mobile */
         
    
          /* --- HIỆU ỨNG TRƯỢT MENU --- */
                  
            

    /* --- CƠ CHẾ MENU TRƯỢT (SLIDE MENU) --- */
   /* 1. Đảm bảo Wrapper luôn sẵn sàng để trượt */
   /* Ép hiển thị wrapper khi ở mobile để hiệu ứng trượt hoạt động */
   .mega-menu-wrapper {
        display: block !important;
        visibility: visible !important;
        position: fixed !important;
        top: 0 !important;
        left: -110% !important; /* Mặc định ẩn bên trái */
        width: 80% !important;
        max-width: 300px;
        height: 100vh !important;
        background: #ffffff !important;
        z-index: 9999999 !important; /* Phải cao hơn Overlay (9999998) */
        transition: all 0.4s ease-in-out !important;
        box-shadow: 5px 0 15px rgba(0,0,0,0.3);
    }

    /* Lệnh quan trọng nhất để menu hiện ra */
    .mega-menu-wrapper.open {
        left: 0 !important;
    }

   /* Lớp nền mờ */
    .menu-overlay {
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 99998;
        display: none;
    }
    /* Hiển thị danh mục dọc trên Mobile */
    .mega-menu-main {
        width: 100% !important;
        border: none !important;
        min-height: auto !important;
    }
    .mega-content {
        position: static !important;
        width: 100% !important;
        display: none !important;
        padding: 0 15px !important;
        background: #f9f9f9 !important;
        box-shadow: none !important;
    }
    .mega-item.active-mobile .mega-content {
        display: block !important;
    }
    /* Tên sản phẩm */
    .product-info > div:first-child { 
        font-size: 20px !important; /* Tăng từ mặc định lên 18px */
        font-weight: bold !important;
        line-height: 1.4;
    }
    .payment-text{ font-size: 20px !important;}

    /* Giá tiền sản phẩm */
    .product-price, .subtotal-val { 
        font-size: 20px !important; /* Làm nổi bật giá tiền */
        color: #d32f2f !important;
    }
    input, textarea {
        font-size: 20px !important; /* Mức 16px là chuẩn nhất trên Mobile để chống zoom */
        height: 50px !important; /* Tăng độ cao ô nhập để tương xứng với chữ to */
    }

    /* Tùy chỉnh riêng cho Placeholder nếu muốn to hơn nữa */
    input::placeholder, textarea::placeholder {
        font-size: 20px !important;
        color: #888;
    }
    .section-title{ font-size: 24px !important;}
    .summary-row {font-size: 20px !important;}

   
   

    /* 3. Ch?nh l?i Card s?n ph?m cho cân d?i */
    .product-card {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 8px !important;
        float: none !important; /* Xóa b? float cu n?u có */
    }

    /* 4. Thu nh? ch? d? không b? v? hàng */
    .p-name {
        font-size: 20px !important;
        height: 40px !important;
        line-height: 19px !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }
    
    .p-price { font-size: 14px !important; }
    /* --- ĐƯA NÚT SẮP XẾP VỀ 1 HÀNG TRÊN MOBILE --- */
    .sort-group {
        display: flex !important;
        align-items: center !important;
        white-space: nowrap !important;
        overflow-x: auto !important; /* Cho phép vuốt ngang nếu màn hình quá nhỏ */
        -webkit-overflow-scrolling: touch;
        gap: 8px !important;
        padding-bottom: 5px; /* Tạo khoảng trống nhỏ phía dưới */
    }
    /* 2. Nhãn "Sắp xếp theo:": Thu nhỏ lại */
    .sort-label {
        font-size: 13px !important;
        margin-right: 5px !important;
        flex-shrink: 0; /* Không cho chữ này bị co lại */
    }

    /* 3. Khối chứa các nút: Giữ trên 1 hàng */
    .sort-options {
        display: flex !important;
        flex-wrap: nowrap !important; /* QUAN TRỌNG: Ép không xuống hàng */
        gap: 5px !important;
    }

    /* 4. Từng nút bấm: Thu nhỏ kích thước và chữ */
    .sort-btn {
        padding: 5px 12px !important; /* Giảm padding */
        font-size: 12px !important; /* Giảm cỡ chữ */
        border-radius: 20px !important;
        height: 30px !important; /* Khống chế chiều cao cố định */
        display: flex !important;
        align-items: center;
        justify-content: center;
        white-space: nowrap !important; /* Không cho chữ trong nút bị nhảy dòng */
        flex-shrink: 0;
    }
    .header-scroll-wrapper { display: none !important; }
    .header-scroll-mobile { display: flex !important; }
    .desktop-only { display: none !important; }
    .header-scroll-mobile { display: flex; padding: 8px 12px; gap: 10px; align-items: center; }
    .search-form-mobile { flex: 1; background: #fff; border-radius: 30px; height: 36px; display: flex; padding-left: 15px; }
    .search-form-mobile input { border: none; outline: none; flex: 1; font-size: 14px; }
    .btn-search-mobi-scroll { background: none; border: none; color: #1250dc; padding: 0 10px; }
}

/* Hiển thị bổ trợ */
.d-none-mobile { display: block; }

@media (min-width: 1024px) { 
.mobile-only-toggle { display: none !important; } /* Thay vì .mobile-menu-toggle */
    .d-lg-none { display: none !important; }
    
       
.product-grid-container {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-x: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}