/* =========================
   Подкатегории в category.tpl
   ========================= */

.category-children {
    margin: 32px 0 40px;
}

.child-category-card {
    height: 100%;
    background: #fff;
    border: 1px solid #E8E8E8;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(35, 35, 35, 0.05);
    position: relative;
}

.child-category-card:hover {
    transform: translateY(-4px);
    border-color: #DB4B17;
    box-shadow: 0 10px 28px rgba(35, 35, 35, 0.12);
}

.child-category-card__link {
    display: block;
    text-decoration: none;
    color: #232323;
    height: 100%;
}
.child-category-card__link:hover {
    text-decoration: none;
}

.child-category-card__image {
    background: #E8E8E8;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 20px;
    border-bottom: 1px solid #E8E8E8;
}

.child-category-card__image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    display: block;
}

.child-category-card:hover .child-category-card__image img {
    transform: scale(1.05);
}

.child-category-card__title {
    padding: 18px 18px 16px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
    color: #232323;
    text-align: center;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.child-category-card__products {
    list-style: none;
    margin: 0;
    padding: 0 18px 18px;
    border-top: 1px solid #E8E8E8;
}

.child-category-card__products li {
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid #E8E8E8;
}

.child-category-card__products li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.child-category-card__products a {
    color: #232323;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.child-category-card__products a:hover {
    color: #DB4B17;
}

.child-category-card__link:hover .child-category-card__title {
    color: #DB4B17;
}

/* Небольшая акцентная полоска сверху */
.child-category-card::before {
    content: "";
    display: block;
    width: 100%;
    height: 4px;
    background: #DB4B17;
    position: absolute;
    top: 0;
    left: 0;
}

/* Адаптив */
@media (max-width: 959px) {
    .category-children {
        margin: 24px 0 32px;
    }

    .child-category-card__image {
        height: 180px;
        padding: 16px;
    }

    .child-category-card__title {
        font-size: 16px;
        min-height: 64px;
        padding: 16px 14px 14px;
    }

    .child-category-card__products {
        padding: 0 14px 14px;
    }
}

@media (max-width: 639px) {
    .child-category-card {
        border-radius: 12px;
    }

    .child-category-card__image {
        height: 160px;
    }

    .child-category-card__title {
        font-size: 15px;
        line-height: 1.3;
        min-height: auto;
        padding: 14px 12px;
    }

    .child-category-card__products a {
        font-size: 13px;
    }
}