﻿
/* ============================================ */
/* استایل‌های صفحه فیلتر محصولات */
/* ============================================ */
.filter-page {
    background: #f7f9fc;
    padding: 24px 0;
    min-height: 100vh;
}

.filter-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ============================================ */
/* هدر صفحه */
/* ============================================ */
.page-header {
    background: #fff;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 24px;
    border: 1px solid #eef1f4;
}

    .page-header h1 {
        font-size: 24px;
        font-weight: 700;
        color: #1a1a2e;
        margin: 0 0 8px 0;
    }

    .page-header p {
        font-size: 14px;
        color: #4a4a4a;
        line-height: 1.8;
        margin: 0;
        max-width: 90%;
    }

/* ============================================ */
/* دکمه‌های فیلتر موبایل */
/* ============================================ */
.mobile-filter-triggers {
    display: none;
    gap: 8px;
    flex-wrap: nowrap;
    margin-bottom: 16px;
    overflow-x: scroll;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    white-space: nowrap;
    width: 100%;
    padding-bottom: 2px;
}

    .mobile-filter-triggers::-webkit-scrollbar {
        display: none;
    }

.mobile-filter-trigger {
    padding: 10px 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    font-size: 13px;
    color: #1a1a2e;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    font-weight: 500;
}

    .mobile-filter-trigger:hover {
        border-color: #265a48;
        box-shadow: 0 4px 15px rgba(38, 90, 72, 0.1);
        transform: translateY(-2px);
    }

    .mobile-filter-trigger i {
        font-size: 16px;
        color: #265a48;
    }

    .mobile-filter-trigger .badge-count {
        background: #265a48;
        color: #fff;
        font-size: 10px;
        border-radius: 50%;
        padding: 1px 7px;
        min-width: 20px;
        text-align: center;
        font-weight: 700;
    }

.mobile-filter-trigger-main {
    background: #d8f7ef;
    border-color: #20b99f;
    color: #155f53;
}

    .mobile-filter-trigger-main i {
        color: #155f53;
    }

    .mobile-filter-trigger-main .badge-count {
        background: #f47b49;
        color: #fff;
    }

/* دکمه‌های دسته‌ای فیلترهای فعال در موبایل */
.mobile-active-filter-triggers {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    width: max-content;
    max-width: none;
    min-width: max-content;
    flex-wrap: nowrap;
    white-space: nowrap;
}

/* دکمه‌های دسته‌ای همیشه بلافاصله بعد از «فیلترها» قرار می‌گیرند.
            با زیاد شدن تعداد، فقط خود ردیف افقی اسکرول می‌شود و هیچ دکمه‌ای
            به خط بعدی نمی‌رود. */
@media (max-width: 991px) {
    #mobileFilterTriggers {
        min-width: 0;
        max-width: 100vw;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
        white-space: nowrap;
    }

        #mobileFilterTriggers::-webkit-scrollbar {
            display: none;
        }

        #mobileFilterTriggers > * {
            flex: 0 0 auto !important;
        }

        #mobileFilterTriggers.is-dragging {
            cursor: grabbing;
        }

        #mobileFilterTriggers::-webkit-scrollbar {
            display: none;
        }

    #mobileActiveFilterTriggers {
        display: inline-flex !important;
        flex: 0 0 auto !important;
        width: max-content !important;
        min-width: max-content !important;
        flex-wrap: nowrap !important;
    }

    #mobileFilterTriggers > .mobile-filter-trigger,
    #mobileFilterTriggers > #mobileActiveFilterTriggers,
    #mobileFilterTriggers .mobile-active-filter-trigger {
        flex: 0 0 auto !important;
    }
    /* مخفی کردن هدر جدول محصولات (شامل تعداد و مرتب‌سازی) در موبایل */
    .products-header {
        display: none !important;
    }
    /* نمایش تعداد محصولات در موبایل */
    .mobile-result-count {
        display: block !important;
        font-size: 14px;
        color: #4a4a4a;
        padding: 8px 0 12px 0;
        margin-bottom: 8px;
        border-bottom: 1px solid #eef1f4;
    }

        .mobile-result-count strong {
            color: #1a1a2e;
        }
}

.mobile-active-filter-trigger {
    position: relative;
    min-height: 38px;
    padding: 8px 10px 8px 8px;
    background: #d8f7ef;
    border: 1px solid #20b99f;
    border-radius: 22px;
    color: #155f53;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(21, 95, 83, .06);
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

    .mobile-active-filter-trigger:hover {
        background: #c7f1e8;
        border-color: #169d89;
    }

    .mobile-active-filter-trigger .category-chevron {
        font-size: 12px;
        color: #155f53;
        transition: transform .2s ease;
    }

    .mobile-active-filter-trigger .category-remove {
        width: 20px;
        height: 20px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #155f53;
        color: #fff;
        cursor: pointer;
        flex: 0 0 20px;
        line-height: 1;
    }

        .mobile-active-filter-trigger .category-remove:hover {
            background: #0e4a40;
        }

.quick-mobile-toggle {
    flex: 0 0 auto;
    white-space: nowrap;
}

    .quick-mobile-toggle.active {
        background: #d8f7ef !important;
        border-color: #20b99f !important;
        color: #155f53 !important;
        box-shadow: 0 2px 8px rgba(32,185,159,.16);
    }

        .quick-mobile-toggle.active i {
            color: #155f53 !important;
        }

.mobile-active-filter-trigger .category-count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    background: rgba(21, 95, 83, .12);
    color: #155f53;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
}


