:root {
    --color-bg-light: #f4f6f8;      
    --color-surface: #ffffff;       
    --color-text-dark: #1a1a1a;     
    --color-text-medium: #525252;   
    --color-graphite: #3d3d3d;      
    --color-border: #e0e0e0;        
    --color-accent: #007bff;
    --color-accent-dark: #0056b3;
}

/* === БАЗОВЫЕ СТИЛИ САЙТА === */
*, *::before, *::after { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}
html { 
    scroll-behavior: smooth; 
    height: 100%; 
}
body {
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.mono { 
    font-family: 'JetBrains Mono', monospace; 
}

.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}
.content-wrapper {
    flex: 1;
    text-align: center;
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}
@keyframes fadeInUp { 
    to { 
        opacity: 1; 
        transform: translateY(0); 
    } 
}

/* =============== ХЕДЕР V2 =============== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background-color: transparent; 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.header--scrolled {
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}
.header-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.8rem;
    color: var(--color-text-medium);
    opacity: 0;
    transform: translateY(-15px);
    transition: all 0.3s ease;
    pointer-events: none;
}
.header--scrolled .header-top-bar { 
    opacity: 1; 
    transform: translateY(0); 
    pointer-events: auto; 
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 60px;
    padding: 20px 0;
    transition: padding 0.3s ease;
}
.header--scrolled .header-container { 
    padding: 15px 0; 
}
.logo {
    font-family: 'Turbo', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    letter-spacing: -0.02em;
    text-decoration: none;
    color: var(--color-graphite);
    font-weight: 400;
}
.nav .nav-list {
    display: flex;
    gap: 40px;
    list-style: none;
    font-size: 0.95rem;
    font-weight: 500;
}
.nav-list a {
    color: var(--color-text-medium);
    text-decoration: none;
    position: relative;
    transition: color 0.2s;
    white-space: nowrap;
}
.nav-list a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    height: 2px;
    width: 0;
    background-color: var(--color-accent);
    border-radius: 2px;
    transition: width 0.3s ease-out;
}
.nav-list a:hover { 
    color: var(--color-graphite); 
}
.nav-list a:hover::after { 
    width: 100%; 
}

/* =============== ОСНОВНОЙ КАТАЛОГ (ЦЕНТРИРОВАННЫЙ ТЕКСТ) =============== */
.features-grid {
    display: grid;
    gap: 48px;
    margin: 40px auto 60px;
    max-width: 1200px;
    /* Для страницы ЦОД с двумя колонками товаров */
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
}

.product-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    padding: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    
    /* ГЛАВНАЯ СЕТКА: Картинка | Текст */
    display: grid;
    grid-template-columns: 250px 1fr; 
    gap: 32px;
    align-items: start;
}

.image-wrapper {
    width: 250px;
    height: 250px;
    flex-shrink: 0;
    background-color: #f5f5f5;
    border-radius: 12px; 
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.card-image {
    display: block;
    width: auto;
    max-width: 250px;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    margin-left: auto;
    margin-right: auto;
}

/* --- НОВЫЕ ПРАВИЛА ДЛЯ ЦЕНТРИРОВАНИЯ ОПИСАНИЯ --- */
.content {
    display: flex;
    flex-direction: column;
    justify-content: center; /* Центрируем весь блок текста по вертикали */
    align-items: center;     /* Центрируем заголовок и список по горизонтали */
    text-align: center;      /* Центрируем строки при переносе */
    height: 100%;            /* Занимает всю высоту карточки */
    gap: 16px;
    padding-left: 0;
}

/* Заголовок H3 вынесен из общего центра к верху блока контента */
.content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-graphite);
    margin: 0;
    align-self: flex-start; /* Прижимаем название к левому краю внутри флекса */
    width: 100%;
    text-align: left;
}

/* Если нужно центрировать абсолютно всё вместе с заголовком:
   Раскомментируйте этот блок и удалите предыдущий (.content h3)
*/
/*
.content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-graphite);
    margin: 0;
    align-self: center;
    width: 100%;
    text-align: center;
}
*/

