/* Стили для карточек категорий - обновление существующего блока */
.catalog_wrapper {
    margin: 40px 0 !important;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 16px !important;
}

/* Преобразуем старый формат в карточки */
.catalog_wrapper .catalog-category {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 20px !important;
    gap: 16px !important;
    text-align: left !important;
    background: #fff !important;
    border-radius: 12px !important;
    border: 1px solid #e0e0e0 !important;
    transition: all 0.3s ease !important;
    overflow: hidden !important;
    margin-bottom: 0 !important;
    min-height: 80px !important;
    text-decoration: none !important;
    position: relative !important;
}

.catalog_wrapper .catalog-category:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    border-color: #f0cf4c !important;
}

.catalog_wrapper .catalog-category-name {
    order: 1 !important;
    margin: 0 !important;
    margin-left: 0 !important;
    text-align: left !important;
    flex: 1 !important;
}

.catalog_wrapper .catalog-category-img {
    order: 2 !important;
    display: block !important;
    margin: 0 !important;
    width: 60px !important;
    height: 60px !important;
    flex-shrink: 0 !important;
}

.catalog_wrapper .catalog-category-img img,
.catalog_wrapper .catalog_category__item_img {
    width: 60px !important;
    height: 60px !important;
    object-fit: contain !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

.catalog_wrapper .catalog-category-name a {
    color: #333 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.catalog_wrapper .catalog-category-name a:hover {
    color: #f0cf4c !important;
}

/* Адаптивность */
@media (max-width: 992px) {
    .catalog_wrapper {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
        gap: 12px !important;
    }
    
    .catalog_wrapper .catalog-category {
        padding: 14px 16px !important;
        min-height: 70px !important;
        gap: 12px !important;
    }
    
    .catalog_wrapper .catalog-category-name a {
        font-size: 13px !important;
    }
    
    .catalog_wrapper .catalog-category-img,
    .catalog_wrapper .catalog-category-img img,
    .catalog_wrapper .catalog_category__item_img {
        width: 50px !important;
        height: 50px !important;
    }
}

@media (max-width: 768px) {
    .catalog_wrapper {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    .catalog_wrapper .catalog-category {
        padding: 12px 16px !important;
        min-height: 60px !important;
        gap: 12px !important;
    }
    
    .catalog_wrapper .catalog-category-name a {
        font-size: 12px !important;
    }
    
    .catalog_wrapper .catalog-category-img,
    .catalog_wrapper .catalog-category-img img,
    .catalog_wrapper .catalog_category__item_img {
        width: 40px !important;
        height: 40px !important;
    }
}