.mobile-category-filter-item {
    min-height: 48px;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #e7edf2;
    border-radius: 12px;
    background: #fff;
    color: #30343b;
    font-size: 13px;
    cursor: pointer;
}

    .mobile-category-filter-item .item-name {
        display: flex;
        align-items: center;
        gap: 9px;
        min-width: 0;
    }

.mobile-category-checkbox {
    width: 19px;
    height: 19px;
    accent-color: #20a98f;
    flex: 0 0 auto;
}

.mobile-category-filter-item .item-label-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-category-filter-item .item-state {
    color: #b6c0c7;
    font-size: 18px;
    flex: 0 0 auto;
}

.mobile-category-filter-item:has(.mobile-category-checkbox:checked) {
    background: #f0fbf7;
    border-color: #9adfce;
}

    .mobile-category-filter-item:has(.mobile-category-checkbox:checked) .item-state {
        color: #20a98f;
    }

/* ============================================ */
/* سایدبار فیلتر - دسکتاپ */
/* ============================================ */
.filter-sidebar {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eef1f4;
    padding: 20px;
    position: sticky;
    top: 20px;
}

    /* ============================================ */
    /* فیلترها */
    /* ============================================ */
    .filter-sidebar .filter-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 16px;
        border-bottom: 1px solid #eef1f4;
        margin-bottom: 16px;
    }

        .filter-sidebar .filter-header h5 {
            font-weight: 700;
            font-size: 16px;
            color: #1a1a2e;
            margin: 0;
        }

        .filter-sidebar .filter-header .clear-all {
            font-size: 12px;
            color: #00a99d;
            cursor: pointer;
            text-decoration: none;
        }

/* ============================================ */
/* جستجو و فیلترهای سریع در یک کادر */
/* ============================================ */
.search-and-quick-filters {
    border: 1px solid #eef1f4;
    border-radius: 12px;
    padding: 16px;
    background: #fafbfc;
    margin-bottom: 16px;
}

/* جستجو */
.search-box {
    margin-bottom: 12px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

    .search-input-wrapper .search-icon {
        position: absolute;
        right: 14px;
        color: #88909b;
        font-size: 18px;
        pointer-events: none;
        z-index: 1;
    }

    .search-input-wrapper .search-input {
        width: 100%;
        padding: 10px 44px 10px 14px;
        /*border: 1px solid #e2e8f0;
                border-radius: 50px;*/
        font-size: 14px;
        color: #1a1a2e;
        background: #fff;
        transition: all 0.3s ease;
    }

        .search-input-wrapper .search-input:focus {
            outline: none;
            /*border-color: #265a48;*/
            background: #fff;
            /*box-shadow: 0 0 0 3px rgba(38, 90, 72, 0.1);*/
        }

        .search-input-wrapper .search-input::placeholder {
            color: #88909b;
        }

/* ============================================ */
/* استایل سوئیچ‌های روشن/خاموش (Toggle Switches) */
/* ============================================ */

.quick-filters {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #eef1f4;
    border-radius: 12px;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    padding: 12px 0;
    user-select: none;
    position: relative;
}

    /* ایجاد خط جداکننده بین دو گزینه (به جز مورد آخر) */
    .toggle-switch:not(:last-child) {
        border-bottom: 1px solid #eee;
    }

    /* مخفی کردن چک‌باکس اصلی */
    .toggle-switch input[type="checkbox"] {
        display: none;
    }

/* ظاهر دکمه سوئیچ (پس‌زمینه و دایره سفید) */
.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: #d1d5db; /* رنگ خاکستری روشن (حالت خاموش) */
    border-radius: 50px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

    /* دایره سفید وسط دکمه */
    .toggle-slider::before {
        content: '';
        position: absolute;
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
        background-color: #fff;
        border-radius: 50%;
        transition: all 0.3s ease;
        box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    }

/* استایل متن کنار سوئیچ */
.toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: #4a4a4a;
    transition: color 0.3s ease;
}

/* ============================================ */
/* حالت فعال (Checked - روشن) */
/* ============================================ */

.toggle-switch input:checked + .toggle-slider {
    background-color: #b3d4fc; /* رنگ آبی روشن مشابه تصویر */
}

    .toggle-switch input:checked + .toggle-slider::before {
        transform: translateX(20px); /* حرکت دایره به سمت راست */
    }

.toggle-switch input:checked ~ .toggle-label {
    color: #1a1a2e; /* تیره‌تر کردن متن هنگام فعال بودن */
    font-weight: 600;
}

/* ============================================ */
/* افکت هاور (موس) */
/* ============================================ */
.toggle-switch:hover .toggle-slider {
    box-shadow: 0 0 0 2px rgba(38, 90, 72, 0.1);
}

.toggle-switch input:checked:hover + .toggle-slider {
    box-shadow: 0 0 0 2px rgba(38, 90, 72, 0.2);
}

.quick-filter-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #4a4a4a;
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
    position: relative;
}

    .quick-filter-item input[type="checkbox"] {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
    }

    .quick-filter-item .checkmark {
        width: 20px;
        height: 20px;
        border: 2px solid #d2dce8;
        border-radius: 4px;
        position: relative;
        flex-shrink: 0;
        transition: all 0.2s ease;
        background: #fff;
    }

    .quick-filter-item input:checked + .checkmark {
        background: #265a48;
        border-color: #265a48;
    }

        .quick-filter-item input:checked + .checkmark::after {
            content: '\2713';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: #fff;
            font-size: 13px;
            font-weight: 700;
        }

    .quick-filter-item:hover .checkmark {
        border-color: #265a48;
    }

