/* Min-width */
@media (min-width: 576px) {}

@media (min-width: 768px) {

    /* .container,
    .container-sm {
        max-width: 100%;
    } */
}

@media (min-width: 992px) {

    .duan-grid {
        grid-template-columns: repeat(2, 1fr);
        padding-left: 3%;
        padding-right: 3%;
    }

    .home-quytrinh-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 94px 20px;
    width: 100%;    
    margin-left: 0; 
    }
    

    .home-quytrinh-item:nth-of-type(5) { grid-column: 4; grid-row: 2; }
    .home-quytrinh-item:nth-of-type(6) { grid-column: 3; grid-row: 2; }

    @media (hover: hover) {
        .giaiphap-item .image img { min-height: 291px; }

        .giaiphap-item .giaiphap-panel {
            position: absolute;
            right: 0;
            bottom: 0;
            left: 0;
            transform: translateY(calc(100% - 64px));
            transition: transform .45s ease;
        }

        .giaiphap-item:hover .giaiphap-panel { transform: translateY(0); }
        .giaiphap-item:hover .image img { transform: scale(1.06); }
    }
}

@media (hover: hover) {
    .dichvu-card .dichvu-card-btn { opacity: 0; visibility: hidden; }
    .dichvu-card:hover .info::before { opacity: 1; }
    .dichvu-card:hover .name a { color: #fff; }
    .dichvu-card:hover .info > p { color: rgba(255,255,255,.9); }
    .dichvu-card:hover .dichvu-card-btn {
        opacity: 1;
        visibility: visible;
    }
    .dichvu-card:hover .image img { transform: scale(1.06); }
}



@media (min-width: 1200px) {
    .category-lists .col-xl-2 {
        width: 14.28%;
    }

    .category-lists span {
        max-width: 80%;
    }

    /* SECTION 8 — [SPEC OVERRIDE - quy trinh bam figma tuyet doi, 12/08/2026]
       Bản cũ: lưới 4 cột co giãn trong .container -> cụm bước rộng hơn design nhiều và lệch phải so
       với ảnh nền, vì nền scale theo viewport còn nội dung scale theo container (2 hệ scale khác nhau).
       Nay: canvas tuyệt đối. .home-quytrinh-grid phủ đúng khung Figma 1920x719.220703 (absolute nên
       thoát .container, neo thẳng vào .home-quytrinh), mỗi bước đặt bằng toạ độ Figma NGUYÊN BẢN
       nhân var(--qt) -> TÂM ICON rơi đúng điểm design ở MỌI bề rộng màn (đo thực tế: lệch < 0.02px).
       KÍCH CỠ item giữ nguyên bản cũ: ô 170px, icon 78px, chữ như cũ.
       Vì size cố định mà toạ độ co giãn nên đặt left/top = TÂM icon rồi kéo ngược bằng margin âm
       nửa ô (-85px) + nửa icon (-39px) -> tâm luôn khớp bất kể ô to nhỏ.
       Dùng margin âm chứ KHÔNG dùng transform: item có data-aos="fade-up", AOS sẽ ghi đè transform.
       Mốc 1200 (không phải 992) vì dưới ~1232px khoảng cách cột design đã hẹp hơn 170px -> ô đè nhau.
       Tâm icon Figma: x 531.070 / 795.964 / 1060.858 / 1325.753 ; y 51.566 (hàng trên) / 335.458 (dưới). */
    .home-quytrinh-fig .home-quytrinh-grid {
        position: absolute;
        inset: 0;
        display: block;
        gap: 0;
        margin: 0;
    }

    .home-quytrinh-fig .home-quytrinh-item {
        position: absolute;
        width: 170px;
        margin-top: -39px;
        margin-left: -85px;
    }

    .home-quytrinh-fig .home-quytrinh-item:nth-of-type(1) { left: calc(531.070 * var(--qt)); top: calc(51.566 * var(--qt)); }
    .home-quytrinh-fig .home-quytrinh-item:nth-of-type(2) { left: calc(795.964 * var(--qt)); top: calc(51.566 * var(--qt)); }
    .home-quytrinh-fig .home-quytrinh-item:nth-of-type(3) { left: calc(1060.858 * var(--qt)); top: calc(51.566 * var(--qt)); }
    .home-quytrinh-fig .home-quytrinh-item:nth-of-type(4) { left: calc(1325.753 * var(--qt)); top: calc(51.566 * var(--qt)); }
    .home-quytrinh-fig .home-quytrinh-item:nth-of-type(5) { left: calc(1325.753 * var(--qt)); top: calc(335.458 * var(--qt)); }
    .home-quytrinh-fig .home-quytrinh-item:nth-of-type(6) { left: calc(1060.858 * var(--qt)); top: calc(335.458 * var(--qt)); }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1215px;
    }
}


