
                @media (max-width: 1024px) {
                    :root {
                        --ffmf-navy: #004E89;
                        --ffmf-pink: #DD98BE;
                        --ffmf-ink: #172433;
                        --ffmf-muted: #75808b;
                        --ffmf-line: #e7edf2;
                        --ffmf-soft: #f6f8fa;
                        --ffmf-shadow: 0 22px 70px rgba(0, 34, 58, .22);
                    }

                    body.ffmf-nonarchive .ff-mobile-filter-trigger,
                    body.ffmf-nonarchive .ff-mobile-filter-panel,
                    body.ffmf-nonarchive #ffmf-archive-toolbar-host,
                    body.ffmf-nonarchive #ffmf-sort-overlay,
                    body.ffmf-nonarchive #ffmf-sort-sheet {
                        display: none !important;
                    }

                    body.ffmf-lock {
                        overflow: hidden !important;
                        overscroll-behavior: none !important;
                    }

                    /* منبع اصلی فقط داده فیلتر را نگه می‌دارد و در موبایل دیده نمی‌شود. */
                    .ff-mobile-filter-panel {
                        display: none !important;
                    }

                    /* دستگیره آیکونی لبه صفحه؛ کم‌مزاحمت و قابل کشف. */
                    .ff-mobile-filter-trigger {
                        position: fixed !important;
                        z-index: 1000000 !important;
                        top: 56% !important;
                        right: -10px !important;
                        width: 44px !important;
                        height: 44px !important;
                        min-width: 44px !important;
                        max-width: 44px !important;
                        margin: 0 !important;
                        padding: 0 !important;
                        display: grid !important;
                        place-items: center !important;
                        overflow: visible !important;
                        border: 1px solid rgba(0,78,137,.22) !important;
                        border-right: 0 !important;
                        border-radius: 15px 0 0 15px !important;
                        background: rgba(255,255,255,.98) !important;
                        box-shadow: 0 10px 28px rgba(0,54,88,.18) !important;
                        color: var(--ffmf-navy) !important;
                        cursor: pointer !important;
                        transform: translateY(-50%) !important;
                        transition: transform .16s ease, opacity .16s ease, box-shadow .16s ease !important;
                        -webkit-tap-highlight-color: transparent !important;
                    }

                    .ff-mobile-filter-trigger:active {
                        transform: translateY(-50%) scale(.95) !important;
                    }

                    .ff-mobile-filter-trigger > :not(.ffmf-trigger-badge) {
                        opacity: 0 !important;
                        visibility: hidden !important;
                        pointer-events: none !important;
                    }

                    .ff-mobile-filter-trigger::before {
                        content: "";
                        position: absolute;
                        left: 7px;
                        top: 50%;
                        width: 18px;
                        height: 18px;
                        transform: translateY(-50%);
                        background-repeat: no-repeat;
                        background-position: center;
                        background-size: contain;
                        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23004E89' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16M7 12h10M10 19h4'/%3E%3C/svg%3E");
                    }

                    .ff-mobile-filter-trigger::after { display: none !important; }

                    .ffmf-trigger-badge {
                        position: absolute;
                        top: -5px;
                        left: -5px;
                        min-width: 18px;
                        height: 18px;
                        padding: 0 5px;
                        display: none;
                        align-items: center;
                        justify-content: center;
                        border: 2px solid #fff;
                        border-radius: 999px;
                        background: var(--ffmf-pink);
                        color: #fff;
                        font-size: 8px;
                        line-height: 1;
                        font-weight: 950;
                        box-shadow: 0 4px 10px rgba(221,152,190,.25);
                        pointer-events: none;
                    }

                    .ff-mobile-filter-trigger.has-active-filter .ffmf-trigger-badge { display: inline-flex; }

                    body.ffmf-open .ff-mobile-filter-trigger {
                        opacity: 0 !important;
                        visibility: hidden !important;
                        pointer-events: none !important;
                        transform: translate(12px, -50%) !important;
                    }

                    #ffmf-overlay {
                        position: fixed;
                        z-index: 1000001;
                        inset: 0;
                        visibility: hidden;
                        opacity: 0;
                        background: rgba(9, 20, 31, .46);
                        backdrop-filter: blur(2px);
                        -webkit-backdrop-filter: blur(2px);
                        transition: opacity .2s ease, visibility 0s linear .2s;
                        cursor: pointer;
                        -webkit-tap-highlight-color: transparent;
                    }

                    body.ffmf-open #ffmf-overlay {
                        visibility: visible;
                        opacity: 1;
                        transition-delay: 0s;
                    }

                    #ffmf-drawer {
                        position: fixed;
                        z-index: 1000002;
                        top: 0;
                        right: 0;
                        bottom: 0;
                        width: min(92vw, 400px);
                        max-width: 400px;
                        height: 100dvh;
                        min-height: 100vh;
                        display: flex;
                        flex-direction: column;
                        overflow: hidden;
                        direction: rtl;
                        background: #fff;
                        border-radius: 20px 0 0 20px;
                        box-shadow: var(--ffmf-shadow);
                        transform: translate3d(105%,0,0);
                        transition: transform .24s cubic-bezier(.22,.75,.24,1);
                        pointer-events: none;
                        font-family: inherit;
                    }

                    body.ffmf-open #ffmf-drawer {
                        transform: translate3d(0,0,0);
                        pointer-events: auto;
                    }

                    #ffmf-drawer,
                    #ffmf-drawer * {
                        box-sizing: border-box;
                        font-family: inherit;
                    }

                    .ffmf-head {
                        flex: 0 0 auto;
                        min-height: 62px;
                        padding: calc(10px + env(safe-area-inset-top,0px)) 12px 9px;
                        display: flex;
                        align-items: center;
                        justify-content: space-between;
                        gap: 10px;
                        background: rgba(255,255,255,.98);
                        border-bottom: 1px solid var(--ffmf-line);
                    }

                    .ffmf-head-copy {
                        min-width: 0;
                        display: flex;
                        flex-direction: column;
                        gap: 2px;
                    }

                    .ffmf-head-copy strong {
                        color: var(--ffmf-navy);
                        font-size: 13.5px;
                        line-height: 1.35;
                        font-weight: 900;
                    }

                    .ffmf-head-copy small {
                        color: var(--ffmf-muted);
                        font-size: 9px;
                        line-height: 1.4;
                    }

                    .ffmf-close {
                        flex: 0 0 34px;
                        width: 34px;
                        height: 34px;
                        padding: 0;
                        display: grid;
                        place-items: center;
                        border: 1px solid var(--ffmf-line) !important;
                        border-radius: 50% !important;
                        background: var(--ffmf-soft) !important;
                        color: var(--ffmf-navy) !important;
                        box-shadow: none !important;
                        cursor: pointer;
                    }

                    .ffmf-close svg {
                        width: 17px;
                        height: 17px;
                        fill: none;
                        stroke: currentColor;
                        stroke-width: 2;
                        stroke-linecap: round;
                    }

                    .ffmf-toolbar {
                        flex: 0 0 auto;
                        padding: 7px 12px;
                        display: flex;
                        align-items: center;
                        justify-content: space-between;
                        gap: 10px;
                        border-bottom: 1px solid var(--ffmf-line);
                        background: #fff;
                    }

                    .ffmf-active-count {
                        color: var(--ffmf-muted);
                        font-size: 10px;
                        font-weight: 750;
                    }

                    .ffmf-clear {
                        padding: 5px 9px !important;
                        border: 1px solid rgba(221,152,190,.28) !important;
                        border-radius: 999px !important;
                        background: rgba(221,152,190,.08) !important;
                        color: #b96797 !important;
                        font-size: 9.5px !important;
                        font-weight: 850 !important;
                        box-shadow: none !important;
                        cursor: pointer;
                    }

                    .ffmf-chips {
                        flex: 0 0 auto;
                        min-height: 0;
                        padding: 0 12px;
                        display: flex;
                        gap: 6px;
                        overflow-x: auto;
                        scrollbar-width: none;
                        background: #fff;
                    }

                    .ffmf-chips::-webkit-scrollbar { display: none; }

                    .ffmf-chips:not(:empty) {
                        padding-top: 8px;
                        padding-bottom: 8px;
                        border-bottom: 1px solid var(--ffmf-line);
                    }

                    .ffmf-chip {
                        flex: 0 0 auto;
                        min-height: 27px;
                        padding: 5px 8px;
                        display: inline-flex;
                        align-items: center;
                        gap: 5px;
                        border: 1px solid rgba(0,78,137,.12);
                        border-radius: 999px;
                        background: rgba(0,78,137,.055);
                        color: var(--ffmf-navy);
                        font-size: 9.2px;
                        font-weight: 800;
                        white-space: nowrap;
                        cursor: pointer;
                    }

                    .ffmf-chip::after {
                        content: "×";
                        color: var(--ffmf-pink);
                        font-size: 13px;
                        line-height: 1;
                    }

                    .ffmf-body {
                        flex: 1 1 auto;
                        min-height: 0;
                        padding: 8px 10px 14px;
                        overflow-y: auto;
                        overscroll-behavior: contain;
                        -webkit-overflow-scrolling: touch;
                        background: #f8fafc;
                    }

                    .ffmf-group {
                        margin-bottom: 7px;
                        overflow: hidden;
                        border: 1px solid var(--ffmf-line);
                        border-radius: 12px;
                        background: #fff;
                        box-shadow: 0 3px 12px rgba(0,34,58,.035);
                    }

                    .ffmf-group-toggle {
                        width: 100%;
                        min-height: 44px;
                        padding: 9px 11px;
                        display: flex;
                        align-items: center;
                        justify-content: space-between;
                        gap: 10px;
                        border: 0 !important;
                        background: #fff !important;
                        color: var(--ffmf-ink) !important;
                        text-align: right;
                        box-shadow: none !important;
                        cursor: pointer;
                    }

                    .ffmf-group-toggle-title {
                        min-width: 0;
                        display: flex;
                        align-items: center;
                        gap: 6px;
                        color: var(--ffmf-navy);
                        font-size: 11.3px;
                        font-weight: 900;
                    }

                    .ffmf-group-badge {
                        min-width: 20px;
                        height: 20px;
                        padding: 0 6px;
                        display: none;
                        align-items: center;
                        justify-content: center;
                        border-radius: 999px;
                        background: var(--ffmf-pink);
                        color: #fff;
                        font-size: 9px;
                        font-weight: 900;
                    }

                    .ffmf-group.has-value .ffmf-group-badge { display: inline-flex; }

                    .ffmf-chevron {
                        width: 16px;
                        height: 16px;
                        transition: transform .18s ease;
                        fill: none;
                        stroke: #8a949e;
                        stroke-width: 2;
                        stroke-linecap: round;
                    }

                    .ffmf-group.is-open .ffmf-chevron { transform: rotate(180deg); }

                    .ffmf-group-content {
                        display: none;
                        padding: 0 9px 9px;
                        border-top: 1px solid var(--ffmf-line);
                    }

                    .ffmf-group.is-open .ffmf-group-content { display: block; }

                    .ffmf-option-search {
                        width: 100%;
                        min-height: 36px;
                        margin: 8px 0 7px;
                        padding: 7px 9px;
                        border: 1px solid #dfe6ec !important;
                        border-radius: 9px !important;
                        background: #fff !important;
                        color: var(--ffmf-ink) !important;
                        font-size: 9.8px !important;
                        box-shadow: none !important;
                        outline: none;
                    }

                    .ffmf-options {
                        display: grid;
                        grid-template-columns: repeat(2, minmax(0,1fr));
                        gap: 6px;
                    }

                    .ffmf-option {
                        min-height: 38px;
                        padding: 7px 7px;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        border: 1px solid #e2e8ed !important;
                        border-radius: 9px !important;
                        background: #fff !important;
                        color: #43505d !important;
                        font-size: 9.6px !important;
                        line-height: 1.35 !important;
                        font-weight: 700 !important;
                        text-align: center;
                        box-shadow: none !important;
                        cursor: pointer;
                        -webkit-tap-highlight-color: transparent;
                    }

                    .ffmf-option.is-selected {
                        border-color: rgba(0,78,137,.34) !important;
                        background: linear-gradient(105deg, rgba(0,78,137,.09), rgba(221,152,190,.18)) !important;
                        color: var(--ffmf-navy) !important;
                        font-weight: 900 !important;
                        box-shadow: inset 0 0 0 1px rgba(0,78,137,.035) !important;
                    }

                    .ffmf-option.is-selected::before {
                        content: "✓";
                        margin-left: 4px;
                        color: var(--ffmf-pink);
                        font-size: 10px;
                        font-weight: 950;
                    }

                    .ffmf-price-grid {
                        padding-top: 10px;
                        display: grid;
                        grid-template-columns: repeat(2,minmax(0,1fr));
                        gap: 8px;
                    }

                    .ffmf-price-field {
                        display: flex;
                        flex-direction: column;
                        gap: 5px;
                    }

                    .ffmf-price-field span {
                        color: var(--ffmf-muted);
                        font-size: 9px;
                        font-weight: 750;
                    }

                    .ffmf-price-field input {
                        width: 100%;
                        min-height: 38px;
                        padding: 7px 7px;
                        border: 1px solid #dfe6ec !important;
                        border-radius: 9px !important;
                        background: #fff !important;
                        color: var(--ffmf-ink) !important;
                        font-size: 9.8px !important;
                        box-shadow: none !important;
                    }

                    .ffmf-footer {
                        flex: 0 0 auto;
                        padding: 8px 12px calc(8px + env(safe-area-inset-bottom,0px));
                        display: grid;
                        grid-template-columns: minmax(0,1fr);
                        gap: 8px;
                        border-top: 1px solid var(--ffmf-line);
                        background: rgba(255,255,255,.98);
                    }

                    .ffmf-apply {
                        width: 100%;
                        min-height: 46px;
                        border: 0 !important;
                        border-radius: 12px !important;
                        background: linear-gradient(105deg, var(--ffmf-navy), #176da8 66%, var(--ffmf-pink)) !important;
                        color: #fff !important;
                        font-size: 11.5px !important;
                        font-weight: 900 !important;
                        box-shadow: 0 10px 24px rgba(0,78,137,.18) !important;
                        cursor: pointer;
                    }

                    .ffmf-apply.is-loading {
                        opacity: .72;
                        pointer-events: none;
                    }

                    /*
                     * Prepaint فعال‌ها: قبل از اجرای JavaScript و از همان اولین Paint.
                     * :has در مرورگرهای موبایل مدرن پشتیبانی می‌شود و Wrapper واقعی وودمارت را هدف می‌گیرد.
                     */
                    body:has(.ff-mobile-filter-panel)
                    :where(div,section,p):has(> .chosen[class*="chosen-"]) {
                        width: 100% !important;
                        margin: 4px 0 12px !important;
                        padding: 7px 4px !important;
                        display: flex !important;
                        align-items: center !important;
                        gap: 6px !important;
                        overflow-x: auto !important;
                        overflow-y: hidden !important;
                        white-space: nowrap !important;
                        scrollbar-width: none !important;
                        background: transparent !important;
                        border: 0 !important;
                        box-shadow: none !important;
                        -webkit-overflow-scrolling: touch;
                    }

                    body:has(.ff-mobile-filter-panel)
                    :where(div,section,p):has(> .chosen[class*="chosen-"])::-webkit-scrollbar {
                        display: none !important;
                    }

                    body:has(.ff-mobile-filter-panel)
                    :where(div,section,p):has(> .chosen[class*="chosen-"]) > br {
                        display: none !important;
                    }

                    body:has(.ff-mobile-filter-panel) .chosen[class*="chosen-"] {
                        flex: 0 0 auto !important;
                        margin: 0 !important;
                        padding: 0 !important;
                        display: inline-flex !important;
                        align-items: center !important;
                        border: 1px solid rgba(0,78,137,.13) !important;
                        border-radius: 999px !important;
                        background: linear-gradient(105deg, rgba(0,78,137,.055), rgba(221,152,190,.10)) !important;
                        box-shadow: none !important;
                    }

                    body:has(.ff-mobile-filter-panel) .chosen[class*="chosen-"] > a {
                        min-height: 30px !important;
                        padding: 6px 9px !important;
                        display: inline-flex !important;
                        align-items: center !important;
                        gap: 5px !important;
                        color: var(--ffmf-navy) !important;
                        font-size: 9.5px !important;
                        line-height: 1.2 !important;
                        font-weight: 850 !important;
                        text-decoration: none !important;
                        white-space: nowrap !important;
                        background: transparent !important;
                        border: 0 !important;
                    }

                    body:has(.ff-mobile-filter-panel) .chosen[class*="chosen-"] > a::before {
                        display: none !important;
                    }

                    body:has(.ff-mobile-filter-panel) .chosen[class*="chosen-"] > a::after {
                        content: "×" !important;
                        display: inline-block !important;
                        color: var(--ffmf-pink) !important;
                        font-size: 13px !important;
                        line-height: 1 !important;
                        font-weight: 950 !important;
                    }

                    /* لینک پاک‌سازی، فقط وقتی هم‌والد مستقیم Chipهای Native است. */
                    body:has(.ff-mobile-filter-panel)
                    :where(div,section,p):has(> .chosen[class*="chosen-"]) > a {
                        flex: 0 0 auto !important;
                        min-height: 30px !important;
                        margin: 0 !important;
                        padding: 6px 9px !important;
                        display: inline-flex !important;
                        align-items: center !important;
                        border: 1px solid rgba(221,152,190,.26) !important;
                        border-radius: 999px !important;
                        background: rgba(221,152,190,.08) !important;
                        color: #b55e91 !important;
                        font-size: 9.3px !important;
                        line-height: 1.2 !important;
                        font-weight: 900 !important;
                        text-decoration: none !important;
                        white-space: nowrap !important;
                        box-shadow: none !important;
                    }

                    /* نوار فشرده عنوان آرشیو + مرتب‌سازی موبایل */
                    .ffmf-archive-visual-block {
                        width: 100% !important;
                        min-width: 0 !important;
                        min-height: 0 !important;
                        height: auto !important;
                        margin: 6px 0 10px !important;
                        padding: 0 !important;
                        display: block !important;
                        overflow: visible !important;
                        background: transparent !important;
                        border: 0 !important;
                        border-radius: 0 !important;
                        box-shadow: none !important;
                    }

                    .ffmf-archive-visual-block > :not(#ffmf-archive-toolbar),
                    .ffmf-archive-visual-block .ffmf-native-archive-piece {
                        display: none !important;
                    }

                    #ffmf-archive-toolbar {
                        width: 100%;
                        min-height: 50px;
                        margin: 0 !important;
                        padding: 6px 8px 6px 10px !important;
                        display: flex !important;
                        align-items: center !important;
                        justify-content: space-between !important;
                        gap: 8px !important;
                        direction: rtl;
                        background: linear-gradient(145deg, #fff 0%, #f8fafc 100%);
                        border: 1px solid rgba(0,78,137,.09);
                        border-radius: 13px;
                        box-shadow: 0 6px 18px rgba(0,54,88,.05);
                    }

                    .ffmf-archive-title {
                        flex: 1 1 auto;
                        min-width: 0;
                        margin: 0 !important;
                        color: var(--ffmf-navy) !important;
                        font-size: clamp(14px, 4.1vw, 17px) !important;
                        line-height: 1.3 !important;
                        font-weight: 950 !important;
                        text-align: right !important;
                        white-space: nowrap;
                        overflow: hidden;
                        text-overflow: ellipsis;
                    }

                    #ffmf-sort-open {
                        flex: 0 0 auto;
                        min-width: 92px;
                        min-height: 36px;
                        padding: 6px 9px !important;
                        display: inline-flex !important;
                        align-items: center !important;
                        justify-content: center !important;
                        gap: 6px !important;
                        border: 1px solid rgba(0,78,137,.14) !important;
                        border-radius: 10px !important;
                        background: #fff !important;
                        color: var(--ffmf-navy) !important;
                        box-shadow: none !important;
                        cursor: pointer;
                        -webkit-tap-highlight-color: transparent;
                    }

                    #ffmf-sort-open .ffmf-sort-copy {
                        min-width: 0;
                        display: flex;
                        flex-direction: column;
                        align-items: flex-start;
                        gap: 0;
                    }

                    #ffmf-sort-open strong {
                        color: var(--ffmf-navy);
                        font-size: 10px;
                        line-height: 1.25;
                        font-weight: 900;
                    }

                    #ffmf-sort-open small {
                        display: none !important;
                    }

                    #ffmf-sort-open svg {
                        flex: 0 0 16px;
                        width: 16px;
                        height: 16px;
                        fill: none;
                        stroke: var(--ffmf-navy);
                        stroke-width: 1.9;
                        stroke-linecap: round;
                        stroke-linejoin: round;
                    }

                    .ffmf-hide-native-archive-head,
                    .ffmf-hide-native-archive-piece,
                    .ffmf-hide-native-title-only,
                    .ffmf-force-hide-native-title-card,
                    .ffmf-hide-native-ordering-mobile {
                        display: none !important;
                        min-height: 0 !important;
                        height: 0 !important;
                        max-height: 0 !important;
                        margin: 0 !important;
                        padding: 0 !important;
                        border: 0 !important;
                        overflow: hidden !important;
                        visibility: hidden !important;
                        opacity: 0 !important;
                        pointer-events: none !important;
                    }

                    @media (max-width: 370px) {
                        #ffmf-archive-toolbar { padding-left: 8px !important; }
                        #ffmf-sort-open { min-width: 94px; }
                        #ffmf-sort-open small { display: none; }
                    }

                    #ffmf-sort-overlay {
                        position: fixed;
                        z-index: 1000011;
                        inset: 0;
                        visibility: hidden;
                        opacity: 0;
                        background: rgba(9,20,31,.42);
                        backdrop-filter: blur(2px);
                        -webkit-backdrop-filter: blur(2px);
                        transition: opacity .18s ease, visibility 0s linear .18s;
                    }

                    #ffmf-sort-sheet {
                        position: fixed;
                        z-index: 1000012;
                        right: 10px;
                        bottom: calc(10px + env(safe-area-inset-bottom,0px));
                        left: 10px;
                        max-height: min(72dvh, 520px);
                        padding: 8px;
                        display: flex;
                        flex-direction: column;
                        direction: rtl;
                        overflow: hidden;
                        visibility: hidden;
                        opacity: 0;
                        background: #fff;
                        border: 1px solid rgba(0,78,137,.10);
                        border-radius: 20px;
                        box-shadow: 0 22px 70px rgba(0,34,58,.25);
                        transform: translate3d(0, 22px, 0) scale(.98);
                        transition: transform .20s cubic-bezier(.22,.75,.24,1), opacity .18s ease, visibility 0s linear .20s;
                        pointer-events: none;
                    }

                    body.ffmf-sort-open #ffmf-sort-overlay {
                        visibility: visible;
                        opacity: 1;
                        transition-delay: 0s;
                    }

                    body.ffmf-sort-open #ffmf-sort-sheet {
                        visibility: visible;
                        opacity: 1;
                        transform: translate3d(0,0,0) scale(1);
                        transition-delay: 0s;
                        pointer-events: auto;
                    }

                    .ffmf-sort-head {
                        min-height: 52px;
                        padding: 6px 8px 10px;
                        display: flex;
                        align-items: center;
                        justify-content: space-between;
                        gap: 10px;
                        border-bottom: 1px solid var(--ffmf-line);
                    }

                    .ffmf-sort-head strong {
                        color: var(--ffmf-navy);
                        font-size: 13px;
                        font-weight: 950;
                    }

                    .ffmf-sort-close {
                        width: 34px;
                        height: 34px;
                        padding: 0 !important;
                        display: grid !important;
                        place-items: center !important;
                        border: 1px solid var(--ffmf-line) !important;
                        border-radius: 50% !important;
                        background: var(--ffmf-soft) !important;
                        color: var(--ffmf-navy) !important;
                        box-shadow: none !important;
                    }

                    .ffmf-sort-options {
                        padding: 7px 2px 2px;
                        display: grid;
                        gap: 6px;
                        overflow-y: auto;
                        overscroll-behavior: contain;
                        -webkit-overflow-scrolling: touch;
                    }

                    .ffmf-sort-option {
                        width: 100%;
                        min-height: 45px;
                        padding: 10px 12px !important;
                        display: flex !important;
                        align-items: center !important;
                        justify-content: space-between !important;
                        gap: 10px !important;
                        border: 1px solid var(--ffmf-line) !important;
                        border-radius: 12px !important;
                        background: #fff !important;
                        color: var(--ffmf-ink) !important;
                        font-size: 10.5px !important;
                        line-height: 1.45 !important;
                        font-weight: 750 !important;
                        text-align: right !important;
                        box-shadow: none !important;
                    }

                    .ffmf-sort-option::after {
                        content: "";
                        flex: 0 0 17px;
                        width: 17px;
                        height: 17px;
                        border: 1.5px solid #cfd8df;
                        border-radius: 50%;
                        background: #fff;
                    }

                    .ffmf-sort-option.is-selected {
                        border-color: rgba(0,78,137,.30) !important;
                        background: linear-gradient(105deg, rgba(0,78,137,.06), rgba(221,152,190,.11)) !important;
                        color: var(--ffmf-navy) !important;
                        font-weight: 900 !important;
                    }

                    .ffmf-sort-option.is-selected::after {
                        border: 5px solid var(--ffmf-navy);
                    }

                    body.ffmf-sort-open #ffmcb47-root .ffmcb4-bar,
                    body.ffmf-sort-open #goftino_w,
                    body.ffmf-sort-open iframe#goftino_w.goftino-wakeup {
                        opacity: 0 !important;
                        visibility: hidden !important;
                        pointer-events: none !important;
                    }

                    body.ffmf-open #ffmcb47-root .ffmcb4-bar {
                        opacity: 0 !important;
                        visibility: hidden !important;
                        pointer-events: none !important;
                        transform: translateY(110%) !important;
                    }

                    body.ffmf-open #goftino_w,
                    body.ffmf-open iframe#goftino_w.goftino-wakeup {
                        opacity: 0 !important;
                        visibility: hidden !important;
                        pointer-events: none !important;
                    }

                    /* V2.3.2: میزبان مستقل نوار آرشیو، خارج از باکس بلند Elementor */
                    .ffmf-archive-toolbar-host {
                        width: 100% !important;
                        min-width: 0 !important;
                        margin: -14px 0 3px !important;
                        padding: 0 !important;
                        display: block !important;
                        position: relative !important;
                        z-index: 2 !important;
                        overflow: visible !important;
                        background: transparent !important;
                        border: 0 !important;
                        box-shadow: none !important;
                    }

                    .ffmf-hide-native-archive-block {
                        display: none !important;
                        min-height: 0 !important;
                        height: 0 !important;
                        margin: 0 !important;
                        padding: 0 !important;
                        overflow: hidden !important;
                    }

                    #ffmf-archive-toolbar {
                        display: flex !important;
                        visibility: visible !important;
                        opacity: 1 !important;
                    }

                    #ffmf-sort-open {
                        display: inline-flex !important;
                    }


                    /* V2.3.5: مرتب‌سازی Native موبایل پس از هر AJAX همواره مخفی بماند. */
                    body:has(.ff-mobile-filter-panel) form.woocommerce-ordering,
                    body:has(.ff-mobile-filter-panel) .woocommerce-ordering,
                    body:has(.ff-mobile-filter-panel) select.orderby,
                    body:has(.ff-mobile-filter-panel) select[name="orderby"] {
                        display: none !important;
                        min-height: 0 !important;
                        height: 0 !important;
                        max-height: 0 !important;
                        margin: 0 !important;
                        padding: 0 !important;
                        border: 0 !important;
                        overflow: hidden !important;
                        visibility: hidden !important;
                        opacity: 0 !important;
                        pointer-events: none !important;
                    }
                }

                @media (min-width: 1025px) {
                    #ffmf-overlay,
                    #ffmf-drawer,
                    #ffmf-archive-toolbar,
                    #ffmf-sort-overlay,
                    #ffmf-sort-sheet { display: none !important; }

                    .ff-mobile-filter-trigger { display: none !important; }
                    .ff-mobile-filter-panel { display: block !important; }

                    /* V2.3.4: مرتب‌سازی دسکتاپ با منوی اختصاصی هم‌سبک موبایل. */
                    body:has(.ff-mobile-filter-panel) form.woocommerce-ordering,
                    body:has(.ff-mobile-filter-panel) .woocommerce-ordering {
                        position: relative;
                        margin: 0 !important;
                    }

                    body:has(.ff-mobile-filter-panel) select.orderby.ffmf-native-orderby-hidden {
                        position: absolute !important;
                        width: 1px !important;
                        height: 1px !important;
                        margin: -1px !important;
                        padding: 0 !important;
                        overflow: hidden !important;
                        clip: rect(0 0 0 0) !important;
                        clip-path: inset(50%) !important;
                        opacity: 0 !important;
                        pointer-events: none !important;
                        white-space: nowrap !important;
                        border: 0 !important;
                    }

                    .ffmf-desktop-sort-open {
                        min-width: 300px;
                        min-height: 48px;
                        padding: 9px 14px !important;
                        display: inline-flex !important;
                        align-items: center !important;
                        justify-content: space-between !important;
                        gap: 12px !important;
                        direction: rtl;
                        border: 1px solid rgba(0,78,137,.15) !important;
                        border-radius: 13px !important;
                        background: linear-gradient(145deg,#fff 0%,#fbfcfd 100%) !important;
                        color: #172433 !important;
                        font-size: 13px !important;
                        line-height: 1.4 !important;
                        font-weight: 800 !important;
                        box-shadow: 0 8px 22px rgba(0,54,88,.06) !important;
                        cursor: pointer;
                    }

                    .ffmf-desktop-sort-open::after {
                        content: "";
                        width: 8px;
                        height: 8px;
                        flex: 0 0 8px;
                        border-right: 2px solid #004E89;
                        border-bottom: 2px solid #004E89;
                        transform: rotate(45deg) translateY(-2px);
                        transition: transform .16s ease;
                    }

                    .ffmf-desktop-sort-open[aria-expanded="true"]::after {
                        transform: rotate(225deg) translate(-1px,-1px);
                    }

                    #ffmf-desktop-sort-menu {
                        position: fixed;
                        z-index: 1000015;
                        width: min(340px, calc(100vw - 24px));
                        max-height: min(480px, calc(100vh - 32px));
                        padding: 8px;
                        display: none;
                        direction: rtl;
                        overflow-y: auto;
                        overscroll-behavior: contain;
                        background: #fff;
                        border: 1px solid rgba(0,78,137,.12);
                        border-radius: 16px;
                        box-shadow: 0 20px 60px rgba(0,34,58,.20);
                    }

                    #ffmf-desktop-sort-menu.is-open { display: grid; gap: 6px; }

                    #ffmf-desktop-sort-menu .ffmf-sort-option {
                        width: 100%;
                        min-height: 46px;
                        padding: 10px 12px !important;
                        display: flex !important;
                        align-items: center !important;
                        justify-content: space-between !important;
                        gap: 12px !important;
                        border: 1px solid #e7edf2 !important;
                        border-radius: 12px !important;
                        background: #fff !important;
                        color: #172433 !important;
                        font-size: 12.5px !important;
                        line-height: 1.45 !important;
                        font-weight: 750 !important;
                        text-align: right !important;
                        box-shadow: none !important;
                    }

                    #ffmf-desktop-sort-menu .ffmf-sort-option::after {
                        content: "";
                        flex: 0 0 18px;
                        width: 18px;
                        height: 18px;
                        border: 1.5px solid #cfd8df;
                        border-radius: 50%;
                        background: #fff;
                    }

                    #ffmf-desktop-sort-menu .ffmf-sort-option.is-selected {
                        border-color: rgba(0,78,137,.28) !important;
                        background: linear-gradient(105deg,rgba(0,78,137,.06),rgba(221,152,190,.12)) !important;
                        color: #004E89 !important;
                        font-weight: 900 !important;
                    }

                    #ffmf-desktop-sort-menu .ffmf-sort-option.is-selected::after {
                        border: 5px solid #004E89;
                    }
                }

                @media (prefers-reduced-motion: reduce) {
                    .ff-mobile-filter-trigger,
                    #ffmf-overlay,
                    #ffmf-drawer { transition-duration: .01ms !important; }
                }
            

