/**
 * Abr Baran Shop Archive Widget Styles
 * RTL | Mobile-first | Navy Blue Theme
 * v2.0.0 — فیلتر توسط YITH | رفع باگ تاچ موبایل
 */

/* ===========================
   CSS VARIABLES
   =========================== */
.abrbaran-shop-wrapper {
    --color-primary:       #1a2744;
    --color-primary-light: #243660;
    --color-primary-ultra: #0d1829;
    --color-accent:        #e74c3c;
    --color-success:       #27ae60;
    --color-text:          #2c3e50;
    --color-text-light:    #7f8c8d;
    --color-border:        #e8ecf0;
    --color-bg:            #f5f6fa;
    --color-white:         #ffffff;
    --color-card-shadow:   rgba(26, 39, 68, 0.10);
    --radius-sm:           6px;
    --radius-md:           10px;
    --radius-lg:           16px;
    --transition:          0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width:       25%;
    --font-persian:        'Vazirmatn', 'IRANSans', Tahoma, Arial, sans-serif;
}

/* ===========================
   WRAPPER LAYOUT
   =========================== */
.abrbaran-shop-wrapper {
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: flex-start;
    direction: rtl;
    font-family: var(--font-persian);
    position: relative;
}
.abrbaran-shop-wrapper.sidebar-left {
    flex-direction: row-reverse;
}

/* ===========================
   SIDEBAR
   =========================== */
.abrbaran-sidebar {
    width: var(--sidebar-width);
    min-width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
}
.abrbaran-sidebar-inner {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 16px var(--color-card-shadow);
    overflow: hidden;
    position: relative;
}
.abrbaran-sidebar-close {
    display: none;
    position: absolute;
    top: 10px;
    left: 10px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    color: var(--color-text);
    z-index: 5;
    transition: background var(--transition);
    flex-shrink: 0;
}
.abrbaran-sidebar-close:hover { background: #e0e0e0; }

/* ===========================
   FILTER BOX (Generic)
   =========================== */
.abrbaran-filter-box {
    padding: 20px 18px;
    border-bottom: 1px solid var(--color-border);
}
.abrbaran-filter-box:last-child { border-bottom: none; }

.abrbaran-sidebar-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.abrbaran-sidebar-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--color-primary);
    border-radius: 2px;
}

/* ===========================
   CATEGORY LIST
   =========================== */
.abrbaran-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.abrbaran-cat-list li { margin-bottom: 2px; }

.abrbaran-cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    text-decoration: none;
    font-size: 13px;
    transition: all var(--transition);
    cursor: pointer;
}
.abrbaran-cat-item:hover {
    background: var(--color-bg);
    color: var(--color-primary);
    padding-right: 16px;
}
.abrbaran-cat-item.active {
    background: var(--color-primary);
    color: var(--color-white) !important;
    font-weight: 600;
}
.abrbaran-cat-item.active .abrbaran-cat-count {
    background: rgba(255,255,255,0.25);
    color: #fff;
}
.abrbaran-cat-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    background: var(--color-bg);
    color: var(--color-text-light);
    font-size: 11px;
    border-radius: 10px;
    padding: 0 6px;
    transition: all var(--transition);
}
.abrbaran-cat-children {
    list-style: none;
    padding: 0 0 0 16px;
    margin: 2px 0 0 0;
}
.abrbaran-cat-children .abrbaran-cat-item {
    font-size: 12px;
    padding-right: 16px;
}

/* ===========================
   YITH FILTER OVERRIDES
   استایل‌های YITH را با تم ویجت هماهنگ می‌کند
   =========================== */
.abrbaran-yith-filter .yith-wcan-filters {
    direction: rtl;
    font-family: var(--font-persian) !important;
}

/* عنوان گروه فیلتر YITH */
.abrbaran-yith-filter .yith-wcan-filter .filter-title,
.abrbaran-yith-filter .yith-wcan-filter h4 {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--color-primary) !important;
    font-family: var(--font-persian) !important;
    margin-bottom: 10px !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid var(--color-border) !important;
}

/* چک‌باکس و رادیوباتون YITH */
.abrbaran-yith-filter .yith-wcan-filter label {
    font-family: var(--font-persian) !important;
    font-size: 13px !important;
    color: var(--color-text) !important;
    cursor: pointer;
}
.abrbaran-yith-filter .yith-wcan-filter input[type="checkbox"]:checked + label,
.abrbaran-yith-filter .yith-wcan-filter li.chosen label {
    color: var(--color-primary) !important;
    font-weight: 600 !important;
}

