/* =================================
   СОВРЕМЕННЫЙ РАЗДЕЛ ПЕЧАТНОЙ ПРОДУКЦИИ
   Компакт-сетка иконок-плиток
   ================================= */

:root {
    --primary-color: #fe2e46;
    --secondary-color: #64748b;
    --accent-color: #fe2e46;
    --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.06);
    --shadow-md: 0 4px 14px -2px rgba(254, 46, 70, 0.15);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    --main-background-color: #fe2e46;
    --secondary-background-color: #41496D;
}

/* Контейнер — унифицирован с printinglife-* (переменная --pl-page-px) */
.modern-products-section {
    background: #ffffff !important;
    padding: 4rem var(--pl-page-px, 4rem);
    position: relative;
}

.modern-products-container {
    width: 100%;
    max-width: 100%;
    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: 0.75rem;
    line-height: 1.2;
    display: inline-block;
}

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

/* === Компакт-сетка === */
.modern-products-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

/* Плитка-карточка */
.modern-product-card {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #ffffff;
    border: 2px solid #e8eaf0;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 0.75rem;
    gap: 1rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    overflow: hidden;
}

.modern-product-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    z-index: 2;
}

/* Иконка */
.modern-product-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 60%;
}

.modern-product-icon svg {
    width: 120px;
    height: 120px;
    overflow: visible;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-product-card:hover .modern-product-icon svg {
    transform: scale(1.1);
}

/* Палитра брендовых иконок (pi-*) — используется внутри SVG из public/images/icons.
   Контур — ink, акценты — brand red, мягкие фоны — полупрозрачные red/ink. */
.modern-product-icon .pi-stroke      { stroke: #41496D; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.modern-product-icon .pi-accent      { stroke: #fe2e46; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.modern-product-icon .pi-fill-soft   { fill: rgba(254, 46, 70, 0.07); stroke: none; }
.modern-product-icon .pi-fill-ink    { fill: rgba(65, 73, 109, 0.06); stroke: none; }
.modern-product-icon .pi-fill-accent { fill: #fe2e46; stroke: none; }
.modern-product-icon .pi-dot         { fill: #41496D; stroke: none; }
.modern-product-icon .pi-thin        { stroke: #41496D; stroke-width: 1; fill: none; stroke-linecap: round; opacity: 0.55; }
.modern-product-card:hover .modern-product-icon .pi-fill-soft { fill: rgba(254, 46, 70, 0.12); }

/* Подпись */
.modern-product-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #41496D;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.3;
    margin: 0;
    padding: 0 0.25rem;
    transition: color 0.25s ease;
    word-break: break-word;
    hyphens: auto;
}

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

/* === Featured (Популярное / Хит) === */
.modern-product-card.featured {
    border-color: rgba(254, 46, 70, 0.25);
    background: linear-gradient(180deg, #ffffff 0%, #fff5f6 100%);
}

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

.modern-product-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    line-height: 1;
    z-index: 3;
    pointer-events: none;
}

/* === Адаптивность === */
@media (max-width: 1280px) {
    .modern-products-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1024px) {
    .modern-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .modern-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    .modern-products-title {
        font-size: 1.5rem;
    }
    .modern-product-icon svg {
        width: 96px;
        height: 96px;
    }
    .modern-product-title {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .modern-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
    }
    .modern-products-section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    .modern-product-card {
        padding: 1rem 0.5rem;
    }
    .modern-product-icon svg {
        width: 80px;
        height: 80px;
    }
    .modern-product-title {
        font-size: 0.75rem;
    }
}

/* === Legacy-обнуления (унаследованные правила с предыдущей вёрстки) === */
.modern-products-section .container {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

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

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

.modern-product-card.hidden { display: none; }
.modern-product-card.show   { display: flex; }