/* ============================================================
   FaceFrame Mobile Filter UX Final v1
   - visible "فیلتر" label
   - always-visible close control
   - sticky action footer
============================================================ */

@media (max-width: 1024px) {

    /*
     * FFMF_VIEWPORT_FIX_V2
     *
     * Keep the whole drawer inside the actually visible mobile
     * viewport even while browser chrome/address bar is expanded.
     */
    #ffmf-drawer {
        height: 100vh !important;
        height: 100dvh !important;

        min-height: 0 !important;
        max-height: 100dvh !important;
    }

    #ffmf-drawer .ffmf-body {
        flex: 1 1 auto !important;
        min-height: 0 !important;

        overflow-y: auto !important;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }



    /*
     * Mobile filter trigger:
     * preserve the existing icon while making its purpose obvious.
     */
    .ff-mobile-filter-trigger {
        display: inline-flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;

        overflow: visible !important;

        line-height: 1 !important;
    }

    .ff-mobile-filter-trigger::after {
        content: "فیلتر";

        display: block !important;

        margin-top: 1px;

        font-size: 10px;
        line-height: 1.15;
        font-weight: 500;

        white-space: nowrap;

        color: currentColor;

        opacity: .72;

        pointer-events: none;
    }


    /*
     * Close button:
     * the JS already understands .ffmf-close.
     * Make it unmistakable and always accessible.
     */
    #ffmf-drawer .ffmf-close {
        position: absolute !important;

        top: calc(10px + env(safe-area-inset-top, 0px)) !important;
        left: 12px !important;

        z-index: 60 !important;

        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;

        width: 38px !important;
        min-width: 38px !important;
        height: 38px !important;
        min-height: 38px !important;

        margin: 0 !important;
        padding: 0 !important;

        border: 1px solid var(--ffmf-line, #e7edf2) !important;
        border-radius: 12px !important;

        background: #fff !important;

        color: var(--ffmf-ink, #172433) !important;

        opacity: 1 !important;
        visibility: visible !important;

        cursor: pointer !important;

        box-shadow: 0 3px 14px rgba(0, 34, 58, .08);
    }

    #ffmf-drawer .ffmf-close:empty::before {
        content: "×";

        display: block;

        font-size: 25px;
        line-height: 1;
        font-weight: 400;
    }


    /*
     * Apply/Clear footer:
     * keep actions visible while filter groups scroll.
     */
    #ffmf-drawer .ffmf-footer {
        position: relative !important;

        right: auto;
        bottom: auto;
        left: auto;

        z-index: 50 !important;

        flex: 0 0 auto !important;

        padding-bottom:
            calc(
                10px +
                env(safe-area-inset-bottom, 0px)
            ) !important;

        background: rgba(255, 255, 255, .98) !important;

        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);

        box-shadow:
            0 -8px 24px rgba(0, 34, 58, .08);
    }

    #ffmf-drawer .ffmf-apply {
        min-height: 46px;
    }

}











