:root {
    --primary: #0f172a;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --text: #1e293b;
    --text-light: #64748b;
    --bg: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--primary);
    color: white;
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
}
.logo img {
    display: block;
    height: 26px;
    width: auto;
}
.logo span { color: var(--accent); }

.nav {
    display: flex;
    gap: 26px;
    align-items: center;
}
.nav a {
    color: #cbd5e1;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.nav a:hover { color: white; }

.header-phone {
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
}

.btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}
.btn:hover { background: var(--accent-hover); }

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}
.btn-outline:hover {
    background: var(--accent);
    color: white;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 70px 0 90px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero h1 {
    font-size: 2.6rem;
    line-height: 1.2;
    margin-bottom: 18px;
}
.hero h1 span { color: var(--accent); }

.hero-lead {
    font-size: 1.1rem;
    color: #94a3b8;
    margin-bottom: 28px;
    max-width: 500px;
}

.hero-form {
    background: white;
    color: var(--text);
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.hero-form h3 {
    margin-bottom: 6px;
    font-size: 1.2rem;
}
.hero-form .form-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 18px;
}

.form-group { margin-bottom: 12px; }
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); }

.hero-form .btn { width: 100%; margin-top: 6px; }

.form-note {
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-light);
    margin-top: 12px;
}

/* Sections */
.section { padding: 70px 0; }

.section-title {
    font-size: 1.9rem;
    margin-bottom: 10px;
    text-align: center;
}
.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 45px;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

/* About */
.about-text {
    max-width: 780px;
    margin: 0 auto 45px;
    text-align: center;
    font-size: 1.08rem;
    color: var(--text-light);
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.stat-card {
    background: white;
    padding: 26px 18px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.stat-card .number {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}
.stat-card .label {
    color: var(--text-light);
    font-size: 0.92rem;
}

/* Catalog */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 22px;
}
.catalog-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.catalog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}
.catalog-card-header {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: white;
    padding: 26px 22px;
    text-align: center;
}
.catalog-card-header .code {
    font-size: 1.9rem;
    font-weight: 700;
    opacity: 0.95;
}
.catalog-card-body {
    padding: 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.catalog-card-body h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}
.catalog-card-body p {
    color: var(--text-light);
    font-size: 0.93rem;
    margin-bottom: 18px;
    flex: 1;
}
.catalog-card .btn {
    text-align: center;
    width: 100%;
}

/* Catalog page (inner) */
.crumbs {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 26px;
}
.crumbs a { color: var(--accent); }
.crumbs a:hover { text-decoration: underline; }

.page-title {
    font-size: 2.1rem;
    margin-bottom: 10px;
}
.page-subtitle {
    color: var(--text-light);
    margin-bottom: 40px;
    max-width: 720px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
    margin-bottom: 50px;
}
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}
.product-card .product-img {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: white;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 1px;
    overflow: hidden;
    position: relative;
}

/* Фото товара — растягивается на всю площадь карточки */
.product-card .product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.product-card:hover .product-img img {
    transform: scale(1.04);
}

/* Бейдж кода модели поверх фото */
.product-card .product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 17, 21, 0.72);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 5px 10px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

/* Фото не загрузилось — остаётся тёмный блок с бейджем модели */
.product-card .product-img[data-empty="true"] {
    background: linear-gradient(135deg, #1e293b, #334155);
}

.product-card .product-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-card h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}
.product-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 16px;
    flex: 1;
}

/* Характеристики — короткий список параметров */
.product-card .product-specs {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    border-top: 1px solid var(--border);
}
.product-card .product-specs li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}
.product-card .product-specs .spec-key {
    color: var(--text-light);
    flex-shrink: 0;
}
.product-card .product-specs .spec-val {
    color: var(--text);
    font-weight: 500;
    text-align: right;
}

.product-card .btn { text-align: center; width: 100%; }

/* Две кнопки в карточке: Подробнее / Запросить цену */
.product-card .card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.product-card .card-actions .btn {
    margin: 0;
    display: block;
}

/* ---------- Страница товара ---------- */
.product-detail {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    margin-bottom: 32px;
}

.product-detail__grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    padding: 30px;
    align-items: start;
}

/* Галерея */
.pd-gallery__main {
    background: #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    aspect-ratio: 4 / 3;
}
.pd-gallery__main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.pd-gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.pd-gallery__thumbs a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #f1f5f9;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}
.pd-gallery__thumbs a:hover { border-color: var(--accent); }
.pd-gallery__thumbs a[aria-current="true"] { border-color: var(--accent); }
.pd-gallery__thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* Миниатюры и главный кадр — кнопки, а не ссылки */
.pd-gallery__main,
.pd-gallery__thumbs a { cursor: zoom-in; border: 0; background: none; padding: 0; width: 100%; display: block; text-decoration: none; }

