/* =================================
   СОВРЕМЕННЫЙ РАЗДЕЛ ПЕЧАТНОЙ ПРОДУКЦИИ
   ================================= */

/* CSS переменные для консистентности */
:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --accent-color: #3b82f6;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Основной контейнер раздела */
.modern-products-section {
    background: #ffffff !important;
    padding: 2rem;
    position: relative;
}

.modern-products-container {
    width: 100%;
    max-width: none;
    margin: 0;
    position: relative;
}

/* Заголовок раздела */
.modern-products-header {
    text-align: center;
    margin-bottom: 3rem;
}

.modern-products-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b !important;
    margin-bottom: 1rem;
    line-height: 1.2;
    position: relative;
    display: inline-block;
}

.modern-products-subtitle {
    font-size: 0.85rem;
    color: #64748b !important;
    font-weight: 400;
    margin: 0 auto;
    line-height: 1.6;
}

/* Сетка продуктов */
.modern-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Карточка продукта */
.modern-product-card {
    background: #f8fafc;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    border: 1px solid #dbdbdb;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.modern-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: #e2e8f0;
}

.modern-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.modern-product-card:hover::before {
    transform: scaleX(1);
}

/* Изображение продукта */
.modern-product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.modern-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.modern-product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(37, 99, 235, 0.1) 100%);
    opacity: 0;
    transition: var(--transition);
}

.modern-product-card:hover .modern-product-image::after {
    opacity: 1;
}

/* Контент карточки */
.modern-product-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.modern-product-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    transition: var(--transition);
}

.modern-product-card:hover .modern-product-title {
    color: var(--primary-color);
}

.modern-product-description {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Кнопка действия - скрыта */
.modern-product-action {
    display: none;
}

/* Специальные стили для популярных категорий */
.modern-product-card.featured {
    border: 1px solid #dbdbdb;
    background: #f8fafc;
}

.modern-product-card.featured::before {
    transform: scaleX(1);
}

.modern-product-card.featured .modern-product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    z-index: 2;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .modern-products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .modern-products-container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .modern-products-section {
        padding: 3rem 0;
    }
    
    .modern-products-container {
        padding: 0 2rem;
    }
    
    .modern-products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .modern-products-header {
        margin-bottom: 2rem;
    }
    
    .modern-product-content {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .modern-products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modern-product-image {
        height: 180px;
    }
    
    .modern-product-content {
        padding: 1rem;
    }
    
    .modern-products-show-more-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .modern-products-title {
        font-size: 1.75rem;
    }
    
    .modern-products-subtitle {
        font-size: 1rem;
    }
}

/* Дополнительные утилиты */
.modern-products-section .container {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

/* Скрытие старых стилей для этого раздела */
.modern-products-section .pechat-products {
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
}

.modern-products-section .row_section {
    display: none !important;
}

/* Переопределение любых старых стилей */
.modern-products-section {
    background-color: #ffffff !important;
    background-image: none !important;
    background: #ffffff !important;
}

/* Состояния загрузки */
.modern-product-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.modern-product-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Кнопка "Показать больше" - скрыта */
.modern-products-show-more {
    display: none;
}

/* Скрытые карточки по умолчанию */
.modern-product-card.hidden {
    display: none;
}

.modern-product-card.show {
    display: flex;
    animation: fadeInUp 0.6s ease-out;
}

/* Улучшенная производительность */
.modern-product-card {
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

.modern-product-image img {
    will-change: transform;
    backface-visibility: hidden;
}

/* Индикатор загрузки для изображений */
.modern-product-image.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}