header.header {
    position: relative;
    border-bottom: 1px solid #e2e6f2;
}
header.header .header-topbar {
    height: 46px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 99;
    background: #fff;
    color: var(--maincolor);
}
header.header .header-topbar:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 1px;
    width: 100%;
    background: var(--maincolor);
    opacity: 0.2;
}

header.header .header-topbar a {
    color: var(--maincolor);
}
header.header .header-topbar a:hover {
    opacity: 0.7;
}
header.header .header-topbar svg {
    margin-right: 4px;
}
header.header .header-topbar .col-right {
    text-align: right;
}
header.header .header-topbar .col-right .hotline-header {
    margin-right: 25px;
}
header.header .header-middle {
    padding: 24px 0;
    position: relative;
    background: #fff;
    z-index: 99;
}
header.header .header-middle:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 1px;
    width: 100%;
    background: var(--maincolor);
    opacity: 0.2;
}
header.header .header-middle .header-category {
    position: relative;
}
header.header .header-middle .header-category .title {
    border-radius: 56px;
    border: 1px solid var(--maincolor);
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 125px;
    color: var(--maincolor);
    cursor: pointer;
}
header.header .header-middle .header-category .title svg {
    margin-right: 8px;
    position: relative;
    top: 1px;
    height: 13px;
}
header.header .header-middle .header-category .title:hover {
    background: var(--maincolor);
    color: #fff;
}
header.header .header-middle .header-category .title:hover path {
    stroke: #fff;
}
header.header .header-middle .header-account {
    position: relative;
}
header.header .header-middle .header-account svg {
    position: relative;
}
header.header .header-middle .header-account > a span {
    display: block;
}
header.header .header-middle .header-account .drop-account {
    width: 170px;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    text-align: center;
    z-index: 999;
    -webkit-box-shadow: 0px 2px 6px 0px rgba(50, 50, 50, 0.33);
    -moz-box-shadow: 0px 2px 6px 0px rgba(50, 50, 50, 0.33);
    box-shadow: 0px 2px 6px 0px rgba(50, 50, 50, 0.33);
    transition-duration: 0s;
    transition-delay: 0.1s;
    opacity: 0;
    visibility: hidden;
}
header.header .header-middle .header-account .drop-account a {
    display: block;
    text-decoration: none;
    line-height: 30px;
    padding: 0 5px;
    border-bottom: solid 1px #ebebeb;
}
header.header .header-middle .header-account .drop-account a:last-child {
    border-bottom: none;
}
@media (min-width: 991px) {
    header.header .header-middle .header-account:hover .drop-account {
        opacity: 1;
        visibility: visible;
    }
}
header.header .header-middle .header-cart a {
    position: relative;
}
/* =================================================================== */
/* == FIX LỆCH SỐ LƯỢNG GIỎ HÀNG & YÊU THÍCH (PHIÊN BẢN HOÀN CHỈNH) == */
/* =================================================================== */

/* 1. Thiết lập thẻ cha làm gốc định vị */
header.header .header-middle .header-wishlist,
header.header .header-middle .header-cart {
    position: relative !important;
}

/* 2. Style chung cho cả hai bộ đếm */
header.header .header-middle .count_item-wish,
header.header .header-middle .count_item_pr {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--maincolor);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    border: 1px solid #fff;
    /* Reset các thuộc tính có thể gây lỗi */
    transform: none;
    margin: 0;
}

/* 3. Định vị cho giao diện DESKTOP (trên 991px) */
header.header .header-middle .count_item-wish,
header.header .header-middle .count_item_pr {
    top: -8px;
    right: 0px; 
}

/* 4. Style riêng cho Header Style 2 (nền màu) */
header.header.header-style-2 .header-middle .count_item-wish,
header.header.header-style-2 .header-middle .count_item_pr {
    background: #fff;
    color: var(--maincolor);
    border-color: var(--maincolor);
}
 header.header.header-style-2 .header-middle .count_item-wish,
 header.header.header-style-2 .header-middle .count_item_pr {
     border-color: #fff;
 }


/* 5. Media Query cho giao diện MOBILE (dưới 991px) */
@media (max-width: 991px) {
    header.header .header-middle .count_item-wish,
    header.header .header-middle .count_item_pr {
        top: -5px;
        right: 50%; /* Đẩy lề phải của số đếm vào giữa thẻ cha */
        margin-right: -18px; /* Dịch sang phải một nửa chiều rộng của icon + một chút đệm */
        /* Hủy các thuộc tính không cần thiết khác */
        left: auto;
        transform: none;
    }
}