/* ============================================================
   FFMF_LABEL_CLEAN_FINAL_V8
   Final single source of truth for the mobile filter trigger.
   - keep original fixed card position
   - center icon + label cleanly
   - do not touch drawer logic
============================================================ */

@media (max-width: 1024px) {

    .ff-mobile-filter-trigger .wd-off-canvas-btn > a {
        padding-bottom: 0 !important;
    }

    .ff-mobile-filter-trigger::before {
        left: 50% !important;
        top: 26px !important;
        transform: translate(-50%, -50%) !important;
        width: 18px !important;
        height: 18px !important;
        z-index: 4 !important;
    }

    .ff-mobile-filter-trigger::after {
        content: "فیلتر" !important;
        display: block !important;

        position: absolute !important;
        top: 7px !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;

        width: auto !important;
        min-width: 0 !important;

        transform: translateX(-50%) !important;

        margin: 0 !important;
        padding: 0 1px !important;

        font-size: 9px !important;
        line-height: 1 !important;
        font-weight: 600 !important;

        white-space: nowrap !important;
        text-align: center !important;

        color: currentColor !important;
        opacity: .82 !important;

        pointer-events: none !important;
        z-index: 6 !important;
    }

}


/* ============================================================
   FFMF_PRICE_SLIDER_FINAL_V8
   Dual range slider UI for mobile filter price block.
============================================================ */

