﻿.h1, h1 {font-size: 1.7rem}

@media (max-width: 767px) {
    #categoryPageRoot { overflow-x: hidden !important; width: 100% !important; position: relative; }

    #categoryPageRoot .container { overflow-x: hidden !important; max-width: 100% !important; }

    #categoryPageRoot .row { overflow-x: hidden !important; }

    #categoryPageRoot section { overflow-x: hidden; }
}

/* استایل‌های صفحه دسته — جدا از style.css (عمومی) */

/* هم‌ترازی مرکزی: عنوان‌های دسته والد و بنر */
#categoryPageRoot .root-category-title,
#categoryPageRoot .category-box .card-title,
#categoryPageRoot .category-banner-title,
#categoryPageRoot .category-banner-count { text-align: center !important; justify-content: center; }

/* اگر اسلایدر قفل است (آیتم کم)، وسط‌چین شدن ردیف */
#categoryPageRoot .category-swiper-fade-outer.is-swiper-locked .category-swiper .swiper-wrapper { justify-content: center; }

/* سایدبار فیلتر محصول — sticky زیر هدر: فاصله از هدر و حداکثر ارتفاع viewport */
.product-filters-sidebar { background: #fff; border: 1px solid #e0e0e0; border-radius: .875rem; padding: 1.5rem; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); position: sticky; top: calc(var(--header-height, 0px) + 12px); max-height: calc(100vh - var(--header-height, 0px) - 24px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--C5, #787675) transparent; }

/* اسکرول‌بار سفارشی باریک و هماهنگ با تم در سایدبار فیلتر */
.product-filters-sidebar::-webkit-scrollbar {
    width: 11px;
}
.product-filters-sidebar::-webkit-scrollbar-track {
    background: transparent;
    margin-top: 3px;
    margin-bottom: 3px;
}
.product-filters-sidebar::-webkit-scrollbar-thumb {
    background-color: var(--C5, #787675);
    border: 3px solid transparent;
    background-clip: padding-box;
    border-radius: 8px;
}

@media (min-width: 768px) {
    /* دسکتاپ: ستون aside کشسان و sticky فیلتر با فاصله از هدر */
    #categoryPageRoot .filters-sidebar-col { display: flex; flex-direction: column; }
    #categoryPageRoot .filters-sidebar-col aside { flex: 1 1 auto; min-height: 0; }
    #categoryPageRoot .product-filters-sidebar { align-self: flex-start; }
}

/* فشرده‌تر کردن گروه‌های فیلتر (چیدمان کناری) */
.product-filters-sidebar .filter-group { padding-bottom: 0.6rem; margin-bottom: 0.7rem !important; }
.product-filters-sidebar .form-label { margin-bottom: 0.35rem !important; }
.product-filters-sidebar .products-count-row .filters-loading-indicator { margin-bottom: 0 !important; }

.filter-group { padding-bottom: 1rem; border-bottom: 1px solid #f0f0f0; }

.filter-group:last-child { border-bottom: none; }

/* جعبه جستجوی فیلتر — ورودی زیبا */
#categoryPageRoot .filter-search-wrap { margin-top: 0.15rem; }
#categoryPageRoot .filter-search-box { position: relative; display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.65rem 0.45rem 0.55rem; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--C5, #787675) 55%, #e2e8f0); background: linear-gradient(145deg, color-mix(in srgb, var(--C8, #fafaf9) 42%, #fff) 0%, #fff 58%); box-shadow: 0 1px 2px rgba(34, 32, 33, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.85); transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease; }
#categoryPageRoot .filter-search-box:focus-within { border-color: color-mix(in srgb, var(--C3, #fed404) 70%, var(--C1, #222021)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--C3, #fed404) 18%, transparent), 0 4px 14px rgba(254, 212, 4, 0.12); background: #fff; }
#categoryPageRoot .filter-search-box.is-pending { border-color: color-mix(in srgb, var(--C3, #fed404) 45%, var(--C5, #787675)); }
#categoryPageRoot .filter-search-box__icon { flex: 0 0 auto; width: 2rem; height: 2rem; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--C3, #fed404); background: color-mix(in srgb, var(--C3, #fed404) 12%, transparent); font-size: 1.05rem; pointer-events: none; }
#categoryPageRoot .filter-search-box__input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; padding: 0.35rem 0.15rem; font-size: 0.9375rem; line-height: 1.45; color: var(--C1, #222021); box-shadow: none !important; }
#categoryPageRoot .filter-search-box__input::placeholder { color: color-mix(in srgb, var(--C5, #787675) 75%, #94a3b8); opacity: 1; }
#categoryPageRoot .filter-search-box__input:focus { outline: none; }
/* حذف دکمه‌های پیش‌فرض مرورگر روی input جستجو (type=search) */
#categoryPageRoot .filter-search-box__input::-webkit-search-cancel-button,
#categoryPageRoot .filter-search-box__input::-webkit-search-decoration,
#categoryPageRoot .filter-search-box__input::-webkit-search-results-button { -webkit-appearance: none; appearance: none; display: none; }
#categoryPageRoot .filter-search-box__input::-ms-clear { display: none; width: 0; height: 0; }
#categoryPageRoot .filter-search-box__clear,
#categoryPageRoot .filter-search-box__pending { flex: 0 0 auto; width: 1.85rem; height: 1.85rem; border: 0; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0; background: color-mix(in srgb, var(--C1, #222021) 8%, transparent); color: var(--C5, #64748b); transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease; }
#categoryPageRoot .filter-search-box__clear:hover { background: color-mix(in srgb, var(--C3, #fed404) 16%, transparent); color: var(--C3, #fed404); }
#categoryPageRoot .filter-search-box__clear[hidden],
#categoryPageRoot .filter-search-box__pending[hidden] { display: none !important; }
#categoryPageRoot .filter-search-hint { min-height: 1.25rem; margin-top: 0.45rem; font-size: 0.78rem; line-height: 1.4; color: color-mix(in srgb, var(--C5, #787675) 88%, #64748b); }
#categoryPageRoot .filter-search-hint.is-active { color: var(--C3, #fed404); }
#categoryPageRoot .filter-search-hint.is-warn { color: #b45309; }
[data-bs-theme="dark"] #categoryPageRoot .filter-search-box,
:root[data-bs-theme="dark"] #categoryPageRoot .filter-search-box { border-color: color-mix(in srgb, var(--C5, #81ad9f) 35%, var(--C4, #1f3a2d)); background: linear-gradient(145deg, color-mix(in srgb, var(--C2, #10261e) 80%, var(--C8, #0b1411)) 0%, var(--C2, #10261e) 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04); }
[data-bs-theme="dark"] #categoryPageRoot .filter-search-box:focus-within,
:root[data-bs-theme="dark"] #categoryPageRoot .filter-search-box:focus-within { border-color: var(--C3, #047b54); box-shadow: 0 0 0 3px color-mix(in srgb, var(--C3, #047b54) 22%, transparent); background: color-mix(in srgb, var(--C2, #10261e) 92%, #000); }
[data-bs-theme="dark"] #categoryPageRoot .filter-search-box__input,
:root[data-bs-theme="dark"] #categoryPageRoot .filter-search-box__input { color: var(--C6, #e5e7eb); }
[data-bs-theme="dark"] #categoryPageRoot .filter-search-box__input::placeholder,
:root[data-bs-theme="dark"] #categoryPageRoot .filter-search-box__input::placeholder { color: var(--C5, #81ad9f); }
[data-bs-theme="dark"] #categoryPageRoot .filter-search-hint,
:root[data-bs-theme="dark"] #categoryPageRoot .filter-search-hint { color: var(--C5, #81ad9f); }

/* Price range (double slider) */
.price-slider-wrapper { height: 26px; /* جهت اسلایدر RTL */ direction: rtl; }

.price-track { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); height: 6px; border-radius: 999px; background: var(--C4); z-index: 1; }

.price-range { position: absolute; top: 50%; transform: translateY(-50%); height: 6px; border-radius: 999px; background: var(--C3); z-index: 2; right: 0; width: 0; left: auto; }

.price-slider-wrapper input[type=range] { position: absolute; left: 0; right: 0; top: -2px; width: 100%; pointer-events: none; background: transparent; z-index: 3; direction: rtl; }

@-moz-document url-prefix() {
    .price-slider-wrapper input[type=range] { top: 1px; }
}

/* Hide native tracks so they never cover thumbs */
.price-slider-wrapper input[type=range]::-webkit-slider-runnable-track { background: transparent; height: 6px; }
.price-slider-wrapper input[type=range]::-moz-range-track { background: transparent; height: 6px; }

.price-slider-wrapper input[type=range]::-webkit-slider-thumb { pointer-events: all; -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--C3); border: 3px solid var(--C2); cursor: pointer; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); transition: all 0.2s ease; }