/* دکمه‌های کالاهای موجود / تخفیف‌دار */
.quick-filter-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #eef1f4;
}

.quick-filter-button {
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #dfe5eb;
    border-radius: 8px;
    background: #fff;
    color: #4a4a4a;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}

    .quick-filter-button:hover {
        border-color: #265a48;
        color: #265a48;
    }

    .quick-filter-button.active {
        background: #265a48;
        border-color: #265a48;
        color: #fff;
        box-shadow: 0 3px 10px rgba(38,90,72,.18);
    }

        .quick-filter-button.active:hover {
            background: #1f4b3b;
            border-color: #1f4b3b;
            color: #fff;
        }

    .quick-filter-button i {
        margin-left: 4px;
    }

    .quick-filter-button input[type="checkbox"] {
        display: none !important;
    }

.quick-hidden-checkbox {
    display: none !important;
}

/* ============================================ */
/* Badgeهای فعال */
/* ============================================ */
.active-filters-container {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    background: #f8f9fc;
    border-radius: 8px;
    border: 1px solid #eef1f4;
    margin-bottom: 16px;
}

    .active-filters-container.active {
        display: flex;
    }

.active-filters-label {
    font-size: 13px;
    color: #4a4a4a;
    font-weight: 500;
    margin-left: 4px;
}

.active-filters-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 6px;
    background: #e8f0fe;
    border-radius: 20px;
    font-size: 12px;
    color: #1a3a5a;
    font-weight: 500;
    border: 1px solid #d2e0f0;
}

    .filter-badge .badge-icon {
        color: #265a48;
        font-size: 14px;
    }

    .filter-badge .badge-remove {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.05);
        border: none;
        color: #666;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.2s ease;
        padding: 0;
        line-height: 1;
    }

        .filter-badge .badge-remove:hover {
            background: #e03a3a;
            color: #fff;
            transform: scale(1.1);
        }

.clear-all-filters-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 12px;
    color: #4a4a4a;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    white-space: nowrap;
}

    .clear-all-filters-btn:hover {
        background: #fee2e2;
        border-color: #fca5a5;
        color: #dc2626;
    }

    .clear-all-filters-btn i {
        font-size: 14px;
    }

/* ============================================ */
/* گروه‌های فیلتر */
/* ============================================ */
.filter-group {
    margin-bottom: 20px;
    border: 1px solid #eef1f4;
    border-radius: 8px;
    padding: 12px 16px;
    background: #fff;
    transition: all 0.2s ease;
}

    .filter-group:last-child {
        margin-bottom: 0;
    }

    .filter-group:hover {
        border-color: #d2dce8;
    }

    .filter-group .filter-title {
        font-size: 14px;
        font-weight: 600;
        color: #1a1a2e;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        user-select: none;
        padding: 2px 0;
    }

        .filter-group .filter-title .title-text {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .filter-group .filter-title .chevron-icon {
            font-size: 14px;
            color: #88909b;
            transition: transform 0.3s ease;
        }

    .filter-group.open .filter-title .chevron-icon {
        transform: rotate(180deg);
    }

.filter-active-indicator {
    display: none;
    align-items: center;
    margin-right: 4px;
}

    .filter-active-indicator .status-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #22c55e;
        display: inline-block;
        animation: pulse 1.5s ease-in-out infinite;
    }

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.filter-group .filter-options {
    display: none;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f2f5;
}

.filter-group.open .filter-options {
    display: flex;
}

.filter-group .filter-options .option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #4a4a4a;
    cursor: pointer;
    padding: 4px 0;
    transition: 0.2s;
}

    .filter-group .filter-options .option-item:hover {
        color: #1a1a2e;
    }

    .filter-group .filter-options .option-item input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: #00a99d;
        cursor: pointer;
        flex-shrink: 0;
        border-radius: 4px;
        border: 2px solid #d2dce8;
    }

    .filter-group .filter-options .option-item .count {
        color: #88909b;
        font-size: 11px;
        margin-right: auto;
    }

/* ============================================ */
/* جستجوی برندها */
/* ============================================ */
/*    .brand-search-box {
            margin-bottom: 12px;
            position: relative;
        }

            .brand-search-box .search-input {
                width: 100%;
                padding: 10px 14px 10px 40px;
                border: 1px solid #e2e8f0;
                border-radius: 50px;
                font-size: 13px;
                color: #1a1a2e;
                background: #f8f9fc;
                transition: all 0.3s ease;
            }

                .brand-search-box .search-input:focus {
                    outline: none;
                    border-color: #265a48;
                    background: #fff;
                    box-shadow: 0 0 0 3px rgba(38, 90, 72, 0.1);
                }

                .brand-search-box .search-input::placeholder {
                    color: #88909b;
                }

            .brand-search-box .search-icon {
                position: absolute;
                left: 14px;
                top: 50%;
                transform: translateY(-50%);
                color: #88909b;
                font-size: 16px;
            }
    */
/* ============================================ */
/* قیمت */
/* ============================================ */
.price-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 4px 0;
}

.price-header {
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
}

.price-inputs-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .price-input-row .input-label {
        font-size: 13px;
        color: #4a4a4a;
        width: 20px;
        text-align: right;
    }

    .price-input-row input {
        flex: 1;
        padding: 6px 0;
        border: none;
        border-bottom: 1px solid #e2e8f0;
        font-size: 15px;
        font-weight: 700;
        color: #1a1a2e;
        text-align: center;
        background: transparent;
        transition: border-color 0.3s;
    }

        .price-input-row input:focus {
            outline: none;
            border-bottom-color: #265a48;
        }

        .price-input-row input::placeholder {
            color: #1a1a2e;
            font-weight: 700;
        }

    .price-input-row .currency-label {
        font-size: 12px;
        color: #88909b;
        width: 40px;
        text-align: left;
    }

