@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,400&display=swap');
/* * {
    outline: 1px solid red !important;
} */

/* Cuộn trang mượt mà khi click vào link */
/* File: style.css */

/* Áp dụng cho TẤT CẢ các thẻ HTML có chứa thuộc tính id="..." */
/* [id] {
    scroll-margin-top: 150px;
}
html {
  scroll-behavior: smooth;
} */

.toc-container {
  background-color: #f2f3f5;
  border-radius: 8px;
  padding: 8px 20px;
  margin-bottom: 20px;
  font-family: Arial, sans-serif;
  color: #333;
}

.toc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toc-title {
  font-weight: bold;
  font-size: 16px;
}

.toc-toggle {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 5px;
}

.toc-content {
  margin-top: 15px;
  display: none !important;
  /* Mặc định là hiện, có thể dùng transition để làm mượt nếu muốn */
}

.toc-content ul {
  list-style-type: none;
  padding-left: 0;
  margin: 0;
}

.toc-content ul ul {
  padding-left: 20px; /* Thụt lề cho mục con */
}

.toc-content li {
  margin-bottom: 8px;
}

.toc-content a {
  text-decoration: none;
  color: #2c3e50;
}

.toc-content a:hover {
  color: #3498db;
}

/* Class quan trọng dùng để JS can thiệp */
.is-hidden {
  display: block !important;
}
/* BREADCRUMB */
.breadcrumb-wrap{
    background-color: #d6d5d5;
}
:root {
    --bg-main: #1B263B;
    --navy-blue: #1c2b4d;
    --navy-light: #415A77;
    --bg-card: rgb(203, 233, 233);
    --text-main: #FFFFC9;
    --text-muted: #FFFDE7;
    --border-color: #cccccc;
    --bg-footer: rgb(51, 51, 51);
    --gray-bg: #f3f4f6; 
}

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    font-family: 'Roboto', sans-serif;
}

.img-fluid {
    max-width: 100%; 
    height: auto; 
}

.text-navy { 
    color: var(--navy-blue) !important; 
}


   /* 2. HEADER & NAVIGATION */
   
#myHeader {
    background-color: var(--bg-main);
    padding-top: 15px; 
    padding-bottom: 15px;
    transition: all 0.4s ease-in-out; 
}

#myHeader .navbar-brand img {
    height: 90px;
    width: auto;
    transition: all 0.4s ease-in-out; 
}

#myHeader .nav-link {
    font-size: 15px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-main) !important; 
    padding: 8px 24px !important;
    margin: 0px 1.4rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

#myHeader .nav-link.active,
#myHeader .nav-link:hover {
    background-color: var(--text-muted);
    color: var(--bg-main) !important;
}


/* Form Input Chung */
.form-control:focus {
    box-shadow: none;
    border-color: var(--text-main);
}
.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.input-icon-wrapper i {
    position: absolute;
    left: 15px;
    color: #6c757d;
    z-index: 2;
}
.custom-input {
    background-color: var(--gray-bg);
    border: none !important;
    border-radius: 8px;
    padding: 12px 15px 12px 45px; 
    font-size: 14px;
    color: #333;
}
.custom-input:focus {
    background-color: #e9ecef;
    box-shadow: none;
    outline: 2px solid rgba(28, 43, 77, 0.2);
}


/* 3. SWIPER & DANH MỤC (CATEGORIES) */
   
.productSwiper {
    --swiper-theme-color: #1B263B;
    --swiper-navigation-size: 1rem;
    --swiper-navigation-color: var(--bg-main);
}