.content ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.content li {
    width: 100%;
    margin-bottom: 0;
}

.content strong {
    white-space: normal;
    word-break: break-word;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

/* Адаптив каталога: на мобильных картинка СВЕРХУ текста + стандартное выравнивание */
@media (max-width: 899px) {
    .features-grid {
        gap: 40px;
    }
    .product-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 24px;
        padding: 24px;
    }
    .image-wrapper {
        width: 200px; 
        height: 200px;
        justify-self: center;
    }
    .content {
        justify-content: flex-start;
        align-items: stretch;
        text-align: left;
        height: auto;
    }
    .content h3 {
        align-self: stretch;
        text-align: left;
    }
    .content ul {
        align-items: flex-start;
        padding-left: 20px;
        gap: 6px;
    }
}

/* =============== ФОРМА И ФУТЕР =============== */
h1 { 
    font-size: clamp(2rem, 5vw, 3rem); 
    font-weight: 600; 
    margin-bottom: 16px; 
    line-height: 1.1; 
    color: var(--color-graphite); 
}
.notify-form { 
    display: flex; 
    gap: 12px; 
    margin-bottom: 40px; 
    align-items: stretch; 
    flex-direction: column; 
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
@media (min-width: 420px) { 
    .notify-form { 
        flex-direction: row; 
    } 
}
.notify-form input { 
    flex: 1; 
    background-color: var(--color-surface); 
    border: 1px solid var(--color-border); 
    color: var(--color-text-dark); 
    padding: 16px 20px; 
    border-radius: 8px; 
    font-size: 1rem; 
    transition: border-color 0.2s;
}
.notify-form input:focus { 
    outline: none; 
    border-color: var(--color-accent); 
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1); 
}
.notify-form button { 
    flex-shrink: 0; 
    background-color: var(--color-graphite); 
    color: #fff; 
    border: none; 
    padding: 0 32px; 
    font-weight: 600; 
    font-size: 1rem; 
    border-radius: 8px; 
    cursor: pointer; 
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.notify-form button:hover:not(:disabled) { 
    background-color: #000; 
    transform: translateY(-1px); 
}
.form-status { 
    height: 20px; 
    margin-top: 8px; 
    font-size: 0.85rem; 
    font-style: italic; 
}
.form-status.success { color: #28a745; }
.form-status.error { color: #dc3545; }
.footer { 
    border-top: 1px solid var(--color-border); 
    padding-top: 32px; 
    color: var(--color-text-medium); 
    font-size: 0.9rem;
    flex-shrink: 0;
}
.contact-line { margin-top: 4px; }
.visually-hidden { 
    position: absolute !important; 
    width: 1px; 
    height: 1px; 
    overflow: hidden; 
    clip: rect(1px, 1px, 1px, 1px); 
    white-space: nowrap; 
} 

/* Блок <style> из HEAD вашего PHP файла (страховка футера) */
.site-footer {
    margin-top: 40px;
    padding-top: 30px;
    padding-bottom: 30px;
    border-top: 1px solid var(--color-border);
    text-align: center;
}
.site-footer p {
    margin: 0 0 8px 0;
    line-height: 1.6;
}
.contact-line .mono + .mono::before {
    content: " | ";
    opacity: 0.6;
}


/* ######################################################################## */
/* ############### ПРАВИЛА СПЕЦИАЛЬНО ДЛЯ СТРАНИЦЫ ЦОД #################### */
/* ######################################################################## */

.two-columns-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-top: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.optics-section .features-grid,
.copper-column .features-grid {
    display: grid;
    gap: 40px;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    margin: 0;
}

@media (max-width: 1199px) {
    .optics-section .features-grid,
    .copper-column .features-grid {
        grid-template-columns: 1fr;
    }
}

/* На странице ЦОД используем те же классы product-card, они уже лежат правильно */

@media (max-width: 992px) {
    .two-columns-layout {
        grid-template-columns: 1fr;
    }
}