:root {
    --bg: #0b0f0e;
    --bg-radial: #1b2a20;
    --card: #121817;
    --line: #26312e;
    --text: #eef4f0;
    --muted: #9aa9a2;
    --accent: #b7ff4a;
    --accent2: #d9ff9b;
    --accent-ink: #0b0f0e;

    --surface: #141d1a;
    --surface-strong: #121817;
    --input-bg: #0c110f;

    --visual-grad-1: #17201d;
    --visual-grad-2: #0e1312;

    --order-grad-1: #182319;
    --order-grad-2: #111713;
    --order-border: #334331;
    --badge-border: #425044;

    --overlay-bg: rgba(255, 255, 255, 0.03);
    --overlay-border: rgba(255, 255, 255, 0.1);
    --overlay-text: rgba(255, 255, 255, 0.7);
    --shadow: rgba(0, 0, 0, 0.7);
    --error-color: #ff8a8a;
    --error-bg: rgba(255, 90, 90, 0.08);
    --error-border: rgba(255, 90, 90, 0.3);
    --hover-surface: #1a2622;
    --success-icon-bg: rgba(183, 255, 74, 0.15);
    --success-icon-color: #bcff3c;

    /* Приглушённые цвета статусов наличия — не такие яркие, как
       основной акцент, чтобы не выглядеть как «купи скорее», когда
       товара мало/нет. */
    --stock-low: #d9b84a;
    --stock-low-hover: #e8c968;
    --stock-backorder: #6f8ea6;
    --stock-backorder-hover: #86a2b8;

    color-scheme: dark;
}

[data-theme="light"] {
    --bg: #f5f8f6;
    --bg-radial: #e2f0e4;
    --card: #ffffff;
    --line: #dde6e0;
    --text: #16241d;
    --muted: #5c6d65;
    --accent: #5f9e1e;
    --accent2: #7ec232;
    --accent-ink: #ffffff;

    --surface: #ffffff;
    --surface-strong: #ffffff;
    --input-bg: #ffffff;

    --visual-grad-1: #eef4ef;
    --visual-grad-2: #e2ece3;

    --order-grad-1: #eef6ee;
    --order-grad-2: #e4f0e4;
    --order-border: #cde3cd;
    --badge-border: #bdd6be;

    --overlay-bg: rgba(10, 30, 18, 0.03);
    --overlay-border: rgba(10, 30, 18, 0.1);
    --overlay-text: rgba(15, 30, 20, 0.65);
    --shadow: rgba(20, 40, 25, 0.12);
    --error-color: #c9403f;
    --error-bg: rgba(201, 64, 63, 0.07);
    --error-border: rgba(201, 64, 63, 0.25);
    --hover-surface: #eaf2ea;
    --success-icon-bg: rgba(95, 158, 30, 0.14);
    --success-icon-color: #4f8a17;

    --stock-low: #a97c1f;
    --stock-low-hover: #c2911f;
    --stock-backorder: #4d6b82;
    --stock-backorder-hover: #5d7f99;

    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    background:
        radial-gradient(
            circle at 80% 0,
            var(--bg-radial) 0,
            transparent 35%
        ),
        var(--bg);
    color: var(--text);
    /* Системный стек вместо внешнего Google Fonts (Inter). На части
       хостингов запрос к fonts.googleapis.com блокируется (CSP,
       региональные ограничения, GDPR-режим панели хостинга) — тогда
       браузер вместо тихого отката на Arial иногда подставляет случайный
       декоративный шрифт. Системные шрифты грузятся мгновенно и
       визуально почти неотличимы от Inter на всех платформах. */
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        Arial,
        sans-serif;
    line-height: 1.5;
    transition: background-color 0.25s ease, color 0.25s ease;
}

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

.wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}


header {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    position: relative;
}

.logo {
    font-weight: 800;
    letter-spacing: 0.12em;
}

.logo span {
    color: var(--accent);
}

nav {
    display: flex;
    gap: 26px;
    color: var(--muted);
    font-size: 14px;
}

nav a {
    transition: color 0.2s ease;
}

nav a:hover {
    color: var(--text);
}

