/* css/main.css — Единые стили сайта Касса Плюс */

:root {
    color-scheme: light;
    --primary: #1d6ce0;
    --primary-hover: #1557b8;
    --success: #16a34a;
    --bg: #f4f7fb;
    --card-bg: #ffffff;
    --dark: #0f172a;
    --gray: #475569;
    --border: #cbd5e1;
    --shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] {
    color-scheme: dark;
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --success: #22c55e;
    --bg: #0b0f19;
    --card-bg: #131a2a;
    --dark: #f1f5f9;
    --gray: #94a3b8;
    --border: #1e293b;
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

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

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--dark);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.2s, color 0.2s;
}

main { flex: 1; }

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

/* --- ШАПКА --- */
header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    align-items: center;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 70px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 22px;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--dark);
    text-decoration: none;
    letter-spacing: -0.5px;
    white-space: nowrap;
}
.logo span { color: var(--primary); }

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 16px;
}

.nav-links a:not(.nav-pill-btn) {
    text-decoration: none;
    color: var(--dark);
    font-size: 14px;
    font-weight: 600;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.nav-links a:not(.nav-pill-btn):hover,
.nav-links a:not(.nav-pill-btn).active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.nav-pill-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 13px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    transition: transform 0.15s, opacity 0.15s;
}
.nav-pill-btn:hover { transform: translateY(-1px); opacity: 0.92; }
.nav-pill-support { background: var(--success); color: #fff !important; }
.nav-pill-chat { background: var(--primary); color: #fff !important; }

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

.phones-block .phone {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    text-decoration: none;
    white-space: nowrap;
}
.phones-block .phone:hover { color: var(--primary); }

.cart-nav-btn, .theme-toggle, .burger-btn {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--dark);
    height: 36px;
    padding: 0 11px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: border-color 0.15s;
}
.cart-nav-btn:hover, .theme-toggle:hover, .burger-btn:hover { border-color: var(--primary); }
.burger-btn { display: none; font-size: 18px; }

/* --- ЕДИНАЯ СТРОГО ФИКСИРОВАННАЯ ПОЛОСА ДЛЯ ВСЕХ СТРАНИЦ --- */
.page-hero {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    height: 220px;
    padding: 0;
    display: flex;
    align-items: center;
    text-align: center;
}
.page-hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.page-hero h1 {
    font-size: 30px;
    color: var(--dark);
    line-height: 1.25;
    margin-bottom: 8px;
    max-width: 840px;
}
.page-hero p {
    font-size: 15px;
    color: var(--gray);
    max-width: 720px;
    margin: 0 auto;
}
.hero-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* Хлебные крошки */
.breadcrumbs {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 10px;
}
.breadcrumbs a { color: var(--primary); text-decoration: none; font-weight: 600; }
.breadcrumbs a:hover { text-decoration: underline; }

/* --- КНОПКИ --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, transform 0.15s;
}
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-outline { background: var(--card-bg); color: var(--dark); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--card-bg); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }

/* Эстетичная кнопка «Подробнее» в карточке товара */
.specs-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(29, 108, 224, 0.08);
    border: 1px solid rgba(29, 108, 224, 0.22);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.18s ease;
}
.specs-link-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    transition: transform 0.18s ease;
}
.specs-link-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(29, 108, 224, 0.25);
}
.specs-link-btn:hover svg {
    transform: translateX(1px);
}

/* --- СЛОТ ИЗОБРАЖЕНИЯ И ГАЛЕРЕИ ОБОРУДОВАНИЯ --- */
.product-media-box {
    width: 100%;
    height: 152px;
    border-radius: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: border-color 0.2s;
}
.product-card:hover .product-media-box {
    border-color: rgba(29, 108, 224, 0.45);
}
.product-media-box.has-photo {
    background: transparent;
    padding: 10px 10px 22px;
}
.product-media-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.25s ease;
}
.product-card:hover .product-media-box.has-photo img {
    transform: scale(1.03);
}

.card-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.55);
    color: #ffffff;
    border: none;
    font-size: 13px;
    line-height: 1;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: background-color 0.15s;
}
.card-gallery-nav:hover { background: var(--primary); }
.card-gallery-prev { left: 6px; }
.card-gallery-next { right: 6px; }
.product-media-box.multi-photo .card-gallery-nav { display: inline-flex; }

.card-gallery-dots {
    position: absolute;
    bottom: 6px;
    left: 0;
    right: 0;
    display: none;
    justify-content: center;
    gap: 5px;
    z-index: 3;
}
.product-media-box.multi-photo .card-gallery-dots { display: flex; }
.card-gallery-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cbd5e1;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.15s;
}
.card-gallery-dot.active {
    background: var(--primary);
    width: 14px;
    border-radius: 4px;
}

.product-svg-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--primary);
    background: linear-gradient(135deg, rgba(29, 108, 224, 0.04) 0%, rgba(29, 108, 224, 0.11) 100%);
}
.product-svg-fallback svg {
    width: 68px;
    height: 68px;
    stroke: var(--primary);
}
.product-svg-caption {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--gray);
}

.modal-gallery-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.modal-media-box {
    width: 100%;
    height: 220px;
    border-radius: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.modal-media-box.has-photo {
    background: transparent;
    padding: 14px;
}
.modal-media-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.modal-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.65);
    color: #fff;
    border: none;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s;
}
.modal-gallery-arrow:hover { background: var(--primary); }
.modal-gallery-prev { left: 10px; }
.modal-gallery-next { right: 10px; }

.modal-thumbs-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}
.modal-thumb-btn {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    border: 2px solid var(--border);
    background: transparent;
    padding: 4px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, transform 0.15s;
}
.modal-thumb-btn:hover { border-color: var(--primary); }
.modal-thumb-btn.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(29, 108, 224, 0.25);
}
.modal-thumb-btn img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* --- МОДАЛЬНЫЕ ОКНА --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 99990;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal-overlay.open { display: flex; }

.modal-window {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.modal-header h3 { font-size: 18px; color: var(--dark); line-height: 1.3; }

.modal-close {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--gray);
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.15s;
}
.modal-close:hover {
    color: var(--dark);
    border-color: var(--primary);
    background: var(--card-bg);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.spec-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.spec-tag-pill {
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(29, 108, 224, 0.09);
    color: var(--primary);
    border: 1px solid rgba(29, 108, 224, 0.2);
}
.spec-info-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--dark);
}
.spec-section-lbl {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--gray);
    margin-bottom: 6px;
}

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--dark); }
.form-group input, .form-group textarea {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--dark);
    font-size: 14px;
    font-family: inherit;
    outline: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); }

/* Скрытое поле-ловушка для спам-ботов */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.pdn-notice {
    font-size: 12px;
    line-height: 1.45;
    color: var(--gray);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
}
.pdn-notice a { color: var(--primary); text-decoration: underline; }

/* --- ПЛАВНЫЙ КАЛЬКУЛЯТОР ОПЦИЙ ККТ БЕЗ ДЁРГАНЬЯ --- */
.kkt-options-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 0.28s ease-out, opacity 0.22s ease-out;
    will-change: grid-template-rows, opacity;
}

