/**
 * Mika Luxury Store - Shop & Archive Stylesheet
 * File: 03-archive-product.css
 * Path: assets/css/03-archive-product.css
 * Scope: Shop, Categories & Sale Archives (Loaded conditionally on is_shop() || is_product_taxonomy())
 * Version: 1.0.0
 * Created By Pixit-ACHTUNg
 */

/* ====================================================================================================
   ------------------ #26: Archive & Shop - Filters Sidebar & Mobile Offcanvas Drawer ------------------
   ==================================================================================================== */

/*--- #26: Archive & Shop - Filters Sidebar & Mobile Offcanvas Drawer ---*/

/* ==========================================================================
   بخش ۸: استایل‌دهی سایدبار، فواصل متقارن ابزارک‌ها و هدر لوکس سایدبار موبایل
   ========================================================================== */

/* ۸.۱ خط جداکننده عمودی بین سایدبار و محصولات در دسکتاپ */
@media (min-width: 1025px) {
    .sidebar-container.wd-sidebar {
        border-left: 1px solid rgba(226, 232, 240, 0.75) !important;
        padding-left: 24px !important;
        padding-right: 0 !important;
    }
}

/* ۸.۲ سربرگ اصیل «فروشگاه میکا» (قفل ارتفاع ۴۴px جهت تراز لیزری با نوار کنترل چپ) */
.sidebar-container .widget-area::before {
    content: 'فروشگاه میکا' !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 44px !important;                 /* قفل دقیق ارتفاع */
    box-sizing: border-box !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    color: #1e293b !important;
    padding: 0 !important;
    margin: 0 !important;
    border-bottom: 1.5px solid rgba(226, 232, 240, 0.8) !important;
    background: transparent !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: none !important;
    letter-spacing: -0.3px !important;
}

/* ۸.۳ حذف فیلترهای بالای محصولات (محدود به صفحات آرشیو ووکامرس) */
.woocommerce-shop .wd-active-filters,
.woocommerce-shop .woodmart-active-filters,
.woocommerce-shop .widget_layered_nav_filters,
.tax-product_cat .wd-active-filters,
.tax-product_cat .woodmart-active-filters,
.tax-product_cat .widget_layered_nav_filters {
    display: none !important;
}

/* ۸.۴ حذف اعداد شمارنده فقط در سایدبار فروشگاه */
.sidebar-container.wd-sidebar .sidebar-widget .count,
.sidebar-container.wd-sidebar .wd-filter-list .count,
.sidebar-container.wd-sidebar .product-categories .count,
.sidebar-container.wd-sidebar .woocommerce-widget-layered-nav-list .count {
    display: none !important;
}

/* ۸.۵ فاصله‌بندی متقارن و خطوط جداکننده مساوی بین تمام ابزارک‌ها */
.sidebar-widget {
    margin: 0 !important;
    padding-top: 12px !important;    /* فاصله دقیق و مساوی ۱۲px از خط بالایی */
    padding-bottom: 12px !important; /* فاصله دقیق و مساوی ۱۲px تا خط پایینی */
    border-bottom: 1px solid rgba(241, 245, 249, 0.95) !important; /* خط جداکننده منظم */
    box-sizing: border-box !important;
}

.sidebar-widget:last-child {
    border-bottom: none !important;
}