.swiper-button-next,
.swiper-button-prev {
    background-color: #ffffff; 
    width: 40px;
    height: 40px;
    padding: 8px 0px;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.productListSwiper {
    --swiper-theme-color: #1B263B;
    --swiper-navigation-size: 1rem;
    --swiper-navigation-color: var(--bg-main);
    padding: 10px;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    margin: 0;
}
.category-circle {
    width: 100%; 
    max-width: 160px;
    aspect-ratio: 1 / 1;
    background-color: #ffffff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.category-circle img {
    height: auto;
    width: 60%; 
    max-width: 160px;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.category-item:hover .category-circle {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}
.category-item:hover .category-circle img {
    transform: scale(1.03); 
}
.category-title {
    font-size: 1.2rem;
    padding-top: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* 4. THẺ SẢN PHẨM & BÀI VIẾT (CARDS) */
   
.products-list {
    background-color: #F5F5F5;
}
.list-bg {
    padding: 2rem;
}
.list-slide {
    margin: 0;
}

/* Card Sản phẩm dọc */
.card-custom {
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border: 1px solid #cfcaca !important;
    border-radius: 16px; 
    overflow: hidden; 
    transition: all 0.4s ease-in-out; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.03); 
}
.card-custom:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 20px 40px rgba(27, 38, 59, 0.15);
    border-color: var(--bg-main) !important; 
}
.card-img-wrapped {
    flex: 3;
    width: 100%;
    height: 260px; 
    background-color: #fcfcfc; 
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.card-img-wrapped img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    padding: 10px;
    transition: transform 0.5s ease; 
}
.card-custom:hover .card-img-wrapped img {
    transform: scale(1.1);
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

/* Card Bài viết/Combo nằm ngang */
.horizontal-card {
    border-radius: 12px;
    transition: transform 0.3s ease;    
    height: 160px;
    width: 100%;
    background-color: #f8f9fa; 
    overflow: hidden;
    position: relative;
}
.horizontal-card:hover {
    transform: translateY(-3px);
}
.object-fit-cover {
    width: 100%;
    height: 100%;
    object-fit: contain; 
}
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.comboSwiper {
    padding: 10px;
}
.custom-combo-card {
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid #dfdada !important;
}
.custom-combo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}
.combo-img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}
.watermark-logo {
    position: absolute; 
    top: 15px;          
    right: 15px;        
    width: 38px;       
    height: auto;
    opacity: 0.85;      
    z-index: 2;         
}
.watermark-logo-pd {
    position: absolute; 
    bottom: 15px;          
    right: 15px;        
    width: 38px;       
    height: auto;
    opacity: 0.85;      
    z-index: 2;         
}

/* 5. NÚT BẤM CHUNG (BUTTONS) */
.btn-custom-contact {
    display: inline-block;
    text-decoration: none;
    background-color: #ffffff;
    color: var(--bg-main);
    border: 1px solid var(--bg-main);
    border-radius: 50px; 
    padding: 6px 28px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}
