body, header, textarea, input[type=text], input[type=password], input[type=datetime], input[type=datetime-local], input[type=date], input[type=month], input[type=time], input[type=week], input[type=number], input[type=email], input[type=url], input[type=search], input[type=tel], input[type=color] {
    font-family: "Lexend", sans-serif!important;
    font-style: normal!important;
    font-weight: 400!important;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700!important;
}

.nhh__main .tf-form-search {
    max-width: 100%;
    margin-left: 0;
}

.nhh__main .tf-form-search #departmentSelect {
    position: absolute;
    top: 0;
    left: 0;   
    height: 50px;
    line-height: 20px;
    border: none;
    background: transparent;
    padding: 0 10px;
    border-right: 1px solid rgba(0, 0, 0, 0.2);
}

.nhh__main .tf-form-search input {
    padding-left: 200px;
}

.nhh__main .wrapper-header-bottom {
    justify-content: center;
}

.wg-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    margin-top: 40px;
}

.tf-grid-layout .wg-pagination {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.nhh__main .card-product .card-product-wrapper img {
    object-fit: contain;
}

.nhh__main .card-product.out-of-stock .card-product-wrapper::before {
    content: 'Hết hàng';
}

.wrapper-shop.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Ajax Loading System */
.nhh-ajax-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.nhh-ajax-loading.active {
    opacity: 1;
    visibility: visible;
}

.nhh-ajax-loading-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 90%;
    width: 300px;
}

.nhh-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #000;
    animation: nhh-spin 1s linear infinite;
    margin-bottom: 15px;
}

.nhh-loading-text {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

/* Filter box hover effect */
.category-filter {
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-filter:hover {
    color: var(--tf-primary-color);
}

.all-category.active .category-filter,
.cate-item.active .category-filter {
    color: var(--tf-primary-color);
    font-weight: 500;
}

/* Spinner animation */
@keyframes nhh-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive loading */
@media (max-width: 767px) {
    .nhh-ajax-loading-content {
        padding: 20px;
        width: 250px;
    }
    
    .nhh-spinner {
        width: 40px;
        height: 40px;
    }
    
    .nhh-loading-text {
        font-size: 14px;
    }
}

/* Loading focus area */
.loading-area {
    position: relative;
}

.loading-area.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 10;
}

.loading-area.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #000;
    animation: nhh-spin 1s linear infinite;
    z-index: 11;
}

/* Cart */
/* Cart Styles */
.cart-products {
    max-height: 350px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.cart-item-image {
    width: 80px;
    margin-right: 15px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-size: 14px;
    margin-bottom: 5px;
}

.cart-item-price {
    font-weight: 500;
    margin-bottom: 10px;
}

.cart-item-quantity .wg-quantity {
    display: inline-flex;
}

.cart-item-remove button {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
}

.cart-item-remove button:hover {
    color: #f00;
}

.cart-summary {
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-weight: 500;
}

.cart-actions {
    display: flex;
    gap: 10px;
}

.cart-actions .tf-btn {
    flex: 1;
}

.cart-empty {
    padding: 30px 15px;
}

.count-cart {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--tf-primary-color);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Ẩn hiệu ứng loading mặc định của WooCommerce */
.woocommerce .blockUI.blockOverlay,
#shoppingCart .blockUI.blockOverlay,
.cart-content .blockUI.blockOverlay {
    display: none !important;
    opacity: 0 !important;
    z-index: -1 !important;
}
.woocommerce .processing:before,
#shoppingCart .processing:before,
.cart-content .processing:before {
    display: none !important;
}

/* Ẩn hiệu ứng loading trong sidecart */
.canvas-body.popup-inner.processing,
#cart-content.processing {
    opacity: 1 !important;
    position: relative;
}

.canvas-body.popup-inner.processing:before,
.canvas-body.popup-inner.processing:after,
#cart-content.processing:before,
#cart-content.processing:after {
    display: none !important;
    opacity: 0 !important;
    z-index: -1 !important;
}

/* Khôi phục tương tác trong quá trình xử lý */
body.woocommerce-cart.processing,
body.woocommerce-checkout.processing,
.cart-content.processing,
.popup-shopping-cart.processing *,
#cart-content.processing * {
    pointer-events: auto !important;
}