.price-slider-wrapper input[type=range]::-webkit-slider-thumb:hover { background: var(--C4); border-color: var(--C2); transform: scale(1.1); box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3); }

.price-slider-wrapper input[type=range]::-webkit-slider-thumb:active { background: var(--C4); transform: scale(1.15); }

.price-slider-wrapper input[type=range]::-moz-range-thumb { pointer-events: all; -moz-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--C3); border: 3px solid var(--C2); cursor: pointer; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); transition: all 0.2s ease; }

.price-slider-wrapper input[type=range]::-moz-range-thumb:hover { background: var(--C4); border-color: var(--C2); transform: scale(1.1); box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3); }

.price-slider-wrapper input[type=range]::-moz-range-thumb:active { background: var(--C4); transform: scale(1.15); }

/* بک‌دراپ فیلتر موبایل */
.filters-backdrop { display: none; position: fixed; inset: 0; background-color: #000000a3; z-index: 1051; }

.filters-backdrop.is-open { display: block; }

@media (max-width: 767px) {
    /* دکمه فیلتر موبایل: با transform می‌چسبد زیر هدر (بدون پرش) */
    #categoryPageRoot .filters-mobile-sticky { position: relative; z-index: 1; padding-top: 0.35rem; padding-bottom: 0.35rem; margin-bottom: 0.75rem !important; will-change: transform; transition: box-shadow 0.28s ease, background-color 0.28s ease; }

    #categoryPageRoot .filters-mobile-sticky.is-stuck { z-index: 1025; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.14); }

    [data-bs-theme="dark"] #categoryPageRoot .filters-mobile-sticky.is-stuck,
    :root[data-bs-theme="dark"] #categoryPageRoot .filters-mobile-sticky.is-stuck { box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.4); }

    .filters-backdrop {
        display: block;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        backdrop-filter: blur(0);
        -webkit-backdrop-filter: blur(0);
        transition: opacity 0.48s ease, visibility 0.48s ease, backdrop-filter 0.48s ease, -webkit-backdrop-filter 0.48s ease;
    }

    .filters-backdrop.is-open {
        visibility: visible;
        pointer-events: auto;
    }

    .filters-backdrop.is-open.is-visible {
        opacity: 1;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        isolation: isolate;
        transform: translateZ(0);
    }

    .product-filters-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: min(86vw, 340px);
        height: auto;
        max-height: 100vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 1051;
        opacity: 0;
        transform: translate3d(110%, 0, 0);
        transition:
            transform 0.48s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.42s ease,
            visibility 0s linear 0.48s;
        border-radius: 0;
        box-sizing: border-box;
        visibility: hidden;
        pointer-events: none;
        will-change: transform, opacity;
    }

    .product-filters-sidebar.is-open {
        opacity: 1;
        transform: translate3d(0, 0, 0);
        visibility: visible;
        pointer-events: auto;
        padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
        transition:
            transform 0.52s cubic-bezier(0.22, 1, 0.36, 1),
            opacity 0.38s ease,
            visibility 0s;
    }

    /* تا boot انیمیشن‌ها (wpg-anim-ready) سایدبار بسته بماند */
    html:not(.wpg-anim-ready) #categoryPageRoot .product-filters-sidebar:not(.is-open) { transform: translate3d(110%, 0, 0) !important; opacity: 0 !important; }

    #categoryPageRoot .filters-sidebar-col { height: 0; min-height: 0; padding: 0 !important; margin: 0 !important; overflow: visible; border: none; }
    #categoryPageRoot .filters-sidebar-col > aside { margin: 0 !important; }
}