@media (max-width: 1024px) {

    .ffmf-price-grid {
        display: block !important;
        padding-top: 10px !important;
    }

    .ffmf-price-shell {
        display: grid;
        gap: 12px;
    }

    .ffmf-price-slider {
        position: relative;
        height: 28px;
        margin-top: 2px;
    }

    .ffmf-price-slider-track,
    .ffmf-price-slider-fill {
        position: absolute;
        top: 50%;
        height: 6px;
        border-radius: 999px;
        transform: translateY(-50%);
    }

    .ffmf-price-slider-track {
        right: 0;
        left: 0;
        background: #eadde5;
    }

    .ffmf-price-slider-fill {
        background: #e93487;
    }

    .ffmf-price-range-input {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 28px;
        margin: 0;
        background: none !important;
        border: 0 !important;
        box-shadow: none !important;
        outline: none !important;
        appearance: none;
        -webkit-appearance: none;
        pointer-events: none;
    }

    .ffmf-price-range-input::-webkit-slider-runnable-track {
        height: 6px;
        background: transparent;
        border: 0;
    }

    .ffmf-price-range-input::-moz-range-track {
        height: 6px;
        background: transparent;
        border: 0;
    }

    .ffmf-price-range-input::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 18px;
        height: 18px;
        margin-top: -6px;
        border: 0;
        border-radius: 50%;
        background: #e93487;
        box-shadow: 0 2px 8px rgba(233, 52, 135, .32);
        cursor: pointer;
        pointer-events: auto;
    }

    .ffmf-price-range-input::-moz-range-thumb {
        width: 18px;
        height: 18px;
        border: 0;
        border-radius: 50%;
        background: #e93487;
        box-shadow: 0 2px 8px rgba(233, 52, 135, .32);
        cursor: pointer;
        pointer-events: auto;
    }

    .ffmf-price-range-input.ffmf-range-min {
        z-index: 3;
    }

    .ffmf-price-range-input.ffmf-range-max {
        z-index: 4;
    }

    .ffmf-price-legend {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        color: #6a7683;
        font-size: 12px;
        font-weight: 700;
    }

    .ffmf-price-values {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .ffmf-price-value {
        min-height: 58px;
        padding: 9px 10px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        border: 1px solid #dfe6ec;
        border-radius: 12px;
        background: #fff;
    }

    .ffmf-price-value span {
        color: var(--ffmf-muted);
        font-size: 10px;
        font-weight: 750;
    }

    .ffmf-price-value strong {
        color: var(--ffmf-ink);
        font-size: 11.3px;
        font-weight: 900;
        line-height: 1.35;
    }

    .ffmf-price-field {
        display: none !important;
    }
}