.kkt-options-wrapper.open {
    grid-template-rows: 1fr;
    opacity: 1;
}

.kkt-options-inner {
    overflow: hidden;
    min-height: 0;
}

.kkt-options-collapse {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.calc-group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--gray);
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.fn-helper-trigger {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 11px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}
.fn-helper-trigger:hover { color: var(--primary-hover); }

.calc-group-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.calc-option-row {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 11px;
    font-size: 13px;
    color: var(--dark);
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}

.calc-option-row:hover {
    border-color: var(--primary);
}

.calc-option-row.selected {
    border-color: var(--primary);
    background: rgba(29, 108, 224, 0.08);
    font-weight: 600;
}

.calc-option-row input[type="radio"] {
    accent-color: var(--primary);
    width: 15px;
    height: 15px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
}

.calc-opt-name {
    flex: 1;
    line-height: 1.3;
}

.calc-opt-price {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.calc-opt-price.muted {
    color: var(--gray);
    font-weight: 500;
}

.btn-outline-toggle {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--primary);
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.15s, background-color 0.15s;
}

.btn-outline-toggle:hover,
.btn-outline-toggle.opened {
    border-color: var(--primary);
    background: rgba(29, 108, 224, 0.08);
}

.toggle-arrow {
    display: inline-block;
    transition: transform 0.25s ease-out;
}

.btn-outline-toggle.opened .toggle-arrow {
    transform: rotate(180deg);
}

/* --- ПОМОЩНИК ВЫБОРА ФН (15 ИЛИ 36 МЕС.) --- */
.fn-wizard-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}
.fn-wizard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.fn-wizard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 16px;
}
.fn-wizard-col {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.fn-wizard-col-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--dark);
}
.fn-wizard-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--dark);
    cursor: pointer;
}
.fn-wizard-radio input { accent-color: var(--primary); }
.fn-wizard-result {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(29, 108, 224, 0.08);
    border: 1px solid rgba(29, 108, 224, 0.25);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.product-card.highlight-fn {
    border-color: var(--success) !important;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2) !important;
}

/* --- ВСПЛЫВАЮЩИЕ TOAST-УВЕДОМЛЕНИЯ --- */
.kp-toast-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 340px;
    pointer-events: none;
}
.kp-toast {
    pointer-events: auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left: 4px solid var(--success);
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: kpToastIn 0.22s ease-out;
}
.kp-toast-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--dark);
}
.kp-toast-sub {
    font-size: 12.5px;
    color: var(--gray);
    line-height: 1.4;
}
.kp-toast-action {
    align-self: flex-start;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 12.5px;
    font-weight: 700;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
}
@keyframes kpToastIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- COOKIE-БАННЕР (152-ФЗ) --- */
.kp-cookie-bar {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 99980;
    max-width: 440px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.22);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-size: 12.5px;
    color: var(--gray);
    line-height: 1.45;
}
.kp-cookie-bar a { color: var(--primary); text-decoration: underline; }

/* --- ПОДВАЛ --- */
footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 24px 0;
    margin-top: auto;
    font-size: 13px;
    color: var(--gray);
}
footer .container { display: flex; justify-content: center; }

/* --- АДАПТИВ --- */
@media (max-width: 1120px) {
    .phones-block { display: none; }
}

@media (max-width: 920px) {
    .burger-btn { display: inline-flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--card-bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 20px;
        gap: 12px;
        box-shadow: var(--shadow);
    }
    .nav-links.mobile-open { display: flex; }
    .nav-pill-group { width: 100%; flex-wrap: wrap; padding-top: 6px; }
    .page-hero { height: auto; min-height: 180px; padding: 26px 0; }
    .page-hero h1 { font-size: 24px; }
    .fn-wizard-grid { grid-template-columns: 1fr; }
    .kp-cookie-bar { left: 14px; right: 14px; bottom: 14px; max-width: none; }
}
/* Устранение дёрганья страницы (CLS) при обновлении */
html { scrollbar-gutter: stable; }
header { min-height: 68px; }
/* --- МОБИЛЬНАЯ ВЕРСИЯ «КАК ПРИЛОЖЕНИЕ» (до 768px) --- */
.mobile-call-btn,
.mobile-tabbar,
.mobile-sheet-overlay {
    display: none;
}

@media (max-width: 768px) {
    body {
        padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
        -webkit-tap-highlight-color: transparent;
    }

    /* Компактная шапка */
    header {
        height: 56px;
        min-height: 56px;
    }
    header .container {
        height: 56px;
        padding: 0 14px;
        gap: 10px;
    }
    .logo { font-size: 19px; }

    /* Скрываем десктопные контролы, которые переехали в нижний Tab Bar */
    .burger-btn,
    .cart-nav-btn,
    .nav-links {
        display: none !important;
    }

    /* Кнопка быстрого звонка в шапке */
    .mobile-call-btn {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        height: 36px;
        padding: 0 12px;
        border-radius: 999px;
        background: rgba(29, 108, 224, 0.12);
        color: var(--primary);
        border: 1px solid rgba(29, 108, 224, 0.25);
        font-size: 13px;
        font-weight: 700;
        text-decoration: none;
        white-space: nowrap;
    }
    .theme-toggle {
        height: 36px;
        width: 36px;
        padding: 0;
        justify-content: center;
        border-radius: 999px;
    }

    /* Контейнеры и Hero */
    .container { padding: 0 14px; }
    .page-hero {
        height: auto;
        min-height: 0;
        padding: 20px 0 22px;
        text-align: left;
    }
    .page-hero .container { align-items: flex-start; }
    .page-hero h1 { font-size: 22px; margin-bottom: 6px; }
    .page-hero p { font-size: 14px; margin: 0; }
    .hero-btns {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
        margin-top: 14px;
    }
    .hero-btns .btn {
        flex: 1 1 auto;
        min-height: 44px;
        padding: 10px 14px;
        font-size: 13.5px;
    }
    .breadcrumbs { justify-content: flex-start; font-size: 12px; }

    /* Удобные кнопки и поля ввода (без автозума на iOS) */
    .btn { min-height: 42px; }
    .btn-sm { min-height: 38px; padding: 8px 14px; }
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px;
        padding: 11px 12px;
    }

    /* Нижний Tab Bar */
    .mobile-tabbar {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 950;
        background: var(--card-bg);
        border-top: 1px solid var(--border);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.12);
        backdrop-filter: blur(10px);
    }
    .mobile-tab-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        background: none;
        border: none;
        color: var(--gray);
        text-decoration: none;
        font-family: inherit;
        font-size: 10.5px;
        font-weight: 600;
        padding: 4px 2px;
        cursor: pointer;
        position: relative;
        transition: color 0.15s;
    }
    .mobile-tab-item .tab-ico {
        font-size: 20px;
        line-height: 1.1;
    }
    .mobile-tab-item.active {
        color: var(--primary);
    }
    .mobile-tab-badge {
        position: absolute;
        top: 1px;
        right: calc(50% - 20px);
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        border-radius: 999px;
        background: var(--primary);
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .mobile-tab-badge:empty,
    .mobile-tab-badge[data-zero="1"] {
        display: none;
    }

    /* Все модалки превращаются в Bottom Sheets (шторки снизу) */
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
    .modal-window {
        max-width: 100% !important;
        width: 100%;
        max-height: 90vh;
        border-radius: 20px 20px 0 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        animation: kpSheetUp 0.22s ease-out;
    }
    .modal-window::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        border-radius: 999px;
        background: var(--border);
        margin: 8px auto 0;
        flex-shrink: 0;
    }
    .modal-header {
        padding: 12px 16px 14px;
    }
    .modal-body {
        padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    }

    /* Шторка меню «Ещё» */
    .mobile-sheet-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.55);
        backdrop-filter: blur(2px);
        z-index: 99985;
        display: none;
        align-items: flex-end;
    }
    .mobile-sheet-overlay.open { display: flex; }
    .mobile-sheet {
        width: 100%;
        background: var(--card-bg);
        border-top: 1px solid var(--border);
        border-radius: 20px 20px 0 0;
        padding: 10px 16px calc(20px + env(safe-area-inset-bottom, 0px));
        animation: kpSheetUp 0.22s ease-out;
        max-height: 85vh;
        overflow-y: auto;
    }
    .mobile-sheet-handle {
        width: 40px;
        height: 4px;
        border-radius: 999px;
        background: var(--border);
        margin: 0 auto 12px;
    }
    .mobile-sheet-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 12px;
    }
    .mobile-sheet-head strong { font-size: 16px; color: var(--dark); }
    .mobile-sheet-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .mobile-sheet-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 13px 14px;
        border-radius: 12px;
        background: var(--bg);
        border: 1px solid var(--border);
        color: var(--dark);
        text-decoration: none;
        font-size: 15px;
        font-weight: 600;
        font-family: inherit;
        cursor: pointer;
        width: 100%;
        text-align: left;
    }
    .mobile-sheet-link.accent-green {
        background: rgba(22, 163, 74, 0.1);
        border-color: rgba(22, 163, 74, 0.3);
        color: var(--success);
    }

    /* Поднимаем Toast и Cookie-плашку над Tab Bar */
    .kp-toast-container {
        left: 12px;
        right: 12px;
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        max-width: none;
    }
    .kp-cookie-bar {
        left: 12px;
        right: 12px;
        bottom: calc(74px + env(safe-area-inset-bottom, 0px));
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    @keyframes kpSheetUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }
}
/* Защита от горизонтального переполнения на мобильных экранах */
html, body { overflow-x: clip; }
img, iframe { max-width: 100%; }