header.header .header-middle .col-right {
    align-items: center;
    display: flex;
    justify-content: end;
}
header.header .header-middle .col-right > div {
    margin-left: 25px;
}
header.header .header-middle .col-right > div svg {
    height: 20px;
    margin: auto;
    display: block;
    margin-bottom: 5px;
}
header.header.header-style-2 .header-topbar {
    color: #fff;
    background: var(--maincolor);
}
header.header.header-style-2 .header-topbar:after {
    background: #fff;
}
header.header.header-style-2 .header-topbar svg path {
    stroke: #fff;
}
header.header.header-style-2 .header-topbar a {
    color: #fff;
}
header.header.header-style-2 .header-middle {
    background: var(--maincolor);
}
header.header.header-style-2 .header-middle .col-right > div svg path {
    fill: #fff;
}
header.header.header-style-2 .header-middle .col-right > div > a {
    color: #fff;
}
header.header.header-style-2 .header-middle .col-right > div > a:hover {
    opacity: 0.7;
}
header.header.header-style-2 .header-middle .header-category .title {
    border: 1px solid #fff;
    color: #fff;
}
header.header.header-style-2 .header-middle .header-category .title svg path {
    stroke: #fff;
}
header.header.header-style-2 .header-middle .header-category .title:hover {
    color: var(--maincolor);
    background: #fff;
}
header.header.header-style-2 .header-middle .header-category .title:hover svg path {
    stroke: var(--maincolor);
}
header.header.header-style-2 .header-middle .header-cart .count_item.count_item_pr {
    background: #fff;
    color: var(--maincolor);
}
@media (max-width: 991px) {
    .header-nav li>ul {
        display: none;
    }
	.header-nav li.current>ul {
        display: block;
    }
}
@media (min-width: 991px) {
    header.header .nd-categories {
        position: absolute;
        top: 100%;
        width: 100%;
        left: 0;
        z-index: 9;
        visibility: hidden;
        opacity: 0;
        transition-property: opacity, visibility;
        transition-duration: 0.4s;
        transition-delay: 0.2;
        transition-timing-function: ease;
    }
    header.header .nd-categories.show {
        visibility: visible;
        opacity: 1;
    }
    header.header .nd-categories .inner {
        background: #edf0f3;
        position: relative;
        z-index: 99;
    }
    header.header .nd-categories .backdrop-nd-categories {
        background-color: #363636;
        position: fixed;
        width: 100%;
        height: 100%;
        top: 0 !important;
        left: 0 !important;
        opacity: 0.5;
    }
    header.header .nd-categories .nav-cate {
        background: #fff;
        width: 300px;
        position: relative;
        z-index: 9;
    }
}
@media (min-width: 991px) and (max-width: 1199px) and (min-width: 991px) {
    header.header .nd-categories .nav-cate {
        width: 220px;
    }
}
@media (min-width: 991px) {
    header.header .nd-categories .nav-cate ul {
        width: 100%;
        overflow: visible;
        border-top: none;
    }
    header.header .nd-categories .nav-cate ul li {
        display: block;
        overflow: visible;
        cursor: pointer;
    }
    header.header .nd-categories .nav-cate ul li .nd-categories-a {
        position: relative;
        display: block;
        color: #000;
        padding: 9px 15px 9px;
        border-bottom: 1px dotted #e1e1e1;
        margin: 0;
        font-size: 14px;
    }
    header.header .nd-categories .nav-cate ul li .nd-categories-a label {
        margin-bottom: 0;
    }
    header.header .nd-categories .nav-cate ul li .nd-categories-a span {
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
    }
    header.header .nd-categories .nav-cate ul li .nd-categories-a svg {
        width: 10px;
        height: 10px;
        position: absolute;
        top: 15px;
        right: 10px;
    }
    header.header .nd-categories .nav-cate ul li .nd-categories-a svg path,
    header.header .nd-categories .nav-cate ul li .nd-categories-a svg rect {
        fill: #000;
    }
    header.header .nd-categories .nav-cate ul li .nd-categories-a:hover,
    header.header .nd-categories .nav-cate ul li .nd-categories-a:focus {
        color: var(--maincolor);
    }
    header.header .nd-categories .nav-cate ul li .nd-categories-a:hover svg path,
    header.header .nd-categories .nav-cate ul li .nd-categories-a:focus svg path {
        fill: var(--maincolor);
    }
    header.header .nd-categories .nav-cate ul li .icon-down {
        position: absolute;
        right: 0;
        top: 0;
        height: 40px;
        display: flex;
        align-items: center;
        width: 30px;
        justify-content: center;
    }
    header.header .nd-categories .nav-cate ul li .icon-down svg {
        width: 10px;
        height: 10px;
    }
    header.header .nd-categories .nav-cate ul li .icon-down svg path,
    header.header .nd-categories .nav-cate ul li .icon-down svg rect {
        fill: #000;
    }
    header.header .nd-categories .nav-cate ul li:last-child .nd-categories-a {
        border-bottom: none;
    }
    header.header .nd-categories .nav-cate ul li.dropdown {
        position: relative;
    }
    header.header .nd-categories .nav-cate ul li.dropdown.active {
        position: static;
    }
    header.header .nd-categories .nav-cate ul li.dropdown.active .nd-categories-a {
        color: #fff;
        background: var(--maincolor);
    }
    header.header .nd-categories .nav-cate ul li.dropdown.active .nd-categories-a svg path {
        fill: #fff;
    }
    header.header .nd-categories .nav-cate ul li.dropdown .nd-categories-a {
        padding-right: 30px;
    }
    header.header .nd-categories .nav-cate ul li.dropdown.active .subcate {
        display: block;
    }
    header.header .nd-categories .nav-cate ul li .subcate {
        display: none;
        cursor: default;
        position: absolute;
        top: 0;
        left: 100%;
        padding: 15px;
        width: 910px;
        background: #edf0f3;
    }
}
@media (min-width: 991px) and (max-width: 1199px) and (min-width: 991px) {
    header.header .nd-categories .nav-cate ul li .subcate {
        width: 720px;
    }
}
@media (min-width: 991px) {
    header.header .nd-categories .nav-cate ul li .subcate .margin {
        margin-right: -5px;
        margin-left: -5px;
    }
    header.header .nd-categories .nav-cate ul li .subcate .item {
        padding: 0 5px;
        margin-bottom: 10px;
    }
    header.header .nd-categories .nav-cate ul li .subcate .item .inner-aside {
        background: #fff;
        padding: 10px;
        border-radius: 10px;
        height: 100%;
    }
    header.header .nd-categories .nav-cate ul li .subcate .item .nd-categories-main-sub {
        display: flex;
        align-items: center;
        font-weight: 500;
    }
    header.header .nd-categories .nav-cate ul li .subcate .item .nd-categories-main-sub .icon {
        width: 30px;
        text-align: center;
    }
    header.header .nd-categories .nav-cate ul li .subcate .item .nd-categories-main-sub .icon img {
        height: 30px;
        object-fit: scale-down;
    }
    header.header .nd-categories .nav-cate ul li .subcate .item .nd-categories-main-sub .title {
        width: calc(100% - 30px);
        padding-left: 10px;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
    }
    header.header .nd-categories .nav-cate ul li .subcate .item .nd-categories-main-sub:hover,
    header.header .nd-categories .nav-cate ul li .subcate .item .nd-categories-main-sub:focus {
        color: var(--maincolor);
    }
    header.header .nd-categories .nav-cate ul li .subcate .item .list-nd-categories-main-sub {
        margin-top: 5px;
    }
    header.header .nd-categories .nav-cate ul li .subcate .item .list-nd-categories-main-sub .nd-categories-main-sub-a {
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
    }
    header.header .nd-categories .nav-cate ul li .subcate .item .list-nd-categories-main-sub .nd-categories-main-sub-a:hover,
    header.header .nd-categories .nav-cate ul li .subcate .item .list-nd-categories-main-sub .nd-categories-main-sub-a:focus {
        color: var(--maincolor);
    }
    header.header .nd-categories .nav-cate ul li .subcate .item .list-nd-categories-main-sub .view-all {
        position: relative;
        display: block;
        color: var(--maincolor);
        margin-top: 5px;
    }
    header.header .nd-categories .nav-cate ul li .subcate .item .list-nd-categories-main-sub .view-all:hover {
        color: #231f20;
    }
    header.header .nd-categories .nav-cate ul li .subcate .item .list-nd-categories-main-sub .view-all svg {
        width: 10px;
        height: 10px;
        position: relative;
        top: -1px;
    }
}
@media (min-width: 992px) {
    header.header.mainmenu-other .nav-cate {
        display: none;
    }
    header.header.mainmenu-other.index .nav-cate {
        display: block;
    }
    header.header.mainmenu-other:hover .nav-cate {
        display: block;
    }
}
.header-menu {
    position: relative;
    z-index: 9;
    background: #fff;
}
.header-menu.current {
    z-index: 99;
}
.header-menu.index {
    box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.06);
    margin-bottom: 0px;
}
.header-menu .header-menu-scroll {
    display: flex;
    align-items: center;
}
@media (min-width: 991px) {
    .header-menu .header-menu-scroll .header-nav .item_big {
        white-space: nowrap;
        display: inline-block;
    }
}
.header-menu .header-menu-scroll .control-menu {
    display: none;
    text-align: right;
}
.header-menu .header-menu-scroll .control-menu.active {
    display: block;
}
.header-menu .header-menu-scroll .control-menu #prev svg,
.header-menu .header-menu-scroll .control-menu #next svg {
    width: 12px;
    height: 12px;
    margin-top: -5px;
}
.header-menu .header-menu-scroll .control-menu #prev svg path,
.header-menu .header-menu-scroll .control-menu #next svg path {
    fill: #2b2f33;
}
.header-menu .header-menu-scroll .control-menu #prev:hover svg path,
.header-menu .header-menu-scroll .control-menu #next:hover svg path {
    fill: var(--maincolor);
}
@media (min-width: 1199px) {
    .header-menu .header-menu-scroll .header-nav {
        width: 1175px;
        margin-right: 15px;
    }
    .header-menu .header-menu-scroll .control-menu {
        width: calc(100% - 1175px);
    }
}
@media (max-width: 1199px) and (min-width: 991px) {
    .header-menu .header-menu-scroll .header-nav {
        width: 900px;
    }
    .header-menu .header-menu-scroll .control-menu {
        width: calc(100% - 890px);
    }
}
.header-menu .logo {
    height: 100%;
    align-items: center;
    display: flex;
}
.header-menu .inner {
    background: var(--maincolor);
    padding: 0 0 0 20px;
}
.popup-search {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    display: none;
}
.popup-search.active {
    display: flex;
}
.popup-search .search-header {
    max-width: 500px;
    margin: auto;
}
.search-smart .header-search-form {
    position: relative;
}
.search-smart .header-search-form input {
    width: 100%;
    height: 52px;
    border: 1px solid var(--maincolor);
    border-radius: 52px;
    padding-right: 80px;
    padding-left: 20px;
    color: #99a2bc;
}
.search-smart .header-search-form input::placeholder {
    color: #99a2bc;
    font-size: 14px;
}
.search-smart .header-search-form button {
    position: absolute;
    right: 8px;
    top: 8px;
    width: 40px;
    height: 36px;
    border: 0;
    border-radius: 58px;
    background: var(--maincolor);
}
.search-smart .header-search-form button svg {
    width: 17px;
    height: 17px;
    position: absolute;
    right: 12px;
    top: 10px;
}
.search-smart .header-search-form button svg path {
    fill: #fff;
}
.search-smart .header-search-form button:hover {
    opacity: 0.7;
}
.search-suggest {
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    z-index: 99999;
    background: #fff;
    border: solid 1px #dfe3e8;
    display: none;
    position: absolute;
    top: 115%;
    border-radius: 8px;
}
.search-suggest .inner {
    max-height: 550px;
    overflow-y: auto;
    padding: 0 10px 10px 0;
}
@media (max-width: 767px) {
    .search-suggest .inner {
        max-height: 430px;
    }
}
.search-suggest .inner::-webkit-scrollbar-thumb {
    background-color: var(--maincolor);
    outline: 1px solid var(--maincolor);
}
.search-suggest .inner::-webkit-scrollbar {
    width: 3px;
}
.search-suggest.open {
    display: block;
    z-index: 99999;
    padding: 10px;
}
.search-suggest.open .title {
    display: inline-block;
    color: #000;
}
.list-search-style {
    text-align: center;
    margin-bottom: 10px;
}
.list-search-style .title-search {
    text-align: left;
}
.list-search-style .title-search span {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}
.list-search-style .title-search span:before {
    background: var(--maincolor);
    content: "";
    right: 0;
    left: 0;
    position: absolute;
    bottom: -5px;
    height: 3px;
    display: block;
    z-index: 1;
    width: 40%;
}
.list-search-style .see-more {
    color: #fff;
    padding: 8px 30px;
    display: inline-block;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    margin-top: 15px;
    background: var(--maincolor);
}
.list-search-style .see-more:hover {
    background: #000;
}
.list-search-style .product-smart,
.list-search-style .art-smart {
    display: inline-block;
    padding: 0px 0px 8px;
    border-bottom: 1px solid #ededed;
    background: #fff;
    position: relative;
    width: 100%;
    text-align: left;
}
.list-search-style .product-smart:first-child,
.list-search-style .art-smart:first-child {
    margin-top: 5px;
}
.list-search-style .product-smart:last-child,
.list-search-style .art-smart:last-child {
    border-bottom: none;
}
.list-search-style .product-smart .image_thumb,
.list-search-style .art-smart .image_thumb {
    display: inline-block;
    float: left;
    width: 100%;
    width: 60px;
    text-align: center;
}
.list-search-style .product-smart .image_thumb img,
.list-search-style .art-smart .image_thumb img {
    object-fit: scale-down;
}
.list-search-style .product-smart .product-info,
.list-search-style .art-smart .product-info {
    display: block;
    float: left;
    width: calc(100% - 60px);
    -o-width: calc(100% - 60px);
    -moz-width: calc(100% - 60px);
    -webkit-width: calc(100% - 60px);
    padding-left: 10px;
}
.list-search-style .product-smart .product-info,
.list-search-style .art-smart .product-info {
    margin: 5px 0 5px;
    position: relative;
}
.list-search-style .product-smart .product-info h3,
.list-search-style .art-smart .product-info h3 {
    padding: 0;
    text-overflow: ellipsis;
    color: #000;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    margin: 0 0 3px;
    padding-bottom: 3px;
    text-transform: capitalize;
}
@media (max-width: 1199px) {
    .list-search-style .product-smart .product-info h3,
    .list-search-style .art-smart .product-info h3 {
        font-size: 14px;
    }
}
.list-search-style .product-smart .product-info h3:hover,
.list-search-style .art-smart .product-info h3:hover {
    color: var(--maincolor);
}
.list-search-style .product-smart .product-info h3 a,
.list-search-style .art-smart .product-info h3 a {
    color: #000;
}
.list-search-style .product-smart .product-info h3 a:hover,
.list-search-style .art-smart .product-info h3 a:hover {
    color: var(--maincolor);
}
.list-search-style .product-smart .product-info .price-box,
.list-search-style .art-smart .product-info .price-box {
    color: red;
    line-height: 23px;
    display: block;
    font-size: 14px;
    font-weight: 500;
}
.list-search-style .product-smart .product-info .price-box .price,
.list-search-style .art-smart .product-info .price-box .price {
    padding-right: 5px;
}
.list-search-style .product-smart .product-info .price-box .compare-price,
.list-search-style .art-smart .product-info .price-box .compare-price {
    text-decoration: line-through;
    font-size: 12px;
    color: #969696;
    line-height: 24px;
    font-weight: 300;
}
@media (min-width: 991px) {
    .header-nav {
        flex: 1;
        display: block;
        overflow-x: visible;
        overflow: -moz-scrollbars-none;
        -ms-overflow-style: none;
    }
    .header-nav > ul.item_big > li.nav-item {
        display: inline-block;
        position: static;
        margin-right: 15px;
    }
    .header-nav > ul.item_big > li.nav-item.has-mega {
        position: static;
    }
	.header-nav > ul.item_big > li.nav-item.has-dropdown {
        position: static;
    }
    .header-nav > ul.item_big > li.nav-item.has-mega .mega-content {
        background: #fff;
        overflow: hidden;
        display: block;
        max-height: 0px;
        max-width: 0px;
        opacity: 0;
        -webkit-transform: perspective(600px) rotateX(-90deg);
        -moz-transform: perspective(600px) rotateX(-90deg);
        -ms-transform: perspective(600px) rotateX(-90deg);
        -o-transform: perspective(600px) rotateX(-90deg);
        transform: perspective(600px) rotateX(-90deg);
        -webkit-transition: -webkit-transform 0.5s ease, opacity 0.6s ease, max-height 0.6s step-end, max-width 0.6s step-end, padding 0.6s step-end;
        -o-transition: -o-transform 0.5s ease, opacity 0.6s ease, max-height 0.6s step-end, max-width 0.6s step-end, padding 0.6s step-end;
        transition: transform 0.5s ease, opacity 0.6s ease, max-height 0.6s step-end, max-width 0.6s step-end, padding 0.6s step-end;
        box-shadow: 0px 4px 20px rgba(183, 221, 228, 0.47);
        -webkit-transform-origin: 0% 0%;
        -moz-transform-origin: 0% 0%;
        -ms-transform-origin: 0% 0%;
        -o-transform-origin: 0% 0%;
        transform-origin: 0% 0%;
        margin: 0;
        padding: 15px 15px 0;
        position: absolute;
        top: 100%;
        z-index: 9999;
        width: 100%;
        border: none;
        text-align: left;
    }
    .header-nav > ul.item_big > li.nav-item.has-mega .mega-content .level1.item > a:hover,
    .header-nav > ul.item_big > li.nav-item.has-mega .mega-content .level1.item > a:focus {
        text-decoration: none;
    }
    .header-nav > ul.item_big > li.nav-item.has-mega .mega-content .level1.item .h-mega {
        font-size: 15px;
        margin-top: 0;
        margin-bottom: 5px;
        white-space: break-spaces;
        display: block;
        font-weight: 600;
    }
    .header-nav > ul.item_big > li.nav-item.has-mega .mega-content .level1.item ul.level1 {
        margin-bottom: 30px;
    }
    .header-nav > ul.item_big > li.nav-item.has-mega .mega-content .level1.item ul.level1 li a {
        white-space: normal;
    }
    .header-nav > ul.item_big > li.nav-item.has-mega .mega-content .row .level1 {
        margin-bottom: 10px;
    }
}
@media (min-width: 991px) and (min-width: 991px) {
    .header-nav > ul.item_big > li.nav-item.has-mega .mega-content .row .level1:nth-child(4n + 1) {
        clear: left;
    }
}
@media (min-width: 991px) {
    .header-nav > ul.item_big > li.nav-item.has-mega:hover > .mega-content {
        overflow: visible;
        max-height: 800px;
        max-width: 845px;
        opacity: 1;
        -webkit-transform: perspective(600px) rotateX(0deg);
        -moz-transform: perspective(600px) rotateX(0deg);
        -ms-transform: perspective(600px) rotateX(0deg);
        -o-transform: perspective(600px) rotateX(0deg);
        transform: perspective(600px) rotateX(0deg);
        -webkit-transition: -webkit-transform 0.5s ease, opacity 0.2s ease, max-height 0s step-end, max-width 0s step-end, padding 0s step-end;
        -o-transition: -o-transform 0.5s ease, opacity 0.2s ease, max-height 0s step-end, max-width 0s step-end, padding 0s step-end;
        transition: transform 0.5s ease, opacity 0.2s ease, max-height 0s step-end, max-width 0s step-end, padding 0s step-end;
    }
    .header-nav > ul.item_big > li.nav-item > a {
        display: block;
        text-align: left;
        font-size: 16px;
        position: relative;
        color: #2b2f33;
        padding: 15px 0;
    }
    .header-nav > ul.item_big > li.nav-item > a.caret-down:after {
        content: "";
        position: relative;
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 5px 5px 0 5px;
        border-color: #2b2f33 transparent transparent transparent;
        display: inline-block;
        top: -2px;
        margin-left: 2px;
        margin-top: -6px;
        transition: 0.5s;
    }
    .header-nav > ul.item_big > li.nav-item:hover > a {
        color: var(--maincolor);
    }
    .header-nav > ul.item_big > li.nav-item:hover > a.caret-down:after {
        transform: rotate(180deg);
        border-color: var(--maincolor) transparent transparent transparent;
    }
    .header-nav > ul.item_big > li.nav-item:hover > ul {
        overflow: visible;
        max-height: 3000px;
        max-width: 3000px;
        opacity: 1;
        -webkit-transform: perspective(600px) rotateX(0deg);
        -moz-transform: perspective(600px) rotateX(0deg);
        -ms-transform: perspective(600px) rotateX(0deg);
        -o-transform: perspective(600px) rotateX(0deg);
        transform: perspective(600px) rotateX(0deg);
        -webkit-transition: -webkit-transform 0.5s ease, opacity 0.2s ease, max-height 0s step-end, max-width 0s step-end, padding 0s step-end;
        -o-transition: -o-transform 0.5s ease, opacity 0.2s ease, max-height 0s step-end, max-width 0s step-end, padding 0s step-end;
        transition: transform 0.5s ease, opacity 0.2s ease, max-height 0s step-end, max-width 0s step-end, padding 0s step-end;
    }
    .header-nav > ul.item_big > li.nav-item .fa-caret-down {
        visibility: hidden;
        display: none;
    }
    .header-nav > ul.item_big > li.nav-item .item_small {
        overflow: hidden;
        display: block;
        max-height: 0px;
        max-width: 0px;
        opacity: 0;
        -webkit-transform: perspective(600px) rotateX(-90deg);
        -moz-transform: perspective(600px) rotateX(-90deg);
        -ms-transform: perspective(600px) rotateX(-90deg);
        -o-transform: perspective(600px) rotateX(-90deg);
        transform: perspective(600px) rotateX(-90deg);
        -webkit-transition: -webkit-transform 0.5s ease, opacity 0.6s ease, max-height 0.6s step-end, max-width 0.6s step-end, padding 0.6s step-end;
        -o-transition: -o-transform 0.5s ease, opacity 0.6s ease, max-height 0.6s step-end, max-width 0.6s step-end, padding 0.6s step-end;
        transition: transform 0.5s ease, opacity 0.6s ease, max-height 0.6s step-end, max-width 0.6s step-end, padding 0.6s step-end;
        position: absolute;
        top: 100%;
        left: auto;
        width: 220px;
        padding: 0;
        background-color: #fff;
        box-shadow: 0px 4px 20px rgba(183, 221, 228, 0.47);
        -webkit-transform-origin: 0% 0%;
        -moz-transform-origin: 0% 0%;
        -ms-transform-origin: 0% 0%;
        -o-transform-origin: 0% 0%;
        transform-origin: 0% 0%;
        z-index: 99;
    }
    .header-nav > ul.item_big > li.nav-item .item_small:before {
        content: "";
        position: absolute;
        top: -14px;
        right: 0;
        background: transparent;
        width: 200px;
        height: 14px;
    }
    .header-nav > ul.item_big > li.nav-item > ul li {
        float: none;
        padding: 0 0;
    }
    .header-nav > ul.item_big > li.nav-item > ul li:last-child > a {
        border-bottom: 0;
    }
    .header-nav > ul.item_big > li.nav-item > ul li:hover > ul {
        display: block;
        position: absolute;
        width: 250px;
        padding: 0;
        background-color: #fff;
        z-index: 99;
        box-shadow: 0 1px 2px 2px rgba(0, 0, 0, 0.04);
    }
}
@media (min-width: 991px) and (max-width: 1199px) and (min-width: 992px) {
    .header-nav > ul.item_big > li.nav-item > ul li:hover > ul {
        position: relative;
        left: 0;
        width: 100%;
        padding-left: 0;
        box-shadow: 0 1px 2px 2px rgba(0, 0, 0, 0.04);
    }
    .header-nav > ul.item_big > li.nav-item > ul li:hover > ul li a {
        padding-left: 25px;
    }
}
@media (min-width: 991px) {
    .header-nav > ul.item_big > li.nav-item > ul li a {
        font-weight: 400;
        font-size: 14px;
        line-height: 24px;
        display: block;
        padding: 8.5px 20px 8.5px 10px;
        color: #333;
        position: relative;
        border-bottom: 1px solid #f6f6f6;
        text-align: left;
        white-space: initial;
    }
    .header-nav > ul.item_big > li.nav-item > ul li a.caret-down:before {
        content: "";
        position: absolute;
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 5px 5px 0 5px;
        border-color: #333 transparent transparent transparent;
        display: inline-block;
        top: 50%;
        left: 100%;
        margin-left: -15px;
        margin-top: -2px;
        transition: 0.5s;
        transform: rotate(270deg);
    }
    .header-nav > ul.item_big > li.nav-item > ul li ul {
        box-shadow: 0px 4px 20px rgba(183, 221, 228, 0.47);
        display: none;
        left: 220px;
        top: 0px;
    }
    .header-nav > ul.item_big > li.nav-item > ul > li {
        color: #333;
    }
    .header-nav > ul.item_big > li.nav-item > ul > li:hover > a {
        color: var(--maincolor);
    }
    .header-nav > ul.item_big > li.nav-item > ul > li:hover > a.caret-down:before {
        border-color: var(--maincolor) transparent transparent transparent;
    }
    .header-nav > ul.item_big > li.nav-item > ul > li ul li:hover > a {
        color: var(--maincolor);
    }
    .header-nav > ul.item_big > li.active > a {
        color: var(--maincolor);
    }
    .header-nav > ul.item_big > li.active > a.caret-down:after {
        border-color: var(--maincolor) transparent transparent transparent;
    }
    .header-nav ul li ul a.text2line:hover {
        color: var(--maincolor) !important;
        background: transparent !important;
    }
    .header-nav li li {
        position: relative;
    }
}
@media (max-width: 1199px) and (min-width: 991px) {
    .header-nav > ul.item_big > li.nav-item.has-mega:hover > .mega-content {
        max-width: 760px;
    }
    .header-menu:after {
        -webkit-transform: skew(-19deg);
        -moz-transform: skew(-19deg);
        -ms-transform: skew(-19deg);
        -o-transform: skew(-19deg);
        transform: skew(-19deg);
    }
    .cart-head .count_item {
        position: absolute;
        right: 5px;
        top: 5px;
    }
    header.header .header-middle .header-search {
        margin-right: 10px;
        padding-right: 10px;
    }
    header.header .header-middle .header-search form {
        width: 285px;
    }
    header.header .header-middle .col-right > div {
        margin-left: 10px;
    }
}
@media (max-width: 991px) and (min-width: 767px) {
    header.header .header-topbar .col-right .hotline-header {
        margin-right: 20px;
    }
    header.header .header-middle .header-search {
        margin-right: 0;
    }
    header.header .header-middle .header-search form {
        width: 495px;
    }
    header.header .header-middle .header-cart .cart-head .count_item {
        right: 60px;
        top: -5px;
    }
}
@media (max-width: 991px) {
    .header-nav {
        background-color: #fff;
        height: 100%;
        position: fixed;
        top: 0 !important;
        left: 0;
        z-index: 99999;
        width: 250px;
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform 0.5s cubic-bezier(0.645, 0.045, 0.355, 1), visibility 0.5s cubic-bezier(0.645, 0.045, 0.355, 1);
        box-shadow: none;
        touch-action: manipulation;
    }
    .header-nav .header-sidebar .logo-header-sidebar {
        padding: 14px 12px;
        background: transparent;
        position: relative;
    }
    .header-nav .header-sidebar .logo-header-sidebar:after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        height: 1px;
        width: 100%;
        background: var(--maincolor);
        opacity: 0.2;
    }
    .header-nav .header-sidebar .logo-header-sidebar.style-2 {
        background: var(--maincolor);
    }
    .header-nav .header-sidebar .logo-header-sidebar .logo {
        justify-content: center;
    }
    .header-nav.current {
        visibility: visible;
        transform: translateX(0);
    }
    .header-nav .item_big {
        overflow-y: auto;
        max-height: 100vh;
        height: 100vh;
    }
    .header-nav .item_big .nav-item {
        position: relative;
    }
    .header-nav .item_big .nav-item a {
        padding: 7px 30px 7px 10px;
        color: #333;
        height: unset;
        display: block;
        font-size: 14px;
    }
    .header-nav .item_big .nav-item .fa-caret-down {
        visibility: visible;
        position: absolute;
        right: 5px;
        top: 3px;
        width: 30px;
        height: 35px;
        line-height: 35px;
        text-align: center;
        display: inline-block;
    }
    .header-nav .item_big .nav-item .fa-caret-down:before {
        content: "";
        position: absolute;
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 5px 5px 0 5px;
        border-color: #333 transparent transparent transparent;
        display: inline-block;
        top: 50%;
        transform: translateY(-50%);
        right: 10px;
        transition: 0.5s;
        margin-top: -3px;
    }
    .header-nav .item_big .nav-item .item_small {
        padding-left: 10px;
    }
    .header-nav .item_big .nav-item .item_small li {
        position: relative;
    }
    .header-nav .item_big .nav-item .item_small ul {
        padding-left: 10px;
    }
    .header-nav .item_big .nav-item .item_small ul li {
        position: relative;
    }
    .header-nav .item_big .nav-item .item_small ul li .fa-caret-down {
        visibility: visible;
        position: absolute;
        right: 5px;
        top: 0;
        width: 30px;
        height: 35px;
        line-height: 35px;
        text-align: center;
        display: inline-block;
    }
    .header-nav .item_big .nav-item .item_small ul li .fa-caret-down:before {
        content: "";
        position: absolute;
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 5px 5px 0 5px;
        border-color: #333 transparent transparent transparent;
        display: inline-block;
        top: 50%;
        transform: translateY(-50%);
        right: 10px;
        transition: 0.5s;
        margin-top: -3px;
    }
    .header-nav li > ul {
        display: none;
    }
    .header-nav li.current > a {
        color: var(--maincolor) !important;
    }
    .header-nav li.current > ul {
        display: block;
		position:unset !important;
    }
	 .header-nav li.current > ul.sub-menu{
		opacity:unset !important;
		visibility:visible !important;
		box-shadow: none !important;
   		padding: 0 0 15px 10px !important;
	}
    .header-nav li.current .fa.current {
        transform: rotate(180deg);
        -webkit-transform: rotate(180deg);
        -moz-transform: rotate(180deg);
        -o-transform: rotate(180deg);
        -os-transform: rotate(180deg);
        transition: all 0.5s;
        margin-top: 0px;
        color: #3ba66b;
        top: -3px;
    }
    .header-nav li.current .fa.current:before {
        border-color: var(--maincolor) transparent transparent transparent;
    }
    .header-nav .flash-scroll {
        display: none;
    }
    .header-nav ul.item_big_index {
        padding-right: 0;
    }
    .opacity_menu {
        background: rgba(0, 0, 0, 0.8);
        position: fixed;
        top: 0 !important;
        left: 0;
        height: 100%;
        width: 100%;
        z-index: 99999;
        display: none;
    }
    .opacity_menu.current {
        display: block;
    }
    .block-menu-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 15px;
    }
    header.header {
        margin-bottom: 0;
    }
    header.header .nd-categories {
        position: fixed;
        top: 0;
        z-index: 99;
        width: 100%;
        height: 100%;
        display: none;
    }
    header.header .nd-categories .inner {
        background: #e7eef6;
        height: 100%;
    }
    header.header .nd-categories .inner .nav-cate {
        background: #fff;
        width: 240px;
        position: relative;
        z-index: 9;
        height: 100%;
    }
    header.header .nd-categories .inner .nav-cate ul {
        width: 100%;
        overflow: visible;
        border-top: none;
    }
    header.header .nd-categories .inner .nav-cate ul li {
        display: block;
        overflow: visible;
        cursor: pointer;
        position: relative;
    }
    header.header .nd-categories .inner .nav-cate ul li .nd-categories-a {
        position: relative;
        display: block;
        color: #000;
        padding: 9px 15px 9px;
        border-bottom: 1px dotted #e1e1e1;
        margin: 0;
        font-size: 14px;
    }
    header.header .nd-categories .inner .nav-cate ul li .nd-categories-a svg {
        width: 10px;
        height: 10px;
        position: absolute;
        right: 10px;
        top: 15px;
    }
    header.header .nd-categories .inner .nav-cate ul li.dropdown {
        position: relative;
    }
    header.header .nd-categories .inner .nav-cate ul li .subcate {
        cursor: default;
        overflow: hidden;
        position: absolute;
        top: 0;
        left: 100%;
        min-height: 100% !important;
        background: #fff;
        padding: 15px;
        width: 530px;
        background: #e7eef6;
        height: 100%;
    }
    header.header .nd-categories .inner .nav-cate ul li .subcate aside {
        width: 33.3333%;
        padding: 5px;
        float: left;
        overflow: hidden;
        cursor: default;
    }
    header.header .nd-categories .inner .nav-cate ul li .subcate aside .nd-categories-main-sub {
        display: flex;
        background: #fff;
        padding: 12px;
        border-radius: 12px;
        align-items: center;
        height: 100%;
    }
    header.header .nd-categories .inner .nav-cate ul li .subcate aside .nd-categories-main-sub .icon {
        width: 30px;
        text-align: center;
    }
    header.header .nd-categories .inner .nav-cate ul li .subcate aside .nd-categories-main-sub .icon img {
        height: 30px;
        object-fit: scale-down;
    }
    header.header .nd-categories .inner .nav-cate ul li .subcate aside .nd-categories-main-sub .title {
        width: calc(100% - 30px);
        padding-left: 15px;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
    }
}
@media (max-width: 991px) and (max-width: 767px) {
    header.header .nd-categories .inner .nav-cate {
        width: 100%;
    }
    header.header .nd-categories .inner .nav-cate ul li .subcate {
        padding: 10px;
        width: 100%;
        position: initial;
    }
    header.header .nd-categories .inner .nav-cate ul li .subcate aside {
        width: 50%;
    }
}
@media (max-width: 991px) {
    header.header .nd-categories .container {
        max-width: 100%;
        padding: 0;
        height: 100%;
    }
    header.header .header-middle {
        border-bottom: none;
    }
    header.header .header-middle .col-left a {
        display: block;
        height: initial;
        padding: 10px 0;
    }
    header.header .header-middle .col-right {
        position: fixed;
        bottom: 0;
        left: 0;
        max-width: 100%;
        background: var(--maincolor);
        padding: 10px;
        flex: 0 0 100%;
        z-index: 99999;
        top: initial !important;
    }
    header.header .header-middle .col-right > div > a {
        color: #fff;
    }
    header.header .header-middle .col-right > div > a svg path {
        fill: #fff;
    }
    header.header .header-middle .col-right .menu-bar {
        padding-right: 0;
        margin-right: 0;
        border-right: initial;
        color: #fff;
    }
    header.header .header-middle .col-right .menu-bar svg path {
        fill: var(--maincolor);
    }
    header.header .header-middle .col-right .header-category-mb {
        color: #fff;
    }
    header.header .header-middle .col-right .header-category-mb svg path {
        fill: var(--maincolor) !important;
        stroke: #fff;
    }
    header.header .header-middle .col-right > div {
        width: 25%;
        text-align: center;
        margin-right: 0;
        padding-right: 0;
        margin-left: 0;
    }
    header.header .header-middle .header-account svg {
        margin-bottom: 0;
    }
    .header-menu .inner {
        height: 45px;
        padding: 0 0 0 15px;
    }
    .header-menu .col-right {
        justify-content: space-between !important;
    }
}
@media (max-width: 767px) {
    header.header .header-topbar .col-right {
        text-align: center;
    }
    header.header .header-topbar .col-right .hotline-header {
        margin-right: 0;
    }
    header.header .header-middle {
        padding: 14px 0;
    }
    header.header .header-middle .col-left a {
        padding-top: 0;
        text-align: center;
    }
    header.header .header-middle .col-right .header-hotline {
        display: none;
    }
    header.header .header-middle .col-right > div {
        font-size: 13px;
    }
}
@media (max-width: 767px) and (max-width: 321px) {
    header.header .header-middle .col-right > div {
        font-size: 11px;
    }
}
@media (max-width: 767px) {
    header.header .header-middle .header-cart .cart-head .count_item {
        right: 15px;
        top: -5px;
    }
    .search-smart .header-search-form input {
        height: 38px;
        padding-right: 45px;
    }
    .search-smart .header-search-form button {
        top: 5px;
        height: 28px;
        width: 28px;
    }
    .search-smart .header-search-form button svg {
        width: 15px;
        height: 15px;
        right: 6px;
        top: 7px;
    }
}
/* =================================================================== */
/* == CSS CHO MENU DROPDOWN THÔNG THƯỜNG (HAS-DROPDOWN) == */
/* =================================================================== */