/* ============================================ */
/* دکمه اعمال فیلتر */
/* ============================================ */
.btn-apply-filter {
    width: 100%;
    background: #265a48;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px;
    font-weight: 600;
    font-size: 14px;
    transition: 0.3s;
    margin-top: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .btn-apply-filter:hover {
        background: #1a3f32;
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(38, 90, 72, 0.3);
    }

/* ============================================ */
/* محصولات */
/* ============================================ */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    background: #fff;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid #eef1f4;
}

    .products-header .result-count {
        font-size: 14px;
        color: #4a4a4a;
    }

        .products-header .result-count strong {
            color: #1a1a2e;
        }

    .products-header .sort-options {
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .products-header .sort-options label {
            font-size: 13px;
            color: #4a4a4a;
            margin: 0;
        }

        .products-header .sort-options select {
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            padding: 6px 12px;
            font-size: 13px;
            background: #fff;
            color: #1a1a2e;
        }

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eef1f4;
    overflow: hidden;
    transition: 0.3s;
    position: relative;
    text-decoration: none;
    color: inherit;
    display: block;
}

    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
        border-color: #00a99d;
    }

    .product-card .product-image {
        padding: 16px;
        background: #fafbfc;
        height: 180px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }

        .product-card .product-image img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }

        .product-card .product-image .discount-badge {
            position: absolute;
            top: 10px;
            right: 10px;
            background: #e03a3a;
            color: #fff;
            font-size: 11px;
            font-weight: 600;
            padding: 2px 10px;
            border-radius: 20px;
        }

        .product-card .product-image .stock-badge {
            position: absolute;
            bottom: 10px;
            right: 10px;
            font-size: 10px;
            color: #10b981;
            background: #d1fae5;
            padding: 2px 10px;
            border-radius: 20px;
        }

    .product-card .product-body {
        padding: 12px 14px 14px;
    }

        .product-card .product-body .product-title {
            font-size: 13px;
            font-weight: 500;
            color: #1a1a2e;
            margin-bottom: 4px;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            height: 38px;
        }

        .product-card .product-body .product-brand {
            font-size: 11px;
            color: #88909b;
            margin-bottom: 8px;
        }

        .product-card .product-body .product-price {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

            .product-card .product-body .product-price .final-price {
                font-size: 15px;
                font-weight: 700;
                color: #1a1a2e;
            }

            .product-card .product-body .product-price .original-price {
                font-size: 12px;
                color: #aaa;
                text-decoration: line-through;
            }

            .product-card .product-body .product-price .discount-percent {
                font-size: 11px;
                color: #e03a3a;
                font-weight: 600;
            }

        .product-card .product-body .add-to-cart-btn {
            width: 100%;
            margin-top: 10px;
            padding: 6px;
            border: 1px solid #00a99d;
            border-radius: 6px;
            background: transparent;
            color: #00a99d;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }

            .product-card .product-body .add-to-cart-btn:hover {
                background: #00a99d;
                color: #fff;
            }

/* ============================================ */
/* صفحه‌بندی */
/* ============================================ */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 6px;
}

    .pagination-container .page-item {
        list-style: none;
    }

    .pagination-container .page-link {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
        color: #4a4a4a;
        text-decoration: none;
        font-size: 13px;
        transition: 0.3s;
        background: #fff;
    }

        .pagination-container .page-link:hover {
            border-color: #00a99d;
            color: #00a99d;
        }

    .pagination-container .page-item.active .page-link {
        background: #265a48;
        border-color: #265a48;
        color: #fff;
    }

    .pagination-container .page-item.disabled .page-link {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* ============================================ */
/* Responsive - ONLY the Filters button opens a sidebar */
/* ============================================ */

@media (min-width: 992px) {
    .mobile-filter-overlay,
    .mobile-filter-sidebar,
    .mobile-filter-triggers,
    .mobile-bottom-menu {
        display: none !important;
    }

    #activeFiltersContainerMobile,
    #activeFiltersContainerMobile.active {
        display: none !important;
    }

    .mobile-result-count {
        display: none !important;
    }
}

@media (max-width: 991px) {
    .filter-sidebar {
        display: none !important;
    }

    .mobile-filter-triggers {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        margin-bottom: 16px;
    }

    .mobile-filter-trigger,
    .mobile-active-filter-trigger {
        flex: 0 0 auto;
    }

        .mobile-filter-trigger[data-type="filters"] {
            display: inline-flex;
        }

    .filter-page {
        padding-bottom: 24px;
    }

    .page-header p {
        max-width: 100%;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .product-card .product-image {
        height: 140px;
        padding: 12px;
    }

    .product-card .product-body .product-title {
        font-size: 12px;
        height: 32px;
    }

    .product-card .product-body .product-price .final-price {
        font-size: 13px;
    }

    .products-header {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px;
    }

        .products-header .sort-options {
            justify-content: flex-end;
        }

    #activeFiltersContainer {
        display: none !important;
    }
    /* در ریسپانسیو Badgeهای تک‌تک نمایش داده نمی‌شوند؛
                فیلترهای فعال به‌صورت دکمه‌های دسته‌ای کنار «فیلترها» هستند. */
    #activeFiltersContainerMobile,
    #activeFiltersContainerMobile.active {
        display: none !important;
    }
    /*            .search-input-wrapper .search-input,
                .mobile-filter-sidebar .search-input-wrapper .search-input {
                    -webkit-appearance: none;
                    appearance: none;
                    outline: none !important;
                    background-clip: padding-box;
                    border: 1px solid #e2e8f0 !important;
                    border-radius: 50px !important;
                    box-shadow: none !important;
                }*/
    /*
                    .search-input-wrapper .search-input:focus,
                    .mobile-filter-sidebar .search-input-wrapper .search-input:focus {
                        border-color: #265a48 !important;
                        box-shadow: 0 0 0 3px rgba(38, 90, 72, 0.1) !important;
                    }*/

    .mobile-filter-sidebar .quick-filter-buttons {
        grid-template-columns: 1fr 1fr;
    }
    /* ============================================
                MOBILE RIGHT SIDEBAR
                ============================================ */

    #mobileFilterOverlay {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: rgba(0, 0, 0, .45);
        z-index: 99990 !important;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .25s ease, visibility .25s ease;
    }

        #mobileFilterOverlay.active {
            opacity: 1 !important;
            visibility: visible !important;
            pointer-events: auto;
        }

    #mobileFilterSidebar {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;
        width: min(390px, 92vw) !important;
        max-width: 390px !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff;
        border-radius: 0 !important;
        z-index: 99991 !important;
        transform: translateX(105%) !important;
        transition: transform .3s cubic-bezier(.4, 0, .2, 1);
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        box-shadow: -8px 0 30px rgba(0, 0, 0, .18);
        visibility: hidden;
    }

        #mobileFilterSidebar.open {
            transform: translateX(0) !important;
            visibility: visible;
        }
        /* پاپ‌آپ دسته‌های فعال: از پایین به بالا باز می‌شود */
        #mobileFilterSidebar.category-sheet {
            top: auto !important;
            right: 0 !important;
            bottom: 0 !important;
            left: 0 !important;
            width: 100% !important;
            max-width: none !important;
            height: auto !important;
            max-height: min(72vh, 560px) !important;
            border-radius: 20px 20px 0 0 !important;
            transform: translateY(105%) !important;
            transition: transform .3s cubic-bezier(.4, 0, .2, 1) !important;
            box-shadow: 0 -8px 30px rgba(0, 0, 0, .18) !important;
        }

            #mobileFilterSidebar.category-sheet.open {
                transform: translateY(0) !important;
                visibility: visible;
            }

            #mobileFilterSidebar.category-sheet #mobileFilterContent {
                padding: 12px 16px 24px !important;
                max-height: calc(min(72vh, 560px) - 64px) !important;
            }

    .mobile-category-sheet-hint {
        margin: 0 0 12px;
        color: #88909b;
        font-size: 12px;
        line-height: 1.8;
    }

    .mobile-category-filter-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .mobile-category-filter-item {
        min-height: 48px;
        padding: 10px 12px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        border: 1px solid #e7edf2;
        border-radius: 12px;
        background: #fff;
        color: #30343b;
        font-size: 13px;
    }

        .mobile-category-filter-item .item-name {
            display: flex;
            align-items: center;
            gap: 9px;
            min-width: 0;
        }

        .mobile-category-filter-item .item-check {
            color: #20a98f;
            font-size: 16px;
            flex: 0 0 auto;
        }

        .mobile-category-filter-item .item-remove {
            width: 30px;
            height: 30px;
            padding: 0;
            border: 0;
            border-radius: 50%;
            background: #f2f5f6;
            color: #6b7280;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            flex: 0 0 30px;
        }

            .mobile-category-filter-item .item-remove:hover {
                background: #fee2e2;
                color: #dc2626;
            }

    .mobile-category-empty {
        padding: 24px 12px;
        text-align: center;
        color: #88909b;
        font-size: 13px;
    }

    .mobile-category-clear {
        width: 100%;
        margin-top: 14px;
        min-height: 42px;
        border: 1px solid #f0b5b5;
        border-radius: 10px;
        background: #fff7f7;
        color: #c43d3d;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
    }

    #mobileFilterSidebar .mobile-filter-header {
        position: relative !important;
        flex: 0 0 64px !important;
        width: 100% !important;
        min-height: 64px !important;
        height: 64px !important;
        background: #fff;
        z-index: 2;
        border-bottom: 1px solid #eee;
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px !important;
        border-radius: 0 !important;
    }

    #mobileFilterTitle {
        margin: 0;
        font-size: 16px;
        font-weight: 700;
        color: #1a1a2e;
    }

    #mobileFilterClose {
        position: relative !important;
        inset: auto !important;
        z-index: 10 !important;
        width: 38px;
        height: 38px;
        min-width: 38px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border: 0;
        background: #f5f5f5;
        border-radius: 50%;
        cursor: pointer;
        flex-shrink: 0;
    }

        #mobileFilterClose:hover {
            background: #e9e9e9;
        }

    #mobileFilterContent {
        position: relative !important;
        flex: 1 1 auto !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding: 16px 16px 30px !important;
    }

        #mobileFilterContent .filter-sidebar-mobile-inner {
            display: block !important;
            width: 100% !important;
            padding: 0 !important;
            margin: 0 !important;
            border: 0 !important;
            border-radius: 0 !important;
            box-shadow: none !important;
            position: static !important;
            background: transparent !important;
        }

        #mobileFilterContent .filter-header {
            display: none !important;
        }

        #mobileFilterContent .active-filters-container {
            display: none !important;
        }

        #mobileFilterContent .filter-group {
            width: 100%;
        }

        #mobileFilterContent .filter-title {
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

            #mobileFilterContent .filter-title:active {
                background: #f7f9fc;
            }

    body.mobile-filter-open {
        overflow: hidden !important;
        height: 100vh !important;
        touch-action: none;
    }

        body.mobile-filter-open #mobileFilterSidebar {
            touch-action: auto;
        }

    .mobile-bottom-menu {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-card .product-image {
        height: 120px;
        padding: 8px;
    }

    .product-card .product-body {
        padding: 8px 10px 10px;
    }

        .product-card .product-body .product-title {
            font-size: 11px;
            height: 28px;
        }

        .product-card .product-body .product-brand {
            font-size: 10px;
        }

        .product-card .product-body .product-price .final-price {
            font-size: 12px;
        }

        .product-card .product-body .add-to-cart-btn {
            font-size: 10px;
            padding: 4px;
        }

    .mobile-filter-trigger {
        font-size: 12px;
        padding: 6px 14px;
    }

    .mobile-bottom-menu .menu-item {
        font-size: 10px;
        padding: 4px 8px;
    }

        .mobile-bottom-menu .menu-item i {
            font-size: 18px;
        }

    .page-header {
        padding: 16px 18px;
    }

        .page-header h1 {
            font-size: 20px;
        }

        .page-header p {
            font-size: 13px;
        }
}

