/* ============================================ */
/* СТИЛИ ДЛЯ САЙТА ЭТК-РЕЗЕРВ (ОБЪЕДИНЁННЫЕ)    */
/* ============================================ */

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    background: #eef2f5;
    color: #1e2a36;
    line-height: 1.5;
    font-size: 16px;
}

/* ===== КОНТЕЙНЕР ===== */
.document {
    max-width: 1400px;
    margin: 32px auto;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* ===== ШАПКА ===== */
.header {
    padding: 20px 32px;
    border-bottom: 2px solid #dce4ec;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    background: #ffffff;
}

.logo img {
    height: 52px;
    width: auto;
}

.company {
    text-align: right;
    font-size: 13px;
    color: #5f7f9f;
    line-height: 1.4;
}

.company strong {
    font-size: 15px;
    color: #1e4663;
}

/* ===== НАВИГАЦИЯ ===== */
.nav {
    background: #1e2c3a;
    padding: 0 32px;
}

.nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.nav ul li a {
    display: block;
    padding: 14px 28px;
    color: #ccd7e2;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    border-bottom: 2px solid transparent;
    transition: 0.15s;
}

.nav ul li a:hover {
    color: #ffffff;
    border-bottom-color: #6f9fbf;
}

.nav ul li a.active {
    border-bottom-color: #ff9f4a;
    color: #ffffff;
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
.main {
    padding: 40px 32px;
}

/* ===== ХЛЕБНЫЕ КРОШКИ ===== */
.path {
    font-size: 12px;
    color: #7e95ab;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.path a {
    color: #2c5f8a;
    text-decoration: none;
}

.path a:hover {
    text-decoration: underline;
}

/* ===== ЗАГОЛОВКИ ===== */
h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1a3348;
    margin-bottom: 20px;
    border-left: 4px solid #ff9f4a;
    padding-left: 20px;
}

h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a3348;
    margin: 30px 0 20px 0;
    border-left: 4px solid #ff9f4a;
    padding-left: 16px;
}

h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1e4663;
    margin: 25px 0 15px 0;
    border-left: 3px solid #ff9f4a;
    padding-left: 12px;
}

