/* Дополнительные стили для каталога */
.catalog-header {
    background: linear-gradient(rgba(44, 62, 80, 0.9), rgba(52, 152, 219, 0.8)), url('//cdn.salnik-ural.ru/images/banner_elektrika.jpg') center/cover no-repeat;
    color: white;
    padding: 100px 0;
    position: relative;
    text-align: center;
}

.catalog-header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.catalog-header h2 {
    font-size: 20px;
    font-weight: 300;
    opacity: 0.9;
}

/* Категории продукции */
.category-filter {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.cat-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
}

.cat-btn:hover,
.cat-btn.active {
    background: #003366;
    color: white;
    border-color: #003366;
}

/* Сетка продукции */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e0e0e0;
    text-decoration: none;
    display: block;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    border-color: #003366;
}

.product-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    transition: transform 0.5s;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #dc3545;
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.product-content {
    padding: 20px;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.product-category {
    font-size: 12px;
    color: #666;
    background: #f0f0f0;
    padding: 3px 10px;
    border-radius: 12px;
}

.product-link {
    color: #003366;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.product-link:hover {
    text-decoration: underline;
}

/* Пагинация */
.catalog-pagination {
    margin: 50px 0 30px;
    text-align: center;
}

.pagination-numbers {
    display: inline-flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-number {
    padding: 8px 15px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.page-number:hover,
.page-number.active {
    background: #003366;
    color: white;
    border-color: #003366;
}

/* Теперь карточки видны по умолчанию */
.product-card {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s;
}

/* Анимация для карточек, которые должны появляться с эффектом */
.product-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Для страниц с фильтрацией: карточки по умолчанию скрыты, показываются через JS */
.product-card.initial-hidden {
    opacity: 0;
    transform: translateY(20px);
}

.product-card.initial-hidden.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Адаптивность */
@media (max-width: 768px) {
    .catalog-header h1 {
        font-size: 28px;
    }
    
    .catalog-header h2 {
        font-size: 16px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .category-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cat-btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .catalog-header {
        padding: 40px 0 30px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-content {
        padding: 15px;
    }
    
    .product-title {
        font-size: 16px;
    }
}