/* =========================================================
            PRICE RANGE
            ========================================================= */
.price-range-wrapper {
    position: relative;
    width: 100%;
    padding: 20px 5px 10px;
}

.price-range-track {
    position: absolute;
    left: 5px;
    right: 5px;
    top: 29px;
    height: 5px;
    background: #e5e7eb;
    border-radius: 10px;
    pointer-events: none;
}

.price-range-selected {
    position: absolute;
    top: 0;
    bottom: 0;
    background: var(--bs-primary, #0d6efd);
    border-radius: 10px;
}

.price-range-wrapper input[type="range"] {
    position: absolute;
    left: 0;
    right: 0;
    top: 20px;
    width: 100%;
    height: 20px;
    margin: 0;
    padding: 0;
    background: transparent;
    pointer-events: none;
    appearance: none;
    -webkit-appearance: none;
}

    .price-range-wrapper input[type="range"]::-webkit-slider-runnable-track {
        height: 5px;
        background: transparent;
    }

    .price-range-wrapper input[type="range"]::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
        margin-top: -7px;
        border-radius: 50%;
        border: 3px solid #fff;
        background: var(--bs-primary, #0d6efd);
        box-shadow: 0 1px 5px rgba(0,0,0,.25);
        cursor: pointer;
        pointer-events: auto;
        appearance: none;
        -webkit-appearance: none;
    }

    .price-range-wrapper input[type="range"]::-moz-range-track {
        height: 5px;
        background: transparent;
    }

    .price-range-wrapper input[type="range"]::-moz-range-thumb {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        border: 3px solid #fff;
        background: var(--bs-primary, #0d6efd);
        box-shadow: 0 1px 5px rgba(0,0,0,.25);
        cursor: pointer;
        pointer-events: auto;
    }

.price-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
    font-size: 13px;
    font-weight: 600;
}

.min-price-value, .max-price-value {
    direction: rtl;
    white-space: nowrap;
}

.mobile-category-filter-item .item-check {
    color: #c7d0d6;
    font-size: 16px;
    flex: 0 0 auto;
    transition: color .2s ease, transform .2s ease;
}

.mobile-category-filter-item.selected .item-check {
    color: #20a98f;
    transform: scale(1.05);
}

.mobile-category-filter-item.selected {
    background: #f0fbf7;
    border-color: #9adfce;
}

.mobile-sort-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 0;
}

