
/* ========================================
   BARBERSHOP — CATEGORY / TAG / BRAND
   Чёрный • Белый • Красный
======================================== */

/* 1. Основной фон */
body.tax-product_cat,
body.tax-product_tag,
body.tax-product_brand {
    background: #151515;
    color: #f5f5f5;
}

body.tax-product_cat #primary,
body.tax-product_tag #primary,
body.tax-product_brand #primary,
body.tax-product_cat .site-main,
body.tax-product_tag .site-main,
body.tax-product_brand .site-main {
    background: #151515;
    color: #f5f5f5;
    min-height: 100vh;
    padding-top: 35px;
}

/* 2. Основной контейнер */
body.tax-product_cat .site-main,
body.tax-product_tag .site-main,
body.tax-product_brand .site-main {
    padding-right: 20px;
    padding-left: 20px;
}

/* 3. Заголовок страницы */
body.tax-product_cat .woocommerce-products-header,
body.tax-product_tag .woocommerce-products-header,
body.tax-product_brand .woocommerce-products-header {
    max-width: 1200px;
    margin: 0 auto 30px;
}

body.tax-product_cat .woocommerce-products-header__title,
body.tax-product_tag .woocommerce-products-header__title,
body.tax-product_brand .woocommerce-products-header__title {
    color: #fff !important;
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #c00;
}

/* 4. Описание категории, метки или бренда */
body.tax-product_cat .term-description,
body.tax-product_tag .term-description,
body.tax-product_brand .term-description {
    color: #aaa;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 25px;
}

body.tax-product_cat .term-description p,
body.tax-product_tag .term-description p,
body.tax-product_brand .term-description p {
    color: #aaa;
    margin-bottom: 12px;
}

/* 5. Сортировка и количество товаров */
body.tax-product_cat .woocommerce-result-count,
body.tax-product_tag .woocommerce-result-count,
body.tax-product_brand .woocommerce-result-count {
    color: #999;
    font-size: 14px;
}

body.tax-product_cat .woocommerce-ordering select,
body.tax-product_tag .woocommerce-ordering select,
body.tax-product_brand .woocommerce-ordering select {
    background: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px;
    max-width: 100%;
}

/* 6. Сетка товаров */
body.tax-product_cat ul.products,
body.tax-product_tag ul.products,
body.tax-product_brand ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 25px auto 40px !important;
    padding: 0;
    list-style: none;
}

/* 7. Карточка товара */
body.tax-product_cat ul.products li.product,
body.tax-product_tag ul.products li.product,
body.tax-product_brand ul.products li.product {
    float: none !important;
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
    padding: 14px;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: left;
}

/* 8. Ссылки — никаких синих цветов */
body.tax-product_cat a,
body.tax-product_tag a,
body.tax-product_brand a {
    color: #f5f5f5;
    text-decoration: none;
}

body.tax-product_cat a:visited,
body.tax-product_tag a:visited,
body.tax-product_brand a:visited {
    color: #f5f5f5;
}

/* 9. Изображения */
body.tax-product_cat ul.products li.product img,
body.tax-product_tag ul.products li.product img,
body.tax-product_brand ul.products li.product img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #252525;
    border-radius: 7px;
    margin: 0 0 14px;
}

/* 10. Название товара */
body.tax-product_cat .woocommerce-loop-product__title,
body.tax-product_tag .woocommerce-loop-product__title,
body.tax-product_brand .woocommerce-loop-product__title {
    color: #f5f5f5 !important;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
    padding: 0;
    margin: 0 0 12px;
}

/* 11. Цена */
body.tax-product_cat ul.products li.product .price,
body.tax-product_tag ul.products li.product .price,
body.tax-product_brand ul.products li.product .price {
    color: #e53935 !important;
    font-size: 19px;
    font-weight: 800;
    margin: auto 0 14px;
}

body.tax-product_cat .price del,
body.tax-product_tag .price del,
body.tax-product_brand .price del {
    color: #888 !important;
    font-size: 14px;
    opacity: 1;
}

body.tax-product_cat .price ins,
body.tax-product_tag .price ins,
body.tax-product_brand .price ins {
    color: #e53935 !important;
    text-decoration: none;
}