.section-description {
    font-size: 16px;
    color: #4a6275;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

/* ===== СТРАНИЦА ТОВАРА ===== */
.product-page {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.product-gallery {
    flex: 0 0 320px;
}

.product-main-image {
    background: #fafcfd;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.product-main-image img {
    max-width: 100%;
    height: auto;
}

.product-info {
    flex: 1;
}

.product-description-full {
    line-height: 1.65;
    color: #2c3e50;
    margin-bottom: 25px;
}

.product-description-full a {
    color: #2c3e50;
    text-decoration: underline;
    text-decoration-color: #ff9f4a;
}

.product-description-full a:hover {
    color: #1e4663;
}

/* ===== БЛОК ЦЕНЫ (объединённые стили) ===== */
.price-block {
    background: #f8fafd;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 25px;
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

#product-price {
    font-size: 24px;
    font-weight: bold;
    color: #1e4663;
    margin: 0;
    flex: 1;
}

.price-label {
    font-size: 18px;
    font-weight: 600;
    color: #1e4663;
    margin-right: 8px;
}

.price-value {
    font-size: 32px;
    font-weight: 700;
    color: #1e4663;
}

.price-currency {
    font-size: 18px;
    font-weight: 600;
    color: #2c5f8a;
}

.price-note {
    font-size: 14px;
    color: #6c8dae;
}

.delivery-note {
    font-size: 15px;
    font-weight: 600;
    color: #2c5f8a;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.delivery-note strong {
    color: #1e4663;
}

/* ===== КНОПКА ЗАКАЗА ===== */
.order-button-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.order-button {
    background: #ff9f4a;
    color: #1e4663;
    border: none;
    padding: 10px 28px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-family: inherit;
    touch-action: manipulation;
}

.order-button:hover {
    background: #ff8c2a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.order-button:active {
    transform: translateY(0);
}

.order-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===== ТАБЛИЦА ХАРАКТЕРИСТИК ===== */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.specs-table th,
.specs-table td {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    vertical-align: top;
}

.specs-table th {
    background: #f8fafc;
    color: #1e4663;
    font-weight: 600;
    text-align: left;
    width: 35%;
}

.specs-table td {
    color: #2c3e50;
    text-align: left;
}

.specs-table tr:hover {
    background: #fafcfd;
    transition: background 0.2s ease;
}

/* ===== ТАБЛИЦА СРАВНЕНИЯ ===== */
.comparison-block {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
}

.comparison-table thead th {
    padding: 14px 12px;
    background: #2c5f8a;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    border: 1px solid #e2e8f0;
    border-bottom: 2px solid #e2e8f0;
}

.comparison-table tbody th[scope="row"] {
    background: #f8fafc;
    color: #1e4663;
    font-weight: 600;
    font-size: 14px;
    text-align: left;
    border: 1px solid #e2e8f0;
    padding: 12px 12px;
    width: 25%;
}

.comparison-table td {
    padding: 12px 12px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    color: #2c3e50;
    vertical-align: middle;
}

.comparison-table td.center {
    text-align: center;
}

.comparison-table td:not(:first-child) {
    background-color: #f5f7f9;
}

.comparison-table td:empty:before {
    content: "—";
    color: #a0b3c2;
}

.comparison-table tbody tr:hover td {
    background-color: #fff8f0;
}

.comparison-table tbody tr:hover th[scope="row"] {
    background-color: #fef5e6;
}

/* ===== ОБЁРТКА ДЛЯ ТАБЛИЦ (скролл) ===== */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
    border-radius: 8px;
}

/* ===== ДОКУМЕНТЫ ===== */
.doc-link {
    margin: 20px 0;
}

.doc-link a {
    color: #2c5f8a;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #bfd4e8;
    padding-bottom: 2px;
}

/* ===== СЕРТИФИКАТЫ ===== */
.certificates {
    display: flex;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.certificates img {
    height: 180px;
    width: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* ===== БЛОК ПРЕИМУЩЕСТВ ===== */
.advantages-block,
.application-block,
.why-us-block,
.seo-block,
.engineering-block {
    margin: 30px 0;
}

.advantages-block {
    background: #f8fafd;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
}

.advantages-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    list-style: none;
}

.advantages-list li,
.engineering-list li {
    padding-left: 25px;
    position: relative;
    font-size: 15px;
    color: #2c3e50;
    margin-bottom: 12px;
}

.advantages-list li:before,
.engineering-list li:before {
    content: "✓";
    color: #2c5f8a;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.engineering-list {
    list-style: none;
    margin: 15px 0;
}

.application-item,
.why-us-item {
    line-height: 1.7;
    margin-bottom: 12px;
    font-size: 15px;
    color: #2c3e50;
}

.application-block a,
.category-links a {
    color: #2c3e50;
    text-decoration: underline;
    text-decoration-color: #ff9f4a;
}

.application-block a:hover,
.category-links a:hover {
    color: #1e4663;
}

/* ===== БЛОКИ SEO И ИНЖЕНЕРНЫЙ ===== */
.seo-block,
.engineering-block {
    padding: 25px;
    background: #f8fafd;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.seo-block p,
.engineering-block p {
    font-size: 15px;
    line-height: 1.6;
    color: #2c3e50;
    margin-bottom: 15px;
}

.seo-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.seo-list li {
    padding-left: 20px;
    position: relative;
    font-size: 14px;
    color: #2c3e50;
}

.seo-list li:before {
    content: "✓";
    color: #2c5f8a;
    position: absolute;
    left: 0;
}

/* ===== НАЛИЧИЕ И СРОКИ ===== */
.stock-note {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 12px 18px;
    border-radius: 8px;
    margin: 15px 0;
}

.stock-item {
    margin: 5px 0;
}

.delivery-note-short {
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 12px 18px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 14px;
}

.contacts-block {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.contact-large a,
.contact-large-email a {
    font-size: 18px;
    font-weight: bold;
    color: #1e4663;
    text-decoration: none;
}

.contact-large a:hover,
.contact-large-email a:hover {
    text-decoration: underline;
}

/* ===== ПОХОЖИЕ ТОВАРЫ ===== */
.similar-block {
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.similar-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.similar-link {
    background: #f8fafd;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    padding: 8px 20px;
    color: #2c5f8a;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.similar-link:hover {
    background: #2c5f8a;
    color: #ffffff;
    border-color: #2c5f8a;
}

/* ===== БЛОК FAQ ===== */
.faq-block {
    margin: 40px 0;
}

.faq-item {
    background: #f8fafd;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.faq-question {
    font-size: 16px;
    font-weight: 600;
    color: #1e4663;
    margin-bottom: 10px;
}

.faq-answer {
    font-size: 14px;
    color: #4a6275;
    line-height: 1.55;
}

/* ===== БЛОК КОНТАКТОВ ===== */
.contact-block {
    background: #1e2c3a;
    color: #ffffff;
    padding: 30px 40px;
    border-radius: 12px;
    text-align: center;
    margin: 40px 0 20px;
}

.contact-block p {
    margin: 8px 0;
}

.contact-block strong {
    font-size: 24px;
    color: #ff9f4a;
}

.contact-block a {
    color: #ff9f4a;
    text-decoration: none;
}

.contact-block a:hover {
    text-decoration: underline;
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: #fff;
    margin: 8% auto;
    padding: 25px 30px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 12px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    transition: color 0.2s;
}

.close:hover {
    color: #1e4663;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    border-left: none;
    padding-left: 0;
}

.modal-content label {
    display: block;
    margin-top: 15px;
    font-weight: 600;
    color: #2c3e50;
}

.modal-content input,
.modal-content textarea {
    width: 100%;
    padding: 8px 12px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s;
}

.modal-content input:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: #ff9f4a;
    box-shadow: 0 0 0 2px rgba(255,159,74,0.2);
}

.modal-content input.error,
.modal-content textarea.error {
    border-color: #f44336;
    background-color: #fff8f8;
}

.modal-content button[type="submit"] {
    background: #2c5f8a;
    color: #fff;
    border: none;
    padding: 12px 20px;
    margin-top: 20px;
    width: 100%;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.modal-content button[type="submit"]:hover {
    background: #1e4663;
}

.modal-content button[type="submit"]:disabled {
    background: #a0b3c2;
    cursor: not-allowed;
    opacity: 0.7;
}

#formMessage {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
}

.error-message {
    color: #f44336;
    font-size: 12px;
    margin-top: 4px;
}

/* ===== ФУТЕР ===== */
.footer {
    background: #1e2c3a;
    padding: 28px 32px;
    font-size: 13px;
    color: #a0b3c2;
    text-align: center;
    border-top: 1px solid #2a3a48;
}

.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 36px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.footer-links li a {
    color: #ccd7e2;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-links li a:hover {
    color: #ffffff;
}

/* ============================================ */
/* АДАПТИВНОСТЬ (MEDIA QUERIES)                */
/* ============================================ */

/* Планшеты и маленькие ноутбуки */
@media (max-width: 992px) {
    .advantages-list,
    .seo-list {
        grid-template-columns: 1fr;
    }
}

/* Мобильные устройства (широкие) */
@media (max-width: 860px) {
    .main {
        padding: 28px 20px;
    }
    
    .header {
        padding: 16px 20px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .company {
        text-align: center;
    }
    
    h1 {
        font-size: 26px;
    }
    
    h2 {
        font-size: 22px;
    }
    
    .product-page {
        flex-direction: column;
    }
    
    .product-gallery {
        flex: 0 0 auto;
    }
    
    .certificates img {
        height: 120px;
    }
}

/* Мобильные устройства — ОСНОВНОЙ БЛОК С ТАБЛИЦАМИ */
@media (max-width: 768px) {
    /* Навигация */
    .nav {
        padding: 0 12px;
    }
    
    .nav ul li a {
        padding: 10px 14px;
        font-size: 12px;
    }
    
    /* ===== ГЛАВНОЕ: СКРОЛЛ ДЛЯ ТАБЛИЦ ===== */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 15px 0;
    }
    
    .table-wrapper table {
        min-width: 560px;
        width: auto;
    }
    
    .table-wrapper th,
    .table-wrapper td {
        padding: 8px 10px;
        font-size: 12px;
        white-space: nowrap;
    }
    
    /* Блок сравнения */
    .comparison-block {
        padding: 16px;
        overflow-x: auto;
    }
    
    /* Заголовки таблиц */
    .comparison-table tbody th[scope="row"] {
        width: 35%;
        font-size: 12px;
    }
    
    /* Блоки */
    .seo-block,
    .engineering-block {
        padding: 18px;
    }
    
    .advantages-block {
        padding: 18px;
    }
    
    .advantages-list li,
    .engineering-list li {
        font-size: 14px;
    }
}

/* Маленькие телефоны */
@media (max-width: 600px) {
    /* Ценовой блок */
    .price-block {
        flex-direction: column;
        align-items: stretch;
        padding: 15px 18px;
    }
    
    .order-button-container {
        justify-content: center;
    }
    
    .order-button {
        width: 100%;
        padding: 12px 20px;
        font-size: 16px;
    }
    
    #product-price {
        font-size: 20px;
        text-align: center;
    }
    
    /* Хлебные крошки */
    .path {
        font-size: 10px;
        margin-bottom: 15px;
    }
    
    /* Таблицы — ещё уже */
    .table-wrapper table {
        min-width: 520px;
    }
    
    .table-wrapper th,
    .table-wrapper td {
        padding: 6px 8px;
        font-size: 11px;
    }
    
    /* Похожие товары */
    .similar-links {
        gap: 10px;
    }
    
    .similar-link {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    /* Модальное окно */
    .modal-content {
        margin: 20% auto;
        padding: 18px;
        width: 95%;
    }
    
    .modal-content h3 {
        font-size: 18px;
    }
    
    /* Контакты */
    .contact-block {
        padding: 20px 15px;
    }
    
    .contact-block strong {
        font-size: 16px;
    }
    
    .contact-large a,
    .contact-large-email a {
        font-size: 14px;
    }
    
    /* Футер */
    .footer {
        padding: 20px 16px;
    }
    
    .footer-links {
        gap: 15px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    h1 {
        font-size: 20px;
        padding-left: 10px;
    }
    
    h2 {
        font-size: 18px;
        padding-left: 10px;
    }
    
    h3 {
        font-size: 16px;
        padding-left: 10px;
    }
    
    /* Максимально компактные таблицы */
    .table-wrapper table {
        min-width: 480px;
    }
    
    .table-wrapper th,
    .table-wrapper td {
        padding: 5px 6px;
        font-size: 10px;
    }
    
    .stock-note,
    .delivery-note-short {
        padding: 8px 10px;
        font-size: 11px;
    }
}

/* Планшеты (горизонтальная ориентация) */
@media (min-width: 769px) and (max-width: 1024px) {
    .table-wrapper th,
    .table-wrapper td {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .comparison-table tbody th[scope="row"] {
        width: 30%;
    }
}


/* Блок "О производителе" */
.manufacturer-block {
    background: #f5f8fc;
    border-left: 4px solid #2c5f8a;
    border-radius: 8px;
    padding: 25px 30px;
    margin: 40px 0;
}

.manufacturer-block h3 {
    font-size: 20px;
    color: #1a3348;
    margin-bottom: 15px;
}

.manufacturer-block p {
    color: #4a6275;
    line-height: 1.5;
    margin-bottom: 12px;
}

.manufacturer-block p:last-of-type {
    margin-bottom: 20px;
}

.manufacturer-features {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.manufacturer-features li {
    color: #2c5f8a;
    font-size: 14px;
}

/* ===== КНОПКА "НАВЕРХ" ===== */
.go-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #2c5f8a;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.go-top.show {
    opacity: 1;
    visibility: visible;
}

.go-top:hover {
    background: #ff9f4a;
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .go-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}