.mobile-sort-option {
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #e7edf2;
    border-radius: 12px;
    background: #fff;
    color: #30343b;
    font-size: 14px;
    cursor: pointer;
    transition: .2s ease;
}

    .mobile-sort-option .sort-radio {
        width: 20px;
        height: 20px;
        flex: 0 0 auto;
        accent-color: #20a98f;
    }

    .mobile-sort-option.selected {
        background: #f0fbf7;
        border-color: #9adfce;
        color: #155f53;
        font-weight: 700;
    }

/* =========================================================
        Mobile active filter buttons - horizontal scrolling
        ========================================================= */
@media (max-width: 991.98px) {
    #mobileActiveFilterTriggers {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 8px;
        padding: 4px 2px 8px;
        max-width: 100%;
        scroll-behavior: smooth;
        touch-action: pan-x;
    }

        #mobileActiveFilterTriggers::-webkit-scrollbar {
            display: none;
        }

        #mobileActiveFilterTriggers > * {
            flex: 0 0 auto !important;
            white-space: nowrap !important;
        }

        #mobileActiveFilterTriggers .mobile-filter-trigger {
            flex: 0 0 auto !important;
            white-space: nowrap !important;
        }
        /* جلوگیری از فشرده شدن متن دکمه‌ها */
        #mobileActiveFilterTriggers button,
        #mobileActiveFilterTriggers .filter-badge {
            min-width: max-content;
        }
}

/* =========================================================
        Mobile filter sheet - slide from bottom to top
        ========================================================= */