/* Sidebar loading indicator */
.filters-loading-indicator { display: inline-flex; align-items: center; gap: .4rem; visibility: hidden; opacity: 0; transition: opacity .15s ease; position: relative; z-index: 2; }

.filters-loading-indicator.is-loading { visibility: visible; opacity: 1; }

/* شمارنده محصولات هم‌راستا با لودینگ سایدبار (ردیف شمارش) */
.products-count-row { display: flex; align-items: center; justify-content: flex-end; gap: .45rem; min-height: 20px; position: relative; width: 100%; direction: ltr; }
.products-count-row #productsCountText { direction: rtl; text-align: right; }

/* Better checkbox UI (only this page) */
#categoryPageRoot .filters-check { display: flex; align-items: center; gap: .6rem; padding: .35rem .25rem; border-radius: 10px; }

#categoryPageRoot .filters-check .form-check-input { width: 1.15rem; height: 1.15rem; margin: 0; cursor: pointer; border: 2px solid #cfd4da; }

#categoryPageRoot .filters-check .form-check-input:checked { background-color: var(--C1); border-color: var(--C1); }

#categoryPageRoot .filters-check .form-check-input:focus { box-shadow: 0 0 0 0.2rem rgba(143, 31, 47, 0.2); }

#categoryPageRoot .filters-check .form-check-label { cursor: pointer; user-select: none; margin: 0; }