/* اسلایدر قیمت YITH — touch-friendly */
.abrbaran-yith-filter .yith-wcan-price-slider .ui-slider {
    background: var(--color-border) !important;
    border: none !important;
    height: 6px !important;
}
.abrbaran-yith-filter .yith-wcan-price-slider .ui-slider-range {
    background: var(--color-primary) !important;
}
.abrbaran-yith-filter .yith-wcan-price-slider .ui-slider-handle {
    width: 22px !important;
    height: 22px !important;
    top: -8px !important;
    border: 3px solid var(--color-primary) !important;
    background: #fff !important;
    border-radius: 50% !important;
    cursor: grab !important;
    box-shadow: 0 2px 6px rgba(26,39,68,0.2) !important;
    outline: none !important;
    touch-action: none;
}
.abrbaran-yith-filter .yith-wcan-price-slider .ui-slider-handle:focus,
.abrbaran-yith-filter .yith-wcan-price-slider .ui-slider-handle.ui-state-active {
    background: var(--color-primary) !important;
    cursor: grabbing !important;
}
/* نمایش قیمت‌ها در YITH */
.abrbaran-yith-filter .price-filter-label,
.abrbaran-yith-filter .yith-wcan-price-slider .price-wrapper,
.abrbaran-yith-filter .yith-wcan-price-filter .price-wrapper {
    font-family: var(--font-persian) !important;
    font-size: 12px !important;
    color: var(--color-text) !important;
    direction: rtl !important;
}

/* دکمه اعمال فیلتر YITH */
.abrbaran-yith-filter .yith-wcan-filters .yith-wcan-filter-apply-btn,
.abrbaran-yith-filter .yith-wcan-filters button[type="submit"],
.abrbaran-yith-filter .yith-wcan-apply-filters {
    width: 100% !important;
    padding: 9px !important;
    background: var(--color-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: var(--radius-sm) !important;
    font-family: var(--font-persian) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    margin-top: 10px !important;
    transition: background var(--transition) !important;
}
.abrbaran-yith-filter .yith-wcan-filters .yith-wcan-filter-apply-btn:hover,
.abrbaran-yith-filter .yith-wcan-apply-filters:hover {
    background: var(--color-primary-light) !important;
}

/* دکمه Reset YITH */
.abrbaran-yith-filter .yith-wcan-reset-navigation a {
    color: var(--color-text-light) !important;
    font-family: var(--font-persian) !important;
    font-size: 12px !important;
    text-decoration: underline;
}

/* ===========================
   MAIN CONTENT
   =========================== */
.abrbaran-main-content {
    flex: 1;
    min-width: 0;
}

/* ===========================
   TOOLBAR
   =========================== */
.abrbaran-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 20px;
    box-shadow: 0 1px 8px var(--color-card-shadow);
    gap: 12px;
    flex-wrap: wrap;
}
.abrbaran-result-count,
.abrbaran-shop-wrapper .woocommerce-result-count {
    font-size: 13px;
    color: var(--color-text-light);
    margin: 0;
    font-family: var(--font-persian);
}
.abrbaran-result-count span { font-weight: 600; color: var(--color-primary); }
.abrbaran-sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.abrbaran-sort-wrap label {
    font-size: 13px;
    color: var(--color-text-light);
    white-space: nowrap;
}
.abrbaran-orderby-select,
.abrbaran-shop-wrapper .woocommerce-ordering select {
    font-family: var(--font-persian);
    font-size: 13px;
    padding: 6px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    background: var(--color-white);
    cursor: pointer;
    transition: border-color var(--transition);
    direction: rtl;
}
.abrbaran-orderby-select:focus { outline: none; border-color: var(--color-primary); }

/* ===========================
   PRODUCTS GRID
   ul.products رو هم پوشش میده تا YITH بتونه جایگزین کنه
   =========================== */