/* === PRODUCT VARIANTS & COLOR SWITCHER === */
.product-title-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.variants-toggle-btn svg {
    transition: transform 0.2s ease;
}
.variants-toggle-btn.open svg {
    transform: rotate(180deg);
}
.product-variants-collapse {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    margin: 0;
    transition: grid-template-rows 0.24s ease, opacity 0.2s ease, margin 0.24s ease;
}
.product-variants-collapse.open {
    grid-template-rows: 1fr;
    opacity: 1;
    margin: 8px 0 12px;
}
.product-variants-collapse-inner {
    overflow: hidden;
    min-height: 0;
}
.product-variants-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 10px;
}
.variant-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}
.variant-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray, #64748b);
}
.variant-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.variant-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text, #334155);
    background: var(--card-bg, #ffffff);
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.variant-pill-btn:hover {
    border-color: var(--primary, #2563eb);
    color: var(--primary, #1d4ed8);
}
.variant-pill-btn.active {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary, #2563eb);
    color: var(--primary, #1d4ed8);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}
.variant-swatch {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.28);
    flex-shrink: 0;
}
[data-theme="dark"] .product-variants-box {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] .variant-label {
    color: #94a3b8;
}
[data-theme="dark"] .variant-pill-btn {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.16);
}
[data-theme="dark"] .variant-pill-btn:hover {
    border-color: #60a5fa;
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.14);
}
[data-theme="dark"] .variant-pill-btn.active {
    background: rgba(59, 130, 246, 0.24);
    border-color: #60a5fa;
    color: #ffffff;
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.35);
}
[data-theme="dark"] .variant-swatch {
    border-color: rgba(255, 255, 255, 0.42);
}

.variant-pill-btn:disabled, .variant-pill-btn.disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }


/* === COMPACT TITLE ACTIONS === */
.product-title-row {
    gap: 6px;
    align-items: center;
}
.product-title-row h3 {
    min-width: 0;
    line-height: 1.25;
}
.product-title-actions {
    gap: 4px;
    flex-wrap: nowrap;
}
.product-title-actions .specs-link-btn {
    padding: 3px 7px;
    font-size: 11.5px;
    gap: 2px;
    white-space: nowrap;
}
.product-title-actions .specs-link-btn svg {
    width: 12px;
    height: 12px;
}

/* === SOFTWARE_FULLBLEED_MEDIA_V1 === */
.product-media-box.has-photo:has(img[src*="frontol_6_1y"]),
.product-media-box.has-photo:has(img[src*="prostor_1y"]),
.product-media-box.has-photo:has(img[src*="dreamkas_start_1y"]),
.product-media-box.has-photo:has(img[src*="dreamkas_key"]),
.product-media-box.has-photo:has(img[src*="dreamkas_uchet"]),
.product-media-box.has-photo:has(img[src*="atol_its"]) {
    padding: 0;
    overflow: hidden;
}
.product-media-box.has-photo:has(img[src*="frontol_6_1y"]) img,
.product-media-box.has-photo:has(img[src*="prostor_1y"]) img,
.product-media-box.has-photo:has(img[src*="dreamkas_start_1y"]) img,
.product-media-box.has-photo:has(img[src*="dreamkas_key"]) img,
.product-media-box.has-photo:has(img[src*="dreamkas_uchet"]) img,
.product-media-box.has-photo:has(img[src*="atol_its"]) img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* === SERVICE_MEDIA_FULLBLEED_V1 === */
.service-media-box {
    width: 100%;
    height: 156px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 14px;
    background: #0b1120;
}
.service-media-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}
.service-card:hover .service-media-box {
    border-color: rgba(29, 108, 224, 0.45);
}
.service-card:hover .service-media-box img {
    transform: scale(1.03);
}

/* === CATEGORY_MEDIA_FULLBLEED_V1 === */
.cat-media-box {
    width: 100%;
    aspect-ratio: 16 / 10;
    height: auto;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 14px;
    background: #0b1120;
}
.cat-media-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}
.cat-card:hover .cat-media-box {
    border-color: rgba(29, 108, 224, 0.45);
}
.cat-card:hover .cat-media-box img {
    transform: scale(1.03);
}