/* 12. Кнопки */
body.tax-product_cat ul.products li.product .button,
body.tax-product_tag ul.products li.product .button,
body.tax-product_brand ul.products li.product .button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 8px;
    margin: 0;
    background: #c00 !important;
    color: #fff !important;
    border: 1px solid #c00 !important;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
}

/* 13. Наведение */
@media (hover: hover) {
    body.tax-product_cat ul.products li.product:hover,
    body.tax-product_tag ul.products li.product:hover,
    body.tax-product_brand ul.products li.product:hover {
        border-color: #c00;
    }

    body.tax-product_cat ul.products li.product a:hover,
    body.tax-product_tag ul.products li.product a:hover,
    body.tax-product_brand ul.products li.product a:hover {
        color: #e53935;
    }

    body.tax-product_cat ul.products li.product .button:hover,
    body.tax-product_tag ul.products li.product .button:hover,
    body.tax-product_brand ul.products li.product .button:hover {
        background: #a00000 !important;
        border-color: #a00000 !important;
        color: #fff !important;
    }
}

/* 14. Пагинация */
body.tax-product_cat .woocommerce-pagination,
body.tax-product_tag .woocommerce-pagination,
body.tax-product_brand .woocommerce-pagination {
    margin: 30px auto;
    text-align: center;
}

body.tax-product_cat .woocommerce-pagination ul,
body.tax-product_tag .woocommerce-pagination ul,
body.tax-product_brand .woocommerce-pagination ul {
    border: none !important;
}

body.tax-product_cat .woocommerce-pagination a,
body.tax-product_cat .woocommerce-pagination span,
body.tax-product_tag .woocommerce-pagination a,
body.tax-product_tag .woocommerce-pagination span,
body.tax-product_brand .woocommerce-pagination a,
body.tax-product_brand .woocommerce-pagination span {
    display: inline-block;
    background: #222 !important;
    color: #fff !important;
    border: 1px solid #383838 !important;
    border-radius: 5px;
    padding: 10px 14px;
}

body.tax-product_cat .woocommerce-pagination .current,
body.tax-product_tag .woocommerce-pagination .current,
body.tax-product_brand .woocommerce-pagination .current {
    background: #c00 !important;
    border-color: #c00 !important;
}

/* 15. Планшет */
@media (max-width: 900px) {
    body.tax-product_cat ul.products,
    body.tax-product_tag ul.products,
    body.tax-product_brand ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }
}

/* 16. Телефон */
@media (max-width: 480px) {
    body.tax-product_cat #primary,
    body.tax-product_tag #primary,
    body.tax-product_brand #primary,
    body.tax-product_cat .site-main,
    body.tax-product_tag .site-main,
    body.tax-product_brand .site-main {
        padding-top: 20px;
        padding-right: 12px;
        padding-left: 12px;
    }

    body.tax-product_cat ul.products,
    body.tax-product_tag ul.products,
    body.tax-product_brand ul.products {
        gap: 10px;
        margin-top: 18px !important;
    }

    body.tax-product_cat ul.products li.product,
    body.tax-product_tag ul.products li.product,
    body.tax-product_brand ul.products li.product {
        padding: 8px;
        border-radius: 8px;
    }

    body.tax-product_cat .woocommerce-loop-product__title,
    body.tax-product_tag .woocommerce-loop-product__title,
    body.tax-product_brand .woocommerce-loop-product__title {
        font-size: 13px;
    }

    body.tax-product_cat ul.products li.product .price,
    body.tax-product_tag ul.products li.product .price,
    body.tax-product_brand ul.products li.product .price {
        font-size: 15px;
    }

    body.tax-product_cat ul.products li.product .button,
    body.tax-product_tag ul.products li.product .button,
    body.tax-product_brand ul.products li.product .button {
        font-size: 10px;
        padding: 10px 4px;
    }

    body.tax-product_cat .woocommerce-ordering,
    body.tax-product_tag .woocommerce-ordering,
    body.tax-product_brand .woocommerce-ordering {
        float: none;
        margin-bottom: 15px;
    }

    body.tax-product_cat .woocommerce-ordering select,
    body.tax-product_tag .woocommerce-ordering select,
    body.tax-product_brand .woocommerce-ordering select {
        width: 100%;
    }
}
