/************************************/
/*** 	   side bar danh mục sản phẩm		  ***/
/************************************/
.category-page-row #shop-sidebar {
    padding: 16px 14px;
    background: var(--white);
    border: 1px solid #f1f1f1;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.category-page-row #shop-sidebar .widget:last-child {
    margin-bottom: 0;
}

/* Tiêu đề từng bộ lọc: nền đỏ thương hiệu bo tròn. */
.category-page-row #shop-sidebar .widget>.widget-title {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 11px 18px;
    color: var(--white);
    background: var(--primary);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
}

/* Danh mục: chỉ chỉnh hàng và chữ, giữ nguyên icon/dấu tích đang có trên UI. */
.category-page-row #shop-sidebar .widget_product_categories ul.product-categories {
    padding: 0 6px;
}

.category-page-row #shop-sidebar .widget_product_categories ul.product-categories>li {
    min-height: 42px;
    margin: 0;
    padding: 10px 25px 10px 30px;
    border-bottom: 1px solid #ededed;
    font-size: 14px;
    line-height: 21px;
}

.category-page-row #shop-sidebar .widget_product_categories ul.product-categories>li:last-child {
    border-bottom: 0;
}

.category-page-row #shop-sidebar .widget_product_categories ul.product-categories>li>a {
    color: var(--text-soft);
    font-weight: 600;
}

.category-page-row #shop-sidebar .widget_product_categories ul.product-categories>li>.count {
    float: right;
    color: #999;
    font-size: 12px;
}

/* Đổi màu dấu tích active; mục con tiếp tục dùng vị trí mặc định. */
.category-page-row #shop-sidebar ul.product-categories li.cat-item.active::before {
    color: var(--primary);
    top: 18px;
}

/************************************/
/*** 	   Danh mục sản phẩm 	breadcrumb	  ***/
/************************************/

.category-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    margin: 0 0 12px;
    color: var(--text-sub);
    font-size: 15px;
    font-weight: 600;

}

.category-breadcrumb .breadcrumb-current {
    color: var(--text-sub);
}

.category-breadcrumb .breadcrumb-current a {
    color: #023868;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.category-breadcrumb .breadcrumb-current a:hover {
    color: var(--primary);
}

.category-breadcrumb .divider {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 12px;
}

.category-breadcrumb .divider i {
    display: block;
}

/************************************/
/*** 	   Danh mục sản phẩm hero	  ***/
/************************************/
/* .category-intro {
    display: grid;
    grid-template-columns: 45fr 55fr;
    align-items: stretch;
    gap: 34px;
}

.category-intro__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.term-description h1 {
    position: relative;
    margin: 0 0 30px;
    padding-bottom: 18px;
    color: var(--text-heading);
    font-size: clamp(34px, 3.2vw, 52px);
    font-weight: 800;
    line-height: 1.16;
    letter-spacing: -0.035em;
}

.term-description h1::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 38px;
    height: 4px;
    border-radius: var(--radius-full);
    background: var(--primary);
}

.term-description p {
    margin: 0 0 16px;
    color: var(--text-soft-ui);
    font-size: 16px;
    line-height: 1.75;
}

.term-description p:last-child {
    margin-bottom: 0;
}

.term-description p:first-of-type {
    position: relative;
}


.term-description span {
    color: inherit !important;
    font-size: inherit !important;
}

.term-description a {
    color: var(--link-color);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.term-description a:hover {
    color: var(--link-hover);
}

.category-intro__banner {
    min-height: 405px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--surface-bg-soft);
    box-shadow: var(--shadow-ui-strong);
}

.category-intro__banner img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 405px;
    object-fit: cover;
}

@media (max-width: 991px) {
    .category-page {
        width: min(100% - 30px, 760px);
    }

    .category-intro {
        grid-template-columns: 1fr;
    }

    .category-intro__content {
        padding-block: 0;
    }

    .category-intro__banner,
    .category-intro__banner img {
        min-height: 300px;
    }
}

@media (max-width: 575px) {
    .category-page {
        width: min(100% - 24px, 540px);
        padding-top: 20px;
    }

    .term-description h1 {
        margin-bottom: 24px;
    }

    .term-description p:first-of-type {
        padding-top: 72px;
    }

    .category-intro {
        gap: 24px;
    }

    .category-intro__banner,
    .category-intro__banner img {
        min-height: 220px;
    }
} */

/* ===================================
   AJAX PRODUCT RESULTS
=================================== */

.product-filter-results {
    position: relative;
}

