 /* =============================================
   Wenrexa Filter System - Единый стиль фильтров
   Префикс: wenrexa-filter-
   Версия: 1.0
   ============================================= */
/* Основные переменные */
.wenrexa-filter-system {
    --wenrexa-primary: #4361ee;
    --wenrexa-primary-hover: #3a56d4;
    --wenrexa-secondary: #6c757d;
    --wenrexa-success: #06d6a0;
    --wenrexa-danger: #ef476f;
    --wenrexa-warning: #ffd166;
    --wenrexa-light: #f8f9fa;
    --wenrexa-dark: #212529;
    --wenrexa-border: #dee2e6;
    --wenrexa-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --wenrexa-radius: 8px;
    --wenrexa-radius-sm: 4px;
    --wenrexa-transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Общие стили для контейнеров фильтров */
.wenrexa-filter-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.wenrexa-filter-searchbar {
    margin-bottom: 1.5rem;
}

.wenrexa-filter-searchbar-input {
    position: relative;
}

    .wenrexa-filter-searchbar-input input {
        width: 100%;
        padding: 0.75rem 1rem 0.75rem 2.75rem;
        border: 1px solid var(--wenrexa-border);
        border-radius: var(--wenrexa-radius);
        font-size: 0.95rem;
        transition: var(--wenrexa-transition);
        background-color: white;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: 1rem center;
        background-size: 1rem;
    }

        .wenrexa-filter-searchbar-input input:focus {
            outline: none;
            border-color: var(--wenrexa-primary);
            box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
        }

/* Основная панель фильтров */
.wenrexa-filterbar {
    position: relative;
    margin-bottom: 1.5rem;
}

.wenrexa-filterbar-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

/* Чипсы фильтров */
.wenrexa-filter-chip-wrap {
    position: relative;
    display: inline-block;
}

.wenrexa-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: white;
    border: 1px solid var(--wenrexa-border);
    border-radius: var(--wenrexa-radius);
    font-size: 0.875rem;
    cursor: pointer;
    user-select: none;
    transition: var(--wenrexa-transition);
    min-height: 2.5rem;
}

    .wenrexa-filter-chip:hover {
        border-color: var(--wenrexa-primary);
        background-color: #f8f9ff;
    }

    .wenrexa-filter-chip:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
    }

.wenrexa-filter-chip--active {
    border-color: var(--wenrexa-primary);
    background-color: #f0f3ff;
}

.wenrexa-filter-chip-body {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-grow: 1;
}

.wenrexa-filter-chip-icon {
    color: var(--wenrexa-secondary);
    font-size: 0.875rem;
    min-width: 1rem;
    text-align: center;
}

.wenrexa-filter-chip-label {
    font-weight: 500;
    color: var(--wenrexa-dark);
}

.wenrexa-filter-chip-value {
    color: var(--wenrexa-primary);
    font-weight: 500;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wenrexa-filter-chip-caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.5rem;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid var(--wenrexa-secondary);
    transition: transform 0.2s ease;
}

.wenrexa-filter-chip-wrap[data-open="1"] .wenrexa-filter-chip-caret {
    transform: rotate(180deg);
}

.wenrexa-filter-chip-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    margin-left: 0.5rem;
    background-color: var(--wenrexa-light);
    border-radius: 50%;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--wenrexa-transition);
    color: var(--wenrexa-secondary);
}

    .wenrexa-filter-chip-clear:hover {
        background-color: var(--wenrexa-danger);
        color: white;
    }

/* Выпадающие меню */
.wenrexa-filter-chip-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 280px;
    max-width: 400px;
    max-height: 400px;
    background-color: white;
    border: 1px solid var(--wenrexa-border);
    border-radius: var(--wenrexa-radius);
    box-shadow: var(--wenrexa-shadow);
    z-index: 1000;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--wenrexa-transition);
}

.wenrexa-filter-chip-wrap[data-open="1"] .wenrexa-filter-chip-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wenrexa-filter-menu-grid {
    padding: 1rem;
    overflow-y: auto;
    max-height: 380px;
}

    .wenrexa-filter-menu-grid::-webkit-scrollbar {
        width: 6px;
    }

    .wenrexa-filter-menu-grid::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }

    .wenrexa-filter-menu-grid::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 3px;
    }

        .wenrexa-filter-menu-grid::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }

/* Стили для чекбоксов и радио-кнопок */
.wenrexa-filter-form-check {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    cursor: pointer;
    transition: var(--wenrexa-transition);
    border-radius: var(--wenrexa-radius-sm);
}

    .wenrexa-filter-form-check:hover {
        background-color: #f8f9ff;
    }

.wenrexa-filter-form-check-input {
    margin-right: 0.75rem;
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
    accent-color: var(--wenrexa-primary);
}

.wenrexa-filter-form-check-label {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--wenrexa-dark);
}

.wenrexa-filter-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.5rem;
    padding: 0 0.5rem;
    background-color: var(--wenrexa-light);
    border-radius: 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--wenrexa-secondary);
    margin-left: 0.5rem;
}

/* Слайдер цены */
.wenrexa-filter-dual-range {
    position: relative;
    height: 24px;
    margin: 1.5rem 0;
}

    .wenrexa-filter-dual-range::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 4px;
        background-color: var(--wenrexa-border);
        border-radius: 2px;
        transform: translateY(-50%);
    }

    .wenrexa-filter-dual-range input[type="range"] {
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        width: 100%;
        height: 0;
        margin: 0;
        transform: translateY(-50%);
        pointer-events: none;
        -webkit-appearance: none;
        appearance: none;
        background: transparent;
    }

        .wenrexa-filter-dual-range input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            background-color: var(--wenrexa-primary);
            border-radius: 50%;
            cursor: pointer;
            pointer-events: auto;
            border: 3px solid white;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        }

        .wenrexa-filter-dual-range input[type="range"]::-moz-range-thumb {
            width: 20px;
            height: 20px;
            background-color: var(--wenrexa-primary);
            border-radius: 50%;
            cursor: pointer;
            pointer-events: auto;
            border: 3px solid white;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        }

    .wenrexa-filter-dual-range .min,
    .wenrexa-filter-dual-range .max {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
    }