@media (max-width: 991.98px) {
    #mobileSidebar.category-sheet {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        height: min(88vh, 760px) !important;
        max-height: 88vh !important;
        margin: 0 !important;
        border-radius: 18px 18px 0 0 !important;
        transform: translateY(105%) !important;
        transition: transform .32s cubic-bezier(.22,.61,.36,1) !important;
        overflow: hidden !important;
        z-index: 10001 !important;
        box-shadow: 0 -8px 30px rgba(0,0,0,.18);
    }

        #mobileSidebar.category-sheet.open {
            transform: translateY(0) !important;
        }
        /* محتوای داخلی Sheet */
        #mobileSidebar.category-sheet .mobile-content {
            height: 100%;
            max-height: 100%;
            overflow-y: auto;
            overflow-x: hidden;
            -webkit-overflow-scrolling: touch;
        }
        /* یک دستگیره کوچک بالای Popup */
        #mobileSidebar.category-sheet::before {
            content: "";
            position: absolute;
            top: 7px;
            left: 50%;
            transform: translateX(-50%);
            width: 42px;
            height: 4px;
            border-radius: 10px;
            background: #c9c9c9;
            z-index: 10002;
        }
}

.product-variants {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 4px 0 8px;
}

.variant-badge {
    background: #f0f2f5;
    color: #4a4a4a;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.variant-more {
    background: #265a48;
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 12px;
}

.price-range {
    font-size: 11px;
    color: #88909b;
    margin-right: 4px;
}

/* =========================================================
    موبایل - نمایش تک ستونی با عکس در راست
    ========================================================= */