.btn-custom-contact:hover {
    background-color: var(--bg-main); 
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(255, 255, 201, 0.4); 
}
.btn-combo-contact {
    background-color: #f1f5f9;
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
    border: none;
    transition: all 0.3s;
}
.btn-combo-contact:hover {
    background-color: #1B263B;
    color: #ffffff;
}
.btn-navy {
    background-color: var(--navy-blue);
    color: #ffffff;
    transition: all 0.3s ease;
}
.btn-navy:hover {
    background-color: #121c33;
    color: #ffffff;
    box-shadow: 0 2px 5px var(--navy-blue);
}
.btn-xem-tat-ca {
    display: inline-flex;
    align-items: center;
    background-color: #1B263B;
    color: #ffffff;
    border-radius: 50px;
    padding: 6px 20px 6px 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-xem-tat-ca .icon-circle {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    color: #1B263B;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px; 
}
.btn-xem-tat-ca:hover {
    color: var(--text-main);
    background-color: #1B263B; 
    transform: translateY(-2px);
}
.btn-xem-tat-ca:hover .icon-circle i {
    transform: translateX(3px);
    transition: transform 0.3s ease;
}
/* BANNER */
.main-banner{
    padding-top: 3rem !important;
}
/* 6. FLOATING WIDGETS & BOTTOM NAV (MOBILE) */
.floating-widget {
    position: fixed;   
    bottom: 30px;      
    right: 30px;      
    display: flex;
    flex-direction: column;
    gap: 2rem;        
    z-index: 9999;    
}
.float-btn {
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease; 
    background-color: #fff;
}
.float-btn:hover {
    transform: scale(1.1);
}
.btn-facebook, .btn-zalo {
    /* background-color: var(--bg-main); */
    padding: 5px;
    border-radius: 50%;
    font-size: 20px;
    border: 2px solid rgba(13, 110, 253, 0.6);
}
.btn-facebook {
    box-shadow: 0 0 0 18px rgba(8, 102, 255, 0.2); 
    animation: pulse-ring 2s infinite; 
}
.btn-zalo {
    box-shadow: 0 0 0 18px rgba(0, 104, 255, 0.2);
    animation: pulse-ring 2s infinite; 
}
.zalo-text {
    font-size: 13px;
    font-weight: bold;
    /* width: 45px;
    height: 45px; */
}

 .btn-scroll-top {
    /* background-color: var(--bg-main); */
    border-radius: 8px;       
    font-size: 20px;
    /* color: var(--text-main); */
    color: #69a3fa;
    border: 2px solid #69a3fa;
    opacity: 0; 
    visibility: hidden;
    transform: translate3d(0, 20px, 0); 
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    transition: all 0.3s ease-in-out;
}

.btn-scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, 0, 0); 
}
@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(0, 104, 255, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(0, 104, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 104, 255, 0); }
}

/* Thanh điều hướng dính đáy (Mobile) */
.bottom-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #ffffff;
    z-index: 1000;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}
.bottom-nav-bar .nav-item {
    font-size: 20px;
    text-decoration: none;
    transition: transform 0.2s;
}

.phone-icon {
    display: inline-block; 
}

.ring-pulse {
    animation: pulse-blue 2s infinite;
}

@keyframes pulse-blue {
    0% { 
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.6); 
    }
    70% { 
        box-shadow: 0 0 0 15px rgba(13, 110, 253, 0); 
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0); 
    }
}

.floating-avatar {
    width: 80px;   
    height: 80px;
    border-radius: 50%; 
    padding: 6px; 
    border: 2px solid rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0px 8px 15px rgba(0, 0, 0, 0.25));
    position: relative;
    top: -20px; 
    z-index: 1050;
}

.floating-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block; 
}
.ring-pulse .phone-icon {
    animation: wiggle 2s infinite ease-in-out;
}

@keyframes wiggle {
    0%, 10% { transform: rotate(0deg); }
    15% { transform: rotate(-15deg); }
    20% { transform: rotate(20deg); }
    25% { transform: rotate(-15deg); }
    30% { transform: rotate(20deg); }
    35% { transform: rotate(-15deg); }
    40%, 100% { transform: rotate(0deg); }
}
   /* 7. FOOTER, BẢN ĐỒ & TIỆN ÍCH DƯỚI */
.footer-texture {
    background-color: #F8F9FA;
    background-image: url('/assets/images/icon/texture.jpg'); 
    background-repeat: repeat; 
    border-top: 1px solid #e0e0e0;
}
.logo-box {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    background-color: var(--bg-main);
}
.footer-text {
    font-size: 14px;
    line-height: 1.6;
}
.footer-contact-list li {
    margin-bottom: 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
}
.social-icon {
    text-decoration: none;
}
.fb-icon {
    padding-top: 5px;
    font-size: 55px;
}
.zalo-icon {
    width: 65px;
    height: 65px;
    display: flex;
    justify-content: center;
}

/* Vạch kẻ cho Tiêu đề Footer */
.footer-title, 
.border-bottom-short {
    position: relative;
    padding-bottom: 12px;
    font-weight: 700;
}
.footer-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 45px;
    border-bottom: 2px dashed #415A77; 
}
.border-bottom-short::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--navy-light);
}