/* Ẩn hiệu ứng loading tự động từ WooCommerce trong offcanvas */
.canvas-body.popup-inner.loading-area,
.canvas-body.popup-inner.loading,
.offcanvas-end .loading-area,
.offcanvas-end.loading-area,
.popup-shopping-cart .loading-area,
.popup-shopping-cart.loading-area,
#cart-content.loading-area {
    background-image: none !important;
    position: relative !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.canvas-body.popup-inner.loading-area:before,
.canvas-body.popup-inner.loading:before,
.offcanvas-end .loading-area:before,
.offcanvas-end.loading-area:before,
.popup-shopping-cart .loading-area:before,
.popup-shopping-cart.loading-area:before,
#cart-content.loading-area:before {
    display: none !important;
    opacity: 0 !important;
    content: none !important;
}

/* Đảm bảo không có overlay */
body.processing .blockUI.blockOverlay,
body:has(.loading-area) .blockUI.blockOverlay,
body:has(.loading) .blockUI.blockOverlay {
    display: none !important;
    opacity: 0 !important;
    z-index: -1 !important;
}

/* Styles cho phần mã giảm giá */
.cart-coupons {
    margin-bottom: 15px;
    padding: 15px 0;
    border-top: 1px dashed #e0e0e0;
    border-bottom: 1px dashed #e0e0e0;
}

.coupon-title {
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 600;
}

.coupon-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.coupon-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    position: relative;
}

.coupon-item:hover {
    background-color: #f9f9f9;
}

.coupon-image {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 12px;
    flex-shrink: 0;
}

.coupon-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.coupon-default-image {
    width: 100%;
    height: 100%;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: #555;
}

.coupon-details {
    flex: 1;
}

.coupon-code {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}