/* Max-width */
@media (max-width: 1299.98px) {
    .header-bottom .header-ul .line {
        margin: 0px 5px;
    }

    .search-wrapper.active {
        width: 200px;
    }
}

@media (max-width: 1199.98px) {
    /* [SPEC OVERRIDE - quy trinh bam figma tuyet doi, 12/08/2026] line + 3 mũi tên nay mang toạ độ
       Figma (viewBox 1920x719.220703) nên chỉ trùng tâm icon khi canvas bật (>=1200px). Dưới mốc đó
       lưới quay về 4 cột co giãn -> line sẽ lệch, phải ẩn. (Trước đây chỉ ẩn dưới 992.)
       Padding: section đã bỏ py-2 py-lg-4 (padding phá tỉ lệ canvas) -> trả lại đúng như cũ cho
       khoang dưới 1200 (py-lg-4 = 1.5rem; khoang max-991.98 hạ tiếp về .5rem cho khớp py-2). */
    .home-quytrinh-line { display: none; }
    .home-quytrinh { padding-top: 1.5rem; padding-bottom: 1.5rem; }

    .menu {
        display: none;
    }

    .menu-bar-res {
        display: flex;
        align-items: center;
    }
}

@media (max-width: 991.98px) {

    /* [SPEC OVERRIDE - header footer figma, 17/07/2026] Header/Footer — tablet trở xuống */
    /* RULE: logo footer khi không lấp đầy chiều ngang -> PHẢI căn giữa, không dồn lệch 1 bên */
    .footer-col-logo { text-align: center; }
    .footer-col-logo .logo { display: inline-block; }
    .footer-col-logo .logo img { margin-left: auto; margin-right: auto; }
    .footer-follow { margin-left: auto; margin-right: auto; }

    .footer-article { padding-top: 108px; padding-bottom:0px;}
    /* .footer-article > .container > .row > [class*="col-"] { margin-bottom: 25px; } */

    /* Header: logo hết đè lên topbar, menu xuống hàng */
    .header-bottom .logo { margin-top: 0; }
    .header-bottom-inner { flex-wrap: wrap; min-height: 0; padding-top: 10px; padding-bottom: 10px; }
    .header-ul { gap: 16px; }
    .header-ul a { font-size: 16px; }
    /* .banner-top { display: none !important; } */
    .gioithieu-head .breadCrumbs { display: none !important; }    
    .header-bottom .logo img { width: 80px !important; height: 70px !important; }

    /* [SPEC OVERRIDE - trang chu figma, 17/07/2026] Trang chủ — tablet trở xuống */
    /* SECTION 7 — mosaic bỏ layout 3 cột, về lưới 2 cột đều nhau */
    .duan-grid {
        grid-template-columns: repeat(2, 1fr);
        padding-left: 15px;
        padding-right: 15px;
    }

    .duan-item img { height: 220px; }

    /* SECTION 8 — zigzag về 2 cột, bỏ ép vị trí bước 5/6 */
    .home-quytrinh-grid { grid-template-columns: repeat(2, 1fr); }
    .home-quytrinh-item .num { right: calc(50% - 60px); }

    /* SECTION 9 — form: giảm padding cho đỡ chật */
    .wrap-form { padding-top: 40px; padding-bottom: 40px; }
    .wrap-form .form-panel { padding: 20px; }


    .menu-wrapper:before {
        display: none;
    }

    .header-nav {
        padding: 5px 0;
    }

    .menu-wrapper {
        width: auto;
    }

    img {
        max-width: 100% !important;
        height: auto !important;
        vertical-align: top;
    }

    .header-top {
        text-align: right;
    }

    .header-top marquee {
        width: calc(100% - 150px);
        margin-right: 0px;
    }

    .slideshow {
        width: 100%;
    }
    .pt-100{padding-top:0px;}
    .footer-title {
        margin-bottom: 0px;
    }

    .visao-item {
        margin: 0px 0px 20px 0px !important;
        max-width: 100%;
    }

    #product-title {
        width: 100%;
        -webkit-line-clamp: 3;
    }

    .left-pro-detail {
        width: 400px;
    }

    .right-pro-detail {
        width: calc(100% - 415px);
        padding: 0px;
    }

    .camket-pro-detail {
        width: 100%;
    }

 
    .about-tabs { gap: 20px; }
    .about-tab { width: 150px; height: 150px; font-size: 15px; }
    .linhvuc-name { font-size: 18px; }

    /* Quy trình: line + mũi tên đã ẩn từ khoang max-1199.98 (bám toạ độ Figma, xem ghi chú ở đó) */
    /* .home-quytrinh-line { display: none; } */
    /* [SPEC OVERRIDE - quy trinh responsive xoa bg-img, 2026-07-21] rule cũ giữ lại để đối chiếu */
    /* .home-quytrinh { background-size: 100% auto; background-position: top center; } */
    /* [SPEC OVERRIDE 12/08/2026] padding về .5rem cho khớp py-2 cũ (py-2 py-lg-4 đã bỏ khỏi section) */
    .home-quytrinh { padding-top: .5rem; padding-bottom: .5rem; background-image: none; aspect-ratio: auto; }
}