/* ---------- Лайтбокс ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    background: #07090d;
    display: none;
    z-index: 2000;
}
.lightbox.open { display: flex; flex-direction: column; }

.lightbox__bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding: 16px 76px 16px 24px;
    color: #94a3b8;
    font-size: 0.92rem;
    flex-shrink: 0;
}
.lightbox__counter { font-variant-numeric: tabular-nums; }

.lightbox__stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 0 24px 24px;
    min-height: 0;
}
.lightbox__stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox__btn {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.28); }
.lightbox__btn:disabled { opacity: 0.3; cursor: default; }
.lightbox__btn:disabled:hover { background: rgba(255, 255, 255, 0.12); }

.lightbox__close {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.12);
}
.lightbox__close:hover { background: rgba(255, 255, 255, 0.28); }

@media (max-width: 700px) {
    .lightbox__btn { width: 38px; height: 38px; font-size: 1.1rem; }
    .lightbox__stage { padding: 0 10px 16px; gap: 6px; }
    .lightbox__bar { padding: 12px 62px 12px 14px; }
}

/* Информация о товаре */
.pd-info h1 {
    font-size: 1.9rem;
    margin-bottom: 10px;
    line-height: 1.2;
}
.pd-info .pd-lead {
    color: var(--text-light);
    margin-bottom: 20px;
}
.pd-info h2 {
    font-size: 1.15rem;
    margin: 26px 0 12px;
}
.pd-info p { margin-bottom: 14px; }

/* Таблица характеристик */
.pd-specs {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.pd-specs th,
.pd-specs td {
    text-align: left;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
}
.pd-specs th {
    color: var(--text-light);
    font-weight: 500;
    width: 55%;
}
.pd-specs td { font-weight: 500; }
.pd-specs tr:last-child th,
.pd-specs tr:last-child td { border-bottom: 0; }
.pd-specs tbody tr:nth-child(odd) { background: #f8fafc; }

.pd-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 28px;
}
.pd-actions .btn { display: block; text-align: center; }

.pd-note {
    margin-top: 16px;
    font-size: 0.84rem;
    color: var(--text-light);
}

/* Хлебные крошки */
.crumbs {
    margin-bottom: 22px;
    font-size: 0.9rem;
    color: var(--text-light);
}
.crumbs a { color: var(--accent); }

@media (max-width: 900px) {
    .product-detail__grid {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 20px;
    }
    .pd-info h1 { font-size: 1.5rem; }
    .pd-specs th { width: 45%; }
}

/* Contacts */
.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}
.contact-item { margin-bottom: 18px; }
.contact-item strong {
    display: block;
    margin-bottom: 3px;
}
.contact-item span,
.contact-item a { color: var(--text-light); }

.contact-form {
    background: white;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.contact-form h3 { margin-bottom: 18px; }

/* CTA block */
.cta {
    background: var(--primary);
    color: white;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    margin-bottom: 60px;
}
.cta h2 { font-size: 1.6rem; margin-bottom: 10px; }
.cta p { color: #94a3b8; margin-bottom: 22px; }

/* Footer */
.footer {
    background: var(--primary);
    color: #94a3b8;
    padding: 36px 0 22px;
    text-align: center;
}
.footer a { color: #cbd5e1; }
.footer a:hover { color: white; }
.footer-bottom {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #1e293b;
    font-size: 0.88rem;
}

/* Реквизиты организации в подвале */
.footer-requisites {
    margin-top: 14px;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #64748b;
}
.footer-requisites span {
    display: inline-block;
    margin-right: 6px;
    white-space: nowrap;
}
.footer-requisites span + span::before {
    content: "·";
    margin-right: 10px;
    color: #475569;
}

/* Privacy page */
.privacy-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    max-width: 860px;
    margin: 0 auto;
}
.privacy-content h1 { font-size: 1.9rem; margin-bottom: 24px; }
.privacy-content h2 { font-size: 1.25rem; margin: 26px 0 10px; }
.privacy-content p { color: var(--text-light); margin-bottom: 12px; }

/* Form success / error messages */
.form-alert {
    padding: 13px 15px;
    border-radius: 8px;
    font-size: 0.93rem;
    margin-bottom: 14px;
}
.form-alert.success { background: #dcfce7; color: #166534; }
.form-alert.error { background: #fee2e2; color: #991b1b; }

/* Modal request form */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 17, 21, 0.72);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
    overflow-y: auto;
}
.modal-overlay.open { display: flex; }

.modal {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    width: 100%;
    max-width: 460px;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
    margin: auto;
}
.modal h3 {
    font-size: 1.25rem;
    margin: 0 40px 6px 0;
}
.modal .form-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Название выбранного товара — отдельной строкой под описанием */
.modal .js-modal-product {
    display: block;
    margin-top: 10px;
    padding: 9px 13px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 600;
}
.modal .js-modal-product:empty { display: none; }

.modal .btn { width: 100%; margin-top: 6px; }

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}
.modal-close:hover { background: #e2e8f0; color: var(--text); }

/* Responsive */
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; gap: 36px; }
    .hero h1 { font-size: 2rem; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .contacts-grid { grid-template-columns: 1fr; }
    .nav { display: none; }
}
@media (max-width: 500px) {
    .stats { grid-template-columns: 1fr; }
    .hero { padding: 50px 0 60px; }
}