/* Bản đồ Maps */
.map-wrapper {
    width: 100%;
    line-height: 0; 
    overflow: hidden; 
}
.map-wrapper iframe {
    width: 100% !important; 
    height: 450px;          
    border: none;
    display: block;      
}
.copyright-bar {
    background-color: #1B263B; 
}
/* Product-card */
.text-upp{
    text-transform: capitalize;
}
.btn-pd-contact {
    background-color: #f1f5f9;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    transition: all 0.3s;
}
.btn-pd-contact:hover {
    background-color: #1B263B;
    color: #ffffff;
}


.custom-swiper-nav {
    background-color: var(--border-color);
    color: black;
    width: 30px !important;
    height: 40px !important;
    border-radius: 5px;
    z-index: 10;
}
.swiper-button-lock {
    display: flex ;
}

.swiper-button-disabled {
    opacity: 0.3 ;
    cursor: not-allowed;
    pointer-events: none; 
}
.custom-swiper-nav::after {
    font-size: 16px !important;
    font-weight: bold;
}
[data-fancybox="product-gallery"] {
    transition: border-color 0.3s ease;
}
[data-fancybox="product-gallery"]:hover {
    border-color: var(--navy-blue) !important;
}
.price-ct{
    background-color: #F5F5F5;
    align-items: center;
    padding: 10px 0px 10px 10px ;
    border-radius: 10px;
}
.title-pd-rl{
    background-color: #F5F5F5;
    padding: 10px 20px;
    /* margin-bottom: 1rem; */
}
.pd-relative{
    margin: 0;
    color: black;
}
.products-page{
    margin-bottom: 3rem;
}
.pd-si{
    padding: 0;
}
/* MENU PRODUCTS */
/* BƯỚC 2 LOGIC (Tiếp theo): Xử lý tàng hình và chia cột */

/* 1. Hộp chứa menu bị ép phải nằm tuyệt đối ngay dưới chữ Sản phẩm */
.has-mega-menu{
    position: relative;
}
.mega-box {
    position: absolute;
    top: 100%;
    left: 0;
    width: 400px;
    background: #fff;
    padding: 20px;
    
    /* Làm cho nó tàng hình và tụt xuống dưới một chút */
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px); 
    transition: all 0.3s ease-in-out;
    border-radius: 1rem;

}

/* 2. Logic Trigger: Bất cứ khi nào chuột chạm vào class .has-mega-menu, thì .mega-box bên trong sẽ hiện ra */
.has-mega-menu:hover .mega-box {
    opacity: 1;
    visibility: visible;
    /* transform: translateY(0);  */
}

/* 3. Logic chia 2 cột ngang */
.mega-grid {
    display: grid;
    /* repeat(2, 1fr) nghĩa là: Chia không gian làm 2 phần (fraction) bằng nhau */
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px;
    list-style: none;
    padding: 0;

}
.mega-grid a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    /* color: #444; */
    color: black;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}
.mega-grid a:hover {
    background: var(--bg-main); /* Đổi màu xanh khi trỏ chuột */
    color: var(--text-main);
}
.mega-grid a:hover i {
    color: #fff !important; /* Đổi màu icon cho đồng bộ */
}


/* ==========================================================================
   CSS CHO HỘP GỢI Ý TÌM KIẾM (LIVE SEARCH)
   ========================================================================== */

/* 1. Khung chứa danh sách xổ xuống */
.suggestion-box {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 1050;
    margin-top: 5px;
    max-height: 350px;
    overflow-y: auto; /* Nếu dài quá thì hiện thanh cuộn */
    border: 1px solid #ddd;
}

/* 2. Thiết kế từng dòng sản phẩm (Dùng Flexbox để căn chỉnh) */
.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px; /* Khoảng cách giữa ảnh và chữ */
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.2s ease;
}

