/* Категория/список товаров (product/category.tpl): subcats, toolbar, пагинация, cat-info */

/* ============================================
   КАТЕГОРИЯ / СПИСОК ТОВАРОВ (rf)
   Показывается только с GET-параметром test.
   Карточки товара — сквозные rf-product-card
   (те же, что в табах главной), стили выше.
   После приёмки: убрать else-ветку и проверку
   $_GET['test'] в product/category.tpl.
   ============================================ */

/* Подкатегории-чипы */
.rf-subcats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 20px;
}

.rf-subcats__link {
    display: inline-block;
    padding: 8px 16px;
    background: #fff; /* --rf-surface-2 */
    border: 1px solid #e3e8e3; /* --rf-border */
    border-radius: 999px;
    color: #1a1f1a; /* --rf-text */
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
}

.rf-subcats__link:hover {
    background: #e8f3ec; /* --rf-accent-soft */
    border-color: #2d6a3e; /* --rf-accent */
    color: #1f4a2c; /* --rf-accent-dark */
    text-decoration: none;
}

/* Тулбар: сортировка / на странице, снизу — пагинация */
.rf-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin: 0 0 20px;
}

.rf-toolbar--bottom {
    justify-content: space-between;
    margin: 24px 0 0;
}

.rf-toolbar__field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rf-toolbar__label {
    font-size: 13px;
    color: #5a655a; /* --rf-text-muted */
    margin: 0;
}

.rf-toolbar__select {
    height: 38px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #e3e8e3; /* --rf-border */
    border-radius: 10px; /* --rf-radius-sm */
    font-size: 14px;
    color: #1a1f1a; /* --rf-text */
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a655a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    padding-right: 34px;
    cursor: pointer;
}

.rf-toolbar__select:focus {
    outline: none;
    border-color: #2d6a3e; /* --rf-accent */
}

.rf-toolbar__results {
    font-size: 13px;
    color: #5a655a; /* --rf-text-muted */
}

/* Пагинация (bootstrap 3 .pagination, лёгкий полиш) */
.rf-toolbar__pagination .pagination {
    margin: 0;
}

.rf-toolbar__pagination .pagination > li > a,
.rf-toolbar__pagination .pagination > li > span {
    color: #1a1f1a;
    border: 1px solid #e3e8e3; /* --rf-border */
    margin: 0 3px;
    border-radius: 8px;
}

.rf-toolbar__pagination .pagination > li > a:hover {
    background: #e8f3ec; /* --rf-accent-soft */
    border-color: #2d6a3e; /* --rf-accent */
    color: #1f4a2c; /* --rf-accent-dark */
}

.rf-toolbar__pagination .pagination > .active > a,
.rf-toolbar__pagination .pagination > .active > a:hover,
.rf-toolbar__pagination .pagination > .active > a:focus {
    background: #2d6a3e; /* --rf-accent */
    border-color: #2d6a3e;
    color: #fff;
}

/* SEO-текст категории внизу */
.rf-cat-info {
    margin-top: 28px;
    font-size: 14px;
    line-height: 1.6;
    color: #5a655a; /* --rf-text-muted */
}

/* Адаптив категории */
@media (max-width: 480px) {
    .rf-toolbar {
        gap: 10px;
    }

    .rf-toolbar--bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* Активный чип производителя (страница бренда) — тёмно-зелёный градиент как в футере */
.rf-subcats__link--active,
.rf-subcats__link--active:hover {
    background: linear-gradient(135deg, #1a3324 0%, #2d6a3e 100%); /* --rf-accent-deep → --rf-accent */
    border-color: #1a3324; /* --rf-accent-deep */
    color: #fff;
    cursor: default;
}

/* ===== Пустое состояние (нет товаров) ===== */
.rf-empty {
    padding: 44px 20px 40px;
    text-align: center;
}

.rf-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    border-radius: 18px;
    background: #e8f3ec; /* --rf-accent-soft */
    color: #2d6a3e; /* --rf-accent */
}

.rf-empty__icon svg {
    width: 30px;
    height: 30px;
}

.rf-empty__title {
    font-size: 18px;
    font-weight: 800;
    color: #1a1f1a; /* --rf-text */
    margin-bottom: 6px;
}

.rf-empty__text {
    font-size: 14px;
    line-height: 1.55;
    color: #5a655a; /* --rf-text-muted */
    max-width: 420px;
    margin: 0 auto 20px;
}

.rf-empty__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    padding: 12px 24px;
    background: #2d6a3e; /* --rf-accent */
    border-radius: 8px; /* --rf-radius-sm */
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s;
}

.rf-empty__btn:hover,
.rf-empty__btn:focus {
    background: #1f4a2c; /* --rf-accent-dark */
    color: #fff;
}

.rf-empty__link {
    display: block;
    margin-top: 12px;
    font-size: 13.5px;
    font-weight: 600;
    color: #5a655a; /* --rf-text-muted */
    text-decoration: underline;
}

.rf-empty__link:hover {
    color: #2d6a3e; /* --rf-accent */
}