.abrbaran-products-grid,
.abrbaran-shop-wrapper ul.products {
    display: grid;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.abrbaran-products-grid.columns-2,
.abrbaran-shop-wrapper ul.products.columns-2 { grid-template-columns: repeat(2, 1fr); }
.abrbaran-products-grid.columns-3,
.abrbaran-shop-wrapper ul.products.columns-3 { grid-template-columns: repeat(3, 1fr); }
.abrbaran-products-grid.columns-4,
.abrbaran-shop-wrapper ul.products.columns-4 { grid-template-columns: repeat(4, 1fr); }

/* li.product برای YITH compatibility */
.abrbaran-shop-wrapper ul.products > li.product {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ===========================
   PRODUCT CARD
   =========================== */
.abrbaran-product-card {
    background: var(--color-white);
    border-radius: 0;
    box-shadow: 0 2px 12px var(--color-card-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
    cursor: pointer;
    height: 100%;
}
/* hover فقط روی دستگاه‌هایی با pointer واقعی (دسکتاپ/لپتاپ) */
@media (hover: hover) and (pointer: fine) {
    .abrbaran-product-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 28px rgba(26,39,68,0.16);
    }
    .abrbaran-product-card:hover .abrbaran-card-actions {
        opacity: 1;
        transform: translateY(0);
    }
    .abrbaran-product-card:hover .abrbaran-product-image-wrap img {
        transform: scale(1.06);
    }
}
.abrbaran-product-card.out-of-stock { opacity: 0.75; }

/* Image */
.abrbaran-product-image-wrap {
    position: relative;
    overflow: hidden;
    background: var(--color-bg);
    aspect-ratio: 1 / 1;
    border-radius: 0;
}
.abrbaran-product-image-wrap a {
    display: block;
    width: 100%;
    height: 100%;
}
.abrbaran-product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

/* Badges */
.abrbaran-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    z-index: 2;
    direction: rtl;
}
.abrbaran-badge-sale    { background: var(--color-primary); color: #fff; }
.abrbaran-badge-outstock{ background: #95a5a6; color: #fff; }

/* Card hover actions — فقط desktop */
.abrbaran-card-actions {
    position: absolute;
    bottom: 0; right: 0; left: 0;
    background: linear-gradient(to top, rgba(26,39,68,0.85), transparent);
    padding: 16px 10px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(8px);
    transition: all var(--transition);
    z-index: 3;
    pointer-events: none; /* موبایل: مانع کلیک روی عکس نشه */
}
@media (hover: hover) and (pointer: fine) {
    .abrbaran-card-actions { pointer-events: auto; }
}
.abrbaran-quickview-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.5);
    color: #fff;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    backdrop-filter: blur(4px);
    transition: background var(--transition);
}
.abrbaran-quickview-btn:hover { background: rgba(255,255,255,0.35); }

/* YITH Wishlist */
.abrbaran-wishlist .yith-wcwl-add-to-wishlist { margin: 0; }
.abrbaran-wishlist .yith-wcwl-add-button a,
.abrbaran-wishlist .yith-wcwl-wishlistaddedbrowse a,
.abrbaran-wishlist .yith-wcwl-wishlistexistsbrowse a {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    color: #fff; text-decoration: none;
    backdrop-filter: blur(4px);
}

/* Product Info */
.abrbaran-product-info {
    padding: 12px 14px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Delivery */
.abrbaran-delivery {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-success);
    background: rgba(39, 174, 96, 0.10);
    padding: 3px 8px;
    border-radius: 20px;
    align-self: flex-start;
    direction: rtl;
    border: 1px solid rgba(39, 174, 96, 0.2);
}
.abrbaran-delivery-today {
    background: var(--color-primary);
    color: #fff;
    border-color: transparent;
}

/* Product Title */
.abrbaran-product-title {
    margin: 0;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.5;
    flex: 1;
}
.abrbaran-product-title a {
    color: var(--color-text);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition);
}
.abrbaran-product-title a:hover { color: var(--color-primary); }

/* Price */
.abrbaran-product-price {
    font-size: 14px;
    font-weight: 700;
    direction: rtl;
}
.abrbaran-product-price .woocommerce-Price-amount { color: var(--color-primary); }
.abrbaran-product-price del .woocommerce-Price-amount { color: var(--color-text-light); font-size: 12px; }
.abrbaran-product-price ins { text-decoration: none; }

/* Order Button */
.abrbaran-product-footer { margin-top: auto; }
.abrbaran-order-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-persian);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition), transform 0.1s;
    position: relative;
    z-index: 1;
}
.abrbaran-order-btn:hover { background: var(--color-primary-light); color: #fff; text-decoration: none; }
.abrbaran-order-btn:active { transform: scale(0.97); }
.out-of-stock .abrbaran-order-btn { background: #95a5a6; }
.out-of-stock .abrbaran-order-btn:hover { background: #95a5a6; }

/* ===========================
   NO PRODUCTS
   =========================== */
.abrbaran-no-products {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-light);
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: 0 1px 8px var(--color-card-shadow);
}
.abrbaran-no-products p { font-size: 16px; margin: 0; }

/* ===========================
   PAGINATION
   با کلاس woocommerce-pagination سازگار است
   =========================== */
.abrbaran-pagination,
.abrbaran-shop-wrapper .woocommerce-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
    flex-wrap: wrap;
    direction: ltr;
}
.abrbaran-pagination a,
.abrbaran-pagination span,
.abrbaran-shop-wrapper .woocommerce-pagination a,
.abrbaran-shop-wrapper .woocommerce-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    background: var(--color-white);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-persian);
    font-size: 13px;
    text-decoration: none;
    transition: all var(--transition);
}
.abrbaran-pagination a:hover,
.abrbaran-shop-wrapper .woocommerce-pagination a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.abrbaran-pagination .current,
.abrbaran-shop-wrapper .woocommerce-pagination span.current {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    font-weight: 700;
}