.product-filter-results__content {
    transition:
        opacity var(--transition-fast),
        filter var(--transition-fast);
}

.product-filter-results.is-loading .product-filter-results__content {
    opacity: 0.45;
    filter: grayscale(0.12);
    pointer-events: none;
    user-select: none;
}

.product-filter-loading {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    min-height: 240px;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
    background: rgba(var(--white-rgb), 0.68);
    backdrop-filter: blur(2px);
}

.product-filter-loading[hidden] {
    display: none;
}

.product-filter-loading__spinner {
    width: 42px;
    height: 42px;
    border: 3px solid var(--primary-100);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: product-filter-spin 0.8s linear infinite;
}

@keyframes product-filter-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===================================
   PRODUCT LOAD MORE
=================================== */

.product-load-more-wrap {
    display: flex;
    width: 100%;
    justify-content: center;
    margin: 28px 0;
}

.product-load-more {
    display: inline-flex;
    width: min(100%, 340px);
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin: 0;
    padding: 10px 22px;
    border: 1px solid var(--accent);
    border-radius: var(--radius-lg);
    background: var(--surface-bg);
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: var(--transition-fast);
}

.product-load-more:hover {
    border-color: var(--accent-hover);
    background: var(--surface-bg-accent);
    color: var(--accent-hover);
    box-shadow: var(--shadow-accent);
    transform: translateY(-1px);
}

.product-load-more:active {
    transform: translateY(0);
}

.product-load-more:focus-visible {
    outline: none;
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 4px var(--focus-ring-ui);
}

.product-load-more:disabled {
    cursor: wait;
    opacity: 0.75;
    transform: none;
}

.product-load-more__label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.product-load-more__count {
    color: currentColor;
    font-weight: 700;
}

.product-load-more__icon {
    font-size: 12px;
    transition: transform var(--transition-fast);
}

.product-load-more:hover .product-load-more__icon {
    transform: translateY(2px);
}

.product-load-more__spinner {
    display: none;
    width: 17px;
    height: 17px;
    border: 2px solid rgba(var(--accent-rgb), 0.22);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: product-filter-spin 0.7s linear infinite;
}

.product-load-more.is-loading .product-load-more__icon {
    display: none;
}

.product-load-more.is-loading .product-load-more__spinner {
    display: inline-block;
}

@media (max-width: 768px) {
    .product-filter-loading {
        min-height: 180px;
        padding-top: 70px;
    }

    .product-filter-loading__spinner {
        width: 36px;
        height: 36px;
    }

    .product-load-more-wrap {
        margin: 22px 0;
        padding: 0 12px;
    }

    .product-load-more {
        width: 100%;
        min-height: 46px;
    }
}

/* ===================================
   NO PRODUCTS FOUND
=================================== */

.product-filter-results__content .woocommerce-no-products-found {
    width: 100%;
    margin: 28px 0;
}

.product-filter-results__content .woocommerce-no-products-found .woocommerce-info {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
}

.product-filter-results__content .woocommerce-no-products-found .message-container {
    position: relative;
    display: flex;
    min-height: 220px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 36px 24px;
    border: 1px dashed var(--border-accent);
    border-radius: var(--radius-xl);
    background: var(--surface-bg-accent);
    color: var(--text-soft-ui);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
    text-align: center;
}

.product-filter-results__content .woocommerce-no-products-found .message-container::before {
    content: "\f002";
    display: flex;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    border: 1px solid var(--border-accent);
    border-radius: 50%;
    background: var(--surface-bg);
    color: var(--accent);
    font-family: "Font Awesome 7 Pro";
    font-size: 22px;
    font-weight: 300;
    box-shadow: var(--shadow-ui-soft);
}

.product-filter-results__content .woocommerce-no-products-found .message-container::after {
    content: "Hãy thử bỏ bớt một số tiêu chí hoặc chọn lại bộ lọc khác.";
    display: block;
    max-width: 460px;
    color: var(--text-sub);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .product-filter-results__content .woocommerce-no-products-found {
        margin: 20px 0;
    }

    .product-filter-results__content .woocommerce-no-products-found .message-container {
        min-height: 190px;
        padding: 28px 18px;
        border-radius: var(--radius-lg);
        font-size: 14px;
    }

    .product-filter-results__content .woocommerce-no-products-found .message-container::before {
        width: 48px;
        height: 48px;
        font-size: 19px;
    }

    .product-filter-results__content .woocommerce-no-products-found .message-container::after {
        font-size: 12px;
    }
}
