/* TwoEvens Filter Sidebar v3 */

/* ---- Кнопка-иконка ---- */
.te-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
}
.te-filter-toggle:hover { background: #333; }

/* ---- Затемнение ---- */
.te-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0);
    z-index: 9998;
    transition: background .3s;
}
.te-overlay.is-open {
    display: block;
    background: rgba(0,0,0,0.18);
}

/* ---- Панель (выезжает снизу) ---- */
.te-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 92vh;
    background: #fff;
    border-radius: 20px 20px 0 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.te-panel.is-open { transform: translateY(0); }

/* Закрыть */
.te-panel__close-row {
    display: flex;
    justify-content: flex-end;
    padding: 14px 18px 0;
    flex-shrink: 0;
}
.te-panel__close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    border-radius: 4px;
    transition: color .15s;
}
.te-panel__close:hover { color: #1a1a1a; }

/* Скролл-тело */
.te-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 0 22px;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}
.te-panel__body::-webkit-scrollbar { width: 0; }

/* Заголовки групп */
.te-group-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    color: #bbb;
    text-transform: uppercase;
    padding: 8px 0 4px;
}

/* Пункты сортировки */
.te-sort-item {
    display: block;
    font-size: 12px;
    letter-spacing: .1em;
    color: #1a1a1a;
    padding: 7px 0 7px 12px;
    text-transform: uppercase;
    cursor: pointer;
    font-weight: 400;
}
.te-sort-item.active,
.te-sort-item input:checked ~ * { font-weight: 700; }

/* Строки фильтров */
.te-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 0;
    border-top: 1px solid #f0f0f0;
    cursor: pointer;
    user-select: none;
}
.te-filter-label {
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #1a1a1a;
}
.te-filter-plus {
    font-size: 18px;
    color: #1a1a1a;
    line-height: 1;
    transition: transform .2s;
    flex-shrink: 0;
}
.te-filter-plus.is-open { transform: rotate(45deg); }

/* Контент фильтра */
.te-filter-content {
    overflow: hidden;
    max-height: 0;
    transition: max-height .28s ease;
}
.te-filter-content.is-open { max-height: 400px; }

/* Цена */
.te-price-row {
    display: flex;
    gap: 10px;
    padding: 6px 0 14px;
}
.te-price-row input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 7px 10px;
    font-size: 12px;
    color: #1a1a1a;
    background: #fff;
    outline: none;
    -moz-appearance: textfield;
}
.te-price-row input::-webkit-inner-spin-button,
.te-price-row input::-webkit-outer-spin-button { -webkit-appearance: none; }
.te-price-row input:focus { border-color: #1a1a1a; }

/* Цвета кружочками */
.te-color-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 0 14px;
}
.te-color-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: transform .15s;
}
.te-color-circle:hover { transform: scale(1.1); }
.te-color-circle.selected::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1.5px solid #1a1a1a;
}

/* Размеры и категории */
.te-size-list { padding: 6px 0 12px; }
.te-size-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 12px;
    letter-spacing: .08em;
    color: #1a1a1a;
    text-transform: uppercase;
    cursor: pointer;
}
.te-size-item input {
    width: 14px;
    height: 14px;
    accent-color: #1a1a1a;
    cursor: pointer;
    flex-shrink: 0;
}
.te-size-cnt {
    color: #bbb;
    font-size: 11px;
    letter-spacing: 0;
}

/* ---- Подвал ---- */
.te-panel__footer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 22px 20px;
    border-top: 1px solid #ebebeb;
    flex-shrink: 0;
}
.te-btn-results {
    border: 1.5px solid #1a1a1a;
    border-radius: 4px;
    padding: 8px 18px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    background: #fff;
    color: #1a1a1a;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.te-btn-results:hover { background: #1a1a1a; color: #fff; }
.te-btn-reset {
    font-size: 12px;
    letter-spacing: .1em;
    color: #aaa;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: color .15s;
}
.te-btn-reset:hover { color: #1a1a1a; }

body.te-panel-open { overflow: hidden; }