#categoryPageRoot .filters-check:hover { background: rgba(143, 31, 47, 0.06); }

/* سویچ‌های فیلتر: فقط موجود / رایگان / تخفیف‌دار */
#categoryPageRoot .product-filters-sidebar .form-check.form-switch {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 1.9rem;
    padding: 0;
    margin-bottom: 0;
}

#categoryPageRoot .product-filters-sidebar .form-check.form-switch + .form-check.form-switch {
    margin-top: 0.55rem !important;
}

#categoryPageRoot .product-filters-sidebar .form-check.form-switch .form-check-input {
    cursor: pointer;
    flex-shrink: 0;
    width: 3.1em !important;
    height: 1.55em !important;
    margin: 0 !important;
    float: none;
    background-color: #d1d5db !important;
    border: none !important;
    border-radius: 2em !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.06) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3.5' fill='%23fff'/%3e%3c/svg%3e") !important;
    background-position: 0.22em center !important;
    background-repeat: no-repeat !important;
    background-size: 1.22em 1.22em !important;
    transition: background-position 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

#categoryPageRoot .product-filters-sidebar .form-check.form-switch .form-check-input:hover {
    background-color: #c4c8cc !important;
}

#categoryPageRoot .product-filters-sidebar .form-check.form-switch .form-check-input:checked {
    background-color: var(--C1) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12), 0 0 0 1px var(--C1) !important;
    background-position: 1.68em center !important;
}

#categoryPageRoot .product-filters-sidebar .form-check.form-switch .form-check-input:focus {
    outline: none !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08), 0 0 0 3px color-mix(in srgb, var(--C1) 18%, transparent) !important;
}

