/*
 Theme Name:   Astra Child
 Theme URI:    https://fundelivery.ee
 Description:  Astra Child Theme for Fundelivery
 Author:       Fundelivery
 Template:     astra
 Version:      1.1.0
*/

/* ============================================
   СКРЫВАЕМ СТАРЫЙ БОКОВОЙ СПИСОК ФИЛЬТРОВ
   ============================================ */

/* Скрываем виджет с атрибутом vali в сайдбаре и под товарами */
.woocommerce-widget-layered-nav,
.widget_layered_nav,
.wc-block-attribute-filter,
ul.wc-block-attribute-filter__list,
.woocommerce ul.product_list_widget li .wc-layered-nav-term {
    display: none !important;
}

/* Скрываем секцию "Vali" которая сейчас отображается снизу/сбоку */
.woocommerce .widget h2:contains("Vali"),
.woocommerce-FilterableProducts,
.wc-block-components-filter-wrapper {
    display: none !important;
}

/* Универсальное скрытие — ищем виджет по заголовку */
.widget_wc_layered_nav_filters,
.woocommerce-widget-layered-nav-list {
    display: none !important;
}

/* ============================================
   FUNDELIVERY — ФИЛЬТРЫ КАТАЛОГА
   ============================================ */

.fd-filter-wrap {
    margin-bottom: 24px;
    width: 100%;
}

/* --- Кнопка открытия --- */
.fd-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333333;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    margin-bottom: 10px;
}
.fd-filter-toggle:hover {
    border-color: #aaaaaa;
    background: #f9f9f9;
}
.fd-chevron {
    transition: transform 0.2s ease;
    margin-left: 2px;
}

/* --- Счётчик активных фильтров --- */
.fd-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #692cb6;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    line-height: 1;
}

/* --- Панель фильтров --- */
.fd-filter-panel {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 12px;
}
.fd-filter-panel[hidden] {
    display: none;
}

/* --- Группа фильтров --- */
.fd-filter-group {
    margin-bottom: 14px;
}
.fd-filter-group:last-of-type {
    margin-bottom: 0;
}
.fd-filter-label {
    font-size: 11px;
    font-weight: 600;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 7px;
}

/* --- Таблетки --- */
.fd-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.fd-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 13px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 13px;
    color: #555555;
    background: #ffffff;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}
.fd-pill:hover {
    border-color: #692cb6;
    color: #692cb6;
    text-decoration: none;
}
.fd-pill.active {
    background: #f3ecfb;
    border-color: #692cb6;
    color: #4a1d80;
    font-weight: 500;
}
.fd-pill-count {
    font-size: 11px;
    color: #aaaaaa;
}
.fd-pill.active .fd-pill-count {
    color: #692cb6;
}

/* --- Сброс всех фильтров --- */
.fd-filter-actions {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}
.fd-clear-all {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #888888;
    text-decoration: underline;
    transition: color 0.15s;
}
.fd-clear-all:hover {
    color: #333333;
    text-decoration: underline;
}

/* --- Активные теги --- */
.fd-active-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}
.fd-active-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    background: #f3ecfb;
    border: 1px solid #692cb6;
    border-radius: 20px;
    font-size: 12px;
    color: #4a1d80;
    text-decoration: none;
    transition: background 0.15s;
}
.fd-active-tag:hover {
    background: #e5d4f5;
    text-decoration: none;
}

/* ============================================
   МОБИЛЬНАЯ ВЕРСИЯ
   ============================================ */
@media (max-width: 768px) {
    .fd-filter-toggle {
        width: 100%;
        justify-content: space-between;
    }
    .fd-pill {
        font-size: 12px;
        padding: 5px 11px;
    }
    .fd-filter-panel {
        padding: 14px;
    }
    .fd-filter-label {
        font-size: 10px;
    }
    .fd-active-tags {
        gap: 5px;
    }
}

/* ============================================
   СТРАНИЦА "НЕТ ТОВАРОВ" — кнопка возврата
   ============================================ */
.fd-no-results-hint {
    text-align: center;
    padding: 24px 16px;
    margin-bottom: 24px;
}
.fd-no-results-hint p {
    font-size: 15px;
    color: #666666;
    margin-bottom: 16px;
}
.fd-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: #692cb6;
    color: #ffffff !important;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none !important;
    transition: background 0.15s;
}
.fd-reset-btn:hover {
    background: #4a1d80;
    text-decoration: none !important;
}