/* === FN_OFD_MEDIA_FULLBLEED_V1 === */
.product-media-box.has-photo:has(img[src*="fn_replace_"]),
.product-media-box.has-photo:has(img[src*="ofd_"]) {
    padding: 0;
    overflow: hidden;
}
.product-media-box.has-photo:has(img[src*="fn_replace_"]) img,
.product-media-box.has-photo:has(img[src*="ofd_"]) img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* === UNIFIED_MEDIA_BACKDROP_V1 === */
.product-media-box.has-photo,
.modal-media-box.has-photo,
.modal-thumb-btn {
    background: radial-gradient(circle at 50% 45%, rgba(37, 99, 235, 0.08), #f1f5f9 80%);
}
[data-theme="dark"] .product-media-box.has-photo,
[data-theme="dark"] .modal-media-box.has-photo,
[data-theme="dark"] .modal-thumb-btn {
    background: radial-gradient(circle at 50% 45%, rgba(56, 189, 248, 0.14), #0b1120 78%);
}
.product-media-box.has-photo:has(img[src*="fn_replace_"]),
.product-media-box.has-photo:has(img[src*="ofd_"]),
.modal-media-box.has-photo:has(img[src*="fn_replace_"]),
.modal-media-box.has-photo:has(img[src*="ofd_"]),
.modal-media-box.has-photo:has(img[src*="frontol_6_1y"]),
.modal-media-box.has-photo:has(img[src*="prostor_1y"]),
.modal-media-box.has-photo:has(img[src*="dreamkas_"]),
.modal-media-box.has-photo:has(img[src*="atol_its"]) {
    padding: 0;
    overflow: hidden;
}
.product-media-box.has-photo:has(img[src*="fn_replace_"]) img,
.product-media-box.has-photo:has(img[src*="ofd_"]) img,
.modal-media-box.has-photo:has(img[src*="fn_replace_"]) img,
.modal-media-box.has-photo:has(img[src*="ofd_"]) img,
.modal-media-box.has-photo:has(img[src*="frontol_6_1y"]) img,
.modal-media-box.has-photo:has(img[src*="prostor_1y"]) img,
.modal-media-box.has-photo:has(img[src*="dreamkas_"]) img,
.modal-media-box.has-photo:has(img[src*="atol_its"]) img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* === GLOBAL_HERO_BACKDROP_V1 === */
.page-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(760px 300px at 50% -10%, rgba(29, 108, 224, 0.09), transparent 72%),
        linear-gradient(180deg, #ffffff 0%, #f4f7fc 100%) !important;
    border-bottom: 1px solid var(--border);
}
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 75% 85% at 50% 35%, #000 35%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 75% 85% at 50% 35%, #000 35%, transparent 100%);
}
.page-hero .container {
    position: relative;
    z-index: 1;
}
.page-hero h1 {
    text-wrap: balance;
    letter-spacing: -0.025em;
}

[data-theme="dark"] .page-hero {
    background:
        radial-gradient(680px 320px at 50% -15%, rgba(37, 99, 235, 0.24), transparent 70%),
        radial-gradient(480px 260px at 82% 20%, rgba(56, 189, 248, 0.14), transparent 70%),
        radial-gradient(460px 260px at 18% 30%, rgba(124, 58, 237, 0.12), transparent 70%),
        var(--bg) !important;
}
[data-theme="dark"] .page-hero::before {
    background-image:
        linear-gradient(to right, rgba(148, 163, 184, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
}

/* === HEADER_REDESIGN_V1 === */
header {
    height: 70px;
    background: rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
    transition: height 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
header.scrolled {
    height: 62px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}
header.scrolled .container { height: 62px; }
[data-theme="dark"] header {
    background: rgba(11, 15, 25, 0.78) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14) !important;
}
[data-theme="dark"] header.scrolled {
    background: rgba(11, 15, 25, 0.90) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
header::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent 5%, rgba(56, 189, 248, 0.45) 50%, transparent 95%);
    opacity: 0;
    transition: opacity 0.25s ease;
}
[data-theme="dark"] header::after { opacity: 0.7; }

header .container { gap: 12px; transition: height 0.2s ease; }
.header-left { gap: 14px; min-width: 0; }

/* Логотип с фирменным неоновым знаком */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.logo-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    flex-shrink: 0;
}
.logo-mark svg { width: 16px; height: 16px; }
.logo-word em { font-style: normal; color: var(--primary); }

/* Навигация в капсуле */
.nav-links { gap: 10px; }
.nav-capsule-wrap { display: flex; align-items: center; }
.nav-capsule {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.045);
    border: 1px solid rgba(15, 23, 42, 0.08);
}
[data-theme="dark"] .nav-capsule {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.09);
}
.nav-links .nav-capsule a {
    padding: 6px 10px;
    border-radius: 8px;
    border-bottom: none !important;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--dark);
    transition: background 0.16s ease, color 0.16s ease;
}
.nav-links .nav-capsule a:hover {
    background: rgba(37, 99, 235, 0.09);
    color: var(--primary);
}
.nav-links .nav-capsule a.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
[data-theme="dark"] .nav-links .nav-capsule a.active {
    background: rgba(37, 99, 235, 0.22);
    color: #38bdf8;
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.35);
}

/* Кнопки Удалённая помощь (неоновое стекло) и Чат (акцент) */
.hdr-ico { width: 16px; height: 16px; flex-shrink: 0; }
.nav-pill-btn {
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    gap: 6px;
}
.nav-pill-support {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #047857 !important;
    border: 1px solid rgba(16, 185, 129, 0.38) !important;
}
.nav-pill-support:hover {
    background: rgba(16, 185, 129, 0.20) !important;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.22);
}
[data-theme="dark"] .nav-pill-support {
    background: rgba(16, 185, 129, 0.14) !important;
    color: #34d399 !important;
    border-color: rgba(52, 211, 153, 0.40) !important;
}
[data-theme="dark"] .nav-pill-support:hover {
    background: rgba(16, 185, 129, 0.22) !important;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.28);
}
.nav-pill-chat {
    background: linear-gradient(135deg, #2563eb, #0284c7) !important;
    color: #ffffff !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}
.nav-pill-chat:hover {
    filter: brightness(1.08);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.38);
}
.btn-label-short { display: none; }

/* Поиск Ctrl+K */
.header-actions { gap: 8px; }
.hdr-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.04);
    color: var(--gray);
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.16s, color 0.16s, background 0.16s;
}
[data-theme="dark"] .hdr-search-btn {
    background: rgba(255, 255, 255, 0.04);
}
.hdr-search-btn:hover {
    border-color: var(--primary);
    color: var(--dark);
}
.hdr-kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 5px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--gray);
}