#categoryPageRoot .product-filters-sidebar .form-check.form-switch .form-check-input:focus:checked {
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12), 0 0 0 3px color-mix(in srgb, var(--C1) 22%, transparent) !important;
}

#categoryPageRoot .product-filters-sidebar .form-check.form-switch .form-check-label {
    cursor: pointer;
    user-select: none;
    margin: 0;
    line-height: 1.45;
}

[dir="rtl"] #categoryPageRoot .product-filters-sidebar .form-check.form-switch .form-check-input,
html[dir="rtl"] #categoryPageRoot .product-filters-sidebar .form-check.form-switch .form-check-input {
    background-position: 1.68em center !important;
}

[dir="rtl"] #categoryPageRoot .product-filters-sidebar .form-check.form-switch .form-check-input:checked,
html[dir="rtl"] #categoryPageRoot .product-filters-sidebar .form-check.form-switch .form-check-input:checked {
    background-position: 0.22em center !important;
}

:root[data-bs-theme="dark"] #categoryPageRoot .product-filters-sidebar .form-check.form-switch .form-check-input {
    background-color: #4b5563 !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

:root[data-bs-theme="dark"] #categoryPageRoot .product-filters-sidebar .form-check.form-switch .form-check-input:hover {
    background-color: #6b7280 !important;
}

:root[data-bs-theme="dark"] #categoryPageRoot .product-filters-sidebar .form-check.form-switch .form-check-input:checked {
    background-color: var(--C3) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--C3) !important;
}

/* بلوک فیلتر تاشو: لیست بلند + گرادیان و دکمه «نمایش بیشتر» — روشن / تیره */
#categoryPageRoot .filter-expand-block { --filter-fade-from: rgba(255, 255, 255, 0); --filter-fade-to: #ffffff; position: relative; margin-top: 0.15rem; }

[data-bs-theme="dark"] #categoryPageRoot .filter-expand-block,
:root[data-bs-theme="dark"] #categoryPageRoot .filter-expand-block { --filter-fade-from: transparent; --filter-fade-to: var(--C2, #14322a); }

#categoryPageRoot .filter-expand-block__clip { position: relative; overflow: hidden; transition: max-height 0.28s ease; }

#categoryPageRoot .filter-expand-block.is-clipped:not(.is-expanded) .filter-expand-block__clip { max-height: 12.85rem; }

#categoryPageRoot .filter-expand-block.is-expanded .filter-expand-block__clip { max-height: none; overflow: visible; }

#categoryPageRoot .filter-expand-block__shade { position: absolute; left: 0; right: 0; bottom: 0; height: 2.75rem; pointer-events: none; opacity: 0; transition: opacity 0.22s ease; background: linear-gradient(to top, var(--filter-fade-to) 28%, var(--filter-fade-from) 100%); }

#categoryPageRoot .filter-expand-block.is-clipped:not(.is-expanded) .filter-expand-block__shade { opacity: 1; }

#categoryPageRoot .filter-expand-block__toggle { margin-top: 0.2rem; padding-left: 0 !important; padding-right: 0 !important; font-size: 0.8125rem; font-weight: 600; color: var(--C1, #8f1f2f) !important; border: none; box-shadow: none !important; align-self: flex-start; }

#categoryPageRoot .filter-expand-block__toggle:hover,
#categoryPageRoot .filter-expand-block__toggle:focus { color: var(--C3, #047b54) !important; text-decoration: underline !important; }

[data-bs-theme="dark"] #categoryPageRoot .filter-expand-block__toggle,
:root[data-bs-theme="dark"] #categoryPageRoot .filter-expand-block__toggle { color: var(--C3, #fed404) !important; }

[data-bs-theme="dark"] #categoryPageRoot .filter-expand-block__toggle:hover,
[data-bs-theme="dark"] #categoryPageRoot .filter-expand-block__toggle:focus,
:root[data-bs-theme="dark"] #categoryPageRoot .filter-expand-block__toggle:hover,
:root[data-bs-theme="dark"] #categoryPageRoot .filter-expand-block__toggle:focus { color: var(--C6, #f3f4f6) !important; }