/* --- 1. Container chính của Dropdown (item cấp 1) --- */
.header-nav .nav-item.has-dropdown {
    position: relative !important; /* Quan trọng: để định vị cho menu con */
	overflow:visible !important;;
}

/* --- 2. Khối Sub-menu (ẩn mặc định) --- */
.header-nav .nav-item.has-dropdown .sub-menu {
    position: absolute;
    top: 100%; /* Nằm ngay dưới item cha */
    left: 0;
    min-width: 230px; /* Độ rộng tối thiểu của dropdown */
    background-color: #fff;
    border-radius: 0px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 10px 0;
    z-index: 1000;
    
    /* Hiệu ứng xuất hiện */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease-in-out;
}

/* --- 3. Hiển thị Sub-menu khi hover --- */
@media (min-width: 992px) { /* Chỉ áp dụng hiệu ứng hover trên desktop */
    .header-nav .nav-item.has-dropdown:hover > .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* --- 4. Style cho các item bên trong Sub-menu --- */
.sub-menu li {
    position: relative; /* Quan trọng: để định vị cho menu cấp 3 */
}

.sub-menu li a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    white-space: nowrap; /* Tránh text bị xuống dòng */
    transition: all 0.2s ease;
}

.sub-menu li a:hover {
    background-color: #f7f8fa;
    color: var(--maincolor);
}

/* --- 5. Style cho các cấp menu con (Nested Dropdown) --- */

/* Thêm mũi tên cho item nào có menu con cấp 3 */
.sub-menu .menu-item-has-children > a {
    position: relative;
    padding-right: 35px; /* Thêm khoảng trống cho mũi tên */
}

.sub-menu .menu-item-has-children > a::after {
    content: '›'; /* Ký tự mũi tên sang phải */
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    font-size: 20px;
    color: #999;
}

/* Định vị cho menu cấp 3 */
.sub-menu .sub-menu {
    top: -10px; /* Nằm ngang hàng với item cha (điều chỉnh nếu cần) */
    left: 100%;
}
header.header .nd-categories .inner{
	width:300px;
}