/* ۸.۶ عناوین ابزارک‌ها و آیکون‌های استاندارد فشن */
.sidebar-widget .widget-title {
    font-size: 13.5px !important;
    font-weight: 850 !important;
    color: #1e293b !important;
    margin-bottom: 8px !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.wd-product-category-filter .widget-title::before {
    content: '' !important;
    width: 15px !important;
    height: 15px !important;
    display: inline-block !important;
    background-color: #C01157 !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 6h16M4 12h16M4 18h7'/%3E%3C/svg%3E") no-repeat center / contain !important;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 6h16M4 12h16M4 18h7'/%3E%3C/svg%3E") no-repeat center / contain !important;
}

.wd-widget-stock-status .widget-title::before {
    content: '' !important;
    width: 15px !important;
    height: 15px !important;
    display: inline-block !important;
    background-color: #C01157 !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z'/%3E%3C/svg%3E") no-repeat center / contain !important;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z'/%3E%3C/svg%3E") no-repeat center / contain !important;
}

.woodmart-price-filter .widget-title::before {
    content: '' !important;
    width: 15px !important;
    height: 15px !important;
    display: inline-block !important;
    background-color: #C01157 !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z'/%3E%3C/svg%3E") no-repeat center / contain !important;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z'/%3E%3C/svg%3E") no-repeat center / contain !important;
}

[id*="layered-nav"]:has(.wd-bg) .widget-title::before,
[id*="layered-nav-2"] .widget-title::before {
    content: '' !important;
    width: 15px !important;
    height: 15px !important;
    display: inline-block !important;
    background-color: #C01157 !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M7 21a4 4 0 01-4-4 5 5 0 013-4.582V5a2 2 0 012-2h4a2 2 0 012 2v7.418c1.79.896 3 2.764 3 4.582a4 4 0 01-4 4H7z'/%3E%3C/svg%3E") no-repeat center / contain !important;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M7 21a4 4 0 01-4-4 5 5 0 013-4.582V5a2 2 0 012-2h4a2 2 0 012 2v7.418c1.79.896 3 2.764 3 4.582a4 4 0 01-4 4H7z'/%3E%3C/svg%3E") no-repeat center / contain !important;
}

[id*="layered-nav"]:has(.wd-text) .widget-title::before,
[id*="layered-nav-3"] .widget-title::before {
    content: '' !important;
    width: 15px !important;
    height: 15px !important;
    display: inline-block !important;
    background-color: #C01157 !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z'/%3E%3C/svg%3E") no-repeat center / contain !important;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z'/%3E%3C/svg%3E") no-repeat center / contain !important;
}

/* ۸.۷ تورفتگی یکدست ابزارک‌ها */
.sidebar-widget .product-categories,
.sidebar-widget .wd-checkboxes-on,
.sidebar-widget .woodmart-price-filter,
.sidebar-widget .wd-swatches-filter {
    padding-right: 12px !important;
    box-sizing: border-box !important;
}

/* دسته‌بندی‌ها */
.sidebar-widget .product-categories li {
    margin-bottom: 2px !important;
    padding: 0 !important;
    line-height: 1.3 !important;
}

.sidebar-widget .product-categories li a {
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    padding: 3px 8px !important;
    border-radius: 8px !important;
}

.sidebar-widget .product-categories li a:hover {
    color: #C01157 !important;
    background-color: #f8fafc !important;
    transform: translateX(-3px) !important;
}

.sidebar-widget .product-categories li.current-cat a,
.sidebar-widget .product-categories li.chosen a,
.sidebar-widget .product-categories li.wd-active a,
.sidebar-widget .product-categories li a.current-state {
    background-color: #fff0f5 !important;
    color: #C01157 !important;
    font-weight: 850 !important;
}

/* وضعیت کالا */
.sidebar-widget .wd-checkboxes-on li {
    margin-bottom: 2px !important;
}

.sidebar-widget .wd-checkboxes-on li a {
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 2px 6px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

.sidebar-widget .wd-checkboxes-on li a:hover {
    transform: translateX(-3px) !important;
}

.sidebar-widget .wd-checkboxes-on li a::before {
    border-radius: 5px !important;
    border: 1.5px solid #cbd5e1 !important;
    width: 15px !important;
    height: 15px !important;
    transition: all 0.2s ease !important;
}

.sidebar-widget .wd-checkboxes-on li.chosen a,
.sidebar-widget .wd-checkboxes-on li.wd-active a {
    color: #C01157 !important;
    font-weight: 850 !important;
    background-color: #fff0f5 !important;
}

.sidebar-widget .wd-checkboxes-on li.chosen a::before,
.sidebar-widget .wd-checkboxes-on li.wd-active a::before {
    border-color: #C01157 !important;
    background-color: #C01157 !important;
}

/* فیلتر قیمت */
.sidebar-widget .woodmart-price-filter ul {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    padding: 0 !important;
    margin: 2px 0 0 0 !important;
    list-style: none !important;
}

.sidebar-widget .woodmart-price-filter li {
    margin: 0 !important;
    width: 100% !important;
}

.sidebar-widget .woodmart-price-filter li a {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    padding: 2px 6px !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #475569 !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    gap: 8px !important;
}

.sidebar-widget .woodmart-price-filter li a::before {
    content: '' !important;
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    min-height: 15px !important;
    border-radius: 5px !important;
    border: 1.5px solid #cbd5e1 !important;
    background: #ffffff !important;
    display: inline-block !important;
    transition: all 0.2s ease !important;
}

.sidebar-widget .woodmart-price-filter li a:hover {
    color: #C01157 !important;
    transform: translateX(-3px) !important;
}

.sidebar-widget .woodmart-price-filter li a:hover::before {
    border-color: #C01157 !important;
}

.sidebar-widget .woodmart-price-filter li a.current-state {
    background-color: #fff0f5 !important;
    color: #C01157 !important;
    font-weight: 850 !important;
}

.sidebar-widget .woodmart-price-filter li a.current-state::before {
    border-color: #C01157 !important;
    background-color: #C01157 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E") !important;
    background-size: 11px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.sidebar-widget .woodmart-price-filter li a .amount {
    color: inherit !important;
    font-size: 11.5px !important;
    font-weight: 750 !important;
}

/* فیلتر رنگ‌ها */
.sidebar-widget.woodmart-woocommerce-layered-nav .wd-scroll-content {
    max-height: none !important;
}

.sidebar-widget .wd-swatches-filter.wd-layout-list li {
    margin-bottom: 2px !important;
    padding: 0px 6px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

.sidebar-widget .wd-swatches-filter.wd-layout-list .layered-nav-link {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    width: 100% !important;
    transition: all 0.2s ease !important;
}

.sidebar-widget .wd-swatches-filter.wd-layout-list .layered-nav-link:hover {
    color: #C01157 !important;
    transform: translateX(-3px) !important;
}

.sidebar-widget .wd-swatches-filter .wd-swatch.wd-bg {
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    min-height: 17px !important;
    transition: all 0.2s ease !important;
}

.sidebar-widget .wd-swatches-filter .wd-swatch::after,
.sidebar-widget .wd-swatches-filter .wd-swatch::before,
.sidebar-widget .wd-swatches-filter .wd-swatch-bg::after,
.sidebar-widget .wd-swatches-filter .wd-swatch-bg::before {
    display: none !important;
    content: none !important;
}

.sidebar-widget .wd-swatches-filter.wd-layout-list li.chosen,
.sidebar-widget .wd-swatches-filter.wd-layout-list li.wd-active,
.sidebar-widget .wd-swatches-filter.wd-layout-list li:has(.current-state) {
    background-color: #fff0f5 !important;
}

.sidebar-widget .wd-swatches-filter.wd-layout-list li.chosen .layered-nav-link,
.sidebar-widget .wd-swatches-filter.wd-layout-list li.wd-active .layered-nav-link {
    color: #C01157 !important;
    font-weight: 850 !important;
}

.sidebar-widget .wd-swatches-filter.wd-layout-list li.chosen .wd-swatch.wd-bg,
.sidebar-widget .wd-swatches-filter.wd-layout-list li.wd-active .wd-swatch.wd-bg {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 3.5px #C01157 !important;
}

/* فیلتر اندازه‌ها */
.sidebar-widget.woodmart-woocommerce-layered-nav .wd-scroll,
.sidebar-widget.woodmart-woocommerce-layered-nav .wd-scroll-content {
    overflow: visible !important;
    max-height: none !important;
}

.sidebar-widget .wd-swatches-filter.wd-layout-inline {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px 6px !important;
    width: 100% !important;
    padding: 4px 20px !important;
    margin: 4px 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

.sidebar-widget .wd-swatches-filter.wd-layout-inline li {
    margin: 0 !important;
    width: 100% !important;
    overflow: visible !important;
}

.sidebar-widget .wd-swatches-filter.wd-layout-inline .layer-term-lable,
.sidebar-widget .wd-swatches-filter.wd-layout-inline .wd-tooltip-label,
.sidebar-widget .wd-swatches-filter.wd-layout-inline .wd-tooltip:hover::after,
.sidebar-widget .wd-swatches-filter.wd-layout-inline .wd-tooltip:hover::before,
.sidebar-widget .wd-swatches-filter.wd-layout-inline .tooltip {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.sidebar-widget .wd-swatches-filter.wd-layout-inline .layered-nav-link {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    display: flex !important;
    width: 100% !important;
    overflow: visible !important;
}

.sidebar-widget .wd-swatches-filter.wd-layout-inline .wd-swatch.wd-text {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 27px !important;
    padding: 0 !important;
    border-radius: 14px !important;
    border: 1.5px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #475569 !important;
    font-size: 11px !important;
    font-weight: 750 !important;
    box-shadow: none !important;
    outline: none !important;
    transition: all 0.2s ease !important;
}

.sidebar-widget .wd-swatches-filter.wd-layout-inline .wd-swatch::before,
.sidebar-widget .wd-swatches-filter.wd-layout-inline .wd-swatch::after,
.sidebar-widget .wd-swatches-filter.wd-layout-inline .wd-swatch-text::before,
.sidebar-widget .wd-swatches-filter.wd-layout-inline .wd-swatch-text::after {
    display: none !important;
    content: none !important;
}

.sidebar-widget .wd-swatches-filter.wd-layout-inline .wd-swatch.wd-text:hover {
    border-color: #C01157 !important;
    color: #C01157 !important;
    background-color: #fff8fa !important;
}

.sidebar-widget .wd-swatches-filter.wd-layout-inline li.chosen .wd-swatch.wd-text,
.sidebar-widget .wd-swatches-filter.wd-layout-inline li.wd-active .wd-swatch.wd-text {
    border-color: #C01157 !important;
    background-color: #fff0f5 !important;
    color: #C01157 !important;
    font-weight: 900 !important;
}


/* ۸.۱۱ لودر چسبان و بومی وودمارت (تراز ۱۰۰٪ در مرکز افقی و دامنه اسکرول بهینه) */

/* انیمیشن چرخش مستقل دایره */
@keyframes wd-spin-pure {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ۱. محو شدن نرم محصولات در زمان لودینگ */
.products.wd-loading,
.site-content.wd-loading,
.woodmart-archive-shop.wd-loading {
    opacity: 0.35 !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease !important;
}

/* ۲. کانتینر لودر چسبان و بومی وودمارت */
.wd-sticky-loader,
.wd-content-loader {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 500 !important;
    pointer-events: none !important;
}

/* ۳. کانتینر اسپینر متحرک */
.wd-sticky-loader .wd-loader,
.wd-loader {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 240px !important;
    max-width: 240px !important;
    height: auto !important;
    min-height: auto !important;
    border: none !important;
    background: transparent !important;
    background-image: none !important;
    -webkit-mask: none !important;
    mask: none !important;
    font-size: 0 !important;
    line-height: 0 !important;
    box-shadow: none !important;
    animation: none !important;
    padding: 0 !important;
    margin: 0 !important;
    transform: translateX(-50%) !important;
    box-sizing: border-box !important;
    direction: rtl !important;
}

/* پنهان‌سازی هر تگ یا آیکون داخلی تزریق‌شده توسط وودمارت */
.wd-loader * {
    display: none !important;
}

/* سنتر دقیق روی محصولات در دسکتاپ (با کسر سایدبار راست) */
@media (min-width: 1025px) {
    .wd-sticky-loader,
    .wd-content-loader {
        top: 35px !important; /* نزدیکی استاندارد تا نوار بالا در دسکتاپ */
    }

    .wd-sticky-loader .wd-loader,
    .wd-loader {
        left: calc(50% - 130px) !important;
        right: auto !important;
    }
}


/* ۴. دایره چرخشی یاقوتی در مرکز */
.wd-sticky-loader .wd-loader::before {
    content: '' !important;
    width: 42px !important;
    height: 42px !important;
    border: 3.5px solid rgba(192, 17, 87, 0.15) !important;
    border-top-color: #C01157 !important;
    border-right-color: #C01157 !important;
    border-radius: 50% !important;
    animation: wd-spin-pure 0.75s linear infinite !important;
    box-shadow: 0 0 16px rgba(192, 17, 87, 0.25) !important;
    margin: 0 auto 12px auto !important;
    display: block !important;
    box-sizing: border-box !important;
    align-self: center !important;
}

/* ۵. متن فارسی بدون ماسک وکتور و فونت‌آیکون وودمارت (تراز ۱۰۰٪ محوری) */
.wd-sticky-loader .wd-loader::after {
    content: 'در حال به‌روزرسانی محصولات' !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 850 !important;
    color: #C01157 !important;
    letter-spacing: -0.2px !important;
    white-space: nowrap !important;
    display: block !important;
    text-align: center !important;
    line-height: 1.4 !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    position: static !important;
    transform: none !important;
    align-self: center !important;
    -webkit-mask: none !important;
    mask: none !important;
    background: none !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* سنتر افقی دقیق و فیکس لودینگ در موبایل و تبلت */
@media (max-width: 1024px) {
    .wd-sticky-loader,
    .wd-content-loader {
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        pointer-events: none !important;
    }

    .wd-sticky-loader .wd-loader,
    .wd-loader {
        /* تراز سنتر افقی بدون باگ RTL */
        left: 0 !important;
        right: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        
        /* حذف ترنسفرم افقی برای جلوگیری از پرش به حاشیه */
        transform: none !important; 
        
        width: 240px !important;
        max-width: 90% !important; /* جلوگیری از اسکرول افقی در صفحات خیلی کوچک */
    }
}

/* ==========================================================================
   بخش ۸.۸ (یکپارچه‌شده با ۸.۱۲): سایدبار فیلتر موبایل و تبلت - بدون تداخل و اسکرول کامل
   ========================================================================== */
@media (max-width: 1024px) {
    /* ۱. کانتینر اصلی سایدبار با ارتفاع داینامیک ۱۰۰dvh و انحنای ۲۶px */
    .sidebar-container.wd-sidebar {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 310px !important;
        max-width: 85vw !important;
        height: 100% !important;
        height: 100dvh !important; /* پوشش ارتفاع واقعی صفحه بدون بریدگی نوار ابزار */
        max-height: 100dvh !important;
        background-color: #ffffff !important;
        z-index: 1000000 !important;
        padding: 0 !important;
        box-shadow: none !important;
        box-sizing: border-box !important;

        overflow: hidden !important; 
        display: flex !important;
        flex-direction: column !important;

        border-top-left-radius: 26px !important;
        border-bottom-left-radius: 26px !important;
        border-top-right-radius: 0 !important;
        border-bottom-right-radius: 0 !important;

        transform: translate3d(105%, 0, 0) !important;
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease !important;
        will-change: transform !important;
    }

    /* باز شدن انحصاری فقط با دکمه اختصاصی خود فیلتر (حذف قطعی تداخل با منوی سرچ و همبرگری) */
    .sidebar-container.wd-sidebar.wd-opened {
        transform: translate3d(0, 0, 0) !important;
        visibility: visible !important;
        display: flex !important;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.25) !important;
    }

    .sidebar-container.wd-sidebar:not(.wd-opened) {
        transform: translate3d(105%, 0, 0) !important;
        visibility: hidden !important;
    }

    /* ۲. سربرگ سایدبار موبایل با آیکون قیف و انحنای متقارن */
    .sidebar-container .wd-heading {
        flex-shrink: 0 !important;
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 52px !important;
        background: #ffffff !important;
        border-bottom: 1px solid rgba(226, 232, 240, 0.8) !important;
        border-top-left-radius: 26px !important;
        padding: 0 16px !important;
        margin-bottom: 0 !important;
    }

    /* آیکون قیف یاقوتی */
    .sidebar-container .wd-heading::before {
        content: '' !important;
        width: 20px !important;
        height: 20px !important;
        display: block !important;
        background-color: #C01157 !important;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z'/%3E%3C/svg%3E") no-repeat center / contain !important;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z'/%3E%3C/svg%3E") no-repeat center / contain !important;
    }

    /* دکمه ضربدر بستن سایدبار */
    .sidebar-container .close-side-widget {
        position: absolute !important;
        top: 50% !important;
        left: 14px !important;
        transform: translateY(-50%) !important;
        z-index: 10 !important;
        margin: 0 !important;
    }

    .sidebar-container .close-side-widget .wd-action-text {
        display: none !important;
    }

    .sidebar-container .close-side-widget a {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: transparent !important;
        border: none !important;
        color: #94a3b8 !important;
        font-size: 20px !important;
        font-weight: 900 !important;
        padding: 4px !important;
        line-height: 1 !important;
        transition: all 0.25s ease !important;
    }

    .sidebar-container .close-side-widget a:hover {
        color: #C01157 !important;
        transform: scale(1.1) !important;
    }

    /* ۳. محتوای ابزارک‌ها با پدینگ کف ۱۱۰px برای اسکرول کامل و بدون مانع تا انتهای سایزها */
    .sidebar-container .widget-area {
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 10px 16px calc(110px + env(safe-area-inset-bottom, 0px)) 16px !important;
        box-sizing: border-box !important;

        scrollbar-width: thin !important;
        scrollbar-color: #C01157 #fdf2f7 !important;
    }

    .sidebar-container .widget-area::-webkit-scrollbar {
        width: 5px !important;
    }

    .sidebar-container .widget-area::-webkit-scrollbar-track {
        background: #fdf2f7 !important;
        border-radius: 10px !important;
    }

    .sidebar-container .widget-area::-webkit-scrollbar-thumb {
        background-color: #C01157 !important;
        border-radius: 10px !important;
    }
}

/* ====================================================================================================
   ----------------- #27: Archive & Shop - Loop Head Controls, Ordering & Breadcrumbs ------------------
   ==================================================================================================== */

/*--- #27: Archive & Shop - Loop Head Controls, Ordering & Breadcrumbs ---*/

/* ==========================================================================
   بخش ۹: استایل‌دهی نوار کنترل بالای محصولات (تراز عمودی ۱۰۰٪ در مرکز دو خط)
   ========================================================================== */

/* ۹.۱ دسکتاپ: تقارن عمودی ۱۴px مساوی بین دو خط و تراز مماس با لبه محصولات */
.shop-loop-head {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: auto !important;
    min-height: auto !important;
    margin: 0 0 18px 0 !important;
    padding: 14px 8px 14px 8px !important;       /* پدینگ ۱۴px مساوی از بالا و پایین جهت سنتر دقیق بین دو خط */
    border-bottom: 1.5px solid rgba(226, 232, 240, 0.8) !important;
    box-sizing: border-box !important;
}

/* حذف عبارت انگلیسی اضافه Showing all results */
.woocommerce-result-count {
    display: none !important;
}

/* ۹.۳ بازطراحی دکمه منوی مرتب‌سازی در دسکتاپ (لبه چپ مماس با محصول آخر) */
.shop-loop-head form.woocommerce-ordering {
    margin: 0 !important;
}

.woocommerce-ordering select.orderby {
    height: 33px !important;
    padding: 0 12px 0 26px !important;
    border-radius: 20px !important;
    border: 1.5px solid #cbd5e1 !important;
    background-color: #ffffff !important;
    color: #1e293b !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    outline: none !important;
}

.woocommerce-ordering select.orderby:hover,
.woocommerce-ordering select.orderby:focus {
    border-color: #C01157 !important;
    box-shadow: 0 0 0 3px rgba(192, 17, 87, 0.1) !important;
}

/* ۹.۴ قفل شدن اعداد نمایش عددی (۴ / ۸ / ۱۶ / ۲۴) در مرکز ۵۰٪ مطلق نوار دسکتاپ */
.shop-loop-head .wd-products-per-page {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
    white-space: nowrap !important;
    z-index: 2 !important;
    font-size: 12px !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.wd-products-per-page .per-page-title {
    font-weight: 750 !important;
    color: #334155 !important;
    margin-left: 4px !important;
}

.wd-products-per-page a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 22px !important;
    height: 22px !important;
    padding: 0 4px !important;
    border-radius: 6px !important;
    color: #475569 !important;
    font-weight: 800 !important;
    font-size: 11.5px !important;
    transition: all 0.2s ease !important;
}

.wd-products-per-page a:hover {
    color: #C01157 !important;
}

.wd-products-per-page a.current-page {
    background-color: #fff0f5 !important;
    color: #C01157 !important;
    font-weight: 900 !important;
}

/* ۹.۵ استقرار آیکون‌های گرید دقیقاً در کنار منوی مرتب‌سازی در سمت چپ */
.shop-loop-head .wd-products-shop-view {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-left: -5px !important;
    margin-right: 0 !important;
}

.wd-products-shop-view a {
    color: #cbd5e1 !important;
    transition: all 0.2s ease !important;
}

.wd-products-shop-view a:hover,
.wd-products-shop-view a.current-variation {
    color: #C01157 !important;
    transform: scale(1.08) !important;
}

/* ۹.۱ دسکتاپ: قفل ارتفاع ۴۴px و انطباق ۱۰۰٪ خط زیرین با خط سایدبار */
@media (min-width: 1025px) {

    .shop-loop-head {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: 44px !important;             /* قفل دقیق ارتفاع برابر با سایدبار */
        min-height: 44px !important;
        max-height: 44px !important;
        margin: 0 0 18px 0 !important;
        padding: 0 8px !important;           /* حذف پدینگ‌های بالا و پایین */
        border-bottom: 1.5px solid rgba(226, 232, 240, 0.8) !important;
        box-sizing: border-box !important;
    }
}

/* ==========================================================================
   تراز متقارن نوار کنترل در صفحات دسته‌بندی و آرشیو (تبلت و موبایل)
   ========================================================================== */
@media (max-width: 1024px) {
    /* ۱. حذف ۴۰ پیکسل فضای خالی پیش‌فرض قالب در صفحات دسته‌بندی بدون دست زدن به صفحه اصلی فروشگاه */
    .tax-product_cat .main-page-wrapper,
    .tax-product_tag .main-page-wrapper,
    .archive:not(.woocommerce-shop) .main-page-wrapper {
        padding-top: 4px !important;
    }

    /* ۲. صفر کردن مارجین‌های کاذب محتوا جهت تقارن دقیق فاصله بالا با خط پایین */
    .tax-product_cat .site-content,
    .tax-product_tag .site-content,
    .archive:not(.woocommerce-shop) .site-content {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
}

/* ==========================================================================
   ۹.۶ نسخه بهینه‌سازی‌شده تبلت (iPad و نمایشگرهای بین ۷۶۹ تا ۱۰۲۴ پیکسل)
   ========================================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .shop-loop-head .wd-breadcrumbs {
        width: 100% !important;
        text-align: right !important;
        display: flex !important;
        justify-content: flex-start !important;
        margin-bottom: 8px !important;
        border: none !important;
    }

    .shop-loop-head .wd-shop-tools:first-child,
    .shop-loop-head .wd-shop-tools:first-child::after,
    .shop-loop-head .wd-breadcrumbs::after {
        border: none !important;
        content: none !important;
        display: none !important;
    }

    /* تراز دقیق و مماس لبه‌های چپ و راست با لبه عکس محصولات بدون پدینگ اضافه */
    .shop-loop-head {
        position: relative !important;
        width: 100% !important;
        padding: 14px 8px 14px 8px !important;               /* صفر کردن پدینگ چپ و راست جهت انطباق عمود بر لبه محصولات */
        margin-bottom: 18px !important;
        border-bottom: 1.5px solid rgba(226, 232, 240, 0.8) !important;
    }

    .shop-loop-head .wd-shop-tools:last-child {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        padding: 0 !important;
    }

    /* دکمه کپسولی فیلترها مماس بر لبه راست محصول */
    .shop-loop-head .wd-show-sidebar-btn {
        margin: 0 !important;
    }

    .shop-loop-head .wd-show-sidebar-btn a {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        padding: 6px 14px !important;
        border: 1.5px solid #cbd5e1 !important;
        border-radius: 20px !important;
        background: #ffffff !important;
        color: #1e293b !important;
        text-decoration: none !important;
        font-size: 12px !important;
        font-weight: 750 !important;
        transition: all 0.2s ease !important;
    }

    .shop-loop-head .wd-show-sidebar-btn a:hover {
        border-color: #C01157 !important;
        background-color: #fff0f5 !important;
        color: #C01157 !important;
    }

    .shop-loop-head .wd-show-sidebar-btn .wd-action-icon {
        width: 14px !important;
        height: 14px !important;
        display: inline-block !important;
        background-color: #C01157 !important;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3'/%3E%3C/svg%3E") no-repeat center / contain !important;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3'/%3E%3C/svg%3E") no-repeat center / contain !important;
    }

    .shop-loop-head .wd-show-sidebar-btn .wd-action-icon::before {
        display: none !important;
    }

    .shop-loop-head .wd-show-sidebar-btn .wd-action-text {
        font-size: 0 !important;
    }

    .shop-loop-head .wd-show-sidebar-btn .wd-action-text::after {
        content: 'فیلترها' !important;
        font-family: "Vazirmatn", sans-serif !important;
        font-size: 12px !important;
        font-weight: 750 !important;
        color: inherit !important;
    }

    /* قفل شدن اعداد نمایش در مرکز مطلق نوار تبلت */
    .shop-loop-head .wd-products-per-page {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin: 0 !important;
        white-space: nowrap !important;
        z-index: 2 !important;
    }

    /* انتقال گرید به سمت چپ کنار مرتب‌سازی در تبلت */
    .shop-loop-head .wd-products-shop-view {
        margin-right: auto !important;
        margin-left: -5px !important;
    }
}

/* ==========================================================================
   ۹.۷ نسخه کاملاً پایدار موبایل (گوشی‌های هوشمند تا ۷۶۸ پیکسل)
   ========================================================================== */
@media (max-width: 768px) {
    .shop-loop-head > .wd-shop-tools:first-child,
    .shop-loop-head .woocommerce-result-count,
    .shop-loop-head .woocommerce-breadcrumb,
    .shop-loop-head .yoast-breadcrumb,
    .shop-loop-head .wd-products-per-page {
        display: none !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
    }

    .shop-loop-head {
        display: block !important;
        width: 100% !important;
        margin-top: 0 !important;
        margin-bottom: 14px !important;
        padding: 14px 4px 14px 4px !important;
        border-bottom: 1.5px solid rgba(226, 232, 240, 0.8) !important;
        box-sizing: border-box !important;
    }

    .shop-loop-head > .wd-shop-tools:last-child {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 !important;
        margin: 0 !important;
        height: 34px !important;
    }

    /* بال راست (فیلترها) */
    .shop-loop-head .wd-show-sidebar-btn {
        margin: 0 !important;
        order: 1 !important;
    }

    .shop-loop-head .wd-show-sidebar-btn > a {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        height: 32px !important;
        padding: 0 12px !important;
        border-radius: 20px !important;
        background: #ffffff !important;
        border: 1.5px solid #cbd5e1 !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03) !important;
        text-decoration: none !important;
        line-height: 1 !important;
    }

    .shop-loop-head .wd-show-sidebar-btn .wd-action-icon {
        width: 14px !important;
        height: 14px !important;
        display: inline-block !important;
        background-color: #C01157 !important;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3'/%3E%3C/svg%3E") no-repeat center / contain !important;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3'/%3E%3C/svg%3E") no-repeat center / contain !important;
    }

    .shop-loop-head .wd-show-sidebar-btn .wd-action-icon::before {
        display: none !important;
    }

    .shop-loop-head .wd-show-sidebar-btn .wd-action-text {
        font-size: 0 !important;
    }

    .shop-loop-head .wd-show-sidebar-btn .wd-action-text::after {
        content: 'فیلترها' !important;
        font-family: "Vazirmatn", sans-serif !important;
        font-size: 11.5px !important;
        font-weight: 850 !important;
        color: #1e293b !important;
    }

    /* جفت شدن آیکون‌های گرید در کنار دکمه مرتب‌سازی در سمت چپ */
    .shop-loop-head .wd-products-shop-view {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        margin-right: auto !important;          /* هل دادن گریدها به سمت چپ */
        margin-left: 8px !important;             /* فاصله ۸px تا دکمه دایره‌ای مرتب‌سازی */
        height: 32px !important;
        order: 2 !important;
    }

    .shop-loop-head .wd-products-shop-view a {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 26px !important;
        height: 26px !important;
    }

    /* دکمه دایره‌ای بی‌نقص ۳۴px مرتب‌سازی (حذف کامل بیضی شدن و کشیدگی) */
    .shop-loop-head form.woocommerce-ordering {
        margin: 0 !important;
        order: 3 !important;
        flex: 0 0 34px !important;              /* قفل ابعاد و جلوگیری ۱۰۰٪ از کشیدگی فرم */
        width: 34px !important;
        height: 34px !important;
    }

    .shop-loop-head .woocommerce-ordering.wd-ordering-mb-icon,
    .shop-loop-head .woocommerce-ordering {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;
        border-radius: 50% !important;          /* دایره کامل و ماندگار */
        aspect-ratio: 1 / 1 !important;
        background: #ffffff !important;
        border: 1.5px solid #cbd5e1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
        position: relative !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03) !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .shop-loop-head .woocommerce-ordering::before,
    .shop-loop-head .woocommerce-ordering::after,
    .shop-loop-head .woocommerce-ordering.wd-ordering-mb-icon::before,
    .shop-loop-head .woocommerce-ordering.wd-ordering-mb-icon::after {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1 !important;
    }

    .shop-loop-head .woocommerce-ordering.wd-ordering-mb-icon select.orderby,
    .shop-loop-head .woocommerce-ordering select.orderby {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        opacity: 0 !important;
        cursor: pointer !important;
        padding: 0 !important;
        margin: 0 !important;
        z-index: 5 !important;
    }
}


/* ====================================================================================================
   ----------------------- #28: Archive & Shop - Luxury Bento Categories Banner ------------------------
   ==================================================================================================== */

/*--- #28: Archive & Shop - Luxury Bento Categories Banner ---*/

/* ==========================================================================
   بخش ۱۰: کارت‌های دسته‌بندی لوکس (دسکتاپ افقی + گرید ۴ ستونه اپلیکیشنی در موبایل)
   ========================================================================== */

/* ۱۰.۱ انهدام کادر خالی عنوان در تمام دسته‌بندی‌ها (مشابه روش بخش #36) */
.tax-product_cat .wd-page-title,
.tax-product_cat .page-title,
.tax-product_tag .wd-page-title,
.tax-product_tag .page-title,
.page-title-shop,
.page-title-default {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ۱۰.۲ کانتینر نوار دسته‌بندی (استایل‌های داخلی کارت‌ها به صورت داینامیک از ماژول PiXiT لود می‌شوند) */
.shop-custom-categories-banner {
    display: block !important;
    clear: both !important;
    width: 100% !important;
    margin-bottom: 0 !important;
    padding-bottom: 16px !important;
    border-bottom: 1.5px solid rgba(226, 232, 240, 0.85) !important;
}

/* حذف سفیدی ۴۰ پیکسلی بالای صفحه در دسته‌بندی‌ها در تبلت و موبایل */
@media (max-width: 1024px) {
    .tax-product_cat .main-page-wrapper,
    .tax-product_tag .main-page-wrapper {
        margin-top: -22px !important;
        padding-top: 0 !important;
    }

    .tax-product_cat .site-content,
    .tax-product_tag .site-content {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
}


/* ====================================================================================================
   ------------------ #36: Archive - Special Sale Landing Page (Term 6190) Overrides -------------------
   ==================================================================================================== */

/*--- #36: Archive - Special Sale Landing Page (Term 6190) Overrides ---*/

/* ۱. مخفی‌سازی قطعی دسته فروش ویژه از ابزارک فیلتر دسته‌بندی در تمام سایت (برگرفته از #46) */
.wd-product-category-filter li.cat-item-6190,
.wd-product-category-filter li:has(a[href*="sale"]) {
    display: none !important;
}

/* ۲. انهدام قطعی و ۱۰۰٪ کادر خالی عنوان در صفحه فروش ویژه */
.term-sale .wd-page-title,
.term-6190 .wd-page-title,
body[class*="sale"] .wd-page-title,
body.tax-product_cat.term-sale .page-title {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ۳. دسکتاپ: تنظیم فاصله بالای بنر هم‌تراز با صفحه Shop */
.term-sale .main-page-wrapper,
.term-6190 .main-page-wrapper {
    margin-top: -20px !important;
    padding-top: 0 !important;
}

.term-sale .site-content,
.term-6190 .site-content {
    display: flex !important;
    flex-direction: column !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* ۴. دسکتاپ: استقرار بنر در رتبه اول + خط جداکننده متقارن ۱۸px در زیر آن */
.term-sale .wd-term-desc,
.term-6190 .wd-term-desc {
    order: -99 !important;
    width: 100% !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 18px !important;           /* فاصله دقیق ۱۸px از زیر بنر تا خط اول */
    margin-bottom: 14px !important;            /* فاصله متقارن ۱۴px از خط تا نوار ابزار */
    border-bottom: 1px solid #f1f5f9 !important; /* خط جداکننده اول */
}

/* ۵. دسکتاپ: چیدمان متقارن نوار کنترل */
.term-sale .shop-loop-head,
.term-6190 .shop-loop-head {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 14px !important;
    margin-bottom: 18px !important;
    padding-right: 10px !important;              /* تراز عمود و مماس آیکون خانه با لبه محصول اول */
    padding-left: 10px !important;               /* تراز عمود و مماس دراپ‌داون با لبه محصول آخر */
    border-bottom: 1px solid #f1f5f9 !important; /* خط جداکننده دوم زیر نوار */
    box-sizing: border-box !important;
}

/* مسیر راهنما */
.term-sale .shop-loop-head .wd-breadcrumbs,
.term-6190 .shop-loop-head .wd-breadcrumbs {
    margin: 0 !important;
    padding: 0 !important;
}

/* قفل شدن اعداد نمایش در ۵۰٪ مرکز هندسی نوار */
.term-sale .shop-loop-head .wd-products-per-page,
.term-6190 .shop-loop-head .wd-products-per-page {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
    white-space: nowrap !important;
    z-index: 2 !important;
}

/* جفت شدن آیکون‌های گرید در کنار منوی مرتب‌سازی */
.term-sale .shop-loop-head .wd-products-shop-view,
.term-6190 .shop-loop-head .wd-products-shop-view {
    margin-left: -8px !important;
    margin-right: 0 !important;
}

.term-sale .shop-loop-head form.woocommerce-ordering,
.term-6190 .shop-loop-head form.woocommerce-ordering {
    margin: 0 !important;
}

/* ۶. نسخه تبلت (نمایشگرهای بین ۷۶۸ تا ۱۰۲۴ پیکسل) */
@media (min-width: 768px) and (max-width: 1024px) {
    .term-sale .main-page-wrapper,
    .term-6190 .main-page-wrapper {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .term-sale .site-content,
    .term-6190 .site-content {
        display: flex !important;
        flex-direction: column !important;
        padding-top: 0 !important;
        width: 100% !important;
    }

    .term-sale .wd-term-desc,
    .term-6190 .wd-term-desc {
        order: -99 !important;
        width: 100% !important;
        margin-top: 0 !important;
        padding-bottom: 18px !important;
        margin-bottom: 14px !important;
        border-bottom: 1px solid #f1f5f9 !important;
    }

    .term-sale .shop-loop-head .wd-breadcrumbs,
    .term-6190 .shop-loop-head .wd-breadcrumbs {
        width: 100% !important;
        text-align: right !important;
        display: flex !important;
        justify-content: flex-start !important;
        margin-bottom: 8px !important;
        border: none !important;
    }

    .term-sale .shop-loop-head .wd-shop-tools:first-child,
    .term-sale .shop-loop-head .wd-shop-tools:first-child::after,
    .term-sale .shop-loop-head .wd-breadcrumbs::after,
    .term-6190 .shop-loop-head .wd-shop-tools:first-child::after,
    .term-6190 .shop-loop-head .wd-breadcrumbs::after {
        border: none !important;
        content: none !important;
        display: none !important;
    }

    .term-sale .shop-loop-head,
    .term-6190 .shop-loop-head {
        position: relative !important;
        width: 100% !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 14px !important;
        margin-bottom: 18px !important;
        border-bottom: 1px solid #f1f5f9 !important;
    }

    .term-sale .shop-loop-head .wd-shop-tools:last-child,
    .term-6190 .shop-loop-head .wd-shop-tools:last-child {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        padding: 0 6px !important;
        box-sizing: border-box !important;
    }

    .term-sale .shop-loop-head .wd-show-sidebar-btn,
    .term-6190 .shop-loop-head .wd-show-sidebar-btn {
        margin: 0 !important;
    }

    .term-sale .shop-loop-head .wd-show-sidebar-btn a,
    .term-6190 .shop-loop-head .wd-show-sidebar-btn a {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        padding: 6px 14px !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 20px !important;
        background: #ffffff !important;
        color: #1e293b !important;
        text-decoration: none !important;
        font-size: 12px !important;
        font-weight: 750 !important;
        transition: all 0.2s ease !important;
    }

    .term-sale .shop-loop-head .wd-show-sidebar-btn a:hover {
        border-color: #C01157 !important;
        background-color: #fff0f5 !important;
        color: #C01157 !important;
    }

    .term-sale .shop-loop-head .wd-show-sidebar-btn .wd-action-icon,
    .term-6190 .shop-loop-head .wd-show-sidebar-btn .wd-action-icon {
        display: none !important;
    }

    .term-sale .shop-loop-head .wd-show-sidebar-btn a::before,
    .term-6190 .shop-loop-head .wd-show-sidebar-btn a::before {
        content: '' !important;
        width: 13px !important;
        height: 13px !important;
        background-color: #C01157 !important;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3'/%3E%3C/svg%3E") no-repeat center / contain !important;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3'/%3E%3C/svg%3E") no-repeat center / contain !important;
    }

    .term-sale .shop-loop-head .wd-show-sidebar-btn .wd-action-text,
    .term-6190 .shop-loop-head .wd-show-sidebar-btn .wd-action-text {
        font-size: 0 !important;
    }

    .term-sale .shop-loop-head .wd-show-sidebar-btn .wd-action-text::after,
    .term-6190 .shop-loop-head .wd-show-sidebar-btn .wd-action-text::after {
        content: 'فیلترها' !important;
        font-family: "Vazirmatn", sans-serif !important;
        font-size: 12px !important;
        font-weight: 750 !important;
        color: inherit !important;
    }

    .term-sale .shop-loop-head .wd-products-per-page,
    .term-6190 .shop-loop-head .wd-products-per-page {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin: 0 !important;
        white-space: nowrap !important;
        z-index: 2 !important;
    }

    .term-sale .shop-loop-head .wd-products-shop-view,
    .term-6190 .shop-loop-head .wd-products-shop-view {
        margin-right: auto !important;
        margin-left: -8px !important;
    }

    .term-sale .shop-loop-head form.woocommerce-ordering,
    .term-6190 .shop-loop-head form.woocommerce-ordering {
        margin: 0 !important;
    }

    .term-sale .woocommerce-result-count,
    .term-6190 .woocommerce-result-count {
        display: none !important;
    }
}

/* ۷. بهینه‌سازی اختصاصی موبایل (گوشی‌های هوشمند تا ۷۶۷ پیکسل) */
@media (max-width: 767px) {
    .term-sale .main-page-wrapper,
    .term-6190 .main-page-wrapper {
        margin-top: -12px !important;
        padding-top: 0 !important;
    }

    .term-sale .wd-term-desc,
    .term-6190 .wd-term-desc {
        padding-bottom: 12px !important;
        margin-bottom: 12px !important;
        border-bottom: 1px solid #f1f5f9 !important;
    }

    .term-sale .shop-loop-head .wd-shop-tools:first-child,
    .term-6190 .shop-loop-head .wd-shop-tools:first-child,
    .term-sale .shop-loop-head .wd-breadcrumbs,
    .term-6190 .shop-loop-head .wd-breadcrumbs {
        display: none !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
    }

    .term-sale .shop-loop-head,
    .term-6190 .shop-loop-head {
        margin-top: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 14px !important;
        margin-bottom: 18px !important;
        border-bottom: 1px solid #f1f5f9 !important;
    }

    .term-sale .shop-loop-head .wd-shop-tools:last-child,
    .term-6190 .shop-loop-head .wd-shop-tools:last-child {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
    }

    .term-sale .shop-loop-head .wd-show-sidebar-btn,
    .term-6190 .shop-loop-head .wd-show-sidebar-btn {
        flex: 1 1 0 !important;
        display: flex !important;
        justify-content: flex-start !important;
        margin: 0 !important;
    }

    .term-sale .shop-loop-head .wd-products-shop-view,
    .term-6190 .shop-loop-head .wd-products-shop-view {
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 auto !important;
    }

    .term-sale .shop-loop-head form.woocommerce-ordering,
    .term-6190 .shop-loop-head form.woocommerce-ordering {
        flex: 1 1 0 !important;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        margin: 0 !important;
    }

    .term-sale .shop-loop-head .wd-ordering-mb-icon,
    .term-6190 .shop-loop-head .wd-ordering-mb-icon,
    .term-sale .shop-loop-head form.woocommerce-ordering select.orderby,
    .term-6190 .shop-loop-head form.woocommerce-ordering select.orderby {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;
        border-radius: 50% !important;
        aspect-ratio: 1 / 1 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
}