/* ============================================================
   FFMF_PRICE_FINISH_FINAL_V9
   FaceFrame palette + explicit RTL price direction
============================================================ */

@media (max-width: 1024px) {

    /*
     * Selected price interval:
     * FaceFrame primary blue.
     */
    #ffmf-drawer .ffmf-price-slider-fill {
        height: 5px !important;
        background: #004E89 !important;
        border-radius: 999px !important;
    }

    /*
     * Unselected portion.
     */
    #ffmf-drawer .ffmf-price-slider-track {
        height: 5px !important;
        background: #DDE8F0 !important;
        border-radius: 999px !important;
    }


    /*
     * Right = cheaper
     * Left  = more expensive
     */
    #ffmf-drawer .ffmf-price-range-input {
        direction: rtl !important;
        touch-action: none;
    }


    /*
     * FaceFrame accent handles.
     */
    #ffmf-drawer
    .ffmf-price-range-input::-webkit-slider-thumb {

        width: 18px !important;
        height: 18px !important;

        margin-top: -6.5px !important;

        border: 2px solid #fff !important;
        border-radius: 50% !important;

        background: #DD98BE !important;

        box-shadow:
            0 2px 7px rgba(0, 78, 137, .18),
            0 0 0 1px rgba(221, 152, 190, .18) !important;
    }


    #ffmf-drawer
    .ffmf-price-range-input::-moz-range-thumb {

        width: 18px !important;
        height: 18px !important;

        border: 2px solid #fff !important;
        border-radius: 50% !important;

        background: #DD98BE !important;

        box-shadow:
            0 2px 7px rgba(0, 78, 137, .18),
            0 0 0 1px rgba(221, 152, 190, .18) !important;
    }


    #ffmf-drawer .ffmf-price-legend {
        direction: rtl !important;

        color: #667786 !important;

        font-size: 10.5px !important;
        font-weight: 700 !important;
    }


    #ffmf-drawer .ffmf-price-value {
        border-color: #DFE8EF !important;
        background: #fff !important;
    }


    #ffmf-drawer .ffmf-price-value strong {
        color: #004E89 !important;
    }


    /*
     * Clear-all feedback while navigation begins.
     */
    #ffmf-drawer .ffmf-clear:disabled {
        opacity: .55 !important;
        pointer-events: none !important;
    }

}