/* Кнопки режимов цены */
.wenrexa-filter-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.wenrexa-filter-btn-check {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wenrexa-filter-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: white;
    border: 1px solid var(--wenrexa-border);
    border-radius: var(--wenrexa-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--wenrexa-secondary);
    cursor: pointer;
    transition: var(--wenrexa-transition);
    text-align: center;
}

    .wenrexa-filter-btn:hover {
        border-color: var(--wenrexa-primary);
        color: var(--wenrexa-primary);
    }

.wenrexa-filter-btn-check:checked + .wenrexa-filter-btn {
    background-color: var(--wenrexa-primary);
    border-color: var(--wenrexa-primary);
    color: white;
}

/* Активные фильтры */
.wenrexa-filter-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: #f8f9ff;
    border-radius: var(--wenrexa-radius);
    min-height: 3rem;
}

.wenrexa-filter-active-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background-color: white;
    border: 1px solid var(--wenrexa-primary);
    border-radius: 1rem;
    font-size: 0.875rem;
    color: var(--wenrexa-primary);
    animation: wenrexa-filter-fadeIn 0.3s ease;
}

@@keyframes wenrexa-filter-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wenrexa-filter-active-chip-label {
    font-weight: 500;
}

.wenrexa-filter-active-chip-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: transparent;
    color: inherit;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--wenrexa-transition);
}

    .wenrexa-filter-active-chip-close:hover {
        background-color: var(--wenrexa-danger);
        color: white;
    }

/* Карусель типов продуктов */
.wenrexa-filter-type-strip {
    position: relative;
    overflow: hidden;
    margin-top: 1.5rem;
    padding: 0 2.5rem;
}

.wenrexa-filter-type-strip-inner {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0.5rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .wenrexa-filter-type-strip-inner::-webkit-scrollbar {
        display: none;
    }

.wenrexa-filter-type-strip-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    background-color: white;
    border: 1px solid var(--wenrexa-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--wenrexa-transition);
    color: var(--wenrexa-secondary);
}

    .wenrexa-filter-type-strip-arrow:hover {
        background-color: var(--wenrexa-primary);
        border-color: var(--wenrexa-primary);
        color: white;
    }

.wenrexa-filter-type-strip-arrow--prev {
    left: 0;
}

.wenrexa-filter-type-strip-arrow--next {
    right: 0;
}

.wenrexa-filter-type-strip-arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

    .wenrexa-filter-type-strip-arrow:disabled:hover {
        background-color: white;
        border-color: var(--wenrexa-border);
        color: var(--wenrexa-secondary);
    }

/* Карточки типов */
.wenrexa-filter-type-card {
    position: relative;
    overflow: hidden;
    border: none !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    /* Антиалиасинг для границ */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Хаки для браузеров */
    outline: 1px solid transparent;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    backface-visibility: hidden;
}
    /* Если фон устанавливается через inline style, добавьте !important */
    .wenrexa-filter-type-card[style*="background"] {
        background-size: cover !important;
        background-position: center !important;
    }

    /* Альтернатива с псевдоэлементом */
    .wenrexa-filter-type-card.has-bg-image {
        background: none !important;
    }

        .wenrexa-filter-type-card.has-bg-image::before {
            content: '';
            position: absolute;
            top: -3px;
            left: -3px;
            right: -3px;
            bottom: -3px;
            background: inherit;
            background-size: cover !important;
            background-position: center !important;
            border-radius: calc(var(--wenrexa-radius) + 2px);
            z-index: 0;
        }

    .wenrexa-filter-type-card::before {
        content: '';
        position: absolute;
        top: -1px;
        left: -1px;
        right: -1px;
        bottom: -1px;
        background: inherit;
        background-size: cover;
        background-position: center;
        border-radius: inherit;
        z-index: 0;
    }

    .wenrexa-filter-type-card:hover:not(.wenrexa-filter-type-card--disabled) {
        border-color: var(--wenrexa-primary);
        transform: translateY(-2px);
        box-shadow: var(--wenrexa-shadow);
    }

.wenrexa-filter-type-card--active {
    border-color: var(--wenrexa-primary);
    background-color: #f0f3ff;
}

.wenrexa-filter-type-card--disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wenrexa-filter-type-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.wenrexa-filter-type-card-icon {
    font-size: 2rem;
    color: var(--wenrexa-primary);
    margin-bottom: 0.5rem;
}

.wenrexa-filter-type-card-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--wenrexa-dark);
    line-height: 1.3;
}

/* Текстовые состояния */
.wenrexa-filter-text-muted {
    color: #adb5bd !important;
    opacity: 0.7;
}

/* Адаптивность */
@@media (max-width: 768px) {
    .wenrexa-filterbar-inner {
        gap: 0.5rem;
    }

    .wenrexa-filter-chip {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .wenrexa-filter-chip-menu {
        min-width: 250px;
        max-width: 300px;
    }

    .wenrexa-filter-type-card {
        width: 160px;
    }
}

@@media (max-width: 576px) {
    .wenrexa-filter-type-strip {
        padding: 0 2rem;
    }

    .wenrexa-filter-type-card {
        width: 140px;
        padding: 0.75rem;
    }

    .wenrexa-filter-type-card-icon {
        font-size: 1.5rem;
    }

    .wenrexa-filter-active-filters {
        padding: 0.5rem;
    }
}

 