/* Умный телефон + живой статус + поповер */
.phones-block { position: relative; }
.phone-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 9px;
    border-radius: 10px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.16s, border-color 0.16s;
}
.phone-trigger:hover, .phones-block.open .phone-trigger {
    background: rgba(37, 99, 235, 0.07);
    border-color: var(--border);
}
.phone-meta { display: flex; flex-direction: column; line-height: 1.15; }
.phone-num { font-size: 14px; font-weight: 700; color: var(--dark); white-space: nowrap; }
.live-status-text { font-size: 10.5px; font-weight: 600; color: var(--gray); white-space: nowrap; }
.phone-chevron { width: 14px; height: 14px; color: var(--gray); transition: transform 0.18s; }
.phones-block.open .phone-chevron { transform: rotate(180deg); }

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #94a3b8;
}
.live-dot.is-online {
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    animation: kpPulse 2s infinite;
}
.live-dot.is-offline { background: #f59e0b; }
@keyframes kpPulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.phone-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 300px;
    padding: 14px;
    border-radius: 14px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 950;
}
.phones-block:hover .phone-popover,
.phones-block.open .phone-popover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.pp-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--dark);
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.pp-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.pp-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pp-val { font-size: 14px; font-weight: 700; color: var(--dark); text-decoration: none; }
.pp-val:hover { color: var(--primary); }
.pp-mail { font-size: 13px; font-weight: 600; }
.pp-copy {
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--gray);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.pp-copy:hover { border-color: var(--primary); color: var(--primary); }
.pp-info {
    font-size: 12px;
    color: var(--gray);
    line-height: 1.45;
    padding: 10px;
    border-radius: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    margin-bottom: 10px;
}
.pp-info strong { color: var(--dark); }
.pp-hours { margin-top: 4px; color: var(--primary); font-weight: 600; }
.pp-more {
    display: block;
    text-align: center;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    padding: 6px;
    border-radius: 8px;
}
.pp-more:hover { background: rgba(37, 99, 235, 0.08); }

/* Корзина и переключатель темы с SVG */
.cart-nav-btn, .theme-toggle, .burger-btn {
    border-radius: 10px;
    height: 36px;
    padding: 0 10px;
    background: rgba(15, 23, 42, 0.04);
}
[data-theme="dark"] .cart-nav-btn,
[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .burger-btn {
    background: rgba(255, 255, 255, 0.04);
}
.theme-toggle { width: 36px; padding: 0; justify-content: center; position: relative; }
.theme-toggle svg { width: 17px; height: 17px; transition: transform 0.25s ease; }
.theme-toggle:hover svg { transform: rotate(18deg); }
.theme-ico-sun { display: none; color: #fbbf24; }
.theme-ico-moon { display: block; color: #475569; }
[data-theme="dark"] .theme-ico-sun { display: block; }
[data-theme="dark"] .theme-ico-moon { display: none; }

/* Тост копирования */
.kp-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: #0f172a;
    color: #f8fafc;
    border: 1px solid rgba(56, 189, 248, 0.4);
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 2000;
}
.kp-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Command Palette (Ctrl+K) */
.kp-cmd-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.62);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 10vh 16px 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.16s ease, visibility 0.16s;
    z-index: 1900;
}
.kp-cmd-overlay.open { opacity: 1; visibility: visible; }
.kp-cmd-modal {
    width: 100%;
    max-width: 620px;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    transform: translateY(-10px) scale(0.98);
    transition: transform 0.18s ease;
}
.kp-cmd-overlay.open .kp-cmd-modal { transform: translateY(0) scale(1); }
.kp-cmd-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}
.kp-cmd-ico { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; }
#kpCmdInput {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: var(--dark);
    font-family: inherit;
    font-size: 15px;
}
.kp-cmd-esc {
    font-family: ui-monospace, monospace;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 7px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--gray);
    cursor: pointer;
}
.kp-cmd-body {
    max-height: 54vh;
    overflow-y: auto;
    padding: 8px;
}
.kp-cmd-group {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray);
    padding: 8px 10px 4px;
}
.kp-cmd-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s, border-color 0.12s;
}
.kp-cmd-item:hover, .kp-cmd-item.active {
    background: rgba(37, 99, 235, 0.10);
    border-color: rgba(59, 130, 246, 0.30);
}
.kp-cmd-main { display: flex; flex-direction: column; min-width: 0; }
.kp-cmd-main strong { font-size: 14px; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp-cmd-main span { font-size: 12px; color: var(--gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp-cmd-meta { font-size: 12.5px; font-weight: 700; color: var(--primary); white-space: nowrap; flex-shrink: 0; }
.kp-cmd-arrow { color: var(--gray); font-weight: 700; }
.kp-cmd-empty { padding: 28px 16px; text-align: center; color: var(--gray); font-size: 14px; }
.kp-cmd-foot {
    display: flex;
    gap: 16px;
    padding: 9px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    font-size: 11.5px;
    color: var(--gray);
}
.kp-cmd-foot kbd {
    font-family: ui-monospace, monospace;
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    margin-right: 3px;
}

/* Адаптация под узкие десктопы, чтобы ничего не переносилось */
@media (max-width: 1260px) {
    .hdr-kbd { display: none; }
    .hdr-search-btn { width: 36px; padding: 0; justify-content: center; }
    .btn-label-full { display: none; }
    .btn-label-short { display: inline; }
    .nav-links .nav-capsule a { padding: 6px 8px; font-size: 13px; }
}
@media (max-width: 1080px) {
    .nav-capsule {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        background: transparent;
        border: none;
        padding: 0;
    }
    .btn-label-full { display: inline; }
    .btn-label-short { display: none; }
    .phone-popover { display: none; }
}

/* === HEADER_OVERLAP_FIX_V1 === */
header .container {
    max-width: 1380px;
    gap: 10px;
}
.header-left {
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}
.header-actions {
    gap: 7px;
    flex-shrink: 0;
}
.logo {
    font-size: 18.5px;
    gap: 8px;
    flex-shrink: 0;
}
.logo-mark {
    width: 28px;
    height: 28px;
    color: #ffffff !important;
}
.logo-mark svg {
    stroke: #ffffff !important;
}
.logo-word {
    color: var(--dark);
}
.logo-word em {
    color: var(--primary);
}
.nav-links {
    gap: 8px;
    flex-wrap: nowrap;
}
.nav-links .nav-capsule a {
    padding: 5px 9px;
    font-size: 13px;
}
.nav-pill-group {
    gap: 6px;
    flex-shrink: 0;
}
.nav-pill-btn {
    height: 34px;
    padding: 0 10px;
    font-size: 12.5px;
}
.hdr-search-btn {
    height: 34px;
    padding: 0 9px;
    flex-shrink: 0;
}
.hdr-kbd {
    white-space: nowrap;
    flex-shrink: 0;
}
.phone-num {
    font-size: 13.5px;
}
.cart-nav-btn, .theme-toggle, .burger-btn {
    height: 34px;
}
.theme-toggle {
    width: 34px;
}

@media (max-width: 1340px) {
    .hdr-kbd { display: none; }
    .hdr-search-btn { width: 34px; padding: 0; justify-content: center; }
    .btn-label-full { display: none; }
    .btn-label-short { display: inline; }
    .nav-links .nav-capsule a { padding: 5px 7px; font-size: 12.5px; }
}

/* === LOGO_MARK_AURORA_V1 === */
.logo-mark {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    filter: drop-shadow(0 4px 10px rgba(37, 99, 235, 0.32));
}
.logo-mark svg {
    width: 32px !important;
    height: 32px !important;
    stroke: none !important;
    display: block;
}

/* === GLOBAL_SPOTLIGHT_V1 === */
:is(.kp-spot, .service-card, .bento-card, .tool-card, .wiz-card, .download-card, .dl-card, .article-card, .product-card, .cat-card, .hit-card, .package-card, .partner-mini-card, .piot-intro-card, .schema-card, .steps-card, .map-spoiler-card) {
    position: relative;
    overflow: hidden;
}
:is(.kp-spot, .service-card, .bento-card, .tool-card, .wiz-card, .download-card, .dl-card, .article-card, .product-card, .cat-card, .hit-card, .package-card, .partner-mini-card, .piot-intro-card, .schema-card, .steps-card, .map-spoiler-card)::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
    background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(56, 189, 248, 0.14), transparent 65%);
    z-index: 0;
}
[data-theme="dark"] :is(.kp-spot, .service-card, .bento-card, .tool-card, .wiz-card, .download-card, .dl-card, .article-card, .product-card, .cat-card, .hit-card, .package-card, .partner-mini-card, .piot-intro-card, .schema-card, .steps-card, .map-spoiler-card)::after {
    background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(56, 189, 248, 0.18), transparent 65%);
}
:is(.kp-spot, .service-card, .bento-card, .tool-card, .wiz-card, .download-card, .dl-card, .article-card, .product-card, .cat-card, .hit-card, .package-card, .partner-mini-card, .piot-intro-card, .schema-card, .steps-card, .map-spoiler-card):hover::after {
    opacity: 1;
}
.dl-card::after { z-index: 5; }
.bento-card > *, .tool-card > *, .wiz-card > * {
    position: relative;
    z-index: 1;
}

