/* Разделы каталога */
.cat-sections__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cat-card {
    position: relative;
    display: block;
    aspect-ratio: 517 / 318;
    border-radius: 24px;
    background-color: #fff;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.cat-card:hover {
    box-shadow: 0 12px 32px rgba(39, 43, 51, 0.1);
}

.cat-card__name {
    position: absolute;
    left: 40px;
    bottom: 36px;
    z-index: 1;
    max-width: 55%;
    font-size: 24px;
    line-height: 1.3;
    font-weight: 500;
    color: #272b33;
}

.cat-card__pic {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 70%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.cat-card__pic img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: right center;
    transition: transform 0.3s;
}

.cat-card:hover .cat-card__pic img {
    transform: scale(1.03);
}

body.dark .cat-card {
    background-color: var(--block-card-bg, #272b33);
}

body.dark .cat-card__name {
    color: var(--color-white);
}

@media (max-width: 1024px) {
    .cat-card__name {
        left: 32px;
        bottom: 28px;
        font-size: 20px;
    }
}

@media (max-width: 640px) {
    .cat-sections__list {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .cat-card {
        display: flex;
        flex-direction: column;
        aspect-ratio: 170 / 225;
        border-radius: 16px;
    }

    .cat-card__name {
        position: static;
        padding: 18px 18px 0;
        max-width: none;
        font-size: 18px;
        line-height: 1.35;
    }

    .cat-card__pic {
        position: static;
        width: auto;
        flex: 1;
        min-height: 0;
        align-items: center;
        justify-content: center;
    }

    .cat-card__pic img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center bottom;
    }
}