/* =========================================================
   ОБЩАЯ СТРАНИЦА СПИСКА КАТАЛОГА
   Категории + стили
   ========================================================= */

.category-page__intro,
.style-page__intro {
    max-width: 1080px;
    margin: 20px 0 0;
    color: #74829c;
    font-size: 18px;
    line-height: 1.55;
}

.category-grid,
.style-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.category-card:hover,
.style-card:hover {
    transform: translateY(-2px);
    border-color: #d8e7df;
    box-shadow: 0 9px 26px rgba(20, 40, 30, 0.09);
}

.category-card__media,
.style-card__media {
    width: 112px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f2f0e9;
    border-radius: 10px;
}

.category-card__subtitle,
.style-card__subtitle {
    margin: 4px 0 0;
    color: #8090aa;
    font-size: 13px;
    line-height: 1.25;
}

/* Дополнительный reset для изображения карточки стиля. */
.style-card__media > .style-card__image {
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}


/* Категории */
/* ХЛЕБНЫЕ КРОШКИ */








/* ВВОДНЫЙ БЛОК */

.category-page__header {
    max-width: 1080px;

    margin-bottom: 28px;
}



.category-page__title::after {
    content: "";

    display: block;

    width: 180px;
    height: 4px;

    margin-top: 13px;

    background: #f2a20d;
    border-radius: 4px;
}



.category-page__intro p {
    margin: 0 0 10px;
}

.category-page__count {
    margin: 22px 0 18px;

    color: #74829c;

    font-size: 17px;
}


/* СЕТКА */




/* КАРТОЧКА */

.category-card {
    min-width: 0;
    min-height: 136px;

    display: grid;
    grid-template-columns: 112px 1fr;

    gap: 14px;

    padding: 8px;

    background: #ffffff;

    border: 1px solid #eceeea;
    border-radius: 14px;

    box-shadow: 0 5px 20px rgba(20, 40, 30, 0.055);

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}




/* =========================================================
   ИЗОБРАЖЕНИЕ КАТЕГОРИИ

   Изображение всегда показывается полностью по высоте.
   Если оно слишком широкое — лишнее обрезается по бокам.
   Если узкое — по бокам остаётся фоновая область.
   ========================================================= */







.category-card__placeholder {
    padding: 10px;

    color: #a1a7a3;

    font-size: 12px;
    line-height: 1.3;

    text-align: center;
}


/* ТЕКСТОВАЯ ЧАСТЬ */

.category-card__content {
    min-width: 0;

    display: flex;
    flex-direction: column;

    padding: 10px 5px 5px 0;
}

.category-card__title {
    margin: 0;

    color: #15201d;

    font-size: 17px;
    line-height: 1.2;
}



.category-card__bottom {
    margin-top: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;
}

.category-card__count {
    color: #7e8ca4;

    font-size: 13px;
}

.category-card__arrow {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: grid;
    place-items: center;

    border: 1px solid #badace;
    border-radius: 50%;

    color: #16231f;

    font-size: 20px;

    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease;
}

.category-card:hover .category-card__arrow {
    background: #08753f;
    border-color: #08753f;
    color: #ffffff;
}


/* АДАПТИВНОСТЬ */


/* Стили */
/* =========================================================
   СТРАНИЦА
   ========================================================= */




/* =========================================================
   ХЛЕБНЫЕ КРОШКИ
   ========================================================= */










/* =========================================================
   ЗАГОЛОВОК И ОПИСАНИЕ
   ========================================================= */

.style-page__header {
    max-width: 1080px;

    margin-bottom: 26px;
}





.style-page__title::after {
    content: "";

    display: block;

    width: 115px;
    height: 4px;

    margin-top: 13px;

    background: #f2a20d;

    border-radius: 4px;
}





.style-page__count {
    margin: 23px 0 18px;

    color: #17201d;

    font-size: 17px;
    font-weight: 700;
}


/* =========================================================
   СЕТКА СТИЛЕЙ
   ========================================================= */




/* =========================================================
   КАРТОЧКА
   ========================================================= */

.style-card {
    min-width: 0;
    min-height: 136px;

    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);

    gap: 14px;

    padding: 8px;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid #eceeea;
    border-radius: 14px;

    box-shadow:
        0 5px 20px rgba(20, 40, 30, 0.055);

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}





/* =========================================================
   ФОТО КАРТОЧКИ

   Логика:
   - контейнер имеет фиксированный размер;
   - изображение всегда занимает всю высоту;
   - пропорции сохраняются;
   - слишком широкое фото режется по бокам;
   - слишком узкое оставляет фон по бокам.
   ========================================================= */




/*
   !important здесь нужен специально, потому что в base.css
   есть глобальные настройки img.
*/




.style-card__placeholder {
    width: 100%;
    height: 100%;

    display: grid;
    place-items: center;

    padding: 10px;

    color: #a1a7a3;

    font-size: 12px;
    line-height: 1.3;

    text-align: center;
}


/* =========================================================
   ТЕКСТ КАРТОЧКИ
   ========================================================= */

.style-card__content {
    min-width: 0;

    display: flex;
    flex-direction: column;

    padding: 9px 5px 5px 0;
}


.style-card__title {
    margin: 0;

    color: #15201d;

    font-size: 16px;
    line-height: 1.2;
}





.style-card__bottom {
    margin-top: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 8px;
}


.style-card__category {
    min-width: 0;

    overflow: hidden;

    color: #8490a7;

    font-size: 12px;

    white-space: nowrap;
    text-overflow: ellipsis;
}


/* =========================================================
   СТРЕЛКА
   ========================================================= */

.style-card__arrow {
    width: 34px;
    height: 34px;

    flex: 0 0 34px;

    display: grid;
    place-items: center;

    border: 1px solid #badace;
    border-radius: 50%;

    color: #08753f;

    font-size: 18px;

    transition:
        color 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}


.style-card:hover .style-card__arrow {
    color: #ffffff;

    background: #08753f;
    border-color: #08753f;
}


/* =========================================================
   ПАГИНАЦИЯ
   ========================================================= */

.pagination {
    margin-top: 32px;

    display: flex;
    justify-content: center;
    align-items: center;

    gap: 6px;
}


.pagination__link,
.pagination__current {
    min-width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    padding: 0 12px;

    border: 1px solid #e0e5e1;
    border-radius: 9px;

    font-size: 14px;
}


.pagination__link {
    background: #ffffff;

    color: #526079;
}


.pagination__link:hover {
    border-color: #9fcdb9;

    color: #08753f;
}


.pagination__current {
    color: #ffffff;

    background: #08753f;
    border-color: #08753f;

    font-weight: 700;
}


/* =========================================================
   АДАПТИВНОСТЬ
   ========================================================= */

.style-page__intro p {
    margin: 0;
}

.style-page__intro p + p {
    margin-top: 14px;
}