@media (max-width: 767.98px) {
    .news-date {display: none;}
    .news-item .image:has(.news-date)+.info .name {padding-left: 0px;}

    /* .header-top-mobile { font-size: 12px; min-height: 0; gap: 2px; }
    .header-top-mobile .header-top-item { font-size: 12px; gap: 4px; color: #fff; }
    .header-top-mobile .header-top-item i { font-size: 12px; } */
    
    .header-top-inner { gap: 10px; padding-top: 8px; padding-bottom: 8px;justify-content: center; }
    .header-top-item { font-size: 13px; }
    .header-top-social img { width: 28px; height: 28px; }

    /* Footer: mọi cột căn giữa cho cân, bullet bỏ lệch */
    .footer-company-name { letter-spacing: 2px; }
    .footer-contact li { justify-content: flex-start; }
    .footer-copyright { font-size: 14px; }

    /* [SPEC OVERRIDE - trang chu figma, 17/07/2026] Trang chủ — mobile */
    /* SECTION 3 — counter: dưới 768 wrapper col-6 tự về 2 cột, chỉ cần bỏ vạch ngăn dọc.
       (Markup 19/07/2026: item bọc trong .col-6.col-md-3 -> vạch nằm ở cấp wrapper) */
    /* rule cũ giữ lại để đối chiếu:
       .home-about .counter-item { flex: 1 1 50%; margin-bottom: 10px; }
       .home-about .counter-item + .counter-item::before { display: none; } */
    .home-about .about-count > div + div::before { display: none; }
    .home-about .about-action { gap: 15px; }
    .home-about .about-image-badge { left: 0; width: 60px; height: 60px; }
    .about-tab::before {content: none;}
    /* SECTION 7 — mosaic về 1 cột */
    .duan-grid { grid-template-columns: 1fr; }
    .duan-tab { flex: 1 1 calc(50% - 8px); padding: 9px 10px; font-size: 14px; }

    /* [SPEC OVERRIDE - quy trinh responsive 2 item 1 hang, 2026-07-21] rule cũ giữ lại để đối chiếu */
    /* .home-quytrinh-grid { grid-template-columns: 1fr; } */
    .home-quytrinh-grid { grid-template-columns: repeat(2, 1fr); }

    /* [SPEC OVERRIDE - gioi thieu figma, 18/07/2026] Giới thiệu — mobile
       Tab: chạy Owl Carousel (init riêng cho .about-tabs, xem <script> cuối about_tpl.php).
       Ẩn vạch nối dọc + đường kẻ (không hợp hàng carousel). */
    .about-tabs { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; justify-items: center; gap: 16px 12px !important; margin-bottom: 25px; max-width: 340px; margin-left: auto; margin-right: auto; }
    .about-tabs .nav-item { display: flex; justify-content: center; width: 100%; }
    .about-tab.active::after { display: none; }
    .about-tabs-line { display: none; }
    .about-tab { width: 115px; height: 115px; font-size: 13px; padding: 8px; }
    .about-tab-content { font-size: 15px; text-align: left; }
    /* Lĩnh vực: bỏ so le, về 1 cột, ảnh trên / chú thích dưới đều canh trái */
    .linhvuc-grid { grid-template-columns: 1fr; gap: 25px; }
    .linhvuc-item--right { flex-direction: column; margin-top: 0; }
    .linhvuc-item--left .linhvuc-cap { text-align: left; }
    .about-value { padding: 15px; gap: 12px; }

    /* [SPEC OVERRIDE - chi tiet dich vu figma, 18/07/2026] Chi tiết — mobile */
    /* [SPEC OVERRIDE - dichvu detail đổi sang gallery slick tái dùng .gallery-pro-detail của product, 20/07/2026] rule gallery cũ giữ lại để đối chiếu */
    /* .dvdt-gallery { flex-direction: column-reverse; gap: 10px; } */
    /* .dvdt-thumbs { flex: 0 0 auto; flex-direction: row; overflow-x: auto; } */
    /* .dvdt-thumb { flex: 0 0 90px; } */
    /* .dvdt-thumb img { height: 78px; } */
    .dvdt-panel { padding: 16px; }
    .dvdt-actions { gap: 12px; }
    .dvdt-sidebar-sticky { position: static; top: auto; }

    /* SECTION 9 — bullet + hotline thu nhỏ */
    .wrap-form .form-benefits li { font-size: 15px; }
    .wrap-form .form-hotline .phone { font-size: 22px; }

    div#header {
        z-index: 1000;
        min-height: 46px;
    }

    .search-wrapper .btn {
        border-radius: 0;
        width: 36px;
    }
    .footer-title-wrap{margin-bottom: 8px;}
    .header-top marquee {
        width: calc(100%);
    }

    .search-wrapper.active {
        width: 100%;
        position: relative;
    }

    .slideshow .slider {
        width: 100%;
    }

    .title-main {
        margin-bottom: 15px;
    }

    .wrap-cauhoi {
        background: none;
    }

    .wrap-cauhoi .accordion {
        max-width: 100%;
    }

    .doitac-item {
        padding: 10px;
    }

    .wrap-newsletter .hotline {
        min-height: 135px;
        padding-left: 120px;
    }

    .wrap-newsletter .hotline span {
        font-size: 20px;
        padding-bottom: 10px;
    }

    .wrap-newsletter .hotline a {
        font-size: 35px;
        line-height: 40px;
    }

    .footer {
        padding-bottom: 50px;
    }

    .footer-ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        margin-bottom:8px;
    }


    .footer-ul li.line {
        display: none;
    }

    .footer-ul li {
        width: 45%;
    }

    .wrap-product-list .slider-products,
    .wrap-product-list .slider-product-thumbs {
        width: 100%;
    }

    .wrap-product-list .slider-product-thumbs {
        margin-bottom: 30px;
    }

    .product-item .image,
    .product-item .info {
        width: 100%;
    }

    .footer-statistic,
    .footer-copyright {
        text-align: center;
    }

    .vanhoa-item {
        max-width: 100%;
    }

    #chuyenkhoaTabs .nav-item {
        width: 49.5%;
        margin-bottom: 3px;
    }

    #chuyenkhoaTabs .nav-link {
        font-size: 14px;
        width: 100%;
    }

    #chuyenkhoaTabs .nav-link img {
        width: 20px;
    }

    .giatri-item .info {
        min-height: auto;
    }

    .news-item .name {
        min-height: auto;
    }

    .news-item .line {
        margin-top: 0px;
    }

    .wrap-history {
        background: #f8f8f8;
    }

    .wrap-history .slider-nav,
    .wrap-history .slider-for {
        width: 100%;
    }

    /* .year-item.slick-current span {
        padding-left: 20px;
    } */

    /* .year-item.slick-current::before {
        right: auto;
        left: 0px;
    } */

    .attr-pro-detail,
    .camket-pro-detail {
        width: 100%;
    }

    .left-pro-detail {
        margin: 0px auto;
    }

    .left-pro-detail {
        width: 100%;
    }

    .right-pro-detail {
        width: 100%;
        ;
    }

    .menu-wrapper .menu-toggle {
        width: 54px;
    }

    .menu-header {
        padding: 10px;
    }

    .menu-header .btn-close-menu {
        border: 1px solid #e0e0e0;
        color: #333;
        line-height: 21px;
        padding: 7px 5px 7px 0;
        position: relative;
        text-align: right;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background-color: #6e6e6e;
    }

    .menu-header .btn-close-menu::before,
    .menu-header .btn-close-menu::after {
        content: "";
        position: absolute;
        width: 1px;
        top: 4px;
        left: 8px;
        background-color: #fff;
        height: 8px;
    }

    .menu-header .btn-close-menu::before {
        transform: rotate(45deg);
    }

    .menu-header .btn-close-menu::after {
        transform: rotate(-45deg);
    }

    .menu-dropdown {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        left: auto;
        width: 100vw;
        /* toàn bộ chiều ngang */
        height: 100vh;
        max-height: 100vh;
        overflow-y: auto;
        border: none;
        border-radius: 0px;
        padding: 0px;
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3);
        transition: right 0.3s ease;
    }

    .menu-dropdown.open {
        display: block !important;
        right: 0;
        z-index: 1002;
    }

    .menu-left {
        width: 100px;
        /* height: calc(100vh - 49px); */
        border-right: 0px;
    }

    .menu-right {
        padding: 10px;
        background: #fff;
    }

    .menu-panel .category-item {
        width: calc(100% / 3);
        padding: 0px;
    }

    #thuong-hieu .category-item {
        width: calc(100% / 3 - 6px);
        padding: 0px;
    }

    .search-wrapper {
        height: 36px;
        border-radius: 5px;
    }
}