/* === KP_MOBILE_SERVICES_BTN_V1 === */
#services {
    scroll-margin-top: 86px;
}
.logo-brand-text {
    display: contents;
}
.mobile-services-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 36px;
    padding: 0 13px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.10);
    border: 1px solid rgba(37, 99, 235, 0.28);
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.mobile-services-btn:active {
    transform: scale(0.97);
}
[data-theme="dark"] .mobile-services-btn {
    color: #e0f2fe;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(6, 182, 212, 0.22));
    border-color: rgba(56, 189, 248, 0.42);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] .mobile-services-btn:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.42), rgba(6, 182, 212, 0.34));
    border-color: rgba(125, 211, 252, 0.65);
    color: #ffffff;
}

@media (max-width: 920px) {
    header .header-left {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    header .logo .logo-brand-text {
        display: none !important;
    }
    header .mobile-services-btn {
        display: inline-flex;
    }
}
/* === KP_MOBILE_SERVICES_BTN_V1_END === */

/* === KP_GLOBAL_POLISH_V1 === */

/* 1. Единый современный .page-hero для всех внутренних страниц */
.page-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 42px 0 44px;
}
.page-hero > .container {
    position: relative;
    z-index: 2;
}
[data-theme="dark"] .page-hero {
    background:
        radial-gradient(720px 280px at 50% -10%, rgba(56, 189, 248, 0.20), transparent 72%),
        radial-gradient(460px 230px at 14% 62%, rgba(79, 70, 229, 0.16), transparent 72%),
        radial-gradient(460px 230px at 86% 62%, rgba(6, 182, 212, 0.14), transparent 72%),
        linear-gradient(180deg, #070d1b 0%, #091225 58%, #070c18 100%);
    border-bottom: none;
}
[data-theme="dark"] .page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: radial-gradient(ellipse 85% 90% at 50% 45%, #000 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 85% 90% at 50% 45%, #000 30%, transparent 100%);
}
[data-theme="dark"] .page-hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    pointer-events: none;
    z-index: 3;
    background: linear-gradient(90deg,
        transparent 4%,
        rgba(56, 189, 248, 0.30) 24%,
        rgba(125, 211, 252, 0.65) 50%,
        rgba(129, 140, 248, 0.30) 76%,
        transparent 96%);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.45);
}
[data-theme="dark"] .page-hero h1 {
    background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}
[data-theme="dark"] .page-hero p {
    color: #94a3b8;
}

/* Светлая тема .page-hero (чистая, контрастная, без темноты) */
:root:not([data-theme="dark"]) .page-hero {
    background:
        radial-gradient(760px 300px at 50% -10%, rgba(37, 99, 235, 0.11), transparent 74%),
        radial-gradient(420px 220px at 85% 60%, rgba(6, 182, 212, 0.08), transparent 72%),
        linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
    border-bottom: 1px solid rgba(37, 99, 235, 0.14);
}
:root:not([data-theme="dark"]) .page-hero h1 {
    color: #0f172a;
    -webkit-text-fill-color: #0f172a;
    background: none;
    letter-spacing: -0.02em;
}
:root:not([data-theme="dark"]) .page-hero p {
    color: #475569;
}

/* Хлебные крошки на внутренних страницах */
.page-hero .breadcrumbs {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    margin-bottom: 14px;
    background: rgba(37, 99, 235, 0.07);
    border: 1px solid rgba(37, 99, 235, 0.16);
    color: #475569;
}
.page-hero .breadcrumbs a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}
.page-hero .breadcrumbs a:hover { text-decoration: underline; }
[data-theme="dark"] .page-hero .breadcrumbs {
    background: rgba(15, 23, 42, 0.62);
    border-color: rgba(56, 189, 248, 0.24);
    color: #94a3b8;
    backdrop-filter: blur(8px);
}
[data-theme="dark"] .page-hero .breadcrumbs a { color: #7dd3fc; }

/* 2. Карточки услуг (#services) и FAQ (#faq) в стиле Bento */
#services .services-grid > *,
.service-card {
    border-radius: 16px !important;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}
[data-theme="dark"] #services .services-grid > *,
[data-theme="dark"] .service-card {
    background: linear-gradient(180deg, rgba(20, 29, 48, 0.92), rgba(14, 21, 36, 0.96)) !important;
    border: 1px solid rgba(148, 163, 184, 0.14) !important;
    box-shadow: 0 10px 26px rgba(2, 6, 23, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}
[data-theme="dark"] #services .services-grid > *:hover,
[data-theme="dark"] .service-card:hover {
    transform: translateY(-3px) !important;
    border-color: rgba(56, 189, 248, 0.42) !important;
    box-shadow: 0 14px 32px rgba(2, 6, 23, 0.48), 0 0 24px rgba(56, 189, 248, 0.12) !important;
}
:root:not([data-theme="dark"]) #services .services-grid > *,
:root:not([data-theme="dark"]) .service-card {
    background: #ffffff !important;
    border: 1px solid #dbe4f0 !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05) !important;
}
:root:not([data-theme="dark"]) #services .services-grid > *:hover,
:root:not([data-theme="dark"]) .service-card:hover {
    transform: translateY(-3px) !important;
    border-color: rgba(37, 99, 235, 0.42) !important;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.10) !important;
}
#services .services-grid .btn {
    border-radius: 10px !important;
    font-weight: 600 !important;
    background: linear-gradient(135deg, #2563eb, #0284c7) !important;
    color: #ffffff !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.24) !important;
}
#services .services-grid .btn:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
}