/* ===========================
   MOBILE TOGGLE BUTTON
   =========================== */
.abrbaran-mobile-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-family: var(--font-persian);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 16px;
    transition: background var(--transition);
    position: relative;
    z-index: 1;
    width: 100%;
    justify-content: center;
}
.abrbaran-mobile-toggle:hover { background: var(--color-primary-light); }
.abrbaran-toggle-icon { font-size: 18px; line-height: 1; }

/* ===========================
   OVERLAY (mobile)
   =========================== */
.abrbaran-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
    backdrop-filter: blur(2px);
    animation: abrbaran-fadein 0.2s ease;
}
.abrbaran-overlay.active { display: block; }
@keyframes abrbaran-fadein { from { opacity: 0; } to { opacity: 1; } }

/* ===========================
   LOADING
   =========================== */
.abrbaran-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}
.abrbaran-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: abrbaran-spin 0.7s linear infinite;
}
@keyframes abrbaran-spin { to { transform: rotate(360deg); } }

/* ===========================
   TABLET: 768px – 1024px
   =========================== */
@media (max-width: 1024px) and (min-width: 769px) {
    .abrbaran-products-grid.columns-4,
    .abrbaran-shop-wrapper ul.products.columns-4 { grid-template-columns: repeat(3, 1fr); }
    .abrbaran-products-grid.columns-3,
    .abrbaran-shop-wrapper ul.products.columns-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ===========================
   MOBILE: ≤ 768px
   =========================== */
@media (max-width: 768px) {
    .abrbaran-shop-wrapper { flex-direction: column; }

    .abrbaran-mobile-toggle { display: flex; }

    /* Sidebar drawer از سمت راست */
    .abrbaran-sidebar {
        position: fixed !important;
        top: 0 !important;
        right: -320px !important;
        left: auto !important;
        bottom: 0 !important;
        width: 300px !important;
        min-width: unset !important;
        height: 100% !important;
        z-index: 999999 !important;
        overflow-y: auto !important;
        border-radius: 0 !important;
        transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: none;
    }
    .abrbaran-shop-wrapper.sidebar-left .abrbaran-sidebar {
        right: auto !important;
        left: -320px !important;
        transition: left 0.32s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    .abrbaran-sidebar-inner {
        border-radius: 0;
        min-height: 100%;
        padding-top: 54px;
        position: relative;
        overflow-x: hidden;
    }
    .abrbaran-sidebar.open {
        right: 0 !important;
        box-shadow: -8px 0 40px rgba(0,0,0,0.25) !important;
    }
    .abrbaran-shop-wrapper.sidebar-left .abrbaran-sidebar.open {
        right: auto !important;
        left: 0 !important;
        box-shadow: 8px 0 40px rgba(0,0,0,0.25) !important;
    }
    .abrbaran-sidebar-close {
        display: flex;
        position: absolute;
        top: 10px;
        left: 10px;
    }

    /* YITH در موبایل - اسلایدر بزرگ‌تر برای تاچ */
    .abrbaran-yith-filter .yith-wcan-price-slider .ui-slider-handle {
        width: 32px !important;
        height: 32px !important;
        top: -13px !important;
    }
    .abrbaran-yith-filter .yith-wcan-price-slider .ui-slider {
        height: 8px !important;
    }

    /* گرید */
    .abrbaran-products-grid.columns-3,
    .abrbaran-products-grid.columns-4,
    .abrbaran-shop-wrapper ul.products.columns-3,
    .abrbaran-shop-wrapper ul.products.columns-4 { grid-template-columns: repeat(2, 1fr); }
    .abrbaran-products-grid.columns-2,
    .abrbaran-shop-wrapper ul.products.columns-2 { grid-template-columns: repeat(2, 1fr); }

    .abrbaran-main-content { width: 100%; }
    .abrbaran-toolbar { padding: 10px 12px; }
}

@media (max-width: 480px) {
    .abrbaran-products-grid,
    .abrbaran-shop-wrapper ul.products {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px;
    }
    .abrbaran-product-info { padding: 10px 10px 12px; }
    .abrbaran-product-title { font-size: 12.5px; }
    .abrbaran-order-btn { font-size: 12px; padding: 8px; }
}

/* ===========================
   NATIVE DUAL-RANGE PRICE SLIDER
   بدون jQuery UI — کار می‌کند روی همه دستگاه‌های لمسی
   =========================== */
.abrbaran-price-slider-wrap {
    padding-top: 8px;
}

/* کانتینر اسلایدر */
.ab-dualrange {
    position: relative;
    height: 6px;
    margin: 24px 10px 28px;
    direction: ltr;
}

/* نوار پس‌زمینه */
.ab-dualrange-track {
    position: absolute;
    inset: 0;
    background: var(--color-border);
    border-radius: 3px;
    pointer-events: none;
}

/* نوار رنگی بین دو دستگیره */
.ab-dualrange-fill {
    position: absolute;
    top: 0;
    height: 100%;
    background: var(--color-primary);
    border-radius: 3px;
    pointer-events: none;
}

/* هر دو input روی هم قرار می‌گیرند */
.ab-dualrange input[type="range"] {
    position: absolute;
    top: -9px;           /* مرکز thumb روی track */
    left: 0;
    width: 100%;
    height: 24px;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    padding: 0;
    outline: none;
}

/* ── Thumb: Chrome / Safari / Edge ── */
.ab-dualrange input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    pointer-events: all;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-white);
    border: 3px solid var(--color-primary);
    box-shadow: 0 2px 8px rgba(26,39,68,0.22);
    cursor: grab;
    transition: transform 0.15s, background 0.15s;
}
.ab-dualrange input[type="range"]::-webkit-slider-thumb:active {
    background: var(--color-primary);
    cursor: grabbing;
    transform: scale(1.15);
}

