/*
==================================================
CATEGORY PAGE
Новая страница категории каталога
==================================================
*/


/*
==================================================
ОСНОВНОЙ КОНТЕЙНЕР
==================================================
*/

.category-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}


/*
==================================================
ХЛЕБНЫЕ КРОШКИ
==================================================
*/

.category-breadcrumbs {
    background: #fafafa;
    border-bottom: 1px solid #ececec;
}

.category-breadcrumbs .category-container {
    padding-top: 16px;
    padding-bottom: 16px;

    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;

    color: #777;
}

.category-breadcrumbs a {
    color: #777;
    text-decoration: none;
}

.category-breadcrumbs a:hover {
    color: #222;
}

.category-breadcrumbs span {
    margin: 0 8px;
    color: #bbb;
}

.category-breadcrumbs .current {
    color: #222;
}


/*
==================================================
ОСНОВНАЯ СТРАНИЦА
==================================================
*/

.category-page {
    padding-top: 35px;
    padding-bottom: 60px;
}


/*
==================================================
СЕТКА

Левое меню + основной контент
==================================================
*/

.category-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    column-gap: 45px;
    align-items: start;
}


/*
==================================================
ЛЕВОЕ МЕНЮ
==================================================
*/

.category-sidebar {
    min-width: 0;
}

.category-menu-wrapper {
    margin: 0;
    padding: 0;
}

.category-menu {
    margin: 0;
    padding: 0;

    list-style: none;
}

.category-menu li {
    margin: 0;
    padding: 0;

    list-style: none;
}

.category-menu > li {
    margin-bottom: 5px;
}

.category-menu a {
    display: block;

    padding: 7px 10px;

    color: #555;
    font-family: Arial, sans-serif;
    font-size: 15px;
    line-height: 1.35;

    text-decoration: none;

    border-radius: 3px;

    transition:
        color 0.15s ease,
        background-color 0.15s ease;
}

.category-menu a:hover {
    color: #222;
    background: #f5f5f5;
}

.category-menu li.active > a {
    color: #d71920 !important;
}

.category-menu li.active > a:hover {
    color: #d71920 !important;
}


/*
==================================================
ВЛОЖЕННЫЕ КАТЕГОРИИ
==================================================
*/

.category-submenu {
    margin: 3px 0 8px 10px;
    padding-left: 10px;

    border-left: 2px solid #eeeeee;
}

.category-submenu .category-menu li {
    margin-bottom: 2px;
}

.category-submenu .category-menu a {
    padding: 5px 7px;

    font-size: 14px;
}

.category-submenu .category-menu li.active > a {
    color: #222;
    font-weight: 600;
}


/*
==================================================
КОНТЕНТ
==================================================
*/

.category-content {
    min-width: 0;
}


/*
==================================================
H1
==================================================
*/

.category-title {
    margin: 0 0 25px 0;
    padding: 13px 18px;

    color: #fff;
    background: #ff3b36;

    font-family: Arial, sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;

    box-sizing: border-box;
}


/*
==================================================
ВЕРХНИЙ ТЕКСТ
==================================================
*/