@media (max-width: 991px) {
    /* تغییر گرید به تک ستون */
    .products-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    /* کارت محصول به صورت افقی */
    .product-card {
        display: -ms-flex:inherit;
        -webkit-flex: inherit;
        flex: inherit;
        ;
        flex-direction: row !important;
        align-items: center !important;
        gap: 14px !important;
        padding: 10px !important;
        min-height: 110px !important;
        border-radius: 12px !important;
        background: #fff !important;
        border: 1px solid #eef1f4 !important;
        text-decoration: none !important;
        transition: all 0.2s ease !important;
    }

        .product-card:hover {
            transform: none !important;
            box-shadow: 0 4px 15px rgba(0,0,0,0.06) !important;
        }
        /* تصویر محصول - سمت راست */
        .product-card .product-image {
            width: 100px !important;
            min-width: 100px !important;
            height: 100px !important;
            padding: 8px !important;
            background: #fafbfc !important;
            border-radius: 8px !important;
            order: 2 !important; /* عکس به سمت راست */
            flex-shrink: 0 !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            position: relative !important;
        }

            .product-card .product-image img {
                max-width: 100% !important;
                max-height: 100% !important;
                object-fit: contain !important;
            }
        /* بدنه محصول - سمت چپ */
        .product-card .product-body {
            flex: 1 !important;
            padding: 0 !important;
            min-width: 0 !important;
            order: 1 !important; /* اطلاعات به سمت چپ */
            display: flex !important;
            flex-direction: column !important;
            gap: 4px !important;
        }

            .product-card .product-body .product-title {
                font-size: 13px !important;
                font-weight: 600 !important;
                color: #1a1a2e !important;
                height: auto !important;
                -webkit-line-clamp: 2 !important;
                line-height: 1.4 !important;
                margin-bottom: 2px !important;
            }

            .product-card .product-body .product-brand {
                font-size: 11px !important;
                color: #88909b !important;
                margin-bottom: 2px !important;
            }

            .product-card .product-body .product-price {
                display: flex !important;
                align-items: center !important;
                gap: 6px !important;
                flex-wrap: wrap !important;
            }

                .product-card .product-body .product-price .final-price {
                    font-size: 14px !important;
                    font-weight: 700 !important;
                    color: #1a1a2e !important;
                }

                .product-card .product-body .product-price .original-price {
                    font-size: 11px !important;
                    color: #aaa !important;
                    text-decoration: line-through !important;
                }

                .product-card .product-body .product-price .discount-percent {
                    font-size: 10px !important;
                    color: #e03a3a !important;
                    font-weight: 600 !important;
                }

            .product-card .product-body .price-range {
                font-size: 10px !important;
                color: #88909b !important;
            }
            /* دکمه افزودن به سبد */
            .product-card .product-body .add-to-cart-btn {
                width: auto !important;
                margin-top: 6px !important;
                padding: 4px 14px !important;
                font-size: 11px !important;
                border-radius: 6px !important;
                border: 1px solid #00a99d !important;
                background: transparent !important;
                color: #00a99d !important;
                cursor: pointer !important;
                transition: 0.3s !important;
                display: inline-flex !important;
                align-items: center !important;
                gap: 4px !important;
            }

                .product-card .product-body .add-to-cart-btn:hover {
                    background: #00a99d !important;
                    color: #fff !important;
                }
        /* Badge تخفیف روی تصویر */
        .product-card .product-image .discount-badge {
            position: absolute !important;
            top: 4px !important;
            right: 4px !important;
            font-size: 9px !important;
            padding: 1px 7px !important;
            background: #e03a3a !important;
            color: #fff !important;
            border-radius: 12px !important;
        }

        .product-card .product-image .stock-badge {
            position: absolute !important;
            bottom: 4px !important;
            right: 4px !important;
            font-size: 8px !important;
            padding: 1px 7px !important;
            border-radius: 12px !important;
            background: #d1fae5 !important;
            color: #10b981 !important;
        }

            .product-card .product-image .stock-badge.out-of-stock {
                background: #fee2e2 !important;
                color: #dc2626 !important;
            }
        /* تنوع‌ها (رنگ/سایز) */
        .product-card .product-body .product-variants {
            display: flex !important;
            flex-wrap: wrap !important;
            gap: 3px !important;
            margin: 2px 0 4px !important;
        }

            .product-card .product-body .product-variants .variant-badge {
                font-size: 9px !important;
                padding: 1px 6px !important;
                border-radius: 10px !important;
                background: #f0f2f5 !important;
                color: #4a4a4a !important;
                border: 1px solid #e2e8f0 !important;
            }

            .product-card .product-body .product-variants .variant-more {
                font-size: 9px !important;
                padding: 1px 6px !important;
                border-radius: 10px !important;
                background: #265a48 !important;
                color: #fff !important;
            }
}
    /* =========================================================
    موبایل - تک ستونی با عکس در راست
    ========================================================= */

    @media (max-width: 991px) {
        .products-grid {
            grid-template-columns: 1fr !important;
            gap: 12px !important;
        }

        .product-card {
            display: flex;
            flex-direction: row !important;
            align-items: center !important;
            gap: 14px !important;
            padding: 10px !important;
            min-height: 110px !important;
            border-radius: 12px !important;
            background: #fff !important;
            border: 1px solid #eef1f4 !important;
            text-decoration: none !important;
            transition: all 0.2s ease !important;
            position: relative !important;
        }

            .product-card:hover {
                transform: none !important;
                box-shadow: 0 4px 15px rgba(0,0,0,0.06) !important;
            }
            /* تصویر محصول - سمت راست */
            .product-card .product-image {
                width: 150px !important;
                min-width: 150px !important;
                height: 150px !important;
                padding: 8px !important;
                background: #fafbfc !important;
                border-radius: 8px !important;
                order: 2 !important;
                flex-shrink: 0 !important;
                display: flex !important;
                align-items: center !important;
                justify-content: center !important;
                position: relative !important;
            }

                .product-card .product-image img {
                    max-width: 100% !important;
                    max-height: 100% !important;
                    object-fit: contain !important;
                }
        /* دکمه + در موبایل - کوچک‌تر */
        .add-to-cart-btn-image {
            width: 28px !important;
            height: 28px !important;
            font-size: 16px !important;
            bottom: 4px !important;
            right: 4px !important;
            box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3) !important;
        }

            .add-to-cart-btn-image i {
                font-size: 14px !important;
            }
        /* بدنه محصول - سمت چپ */
        .product-card .product-body {
            flex: 1 !important;
            padding: 0 !important;
            min-width: 0 !important;
            order: 1 !important;
            display: flex !important;
            flex-direction: column !important;
            gap: 4px !important;
        }

            .product-card .product-body .product-title {
                font-size: 13px !important;
                font-weight: 600 !important;
                color: #1a1a2e !important;
                height: auto !important;
                -webkit-line-clamp: 2 !important;
                line-height: 1.4 !important;
                margin-bottom: 2px !important;
            }

            .product-card .product-body .product-brand {
                font-size: 11px !important;
                color: #88909b !important;
                margin-bottom: 2px !important;
            }

            .product-card .product-body .product-price {
                display: flex !important;
                align-items: center !important;
                gap: 6px !important;
                flex-wrap: wrap !important;
            }

                .product-card .product-body .product-price .final-price {
                    font-size: 14px !important;
                    font-weight: 700 !important;
                    color: #1a1a2e !important;
                }

                .product-card .product-body .product-price .original-price {
                    font-size: 11px !important;
                    color: #aaa !important;
                    text-decoration: line-through !important;
                }

                .product-card .product-body .product-price .price-range {
                    font-size: 10px !important;
                    color: #88909b !important;
                }
            /* تنوع‌ها */
            .product-card .product-body .product-variants {
                display: flex !important;
                flex-wrap: wrap !important;
                gap: 3px !important;
                margin: 2px 0 4px !important;
            }

                .product-card .product-body .product-variants .variant-badge {
                    font-size: 9px !important;
                    padding: 1px 6px !important;
                    border-radius: 10px !important;
                    background: #f0f2f5 !important;
                    color: #4a4a4a !important;
                    border: 1px solid #e2e8f0 !important;
                }

                .product-card .product-body .product-variants .variant-more {
                    font-size: 9px !important;
                    padding: 1px 6px !important;
                    border-radius: 10px !important;
                    background: #265a48 !important;
                    color: #fff !important;
                }
        /* Badge تخفیف و موجودی */
        .product-card .product-image .discount-badge {
            position: absolute !important;
            top: 4px !important;
            right: 4px !important;
            font-size: 9px !important;
            padding: 1px 7px !important;
            background: #e03a3a !important;
            color: #fff !important;
            border-radius: 12px !important;
        }

        .product-card .product-image .stock-badge {
            position: absolute !important;
            bottom: 4px !important;
            left: 4px !important; /* سمت چپ تا با دکمه + تداخل نداشته باشد */
            font-size: 8px !important;
            padding: 1px 7px !important;
            border-radius: 12px !important;
            background: #d1fae5 !important;
            color: #10b981 !important;
        }

            .product-card .product-image .stock-badge.out-of-stock {
                background: #fee2e2 !important;
                color: #dc2626 !important;
            }
    }

    /* =========================================================
    موبایل‌های بسیار کوچک
    ========================================================= */

    @media (max-width: 576px) {
        .product-card .product-image {
            width: 120px !important;
            min-width: 120px !important;
            height: 120px !important;
        }

        .product-card .product-body .product-title {
            font-size: 12px !important;
        }

        .product-card .product-body .product-price .final-price {
            font-size: 13px !important;
        }

        .product-card {
            padding: 8px !important;
            gap: 10px !important;
            min-height: 90px !important;
        }
    }