.coupon-description {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.coupon-limit {
    font-size: 11px;
    color: #888;
}

.coupon-select {
    margin-left: 10px;
}

.apply-coupon-input {
    position: absolute;
    opacity: 0;
}

.coupon-checkbox {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.apply-coupon-input:checked + .coupon-checkbox {
    border-color: var(--primary-color);
    background-color: #fff;
}

.apply-coupon-input:checked + .coupon-checkbox:after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-color);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.coupon-manual {
    margin-top: 10px;
}

.coupon-input-group {
    display: flex;
}

.coupon-input-group input {
    flex: 1;
    height: 38px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    padding: 0 12px;
    font-size: 14px;
}

.coupon-input-group button {
    border-radius: 0 4px 4px 0;
    height: 38px;
    padding: 0 12px;
    font-size: 14px;
    white-space: nowrap;
}

.cart-discount {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.discount-label {
    color: #666;
}

.discount-amount {
    color: #e53935;
    font-weight: 600;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.total-label {
    color: #333;
}

.total-amount {
    color: var(--primary-color);
}

/* Styles cho trạng thái mã giảm giá */
.coupon-status {
    display: inline-block;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    background-color: #e8f5e9;
    color: #2e7d32;
    margin-top: 3px;
}

.coupon-item.expired .coupon-status {
    background-color: #ffebee;
    color: #c62828;
}

.coupon-item.used .coupon-status {
    background-color: #eeeeee;
    color: #616161;
}

.coupon-item.min_spend .coupon-status {
    background-color: #fff8e1;
    color: #ff8f00;
}

.coupon-item.expired,
.coupon-item.used,
.coupon-item.min_spend {
    opacity: 0.8;
}

.coupon-checkbox.disabled {
    cursor: not-allowed;
    background-color: #f5f5f5;
}

.coupon-item:hover .coupon-status {
    opacity: 1;
}

/* Page concept */
.cpt-head {
    background-image: linear-gradient(180deg, #000000 0%, #242E3D 100%);
}

.tf-brand .brand-item {
    border: 1px solid #fff;
    border-radius: 10px;
    text-align: center;
    padding: 20px;    
}

.tf-brand .brand-item img {
    max-height: 30px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.tf-brand .brand-item .text {
    color: #fff;
    font-weight: 600;
    display: block;
    margin-top: 20px;
}

.infiniteslide.tf-brand {
    gap: 30px;
}
.cpt-item {
    position: relative;
    min-height: 400px;
}
.cpt-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url(../images/nhh/cpt-banner.webp);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: top right;
    z-index: -1;
}

.cpt-item .img {
    margin-top: 200px;
}

.cpt-item .img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.cpt-item .content {
    background: #2F4560;
    padding: 20px;
    border-radius: 20px;
    margin-top: 50px;
}

.cpt-item .content > * {
    color: #fff;
}

.cpt-item .content h2 {
    font-size: 25px;
    line-height: 1.5;
    margin-bottom: 20px;
    color:#c3a343;
    -webkit-text-fill-color: transparent;
    background: -webkit-linear-gradient(transparent, transparent),
    url(../images/nhh/GOLD-11.webp) repeat;
    background: -o-linear-gradient(transparent, transparent);
    -webkit-background-clip: text;
}

.cpt-item .content span {
    display: block;
    margin-bottom: 10px;
}

.cpt-item .content span.price-main {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.cpt-item .content .tf-btn {
    background: radial-gradient(ellipse farthest-corner at right bottom, #FEDB37 0%, #FDB931 8%, #9f7928 30%, #8A6E2F 40%, transparent 80%),
                radial-gradient(ellipse farthest-corner at left top, #FFFFFF 0%, #FFFFAC 8%, #D1B464 25%, #5d4a1f 62.5%, #5d4a1f 100%);
    border: none;
}

.cpt-item .icon1 {
    position: absolute;
    top: 10%;
    left: 50px;
    width: 200px;
    height: 200px;
    background-image: url(../images/nhh/cpt-icon-1.webp);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
}
.cpt-item .icon2 {
    position: absolute;
    top: 40%;
    right: 0;
    width: 100px;
    height: 200px;
    background-image: url(../images/nhh/cpt-icon-2.webp);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
}

@media (max-width: 767px) {
    .cpt-item .container {
        padding: 0 15px!important;
    }

    .cpt-item .img {
        margin-top: 50px
    }

    .cpt-item .content {
        margin-top: 20px;
        text-align: center;
    }

    .cpt-item .icon1,
    .cpt-item .icon2 {
        display: none;
    }
}
.card-product .on-sale-wrap {
    top: 0;
    left: 0;
}

/* Home */
.nhh-hero .slider-electronic .slider-wrap.type-image-right {
    justify-content: center;
}

.nhh-hero {
    background-color: transparent;
    background-image: radial-gradient(at top left, #FF8F24 0%, #061426 69%);
}

.nhh-hero .slider-wrap {
    border-radius: 20px;
    overflow: hidden;
}

.nhh-hero .slider-wrap .image{
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    position: relative; /* If you want text inside of it */
    
}

.nhh-hero .slider-wrap .image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nhh-hero .sw-dots .swiper-pagination-bullet::after {
    border-color: #fff;
}

.nhh-hero .sw-dots .swiper-pagination-bullet {
    background: #fff
}

.nhh-deals .card-product {
    background-color: #fff;
}

.nhh-catp-item {
    border: 1px solid #ddd;
    border-radius: 20px;

}

.nhh-catp-item .left {
    width: 320px;
    background-color: #000;
    position: relative;
    padding: 30px;
    border-radius: 20px 0 0 20px;
}

.nhh-catp-item .left img {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    height: 250px;
    object-fit: cover;
}

.nhh-catp-item .left .desc {
    font-size: 16px;
    color: #40C057;
    display: block;
    margin-bottom: 20px;
}

.nhh-catp-item .left .title {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

.nhh-catp-item .right {
    width: calc(100% - 320px);
    padding: 30px;
}

.banner-cls-electric .banner-content {
    padding: 50px;
}

.banner-cls-electric .image {
    width: 100%;
    padding-top: 60%; /* 16:9 Aspect Ratio */
    position: relative; /* If you want text inside of it */
    border-radius: 20px;
    overflow: hidden;
    max-width: 300px;
    margin: 0 auto;
}

.banner-cls-electric .image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.banner-cls-electric .banner-content {
    background-image: linear-gradient(40deg, rgb(255, 149, 0) 0%, rgb(255, 94, 58) 100%);
}

.banner-cls-electric .banner-content > * {
    color: #fff;
}

@media (max-width: 767px) {
    .nhh-catp-item .left,
    .nhh-catp-item .right {
        width: 100%;
    }

    .nhh-catp-item .left {
        min-height: 400px;
        border-radius: 20px 20px 0 0;
        text-align: center;
    }

    .nhh-catp-item .right {
        padding: 10px;
    }

    .price-wrap .price-old {
        display: inline-block;
    }
    .banner-cls-electric .banner-content {
        padding: 10px;
    }
}

/* YouTube Video Gallery */
.nhh-video-grid {
    margin-top: 30px;
}

.nhh-video-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.nhh-video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.nhh-video-thumbnail {
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    aspect-ratio: 16 / 9;
}

.nhh-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.nhh-video-item:hover .nhh-video-thumbnail img {
    transform: scale(1.05);
}

.nhh-video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.nhh-video-item:hover .nhh-video-play-icon {
    background-color: var(--tf-primary-color);
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.nhh-video-title {
    padding: 15px;
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    color: #333;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500!important;
}

/* Video Modal */
#videoModal .modal-content {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

#videoModal .modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 15px 20px;
}

#videoModal .modal-title {
    font-size: 18px;
    font-weight: 600;
}

#videoModal .modal-body {
    padding: 0;
}

#videoModal .btn-close {
    box-shadow: none;
    opacity: 0.7;
}

#videoModal .btn-close:hover {
    opacity: 1;
}

/* Video Modal Responsive */
@media (max-width: 767px) {
    .nhh-video-play-icon {
        width: 45px;
        height: 45px;
    }
    
    .nhh-video-play-icon svg {
        width: 36px;
        height: 36px;
    }
    
    .nhh-video-title {
        padding: 12px;
        font-size: 14px;
    }
}

.news-item .img-style  {
    position: relative;
    padding-top: 56.25%;
}

.news-item .img-style img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-item .content .title {
    font-size: 16px;
}

.blog-post-item .entry_image a,
.recent-blog-list .image a{
    position: relative;
    padding-top: 100%;

}

.recent-blog-list .image a {
    border-radius: 10px;
}

.blog-post-item .entry_image a img,
.recent-blog-list .image a img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.s-blog-single .content .entry_image {
    text-align: center;
}

.s-blog-single .content {
    line-height: 1.5;
    font-size: 16px;
}

.s-blog-single .content > * {
    margin-bottom: 20px;
}

.s-blog-single .content h2 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.5;
}

.s-blog-single .content h3 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.5;
}

.s-blog-single .content h4 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
}

.s-blog-single .content figure {
    margin: 20px auto;
    max-width: 100%;
}

.s-blog-single .content figcaption {
    text-align: center;
    background: #ddd;
    font-size: 14px;
    padding: 10px;
}

.box-nav-menu .mega-menu .wrapper-sub-menu {
    width: 100%
}

.box-nav-menu .sub-menu-style-2 {
    left: -50px;
    min-width: 250px;
}

.box-nav-menu .sub-menu-style-2 .menu-list {
    width: 100%
}

.box-nav-menu .menu-list li {padding: 0!important;}

/* Page content */
.page-content-title h1 {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

.wysiwyg-content {
    font-size: 16px;
}

.wysiwyg-content > * {
    margin-bottom: 20px;
    line-height: 1.5;
}

.wysiwyg-content ul {
    padding-left: 20px;
}

.wysiwyg-content ul li {
    list-style-type: disc;
    margin-bottom: 20px;
}

.wysiwyg-content ol {
    list-style-type: decimal;
    padding-left: 20px;
}

.wysiwyg-content ol li {
    list-style-type: decimal;
    margin-bottom: 20px;
}

.wysiwyg-content h2 {
    font-size: 24px;
    font-weight: 600;
}

.wysiwyg-content h3 {
    font-size: 20px;
    font-weight: 600;
}

.wysiwyg-content h4 {
    font-size: 18px;
    font-weight: 600;
}

.wysiwyg-content h5 {
    font-size: 16px;
    font-weight: 600;
}

.wysiwyg-content h6 {
    font-size: 14px;
    font-weight: 600;
}

.wysiwyg-content img {
    max-width: 100%;
    margin: 0 auto;
    display: block;
}

:root {
    --primary: #ff5e3a!important
}