/* Начало. Отзывы. Стили для отзывов */
/* Список отзывов */
.reviews-list {
    max-width: 900px;
    margin: 0 auto;
}

.reviews-list .recal {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #a62d26;
}

.reviews-list .recal .name {
    margin-top: 15px;
    font-weight: 600;
    color: #a62d26;
}

.reviews-list .recal .data {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.recal .review-cats-top {
    float: right;
    margin: 0 0 10px 10px;
}

.recal .review-cats-top .review-cat-tag {
    display: inline-block;
    background: #f0f0f0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #666;
    margin-left: 5px;
}

/* Сетка. отзывы */
.recal .review-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 15px;
}

.recal .review-source-left {
    text-align: left;
    font-size: 14px;
}

.recal .review-source-left a {
    color: #666;
    text-decoration: none;
}

.recal .review-source-left a:hover {
    opacity: 0.7;
    color: #a62d26;
}

.recal .review-right {
    text-align: right;
}

.recal .review-right .name {
    font-weight: 600;
    color: #a62d26;
    margin-bottom: 2px;
}

.recal .review-right .data {
    color: #999;
    font-size: 14px;
}

/* Фильтр. Отзывы */

/* ===== ФИЛЬТР ===== */
.reviews-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    position: relative;
    margin-left: auto;
    margin-right: auto;
    max-width: 900px;
}

/* ===== КНОПКА ===== */
.filter-dropdown {
    position: relative;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    color: #222;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: #a62d26;
    color: #a62d26;
}

.filter-btn.active {
    border-color: #a62d26;
    background: #fff5f5;
}

.filter-btn-arrow {
    font-size: 10px;
    color: #999;
    transition: transform 0.2s;
}

.filter-btn.active .filter-btn-arrow {
    transform: rotate(180deg);
}

/* ===== ПОПАП ===== */
.filter-popup {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 8px 0;
    z-index: 100;
}

.filter-popup.active {
    display: block;
}

.filter-popup-inner {
    padding: 4px 16px 12px;
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}


/* Общие стили для лейблов в фильтре */
.filter-popup label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    background: transparent;
    padding-left: 0; /* Сбрасываем старый padding WooCommerce */
    line-height: 18px;
}

/* Сбрасываем лишние отступы у текста */
.filter-popup label span {
    position: relative; 
    display: inline-flex;
    align-items: flex-end;
}

.filter-popup  .filter-radio {
   position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Общие стили для КВАДРАТА (кастомный чекбокс и радио) */
.filter-popup .filter-checkbox + span::before,
.filter-popup .filter-radio + span::before {
    content: '';
    position: static;   
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;  
    flex-shrink: 0;     
    width: 18px;
    height: 18px;
    background: #fff;
    border: 1px solid #888;
    transition: all 0.2s ease;
}

/* РАДИОКНОПКУ делаем КРУГЛОЙ (если это нужно, иначе удалите эту строчку) */
.filter-popup .filter-radio + span::before {
    border-radius: 50%; 
}
/* ЧЕКБОКС оставляем КВАДРАТНЫМ */
.filter-popup .filter-checkbox + span::before {
    border-radius: 3px; 
}

/* Состояние ACTIVE (красим в красный при клике и чекбокс, и радио) */
.filter-popup .filter-checkbox:checked + span::before,
.filter-popup .filter-radio:checked + span::before {
    border-color: #a62d26;
    background: #a62d26;
}

/* ИДЕАЛЬНАЯ ТОЧКА ДЛЯ РАДИОКНОПКИ (без смещений текста) */
.filter-popup .filter-radio:checked + span::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%; 
    background: #fff; 
    left: 5px;
    top: 5px;
    pointer-events: none; 
    line-height: 0;
    font-size: 0;
}

/* Корректируем галочку для нового отображения */
.filter-popup .filter-checkbox:checked + span::after {
    content: '✔';
    position: absolute;
    left: 4px;
    top: 3px;          
    font-size: 16px;
    line-height: 1;
    color: #fff8f8;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
    .reviews-filter {
        flex-direction: column;
        gap: 8px;
    }
    
    .filter-dropdown {
        width: 100%;
    }
    
    .filter-btn {
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-popup {
        left: 0;
        right: 0;
        min-width: auto;
    }
}

/* Конец. Отзывы. Стили для отзывов */