/* FAQ аккордеон */
#faq .faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#faq .faq-item {
    border-radius: 14px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
[data-theme="dark"] #faq .faq-item {
    background: rgba(17, 25, 42, 0.86) !important;
    border: 1px solid rgba(148, 163, 184, 0.15) !important;
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
[data-theme="dark"] #faq .faq-item:hover,
[data-theme="dark"] #faq .faq-item[open] {
    border-color: rgba(56, 189, 248, 0.40) !important;
    box-shadow: 0 10px 26px rgba(2, 6, 23, 0.38), 0 0 20px rgba(56, 189, 248, 0.10);
}
:root:not([data-theme="dark"]) #faq .faq-item {
    background: #ffffff !important;
    border: 1px solid #dbe4f0 !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}
:root:not([data-theme="dark"]) #faq .faq-item[open] {
    border-color: rgba(37, 99, 235, 0.42) !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.08);
}

/* 3. Внутренние страницы: Каталог, ТС ПИоТ, О нас */
.cat-card, .product-card,
.partner-mini-card, .piot-intro-card, .schema-card, .package-card, .steps-card,
.info-panel, .requisites-box, .map-spoiler-card {
    border-radius: 16px !important;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
[data-theme="dark"] .cat-card,
[data-theme="dark"] .product-card,
[data-theme="dark"] .partner-mini-card,
[data-theme="dark"] .piot-intro-card,
[data-theme="dark"] .schema-card,
[data-theme="dark"] .package-card,
[data-theme="dark"] .steps-card,
[data-theme="dark"] .info-panel,
[data-theme="dark"] .requisites-box,
[data-theme="dark"] .map-spoiler-card {
    background: linear-gradient(180deg, rgba(20, 29, 48, 0.92), rgba(14, 21, 36, 0.96)) !important;
    border: 1px solid rgba(148, 163, 184, 0.15) !important;
    box-shadow: 0 10px 26px rgba(2, 6, 23, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}
[data-theme="dark"] .cat-card:hover,
[data-theme="dark"] .product-card:hover,
[data-theme="dark"] .partner-mini-card:hover,
[data-theme="dark"] .package-card:hover {
    border-color: rgba(56, 189, 248, 0.45) !important;
    box-shadow: 0 14px 32px rgba(2, 6, 23, 0.48), 0 0 24px rgba(56, 189, 248, 0.14) !important;
}
[data-theme="dark"] .partner-banner {
    border-radius: 18px !important;
    background:
        radial-gradient(520px 220px at 90% 10%, rgba(56, 189, 248, 0.18), transparent 72%),
        linear-gradient(135deg, rgba(20, 32, 58, 0.96), rgba(13, 21, 38, 0.98)) !important;
    border: 1px solid rgba(56, 189, 248, 0.30) !important;
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}
:root:not([data-theme="dark"]) .cat-card,
:root:not([data-theme="dark"]) .product-card,
:root:not([data-theme="dark"]) .partner-mini-card,
:root:not([data-theme="dark"]) .piot-intro-card,
:root:not([data-theme="dark"]) .schema-card,
:root:not([data-theme="dark"]) .package-card,
:root:not([data-theme="dark"]) .steps-card,
:root:not([data-theme="dark"]) .info-panel,
:root:not([data-theme="dark"]) .requisites-box,
:root:not([data-theme="dark"]) .map-spoiler-card {
    background: #ffffff !important;
    border: 1px solid #dbe4f0 !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05) !important;
}
:root:not([data-theme="dark"]) .cat-card:hover,
:root:not([data-theme="dark"]) .product-card:hover,
:root:not([data-theme="dark"]) .package-card:hover {
    border-color: rgba(37, 99, 235, 0.45) !important;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.10) !important;
}

/* Поиск в каталоге */
.search-input {
    border-radius: 12px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
[data-theme="dark"] .search-input {
    background: rgba(15, 23, 42, 0.85) !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
    color: #f1f5f9 !important;
}
.search-input:focus {
    outline: none;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18) !important;
}

/* 4. Новый структурированный подвал */
footer {
    position: relative;
    padding: 48px 0 28px !important;
    border-top: 1px solid var(--border);
    background: #ffffff;
}
[data-theme="dark"] footer {
    background: linear-gradient(180deg, #080d1a 0%, #050811 100%) !important;
    border-top: none !important;
}
[data-theme="dark"] footer::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, rgba(56, 189, 248, 0.28) 30%, rgba(125, 211, 252, 0.55) 50%, rgba(129, 140, 248, 0.28) 70%, transparent 95%);
}
.kp-footer-wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 28px !important;
    text-align: left !important;
}
.kp-footer-grid {
    display: grid;
    grid-template-columns: 1.45fr 1fr 1.05fr 1.15fr;
    gap: 28px;
    align-items: start;
}
.kp-f-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 12px;
}
.kp-f-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    flex-shrink: 0;
}
.kp-f-mark svg { width: 100%; height: 100%; display: block; }
.kp-f-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.02em;
}
.kp-f-name span { color: var(--primary); }
.kp-f-desc {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--gray);
    margin: 0 0 14px;
    max-width: 320px;
}
.kp-f-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.kp-f-pill {
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.20);
}
[data-theme="dark"] .kp-f-pill {
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.10);
    border-color: rgba(56, 189, 248, 0.24);
}
.kp-f-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--dark);
    margin-bottom: 12px;
    opacity: 0.9;
}
.kp-f-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.kp-f-links a {
    font-size: 13.5px;
    color: var(--gray);
    text-decoration: none;
    transition: color 0.15s ease;
}
.kp-f-links a:hover { color: var(--primary); }
[data-theme="dark"] .kp-f-links a:hover { color: #7dd3fc; }

.kp-f-phones {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}
.kp-f-phone {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    text-decoration: none;
    letter-spacing: -0.01em;
}
.kp-f-phone:hover { color: var(--primary); }
.kp-f-addr {
    font-size: 13px;
    color: var(--gray);
    line-height: 1.45;
    margin: 0 0 4px;
}
.kp-f-metro {
    font-size: 12.5px;
    font-weight: 600;
    color: #059669;
    margin: 0 0 10px;
}
[data-theme="dark"] .kp-f-metro { color: #34d399; }
.kp-f-map-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}
[data-theme="dark"] .kp-f-map-link { color: #38bdf8; }
.kp-f-map-link:hover { text-decoration: underline; }

.kp-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    font-size: 12.5px;
    color: var(--gray);
}
[data-theme="dark"] .kp-footer-bottom {
    border-top-color: rgba(148, 163, 184, 0.14);
}
.kp-footer-legal-links {
    display: flex;
    align-items: center;
    gap: 8px;
}
.kp-footer-legal-links a {
    color: var(--gray);
    text-decoration: none;
}
.kp-footer-legal-links a:hover { color: var(--primary); text-decoration: underline; }

/* 5. Адаптивность на планшетах и смартфонах */
@media (max-width: 960px) {
    .kp-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }
}
@media (max-width: 768px) {
    .page-hero {
        padding: 32px 0 36px !important;
    }
    .page-hero h1 {
        font-size: clamp(1.5rem, 6vw, 2rem) !important;
        line-height: 1.2 !important;
    }
    .page-hero p {
        font-size: 14.5px !important;
    }
    footer {
        padding: 36px 0 92px !important; /* запас под мобильный tabbar */
    }
    .kp-footer-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .kp-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .categories-grid, .products-grid {
        grid-template-columns: 1fr !important;
    }
}
/* === KP_GLOBAL_POLISH_V1_END === */