/* دایره رنگی واریانت فیلتر */
#categoryPageRoot .variant-color-swatch { flex-shrink: 0; width: 1.125rem; height: 1.125rem; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22); }

[data-bs-theme="dark"] #categoryPageRoot .variant-color-swatch,
:root[data-bs-theme="dark"] #categoryPageRoot .variant-color-swatch { border-color: rgba(255, 255, 255, 0.22); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25); }

/* host لیست محصولات — overlay لودینگ روی گرید (fixed) */
#productsWrapper.category-products-loading-host { position: relative; isolation: isolate; }

#productsWrapper.category-products-loading-host .site-loader-spinner { display: none !important; }

#productsWrapper.category-products-loading-host.loading::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 4;
    display: block;
    background: var(--loader-overlay);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: inherit;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.25s ease, backdrop-filter 0.25s ease, -webkit-backdrop-filter 0.25s ease;
}

[data-bs-theme="dark"] #productsWrapper.category-products-loading-host.loading::before,
:root[data-bs-theme="dark"] #productsWrapper.category-products-loading-host.loading::before {
    background: var(--loader-overlay-dark);
}

#productsWrapper.category-products-loading-host .category-products-loader {
    display: none;
    pointer-events: none;
}

#productsWrapper.category-products-loading-host.loading .category-products-loader {
    display: block;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: calc(var(--header-height, 64px) + 12px);
    z-index: 1025;
    width: max-content;
    max-width: calc(100vw - 1.5rem);
}

#productsWrapper.category-products-loading-host.loading #productsContainer {
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.category-products-loader__pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.72rem 1.2rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--C8) 90%, #fff);
    border: 1px solid color-mix(in srgb, var(--C3) 38%, transparent);
    box-shadow: 0 8px 28px color-mix(in srgb, var(--C3) 18%, transparent), 0 2px 8px color-mix(in srgb, var(--C1) 8%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--C1);
    animation: categoryLoaderIn 0.28s ease;
}

.category-products-loader__ring {
    flex-shrink: 0;
}

@keyframes categoryLoaderIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

[data-bs-theme="dark"] #categoryPageRoot .category-products-loader__pill,
:root[data-bs-theme="dark"] #categoryPageRoot .category-products-loader__pill {
    background: color-mix(in srgb, var(--C2) 88%, var(--C4));
    border-color: color-mix(in srgb, var(--C3) 45%, transparent);
    color: var(--C6);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