.category-top-text {
    margin: 0 0 30px 0;

    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.category-top-text p {
    margin-top: 0;
    margin-bottom: 16px;
}

.category-top-text p:last-child {
    margin-bottom: 0;
}

.category-top-text h2 {
    margin-top: 25px;
    margin-bottom: 15px;
}

.category-top-text h3 {
    margin-top: 20px;
    margin-bottom: 12px;
}


/*
==================================================
ТОВАРЫ

Три карточки в ряд на широком экране
==================================================
*/

.category-products {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 30px 22px;

    margin: 0;
    padding: 0;
}


/*
==================================================
КАРТОЧКА ТОВАРА
==================================================
*/

.category-product {
    min-width: 0;
}

.category-product-link {
    display: block;

    color: inherit;
    text-decoration: none;
}

.category-product-image {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;

    background: #f7f7f7;

    overflow: hidden;
}

.category-product-image img {
    display: block;

    width: 100%;
    height: auto;

    margin: 0;

    transition: transform 0.25s ease;
}

.category-product-link:hover .category-product-image img {
    transform: scale(1.025);
}


/*
==================================================
ЕСЛИ НЕТ КАРТИНКИ
==================================================
*/

.category-product-no-image {
    min-height: 180px;
    padding: 20px;

    box-sizing: border-box;

    color: #777;

    font-family: Arial, sans-serif;
    font-size: 14px;
    text-align: center;
}


/*
==================================================
НАЗВАНИЕ ТОВАРА
==================================================
*/

.category-product-title {
    margin-top: 11px;

    color: #333;

    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.4;

    transition: color 0.15s ease;
}

.category-product-link:hover .category-product-title {
    color: #ff3b36;
}


/*
==================================================
ПАГИНАЦИЯ
==================================================
*/

.category-pager {
    margin-top: 35px;

    font-family: Arial, sans-serif;
    font-size: 15px;

    text-align: center;
}

.category-pager .current {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    color: #fff;
    background: #ff3b36;

    box-sizing: border-box;
}


/*
==================================================
НИЖНИЙ SEO-ТЕКСТ
==================================================
*/

.category-bottom-text {
    margin-top: 45px;

    color: #333;

    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.category-bottom-text p {
    margin-top: 0;
    margin-bottom: 16px;
}

.category-bottom-text h2 {
    margin-top: 30px;
    margin-bottom: 15px;

    font-size: 25px;
    line-height: 1.3;
}

.category-bottom-text h3 {
    margin-top: 25px;
    margin-bottom: 12px;

    font-size: 20px;
    line-height: 1.35;
}

.category-bottom-text ul,
.category-bottom-text ol {
    margin-top: 0;
    margin-bottom: 20px;
}


/*
==================================================
АДАПТИВ

Планшет
==================================================
*/

@media screen and (max-width: 900px) {

    .category-layout {
        grid-template-columns: 210px minmax(0, 1fr);
        column-gap: 30px;
    }

    .category-products {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 28px 20px;
    }

    .category-title {
        font-size: 28px;
    }

}


/*
==================================================
МОБИЛЬНАЯ ВЕРСИЯ
==================================================
*/

@media screen and (max-width: 700px) {

    .category-container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .category-page {
        padding-top: 25px;
        padding-bottom: 40px;
    }

    .category-layout {
        display: block;
    }

    .category-sidebar {
        margin-bottom: 30px;
    }

    .category-menu a {
        padding-left: 7px;
        padding-right: 7px;
    }

    .category-title {
        margin-bottom: 20px;
        padding: 11px 14px;

        font-size: 25px;
    }

    .category-products {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 25px 15px;
    }

}


/*
==================================================
УЗКИЙ МОБИЛЬНЫЙ
==================================================
*/

@media screen and (max-width: 480px) {

    .category-products {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .category-product-title {
        font-size: 16px;
    }

    .category-breadcrumbs .category-container {
        padding-top: 12px;
        padding-bottom: 12px;

        font-size: 13px;
    }

}

/*
==================================================
ПОДКАТЕГОРИИ
==================================================
*/

.category-subcategories {

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 28px;

    margin-top: 30px;
    margin-bottom: 45px;
}


.category-subcategory {

    display: block;

    text-decoration: none;

    color: inherit;

    background: #fff;

    border-radius: 8px;

    overflow: hidden;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.category-subcategory:hover {

    transform: translateY(-3px);

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.10);
}


/*
==================================================
КАРТИНКА ПОДКАТЕГОРИИ
==================================================
*/

.category-subcategory-image {

    width: 100%;

    aspect-ratio: 4 / 3;

    overflow: hidden;

    background: #f3f3f3;
}


.category-subcategory-image img {

    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    object-position: center;

    transition:
        transform 0.3s ease;
}


.category-subcategory:hover
.category-subcategory-image img {

    transform: scale(1.03);
}


/*
==================================================
ЕСЛИ КАРТИНКИ НЕТ
==================================================
*/

.category-subcategory-no-image {

    width: 100%;
    height: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;

    box-sizing: border-box;

    text-align: center;

    color: #777;

    font-size: 16px;
}


/*
==================================================
НАЗВАНИЕ
==================================================
*/

.category-subcategory-title {

    padding: 18px 18px 20px;

    font-size: 18px;

    line-height: 1.35;

    font-weight: 600;

    color: #222;
}


/*
==================================================
АДАПТИВ
==================================================
*/

@media (max-width: 900px) {

    .category-subcategories {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 20px;
    }

}


@media (max-width: 600px) {

    .category-subcategories {

        grid-template-columns: 1fr;

        gap: 20px;

        margin-top: 20px;
        margin-bottom: 35px;
    }


    .category-subcategory-title {

        padding: 15px 16px 17px;

        font-size: 17px;
    }

}

/* ==================================================
   Одинаковый размер превью товаров
   ================================================== */

.category-product-image {
    width: 100%;
    height: 240px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
    background: #fff;
}

.category-product-image img {
    width: 100%;
    height: 100%;

    object-fit: contain;
    object-position: center;

    display: block;
}