/* === KP_HERO_PCB_GLOBAL_V1 === */
.page-hero > *:not(.hero-fx-layer) {
    position: relative;
    z-index: 2;
}
.hero-fx-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    display: flex;
    justify-content: center;
    overflow: hidden;
}
.hero-fx-frame {
    position: relative;
    width: 100%;
    max-width: 1540px;
    height: 100%;
}
.hero-pcb {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 440px;
    height: 330px;
    opacity: 0.92;
}
.hero-pcb-left { left: -24px; }
.hero-pcb-right { right: -24px; transform: translateY(-50%) scaleX(-1); }

/* На внутренних страницах чуть мягче, чтобы текст и хлебные крошки читались идеально */
.hero-fx-layer.is-inner .hero-pcb {
    opacity: 0.78;
}
:root:not([data-theme="dark"]) .hero-pcb {
    opacity: 0.28;
}
:root:not([data-theme="dark"]) .hero-fx-layer.is-inner .hero-pcb {
    opacity: 0.22;
}

.pcb-track {
    fill: none;
    stroke-width: 1.35;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.58;
}
.pcb-track-dim {
    fill: none;
    stroke: #6366f1;
    stroke-width: 1.1;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.34;
}
.pcb-node {
    fill: #070d1b;
    stroke: #38bdf8;
    stroke-width: 1.6;
}
.pcb-node-core {
    fill: #7dd3fc;
}
:root:not([data-theme="dark"]) .pcb-node {
    fill: #f8fbff;
    stroke: #2563eb;
}
:root:not([data-theme="dark"]) .pcb-node-core {
    fill: #2563eb;
}

.pcb-pulse {
    fill: none;
    stroke: #7dd3fc;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-dasharray: 44 460;
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.95));
    animation: kpPcbFlow 5.2s linear infinite;
}
.pcb-pulse-2 {
    stroke: #a5b4fc;
    stroke-dasharray: 34 420;
    filter: drop-shadow(0 0 6px rgba(129, 140, 248, 0.9));
    animation: kpPcbFlow 6.8s linear infinite;
    animation-delay: -2.4s;
}
:root:not([data-theme="dark"]) .pcb-pulse {
    stroke: #2563eb;
    filter: drop-shadow(0 0 4px rgba(37, 99, 235, 0.45));
}
:root:not([data-theme="dark"]) .pcb-pulse-2 {
    stroke: #0284c7;
    filter: drop-shadow(0 0 4px rgba(2, 132, 199, 0.4));
}
.hero-pcb-right .pcb-pulse { animation-delay: -1.8s; }
.hero-pcb-right .pcb-pulse-2 { animation-delay: -4.2s; }

@keyframes kpPcbFlow {
    0%   { stroke-dashoffset: 504; opacity: 0; }
    10%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { stroke-dashoffset: 0; opacity: 0; }
}

@media (max-width: 1180px) {
    .hero-pcb { width: 320px; opacity: 0.55; }
    .hero-fx-layer.is-inner .hero-pcb { opacity: 0.42; }
}
@media (max-width: 768px) {
    .hero-pcb { opacity: 0.22; width: 220px; }
    .hero-fx-layer.is-inner .hero-pcb { opacity: 0.18; }
}
@media (prefers-reduced-motion: reduce) {
    .pcb-pulse, .pcb-pulse-2 { animation: none !important; }
}
/* === KP_HERO_PCB_GLOBAL_V1_END === */

/* === KP_CATALOG_TYPOGRAPHY_V1 === */

/* 1. Сетка категорий: 3 просторные колонки на десктопе -> крупнее обложки и текст */
main .categories-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 22px !important;
}
main .cat-card {
    padding: 20px 22px 22px !important;
}
main .cat-card .cat-media-box {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 10;
    margin-bottom: 16px !important;
    border-radius: 12px !important;
    overflow: hidden;
}
main .cat-card .cat-media-box img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}
main .cat-card h3 {
    font-size: 21px !important;
    line-height: 1.28 !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
    letter-spacing: -0.015em;
}
main .cat-card p {
    font-size: 15px !important;
    line-height: 1.52 !important;
    margin-bottom: 16px !important;
}
[data-theme="dark"] main .cat-card p {
    color: #cbd5e1 !important;
}
:root:not([data-theme="dark"]) main .cat-card p {
    color: #334155 !important;
}
main .cat-card .cat-footer {
    font-size: 14px !important;
    font-weight: 600 !important;
    padding-top: 14px !important;
}

/* 2. Карточки товаров (внутри разделов catalog/*.html и в поиске на equipment.html) */
main .product-card h3,
main .product-card .product-title,
main .product-card .prod-title {
    font-size: 19.5px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
}
main .product-card p,
main .product-card .product-desc,
main .product-card .prod-desc {
    font-size: 15px !important;
    line-height: 1.52 !important;
}
[data-theme="dark"] main .product-card p,
[data-theme="dark"] main .product-card .product-desc,
[data-theme="dark"] main .product-card .prod-desc {
    color: #cbd5e1 !important;
}
:root:not([data-theme="dark"]) main .product-card p,
:root:not([data-theme="dark"]) main .product-card .product-desc,
:root:not([data-theme="dark"]) main .product-card .prod-desc {
    color: #334155 !important;
}
main .product-card .for-whom-tag,
main .product-card .product-tag,
main .product-card .prod-tag,
main .product-card .badge-chip,
main .product-card .tag {
    font-size: 13px !important;
    line-height: 1.3 !important;
    padding: 4px 10px !important;
}
main .product-card .brand-label,
main .product-card .product-brand {
    font-size: 12.5px !important;
}
main .product-card .product-specs li,
main .product-card .spec-row {
    font-size: 14px !important;
    line-height: 1.45 !important;
}

@media (max-width: 1060px) {
    main .categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
@media (max-width: 680px) {
    main .categories-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    main .cat-card h3 { font-size: 19.5px !important; }
    main .cat-card p  { font-size: 14.5px !important; }
}
/* === KP_CATALOG_TYPOGRAPHY_V1_END === */

/* === 152-ФЗ: чекбокс согласия в формах === */
.pdn-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    text-align: left;
}
.pdn-consent input[type="checkbox"] {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin-top: 2px;
    accent-color: var(--primary, #2563eb);
    cursor: pointer;
}

/* === KP_HEADER_PILLS_RIGHT_V1 === */
@media (min-width: 1025px) {
    .nav-links {
        flex: 1 1 auto;
        justify-content: flex-start;
    }
    .nav-pill-group {
        margin-left: auto;
    }
}
/* === /KP_HEADER_PILLS_RIGHT_V1 === */