/* infinite scroll — لیست محصولات دسته */
.category-load-previous-wrap { padding-top: 0.15rem; }
.category-load-previous-btn { min-width: 11rem; font-weight: 600; --bs-btn-hover-color: var(--C3); --bs-btn-active-color: var(--C3); }
.category-load-previous-btn:hover,
.category-load-previous-btn:focus,
.category-load-previous-btn:active { color: var(--C3) !important; }
.category-infinite-scroll-footer { padding: 0.75rem 0 1.5rem; }
.category-infinite-scroll-sentinel { height: 4px; width: 100%; pointer-events: none; }
.category-products-progress { min-height: 1.35rem; font-weight: 600; }
.category-load-more-spinner { display: none; justify-content: center; align-items: center; padding: 0.25rem 0 0.15rem; }
.category-load-more-spinner.is-active { display: flex; }
.category-load-more-spinner__pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--C8) 92%, #fff);
    border: 1px solid color-mix(in srgb, var(--C3) 42%, transparent);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--C3) 12%, transparent);
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--C1);
    line-height: 1.2;
}
.category-load-more-spinner__pill .site-loader-spinner-sm {
    position: static;
    transform: none;
    margin: 0;
    display: block !important;
    width: 0.95rem;
    height: 0.95rem;
    flex-shrink: 0;
    border-width: 2px;
    border-style: solid;
    border-color: color-mix(in srgb, var(--C1) 14%, transparent);
    border-left-color: var(--C3);
    animation: wpg-spinner-spin var(--spinner-duration, 0.75s) linear infinite;
}
[data-bs-theme="dark"] .category-load-more-spinner__pill .site-loader-spinner-sm,
:root[data-bs-theme="dark"] .category-load-more-spinner__pill .site-loader-spinner-sm {
    border-color: color-mix(in srgb, var(--C6) 16%, transparent);
    border-left-color: var(--C3);
}
.category-load-previous-btn.is-loading { pointer-events: none; }
.category-load-more-wrap { padding-top: 0.15rem; }
.category-load-more-btn { min-width: 10rem; font-weight: 600; --bs-btn-hover-color: var(--C3); --bs-btn-active-color: var(--C3); }
.category-load-more-btn:hover,
.category-load-more-btn:focus,
.category-load-more-btn:active { color: var(--C3) !important; }
.category-listing-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.35rem 0.45rem;
    margin-top: 0.5rem;
    padding-top: 0.35rem;
}
.category-listing-pagination__page,
.category-listing-pagination__edge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.15rem;
    min-height: 2.15rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    color: color-mix(in srgb, var(--C5) 88%, var(--C1));
    border: 1px solid color-mix(in srgb, var(--C5) 28%, transparent);
    background: color-mix(in srgb, var(--C8) 94%, #fff);
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.category-listing-pagination__page:hover,
.category-listing-pagination__edge:hover {
    color: var(--C3);
    border-color: color-mix(in srgb, var(--C3) 45%, transparent);
    text-decoration: none;
}
.category-listing-pagination__page.is-current {
    color: var(--on-accent, #fff);
    background: var(--C3);
    border-color: var(--C3);
    cursor: default;
}
.category-listing-pagination__edge { font-size: 1.05rem; padding-inline: 0.65rem; }
.category-seo-pagination-wrap { margin-top: 0.65rem; padding-top: 0.35rem; border-top: 1px solid color-mix(in srgb, var(--C5) 22%, transparent); }
.category-seo-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.2rem 0.35rem; font-size: 0.72rem; line-height: 1.6; }
.category-seo-pagination__link { color: color-mix(in srgb, var(--C5) 82%, var(--C1)); text-decoration: none; padding: 0.1rem 0.2rem; }
.category-seo-pagination__link:hover { color: var(--C3); text-decoration: underline; }
.category-seo-pagination__sep { color: color-mix(in srgb, var(--C5) 55%, transparent); user-select: none; }
[data-bs-theme="dark"] .category-load-more-spinner__pill,
:root[data-bs-theme="dark"] .category-load-more-spinner__pill {
    background: color-mix(in srgb, var(--C2) 90%, var(--C4));
    border-color: color-mix(in srgb, var(--C3) 48%, transparent);
    color: var(--C6);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}
[data-bs-theme="dark"] .category-listing-pagination__page,
:root[data-bs-theme="dark"] .category-listing-pagination__page,
[data-bs-theme="dark"] .category-listing-pagination__edge,
:root[data-bs-theme="dark"] .category-listing-pagination__edge {
    color: color-mix(in srgb, var(--C5) 88%, #fff);
    background: color-mix(in srgb, var(--C2) 90%, var(--C4));
    border-color: color-mix(in srgb, var(--C5) 32%, transparent);
}
[data-bs-theme="dark"] .category-listing-pagination__page.is-current,
:root[data-bs-theme="dark"] .category-listing-pagination__page.is-current {
    color: var(--on-accent, #fff);
    background: var(--C3);
    border-color: var(--C3);
}
[data-bs-theme="dark"] .category-seo-pagination__link,
:root[data-bs-theme="dark"] .category-seo-pagination__link {
    color: color-mix(in srgb, var(--C5) 88%, #fff);
}