@media (max-width: 575.98px) {

    /* Ảnh nhỏ chồng lớp section Giới thiệu trang chủ — thu offset để không tràn màn hẹp */
    .home-about .about-image-sub { right: 0; bottom: -40px; width: 65%; }
    .home-about .about-image:has(.about-image-sub) { margin-bottom: 40px; }

    /* [SPEC OVERRIDE - gioi thieu figma, 17/07/2026] Giới thiệu — mobile nhỏ */
    .about-tabs { max-width: 300px; gap: 14px 10px !important; }
    .about-tab { width: 105px; height: 105px; padding: 6px; font-size: 12px; }
    .about-value { flex-direction: column; align-items: center; text-align: center; }

    .menu-left li {
        padding: 7px 5px;
    }

    .gird-images {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 238px);
        grid-gap: 5px 5px;
    }

    .box-images:nth-child(1) {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
    }

    .gradient-title {
        width: 300PX;
    }

    .cart .text-start {
        display: NONE;
    }

    .wrap-uudai {
        padding-top: 1rem;
        transform: translateY(0);
    }

    .wrap-counter .num {
        display: none
    }

    .banner h2 {
        font-size: 20px;
    }

    .btn-submain {
        font-size: 14px;
    }

    header#header.fixed {
        position: relative;
    }

    .title-main h2 {
        font-size: 22px;
    }

    .title-main::before {
        font-size: 5rem;
        line-height: 65px;
    }

    .wrap-diadiem-hot .service-list h2.name {
        font-size: 16px;
    }

    .wrap-counter .num {
        font-size: 4.5rem;
    }

    .wrap-counter .counter {
        font-size: 2.5rem;
    }

    .wrap-service-list .service-list .name {
        font-size: 17px;
    }

    .wrap-service-list .service-list .info h3 {
        font-size: 16px;
    }

    .wrap-service-list .service-list .info .line {
        margin: 5px auto;
    }

    .news-item .name a {
        height: 40px;
    }

    .news-item .desc {
        font-size: 13px;
    }

    .service-item .name {
        font-size: 18px;
    }

    .service-item .desc {
        font-size: 14px;
    }

    .item_history .name {
        font-size: 1.5rem;
    }

    .item_year {
        font-size: 17px;
    }

    #frm-newsletter {
        padding: 0px;
    }

    .notify-popup {
        bottom: 85px;
    }

    .news-item.list .image {
        width: 120px;
    }

    .news-item.list .info {
        width: calc(100% - 120px);
        padding: 0px 10px;
    }

    .title-main h2,
    .title-main h3,
    .title-main h4 {
        white-space: normal !important;
    }

    .choose-list button {
        font-size: 16px;
        margin-bottom: 5px;
        padding: 7px 15px 4px;
    }

    .left-pro-detail {
        width: 100%;
    }

    .khachhang-item {
        width: 300px;
    }

    .accordion-button {
        font-size: 16px;
    }

    .footer-payments {
        text-align: center;
    }

    .item_history .desc {
        margin-bottom: 0px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
        -webkit-box-orient: vertical;
        display: -webkit-box;
        -webkit-line-clamp: 3;
    }

    .category-item {
        padding: 5px;
        width: calc(100% / 3);
    }

    .wrap-brand .brand-item,
    .wrap-doitac .brand-item {
        width: calc(100% / 3 - .5rem);
    }

    .filter-brand .filter-dropdown-item {
        width: calc(100% / 3 - .5rem);
    }

    .cart-fixed {
        bottom: 100px;
    }

    .wrap-about .about-img {
        position: relative;
        text-align: left;
        padding-bottom: 20%;
    }

    .wrap-about .about-img img:nth-child(2) {
        margin-left: 0px;
        margin-top: 0px;
        position: absolute;
        right: 0px;
        top: 15%;
    }

    /* [SPEC OVERRIDE - gallery thumbs dọc bên trái theo Figma 2051:586 + Tihina, 20/07/2026] rule mobile cũ (thumbs ngang) giữ lại để đối chiếu */
    /* .gallery-pro-detail .gallery-pro-detail-left { width: 100%; margin: 0px; order: -1; } */
    /* .gallery-pro-detail .slider-product-thumbs { width: calc(100% - 85px); } */
    /* .gallery-pro-detail .slider-products { width: 100%; } */
    .gallery-pro-detail .gallery-pro-detail-left {
        width: 90px;
    }
}

@media (max-width: 380.98px) {
    .product-video {
        width: 60px;
        height: 60px;
    }
}