.suggestion-item:last-child {
    border-bottom: none; /* Dòng cuối cùng không cần kẻ gạch ngang */
}

.suggestion-item:hover {
    background-color: #f0f8ff; /* Đổi màu nền xanh nhạt khi rê chuột */
    color: #0d6efd;
}

/* 3. KHÓA KÍCH THƯỚC ẢNH (Bảo vệ UI không bị vỡ) */
.suggestion-item img {
    width: 45px;
    height: 45px;
    object-fit: cover; /* Tự động cắt cúp ảnh cho vuông vức, không bị méo */
    border-radius: 6px;
    flex-shrink: 0; /* Cực kỳ quan trọng: Ép ảnh luôn giữ đúng 45px, không bị bóp méo khi tên SP dài */
    border: 1px solid #eee;
}

/* 4. Xử lý Tên sản phẩm quá dài */
.suggestion-name {
    font-size: 14px;
    font-weight: 500;
    /* 3 dòng dưới đây dùng để cắt chữ thành dấu "..." nếu tên dài vượt quá 1 dòng */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}
/* DÀNH CHO MÀN HÌNH ĐIỆN THOẠI (DƯỚI 768px) */
@media(max-width: 768px) {
    .productSwiper, 
    .list-bg {
        padding: 0;
    }
    .category-item:hover .category-circle {
        transform: translateY(-4px);
    }
    .category-title {
        font-size: 1rem;
        text-align: center;
    }
    .post-form {
        padding: 15px;
    }
    .zalo-icon {
        display: flex;
        justify-content: center;
    }
    .fb-icon {
        padding-top: 7px;
    }
    .btn-scroll-top.show{
        visibility: hidden;
    }
    #scrollTopBtn{
        visibility: hidden;
    }
    .footer {
        padding: 0;
    }
    .footer-icon {
        gap: 0;
    }
    .map-wrapper iframe {
        height: 300px; 
    }
    #myHeader {
        padding-top: 5px;
        padding-bottom: 5px;
        box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.4); 
    }

    #myHeader .navbar-brand img {
        height: 55px;
    }

    #myHeader .nav-link {
        font-size: 14px;
        padding: 6px 18px !important; 
    }
    .mega-box {
        display: none; /* Mặc định giấu đi */
        width: 100%; /* Ép hộp này phải rớt xuống dòng dưới chữ Sản phẩm */
        position: static; /* Hủy bỏ trạng thái bay nổi của desktop */
        box-shadow: none;
        background-color: #f8f9fa; /* Đổi nền xám nhẹ để phân biệt với menu chính */
        border-radius: 6px;
        padding: 10px;
        margin-top: 5px;
    }
    .mega-box.show-submenu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        z-index: 10000;
    }

    /* ÉP DANH MỤC XẾP THÀNH 1 HÀNG DỌC (Sửa lỗi 2 hàng ngang của bạn) */
    
}

/* DÀNH CHO MÀN HÌNH LAPTOP/PC (TRÊN 992px) */
@media (min-width: 992px) {
    .bottom-nav-bar {
        visibility: hidden;
    }
    #myHeader.scrolled {
        padding-top: 5px;
        padding-bottom: 5px;
        box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.4); 
    }

    #myHeader.scrolled .navbar-brand img {
        height: 55px;
    }

    #myHeader.scrolled .nav-link {
        font-size: 14px;
        padding: 6px 18px !important; 
    }
}

/* DÀNH CHO ĐIỆN THOẠI XOAY NGANG (LANDSCAPE) */
@media (max-height: 500px) and (orientation: landscape) {
    .bottom-nav-bar {
        display: none !important;
    }
    .horizontal-card .col-md-4,
    .horizontal-card .col-md-8 {
        width: 100% !important;
    }
    .custom-card-img {
        height: 150px !important; 
    }
    .logo-box {
        width: auto;
    }
    .img-logo {
        width: 200px;
    }
}