/* --- LANGUAGE SELECTOR STYLES --- */
.lang-select {
    position: relative;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- ПЕРЕКЛЮЧАТЕЛЬ ЯЗЫКА (3 языка: ka/ru/en) ---
   Не JS-подмена текста, а обычные ссылки на отдельные HTML-страницы
   (/, /ru/, /en/) — так поисковики видят и индексируют реальный
   текст на каждом языке отдельно. Работает и без JS вообще. */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 3px;
}

.lang-switch a {
    padding: 6px 10px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    transition: background 0.15s ease, color 0.15s ease;
}

.lang-switch a:hover {
    color: var(--text);
    background: var(--hover-surface);
}

.lang-switch a.active {
    color: var(--accent-ink);
    background: var(--accent);
}

.theme-btn {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.theme-btn:hover {
    border-color: var(--accent);
    background: var(--hover-surface);
}

.theme-icon {
    position: absolute;
    font-size: 16px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.theme-icon-sun {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

.theme-icon-moon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="light"] .theme-icon-sun {
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="light"] .theme-icon-moon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

.lang-btn {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    border-color: var(--accent);
    background: var(--hover-surface);
}

.lang-btn .arrow {
    font-size: 10px;
    color: var(--muted);
    margin-left: 2px;
}

.lang-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--surface-strong);
    border: 1px solid var(--line);
    border-radius: 12px;
    min-width: 170px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 12px 30px var(--shadow);
    padding: 6px 0;
}

/* Custom Scrollbar for Dropdown */
.lang-dropdown::-webkit-scrollbar {
    width: 6px;
}

.lang-dropdown::-webkit-scrollbar-track {
    background: var(--surface-strong);
}

.lang-dropdown::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 3px;
}

.lang-dropdown.show {
    display: block;
}

.lang-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    color: var(--muted);
    font-size: 14px;
    transition: background 0.15s ease, color 0.15s ease;
}

.lang-dropdown a:hover {
    background: var(--hover-surface);
    color: var(--accent);
}

.hero {
    min-height: 650px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
    padding: 70px 0;
}

.hero-section {
    border-top: 0;
}