/* ── Thumb: Firefox ── */
.ab-dualrange input[type="range"]::-moz-range-thumb {
    pointer-events: all;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-white);
    border: 3px solid var(--color-primary);
    box-shadow: 0 2px 8px rgba(26,39,68,0.22);
    cursor: grab;
    transition: transform 0.15s, background 0.15s;
}
.ab-dualrange input[type="range"]::-moz-range-thumb:active {
    background: var(--color-primary);
    cursor: grabbing;
}

/* ── Track مخفی (ما track خودمان را داریم) ── */
.ab-dualrange input[type="range"]::-webkit-slider-runnable-track {
    background: transparent;
    height: 6px;
}
.ab-dualrange input[type="range"]::-moz-range-track {
    background: transparent;
    height: 6px;
}

/* برچسب قیمت */
.abrbaran-price-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--color-text);
    margin-bottom: 12px;
    direction: rtl;
    gap: 8px;
}
.abrbaran-price-labels strong { color: var(--color-primary); font-weight: 700; }
.abrbaran-price-label-min,
.abrbaran-price-label-max {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--color-bg);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    flex: 1;
    justify-content: center;
}

/* دکمه اعمال */
.abrbaran-price-buttons {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}
.abrbaran-apply-price-btn {
    flex: 1;
    padding: 9px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-persian);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), transform 0.1s;
}
.abrbaran-apply-price-btn:hover { background: var(--color-primary-light); }
.abrbaran-apply-price-btn:active { transform: scale(0.98); }

.abrbaran-reset-price-btn {
    padding: 9px 12px;
    background: transparent;
    color: var(--color-text-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-persian);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition);
}
.abrbaran-reset-price-btn:hover {
    border-color: var(--color-text-light);
    color: var(--color-text);
}

/* MOBILE: thumb بزرگ‌تر برای touch */
@media (max-width: 768px) {
    .ab-dualrange {
        height: 8px;
        margin: 28px 10px 36px;
    }
    .ab-dualrange input[type="range"] {
        top: -12px;
        height: 32px;
    }
    .ab-dualrange input[type="range"]::-webkit-slider-thumb {
        width: 34px;
        height: 34px;
    }
    .ab-dualrange input[type="range"]::-moz-range-thumb {
        width: 34px;
        height: 34px;
    }
    .abrbaran-price-labels {
        flex-direction: column;
        gap: 4px;
    }
    .abrbaran-apply-price-btn {
        padding: 12px;
        font-size: 14px;
    }
}