.kicker {
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

h1 {
    font-size: clamp(42px, 6vw, 76px);
    line-height: 0.98;
    margin: 16px 0 24px;
    letter-spacing: -0.05em;
}

.lead {
    max-width: 580px;
    font-size: 19px;
    color: var(--muted);
}

.price {
    margin: 30px 0;

    font-size: 34px;
    font-weight: 800;
}

.price small {
    display: inline-block;
    margin-left: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

.value-note {
    max-width: 480px;
    margin: 0 0 26px;
    padding: 10px 14px;
    background: var(--overlay-bg);
    border: 1px solid var(--overlay-border);
    border-radius: 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 24px;
    background: var(--accent);
    color: var(--accent-ink);
    border: 0;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.btn:hover {
    background: var(--accent2);
    transform: translateY(-1px);
}

/* Состояния наличия (см. stock-config.js). Цвет приглушённый —
   не конкурирует с основным зелёным акцентом бренда. */
.btn.state-low {
    background: var(--stock-low);
}

.btn.state-low:hover {
    background: var(--stock-low-hover);
}

.btn.state-backorder {
    background: var(--stock-backorder);
    color: var(--text);
}

.btn.state-backorder:hover {
    background: var(--stock-backorder-hover);
}

.visual {
    min-height: 430px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 45px;
    background:
        linear-gradient(
            145deg,
            var(--visual-grad-1),
            var(--visual-grad-2)
        );
    border: 1px solid var(--line);
    border-radius: 28px;
}

.device-image {
    width: min(100%, 420px);
    max-height: 390px;
    object-fit: contain;
}

.badge {
    position: absolute;
    top: 24px;
    right: 24px;
    padding: 8px 12px;
    color: var(--accent);
    font-size: 12px;
    border: 1px solid var(--badge-border);
    border-radius: 999px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.badge.state-low {
    color: var(--stock-low);
    border-color: var(--stock-low);
}

.badge.state-backorder {
    color: var(--stock-backorder);
    border-color: var(--stock-backorder);
}

section {
    padding: 90px 0;
    border-top: 1px solid var(--line);
}

h2 {
    margin: 0 0 14px;
    font-size: 38px;
    letter-spacing: -0.03em;
}

.sub {
    max-width: 650px;
    color: var(--muted);
}

.grid {
    display: grid;
    grid-template-columns:
        repeat(4, 1fr);
    gap: 16px;
    margin-top: 36px;
}

.card {
    padding: 25px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
}

.card p {
    margin: 0;
    color: var(--muted);
}

.trust-grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
}

.card ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    display: grid;
    gap: 10px;
}

.card ul li {
    line-height: 1.45;
}

.card ul a {
    color: var(--accent);
    text-decoration: underline;
}

.specs {
    display: grid;
    grid-template-columns:
        1fr 1fr;
    gap: 0 40px;
    margin-top: 35px;
}

.spec {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 0;
    border-bottom:
        1px solid var(--line);
}

.spec span:first-child {
    color: var(--muted);
}

.spec b {
    text-align: right;
}

.specs-note {
    margin-top: 20px;
    font-size: 12px;
}

.order {
    display: grid;
    grid-template-columns:
        1fr 360px;
    gap: 40px;
    padding: 45px;
    background:
        linear-gradient(
            135deg,
            var(--order-grad-1),
            var(--order-grad-2)
        );
    border:
        1px solid var(--order-border);

    border-radius: 24px;
}

.order-price {
    margin: 20px 0 0;
    color: var(--accent);
    font-size: 24px;
    font-weight: 800;
}

.order-payment {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.form {
    display: grid;
    gap: 12px;
}

/* Honeypot-поле для защиты от спам-ботов — скрыто для людей,
   но остаётся доступным для автозаполнения ботами. */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    height: 0;
    overflow: hidden;
}

.form input,
.form textarea {
    width: 100%;
    padding: 14px;
    background: var(--input-bg);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 9px;
    font: inherit;
    outline: none;
}

.form input:focus,
.form textarea:focus {
    border-color: var(--accent);
}

.form textarea {
    min-height: 110px;
    resize: vertical;
}

.status {
    min-height: 20px;
    color: var(--muted);
    font-size: 13px;
}

.status a {
    color: var(--accent);
    text-decoration: underline;
}

footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px 24px;
    padding: 35px 0;
    color: var(--muted);
    font-size: 13px;
}

footer span:first-child span {
    color: var(--accent);
}

@media (max-width: 1000px) and (min-width: 801px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 800px) {
    nav {
        display: none;
    }
    .hero {
        grid-template-columns: 1fr;

        padding: 45px 0;
    }
    .visual {
        min-height: 390px;
    }
    .grid,
    .specs,
    .order {
        grid-template-columns: 1fr;
    }
    .order {
        padding: 28px;
    }
    .spec {
        align-items: flex-start;
    }
    .spec b {
        text-align: right;
    }
    footer {
        flex-direction: column;
        gap: 8px;
    }
}

body.i18n-pending {
    visibility: hidden;
}

.fi {
    width: 20px;
    height: 15px;
    display: inline-block;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}


/* ============================================================
   КАТАЛОГ (главная страница index.html)
   Добавлено в тот же файл, чтобы style.css оставался единым для
   всех страниц сайта. Ничего из уже существующих классов выше не
   тронуто — старая страница товара продолжит работать как прежде.
   ============================================================ */

.catalog-hero {
    min-height: auto;
    display: block;
    padding: 70px 0 30px;
}

.catalog-hero .lead {
    max-width: 680px;
}

#catalog {
    padding-top: 20px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 36px;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.product-card-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background:
        linear-gradient(
            145deg,
            var(--visual-grad-1),
            var(--visual-grad-2)
        );
}

.product-card-image img {
    width: 100%;
    max-width: 220px;
    height: auto;
    object-fit: contain;
}

.product-card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.product-card-body h3 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.product-card-body p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.product-card-price {
    font-size: 20px;
    font-weight: 800;
}

.product-card-cta {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
}
/* ============================================================
   Ссылка "назад в каталог" на странице товара
   ============================================================ */
.breadcrumb {
    display: block;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb:hover {
    color: var(--accent);
}
