/* ==========================================================================
   Монтаж видеонаблюдения — Екатеринбург. Основные стили (Bootstrap 5.3)
   ========================================================================== */

:root {
    --brand: #1657d6;
    --brand-dark: #0d3f9e;
    --brand-light: #eaf0ff;
    --accent: #ff7a1a;
    --accent-dark: #e56600;
    --ink: #14213d;
    --ink-soft: #3f4a5f;
    --muted: #6b7791;
    --line: #e3e9f4;
    --bg-soft: #f5f8fd;
    --ok: #16a34a;
    --radius: 16px;
    --radius-sm: 12px;
    --shadow-sm: 0 2px 10px rgba(20, 33, 61, .06);
    --shadow: 0 12px 32px rgba(20, 33, 61, .10);
    --shadow-lg: 0 24px 60px rgba(13, 63, 158, .16);
}

* { -webkit-tap-highlight-color: transparent; }

body {
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, .h1, .h2, .h3 { font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
h2.section-title { font-size: clamp(1.5rem, 2.6vw, 2.15rem); }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
.text-muted { color: var(--muted) !important; }
.section { padding: 72px 0; }
.section-sm { padding: 48px 0; }
.bg-soft { background: var(--bg-soft); }
.bg-ink { background: var(--ink); }

/* ---------- Кнопки ---------- */
.btn { border-radius: 12px; font-weight: 600; padding: .68rem 1.35rem; transition: .18s ease; }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(22, 87, 214, .25); }
.btn-brand:hover, .btn-brand:focus { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; transform: translateY(-1px); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(255, 122, 26, .3); }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; transform: translateY(-1px); }
.btn-outline-brand { color: var(--brand); border: 2px solid var(--brand); background: transparent; }
.btn-outline-brand:hover { background: var(--brand); color: #fff; }
.btn-lg { padding: .85rem 1.7rem; font-size: 1.05rem; border-radius: 14px; }
.btn-ghost-light { color: #fff; border: 1.5px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .06); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .16); color: #fff; }

/* ---------- Верхняя полоса ---------- */
.topbar { background: var(--ink); color: #cdd6e6; font-size: .86rem; padding: .45rem 0; }
.topbar a { color: #e8eefb; }
.topbar .sep { opacity: .35; margin: 0 .6rem; }

/* ---------- Шапка ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1030; }
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.site-header .navbar-brand { font-weight: 800; font-size: 1.12rem; color: var(--ink); display: flex; align-items: center; gap: .6rem; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--brand), #4b8bff); display: grid; place-items: center; color: #fff; font-size: 1.25rem; box-shadow: 0 6px 16px rgba(22, 87, 214, .35); }
.brand-sub { font-size: .74rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.site-header .nav-link { font-weight: 600; color: var(--ink-soft); padding: .55rem .8rem !important; border-radius: 10px; }
.site-header .nav-link:hover, .site-header .nav-link.active { color: var(--brand); background: var(--brand-light); }
.header-phone { font-weight: 800; font-size: 1.12rem; color: var(--ink); white-space: nowrap; }
.header-phone:hover { color: var(--brand); }
.header-note { font-size: .76rem; color: var(--muted); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background:
        radial-gradient(1100px 500px at 85% -10%, rgba(75, 139, 255, .38), transparent 60%),
        linear-gradient(160deg, #0b2a63 0%, #123a86 45%, #1657d6 100%);
    color: #fff;
    padding: 64px 0 76px;
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(80% 70% at 30% 20%, #000 20%, transparent 75%);
    pointer-events: none;
}
.hero > .container { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(1.75rem, 3.6vw, 3rem); margin-bottom: 1rem; }
.hero .lead { color: #d7e3ff; font-size: clamp(1rem, 1.4vw, 1.15rem); max-width: 640px; }
.hero-badge {
    display: inline-flex; align-items: center; gap: .5rem; background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .28); color: #fff; border-radius: 999px;
    padding: .38rem .95rem; font-size: .85rem; font-weight: 600; margin-bottom: 1.1rem;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #46e08a; box-shadow: 0 0 0 4px rgba(70, 224, 138, .25); }
.hero-list { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.hero-list li { position: relative; padding-left: 2rem; margin-bottom: .6rem; color: #eaf1ff; }
.hero-list li::before {
    content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%;
    background: rgba(70, 224, 138, .18); color: #6ff0a7; display: grid; place-items: center; font-size: .78rem; font-weight: 700;
}
.hero-note { color: #b9cbf3; font-size: .9rem; margin-top: 1.2rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 2.2rem; margin-top: 2rem; }
.hero-stats .stat b { display: block; font-size: 1.7rem; line-height: 1.1; }
.hero-stats .stat span { color: #b9cbf3; font-size: .88rem; }

/* ---------- Форма заявки ---------- */
.lead-card { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-lg); }
.lead-card h3 { font-size: 1.25rem; margin-bottom: .35rem; }
.lead-card .sub { color: var(--muted); font-size: .9rem; margin-bottom: 1.1rem; }
.form-control, .form-select { border-radius: 12px; border-color: #d7dfef; padding: .7rem .95rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(22, 87, 214, .12); }
.lead-card .form-label { font-size: .88rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .3rem; }
.form-privacy { font-size: .76rem; color: var(--muted); }
.lead-card.is-inverted { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); color: #fff; }
.lead-card.is-inverted .sub, .lead-card.is-inverted .form-label, .lead-card.is-inverted .form-privacy { color: #c8d6f5; }
.lead-card.is-inverted .form-control, .lead-card.is-inverted .form-select { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .25); color: #fff; }
.lead-card.is-inverted .form-control::placeholder { color: #a9bce4; }

/* ---------- Карточки преимуществ ---------- */
.feature-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; height: 100%; transition: .2s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #cfe0ff; }
.feature-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-light); display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 1rem; }
.feature-card h3 { font-size: 1.06rem; margin-bottom: .5rem; }
.feature-card p { color: var(--muted); font-size: .93rem; margin: 0; }

/* ---------- Услуги ---------- */
.service-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: .2s ease; }
.service-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: #cfe0ff; }
.service-card .top { padding: 24px 24px 0; }
.service-card .icon { font-size: 1.7rem; }
.service-card h3 { font-size: 1.16rem; margin: .6rem 0 .5rem; }
.service-card h3 a { color: var(--ink); }
.service-card h3 a:hover { color: var(--brand); }
.service-card p { color: var(--muted); font-size: .93rem; }
.service-card .bottom { margin-top: auto; padding: 0 24px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price-tag { font-weight: 800; color: var(--ink); font-size: 1.1rem; white-space: nowrap; }
.price-tag small { display: block; font-weight: 500; color: var(--muted); font-size: .76rem; }
.badge-popular { background: var(--accent); color: #fff; font-size: .7rem; border-radius: 999px; padding: .28rem .6rem; font-weight: 700; letter-spacing: .02em; }

/* ---------- Карточки товаров ---------- */
.product-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: .18s ease; }
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: #cfe0ff; }
.product-media { position: relative; background: #f2f5fb; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: contain; padding: 12px; mix-blend-mode: multiply; transition: transform .3s ease; }
.product-card:hover .product-media img { transform: scale(1.05); }
.product-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.chip { font-size: .7rem; font-weight: 700; padding: .24rem .55rem; border-radius: 8px; background: #fff; color: var(--brand); border: 1px solid #d7e3ff; }
.chip.chip-hit { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip.chip-out { background: #ffe8e8; color: #c22; border-color: #ffd2d2; }
.product-body { padding: 16px 18px 0; display: flex; flex-direction: column; flex: 1; }
.product-cat { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .3rem; }
.product-title { font-size: 1rem; font-weight: 700; line-height: 1.35; margin-bottom: .5rem; }
.product-title a { color: var(--ink); }
.product-title a:hover { color: var(--brand); }
.product-meta { font-size: .8rem; color: var(--muted); margin-bottom: .5rem; }
.product-price { font-size: 1.28rem; font-weight: 800; color: var(--ink); }
.product-price .old { font-size: .9rem; color: var(--muted); text-decoration: line-through; font-weight: 500; margin-left: .4rem; }
.product-foot { margin-top: auto; padding: 14px 18px 18px; display: flex; gap: 8px; }
.product-foot .btn { flex: 1; padding: .55rem .8rem; font-size: .9rem; }

/* ---------- Каталог: фильтры ---------- */
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.filters h4 { font-size: 1rem; }
.filter-list { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow: auto; }
.filter-list li a { display: flex; justify-content: space-between; gap: 8px; padding: .42rem .6rem; border-radius: 10px; color: var(--ink-soft); font-size: .93rem; }
.filter-list li a:hover { background: var(--brand-light); color: var(--brand-dark); }
.filter-list li a.active { background: var(--brand); color: #fff; font-weight: 600; }
.filter-list .count { color: var(--muted); font-size: .8rem; }
.filter-list li a.active .count { color: #dbe7ff; }
.filter-list .lvl-2 a { padding-left: 1.4rem; font-size: .89rem; }
.catalog-toolbar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.view-toggle .btn { padding: .35rem .6rem; }
.pagination .page-link { border-radius: 10px; margin: 0 3px; border-color: var(--line); color: var(--ink-soft); }
.pagination .page-item.active .page-link { background: var(--brand); border-color: var(--brand); }
#catalogResults.is-loading { opacity: .45; pointer-events: none; transition: opacity .15s; }

/* ---------- Каталог: страница товара ---------- */
.product-gallery-main { background: #f2f5fb; border-radius: var(--radius); padding: 18px; display: grid; place-items: center; aspect-ratio: 4 / 3; }
.product-gallery-main img { max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.product-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.product-thumbs button { border: 1px solid var(--line); border-radius: 12px; background: #fff; width: 76px; height: 62px; padding: 4px; }
.product-thumbs button.active { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22, 87, 214, .12); }
.product-thumbs img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.specs-table { width: 100%; font-size: .94rem; }
.specs-table td { padding: .55rem .2rem; border-bottom: 1px dashed var(--line); vertical-align: top; }
.specs-table td:first-child { color: var(--muted); width: 45%; }
.buy-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.buy-box .price { font-size: 2rem; font-weight: 800; line-height: 1; }
.stock-in { color: var(--ok); font-weight: 600; font-size: .92rem; }
.stock-out { color: #c22; font-weight: 600; font-size: .92rem; }
.product-desc { font-size: 1rem; color: var(--ink-soft); }
.product-desc ul { padding-left: 1.2rem; }
.product-desc li { margin-bottom: .3rem; }
.product-desc h3 { font-size: 1.1rem; margin: 1.4rem 0 .6rem; }
.product-desc table { width: 100%; font-size: .93rem; }
.product-desc td, .product-desc th { border: 1px solid var(--line); padding: .45rem .6rem; }

/* ---------- CTA-блок прайса ---------- */
.price-cta { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 26px; }
.price-cta h3 { font-size: 1.2rem; }

/* ---------- Этапы работ ---------- */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step-item { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px 22px 74px; }
.step-item::before {
    counter-increment: step; content: counter(step);
    position: absolute; left: 22px; top: 22px; width: 36px; height: 36px; border-radius: 12px;
    background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800;
}
.step-item h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.step-item p { color: var(--muted); font-size: .93rem; margin: 0; }

/* ---------- Отзывы ---------- */
.review-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; height: 100%; }
.review-head { display: flex; align-items: center; gap: 12px; margin-bottom: .8rem; }
.review-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-light); color: var(--brand-dark); display: grid; place-items: center; font-weight: 800; }
.review-card .name { font-weight: 700; }
.review-card .object { font-size: .8rem; color: var(--muted); }
.review-text { color: var(--ink-soft); font-size: .94rem; }
.review-answer { background: var(--bg-soft); border-left: 3px solid var(--brand); border-radius: 10px; padding: 12px 14px; font-size: .88rem; color: var(--ink-soft); margin-top: 12px; }
.rating { color: #ffb400; letter-spacing: 2px; font-size: 1rem; }
.rating .star { color: #d9e0ee; }
.rating .star.on { color: #ffb400; }

/* ---------- Объекты (портфолио) ---------- */
.work-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; height: 100%; }
.work-card .meta { font-size: .8rem; color: var(--brand); font-weight: 700; margin-bottom: .4rem; }
.work-card h3 { font-size: 1.02rem; }
.work-card p { color: var(--muted); font-size: .92rem; margin: 0; }

/* ---------- Гарантия / инфо-полоса ---------- */
.guarantee { background: linear-gradient(135deg, #0b2a63, #1657d6); color: #fff; border-radius: 22px; padding: 40px; }
.guarantee h2 { font-size: clamp(1.3rem, 2.2vw, 1.85rem); }
.guarantee ul { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.guarantee li { padding-left: 1.8rem; position: relative; margin-bottom: .55rem; color: #dce7ff; }
.guarantee li::before { content: "✓"; position: absolute; left: 0; color: #6ff0a7; font-weight: 700; }

/* ---------- FAQ ---------- */
.accordion-item { border: 1px solid var(--line); border-radius: var(--radius) !important; margin-bottom: 12px; overflow: hidden; }
.accordion-button { font-weight: 700; font-size: 1rem; padding: 1.05rem 1.25rem; color: var(--ink); }
.accordion-button:not(.collapsed) { color: var(--brand-dark); background: var(--brand-light); box-shadow: none; }
.accordion-button:focus { box-shadow: none; border-color: transparent; }
.accordion-body { color: var(--ink-soft); font-size: .95rem; }

/* ---------- Калькулятор ---------- */
.calc-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.calc-result { background: linear-gradient(135deg, #0b2a63, #1657d6); color: #fff; border-radius: var(--radius); padding: 26px; }
.calc-result .sum { font-size: 2.2rem; font-weight: 800; line-height: 1.1; }
.calc-result .row-line { display: flex; justify-content: space-between; font-size: .9rem; padding: .35rem 0; border-bottom: 1px dashed rgba(255, 255, 255, .2); color: #dbe6ff; }
.calc-summary { font-size: .84rem; color: var(--muted); }
.form-range::-webkit-slider-thumb { background: var(--brand); }

/* ---------- SEO-текст ---------- */
.seo-text { color: var(--ink-soft); font-size: .98rem; }
.seo-text h2 { font-size: 1.35rem; margin: 1.6rem 0 .7rem; }
.seo-text h3 { font-size: 1.1rem; margin: 1.2rem 0 .5rem; }
.seo-text ul { padding-left: 1.2rem; }
.seo-text li { margin-bottom: .3rem; }

/* ---------- Подвал ---------- */
.site-footer { background: #0f1c33; color: #b6c3d9; padding: 56px 0 26px; font-size: .93rem; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; font-weight: 700; }
.site-footer a { color: #cfdafa; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer .bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 34px; padding-top: 18px; font-size: .82rem; color: #8fa0bd; }
.site-footer .brand-mark { box-shadow: none; }

/* ---------- Мобильная CTA-панель ---------- */
.mobile-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040; background: #fff; border-top: 1px solid var(--line); padding: .6rem .75rem; display: none; gap: .5rem; box-shadow: 0 -6px 24px rgba(20, 33, 61, .08); }
.mobile-cta .btn { flex: 1; padding: .6rem .5rem; font-size: .92rem; }

/* ---------- Прочее ---------- */
.breadcrumbs { font-size: .86rem; }
.breadcrumbs .breadcrumb-item + .breadcrumb-item::before { content: "→"; color: var(--muted); }
.breadcrumb-item a { color: var(--muted); }
.breadcrumb-item.active { color: var(--ink-soft); }
.toast-stack { position: fixed; right: 20px; bottom: 90px; z-index: 1060; display: flex; flex-direction: column; gap: 10px; }
.sticky-side { position: sticky; top: 96px; }
.page-hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 34px 0 30px; }
.page-hero h1 { font-size: clamp(1.5rem, 2.8vw, 2.2rem); margin-bottom: .5rem; }
.empty-state { background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--muted); }
.doc-list { font-size: .95rem; }
.doc-list li { margin-bottom: .6rem; }
.badge-outline { border: 1px solid var(--line); border-radius: 999px; padding: .35rem .8rem; font-size: .82rem; color: var(--ink-soft); background: #fff; }

@media (max-width: 991.98px) {
    .section { padding: 52px 0; }
    .hero { padding: 44px 0 56px; }
    .mobile-cta { display: flex; }
    body { padding-bottom: 66px; }
    .sticky-side { position: static; }
    .filter-list { max-height: none; }
}
@media (max-width: 575.98px) {
    .hero-stats { gap: 1.4rem; }
    .hero-stats .stat b { font-size: 1.35rem; }
    .guarantee { padding: 26px; }
    .product-foot { flex-direction: column; }
    .topbar { font-size: .78rem; }
}
@media print {
    .site-header, .site-footer, .mobile-cta, .topbar { display: none; }
}

/* ==========================================================================
   Cookie-баннер и согласие на обработку данных
   ========================================================================== */
.cookie-banner {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1080;
    padding: 0 14px 14px;
    transform: translateY(130%);
    transition: transform .35s ease, opacity .35s ease;
    pointer-events: none;
}
.cookie-banner--visible { transform: none; pointer-events: auto; }
.cookie-banner--hidden { transform: translateY(130%); opacity: 0; pointer-events: none; }
.cookie-banner__inner {
    max-width: 1180px; margin: 0 auto;
    background: #fff; border: 1px solid var(--line); border-radius: 18px;
    box-shadow: 0 -12px 44px rgba(20, 33, 61, .16);
    padding: 16px 20px; display: flex; gap: 16px; align-items: center;
}
.cookie-banner__icon {
    width: 46px; height: 46px; flex: 0 0 46px; border-radius: 14px;
    background: var(--brand-light); display: grid; place-items: center; font-size: 22px;
}
.cookie-banner__body { flex: 1; min-width: 0; }
.cookie-banner__title { font-weight: 800; margin-bottom: 2px; }
.cookie-banner__text { color: var(--muted); font-size: .88rem; }
.cookie-banner__text a, .cookie-banner__link { color: var(--brand); font-weight: 600; }
.cookie-banner__link { margin-left: 4px; white-space: nowrap; }
.cookie-banner__actions { display: flex; gap: 8px; flex: 0 0 auto; }
@media (max-width: 991.98px) {
    .cookie-banner { bottom: 62px; padding: 0 10px 10px; }
    .cookie-banner__inner { flex-wrap: wrap; padding: 14px 16px; }
    .cookie-banner__actions { width: 100%; }
    .cookie-banner__actions .btn { flex: 1; }
}

.consent-check { margin-top: .85rem; font-size: .82rem; color: var(--muted); line-height: 1.45; }
.consent-check .form-check-input { margin-top: .2rem; }
.consent-check .form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.consent-check a { color: var(--brand); font-weight: 600; }
.lead-card.is-inverted .consent-check, .calc-result .consent-check { color: #cbd8f5; }

/* ==========================================================================
   Услуги: карточки с фотографиями
   ========================================================================== */
.service-card .service-media {
    display: block; position: relative; aspect-ratio: 16 / 10; overflow: hidden;
    background: linear-gradient(135deg, #e8eefb, #f6f9ff);
}
.service-card .service-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.service-card:hover .service-media img { transform: scale(1.06); }
.service-card .service-media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(11, 42, 99, 0) 45%, rgba(11, 42, 99, .55) 100%);
}
.service-card .service-icon-badge {
    position: absolute; left: 16px; bottom: 14px; z-index: 2;
    width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .92);
    display: grid; place-items: center; font-size: 20px; box-shadow: 0 6px 16px rgba(11, 42, 99, .25);
}
.service-card .service-media .service-cat {
    position: absolute; top: 14px; left: 14px; z-index: 2;
    background: rgba(255, 255, 255, .92); color: var(--brand-dark);
    font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
    border-radius: 999px; padding: .25rem .65rem;
}
.service-card .top { padding-top: 18px; }

/* ==========================================================================
   Дерево категорий в фильтрах
   ========================================================================== */
.filter-list li a { align-items: center; }
.filter-list .cat-row { display: flex; align-items: center; gap: 6px; }
.filter-list .cat-toggle {
    flex: 0 0 22px; width: 22px; height: 22px; border-radius: 8px; border: 1px solid var(--line);
    background: #fff; color: var(--brand); font-size: 11px; line-height: 1;
    display: grid; place-items: center; cursor: pointer; padding: 0;
    transition: transform .2s ease, background .2s ease;
}
.filter-list .cat-toggle:hover { background: var(--brand-light); }
.filter-list .cat-toggle.is-open { transform: rotate(90deg); }
.filter-list .cat-toggle.is-empty { visibility: hidden; }
.filter-list .cat-link { display: flex; justify-content: space-between; gap: 8px; flex: 1; padding: .4rem .5rem; border-radius: 10px; color: var(--ink-soft); }
.filter-list .cat-link:hover { background: var(--brand-light); color: var(--brand-dark); }
.filter-list .cat-link.active { background: var(--brand); color: #fff; font-weight: 600; }
.filter-list .cat-link.active .count { color: #dbe7ff; }
.filter-list ul.children { list-style: none; margin: 0 0 0 14px; padding: 0; display: none; border-left: 1px dashed var(--line); }
.filter-list ul.children.is-open { display: block; }
.filter-list ul.children li a.cat-link { font-size: .9rem; }

/* ==========================================================================
   Характеристики товара
   ========================================================================== */
.specs {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px; border-top: 1px solid var(--line);
}
.spec {
    display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
    padding: .7rem .1rem; border-bottom: 1px dashed var(--line); min-width: 0;
}
.spec__name { color: var(--muted); font-size: .92rem; flex: 0 1 45%; }
.spec__value { font-weight: 600; text-align: right; flex: 1 1 auto; overflow-wrap: anywhere; word-break: break-word; }
.spec--wide { grid-column: 1 / -1; }
.spec--wide .spec__name { flex: 0 0 auto; }
.spec--tech .spec__value { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86rem; font-weight: 500; }
@media (max-width: 767.98px) { .specs { grid-template-columns: 1fr; gap: 0; } }

.package-box {
    display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center;
    background: linear-gradient(120deg, #eef4ff, #f7faff);
    border: 1px solid #dbe6fb; border-radius: 14px; padding: 14px 18px; margin-bottom: 18px;
}
.package-box__item { display: flex; align-items: center; gap: 10px; }
.package-box__icon { width: 34px; height: 34px; border-radius: 10px; background: #fff; display: grid; place-items: center; font-size: 17px; box-shadow: var(--shadow-sm); }
.package-box__label { font-size: .78rem; color: var(--muted); display: block; }
.package-box__value { font-weight: 700; }
.package-box__hint { font-size: .76rem; color: var(--muted); margin-left: auto; }

/* ==========================================================================
   Прайс-лист
   ========================================================================== */
.price-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.price-nav__link {
    display: inline-flex; align-items: center; gap: 8px; padding: .5rem .85rem;
    background: #fff; border: 1px solid var(--line); border-radius: 999px;
    color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem;
    box-shadow: 0 2px 8px rgba(20, 33, 61, .04); transition: border-color .15s, transform .15s;
}
.price-nav__link:hover { border-color: var(--brand); transform: translateY(-1px); }
.price-nav__icon { font-size: 1rem; line-height: 1; }
.price-nav__count {
    display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
    background: var(--brand-light); color: var(--brand); border-radius: 999px; font-size: .78rem; font-weight: 700;
}

.price-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.price-search { max-width: 340px; flex: 1 1 260px; }

.price-block {
    background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
    box-shadow: 0 6px 20px rgba(20, 33, 61, .05);
}
.price-block + .price-block { margin-top: 22px; }
.price-block .group-head {
    background: linear-gradient(90deg, #eff4ff, #ffffff 70%);
    padding: 15px 20px; border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: 12px;
}
.price-block .group-head .g-title { font-weight: 800; font-size: 1.05rem; margin: 0; scroll-margin-top: 96px; }
.price-block .group-head .g-icon {
    width: 40px; height: 40px; border-radius: 12px; background: #fff; border: 1px solid #dbe6fb;
    display: grid; place-items: center; font-size: 19px; flex: 0 0 40px;
}
.price-block .group-head .g-count { margin-left: auto; }

.price-table { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.price-table th {
    font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
    font-weight: 600; padding: .6rem 20px; background: #fafcff; border-bottom: 1px solid var(--line);
}
.price-table td { padding: .8rem 20px; border-top: 1px solid #eff3fa; font-size: .95rem; vertical-align: middle; }
.price-table tbody tr:nth-child(even) td { background: #fbfdff; }
/* Шапка «Наименование работ / Ед. изм. / Стоимость» — один раз, у первого раздела */
.price-block:not(.price-block--head) .price-table thead { display: none; }
.price-block:not(.price-block--head) .price-table tbody tr:first-child td { border-top: 0; }
.price-table tbody tr:hover td { background: var(--brand-light); }

/* Колонки выровнены: наименование слева, единица измерения и цена — по правому краю */
.price-table .col-unit { width: 116px; text-align: left; }
.price-table .col-price { width: 180px; text-align: right; }
.price-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.price-name__text { font-weight: 500; }
.price-unit { font-size: .82rem; color: var(--muted); }
.price-unit-mobile { display: none; font-size: .78rem; color: var(--muted); }
.price-note { font-size: .78rem; color: var(--ok); font-weight: 600; white-space: nowrap; }
.price-sum {
    font-weight: 800; font-size: 1rem; white-space: nowrap;
    font-variant-numeric: tabular-nums; letter-spacing: .01em;
}
.price-chip {
    display: inline-block; font-weight: 700; border-radius: 10px; padding: .28rem .65rem; white-space: nowrap;
}
.price-chip--free { color: #12813f; border: 1px solid #cdeed9; background: #f2fdf6; font-weight: 800; }
.price-chip--ask { color: var(--muted); border: 1px dashed var(--line); font-weight: 600; }
.price-hit {
    display: inline-block; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
    color: #8a4b00; background: #fff3dd; border: 1px solid #ffe0ad; border-radius: 999px; padding: .08rem .5rem;
    vertical-align: middle;
}
.price-table tbody tr.price-row--popular td { background: #fffbf0; }
.price-table tbody tr.price-row--popular:hover td { background: #fff6e3; }
.price-table tbody tr.price-row--popular td.col-name { box-shadow: inset 3px 0 0 var(--accent); }
.price-legend { font-size: .82rem; color: var(--muted); margin-top: 16px; }

.price-table tr.is-hidden { display: none; }
.price-block.is-empty { display: none; }
.price-empty { display: none; }
.price-empty.is-visible { display: block; }

@media (max-width: 575.98px) {
    .price-table th, .price-table td { padding-left: 14px; padding-right: 14px; }
    .price-table .col-unit { display: none; }
    .price-table .col-price { width: 124px; }
    .price-unit-mobile { display: inline; }
    .price-sum { font-size: .95rem; }
    .price-block .group-head { padding: 13px 14px; }
}

/* Таблицы со сложными значениями (характеристики, RTSP-ссылки) */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88rem; }

/* Картинка на странице услуги */
.service-hero-image { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); background: #eef3fb; }
.service-hero-image img { width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; object-fit: cover; }

/* Плашки-счётчики (прайс-лист, каталог) на фронте */
.badge-soft { display: inline-flex; align-items: center; gap: 4px; background: #eef3ff; color: #1657d6;
    border-radius: 8px; padding: 3px 9px; font-size: 12px; font-weight: 600; line-height: 1.4; }
.badge-soft.g-count { background: #f0f2f6; color: #5b6780; white-space: nowrap; }
.badge-soft.green { background: #e7f8ee; color: #12813f; }
.badge-soft.orange { background: #fff3e6; color: #b45309; }
.badge-soft.red { background: #fdecec; color: #b91c1c; }

/* ============================================================
   Заказ товара и заявка на монтаж (offcanvas)
   ============================================================ */
.order-offcanvas { width: 640px; max-width: 100%; }
.order-offcanvas .offcanvas-body { padding-top: 8px; }

.order-form__head { margin-bottom: 16px; }
.order-form__title { font-size: 20px; font-weight: 700; display: flex; gap: 8px; align-items: flex-start; line-height: 1.3; }
.order-form__icon { font-size: 22px; line-height: 1; }
.order-form__sub { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.order-form__note { color: var(--muted); font-size: 12.5px; margin-top: 10px; }

.order-main {
    display: flex; gap: 12px; align-items: center; padding: 12px;
    border: 1px solid var(--line); border-radius: 14px; background: #fff; margin-bottom: 16px;
}
.order-main__thumb { width: 72px; height: 72px; object-fit: contain; background: var(--bg-soft); border-radius: 10px; padding: 4px; flex: none; }
.order-main__info { min-width: 0; flex: 1; }
.order-main__name { font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.order-main__meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.order-main__meta [data-order-price] { font-weight: 700; color: var(--brand-dark, #0f2d5c); font-size: 15px; }
.order-main__qty { flex: none; text-align: center; }
.order-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.order-stepper button {
    width: 32px; height: 36px; border: 0; background: var(--bg-soft); font-size: 17px; font-weight: 700;
    color: var(--brand-dark, #0f2d5c); cursor: pointer;
}
.order-stepper button:hover { background: #e6edfb; }
.order-stepper input {
    width: 48px; height: 36px; border: 0; text-align: center; font-weight: 700; -moz-appearance: textfield;
}
.order-stepper input::-webkit-outer-spin-button,
.order-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* --- Подбор комплекта --- */
.order-complete {
    border: 1px dashed var(--line); border-radius: 14px; padding: 14px; background: #fbfcfe; margin-bottom: 16px;
}
.order-complete__title { font-weight: 700; font-size: 15.5px; }
.order-complete__sub { color: var(--muted); font-size: 12.5px; margin: 4px 0 12px; }
.order-group + .order-group { margin-top: 14px; }
.order-group__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.order-group__icon { font-size: 16px; }
.order-group__title { font-weight: 700; font-size: 14px; }
.order-group__hint { color: var(--muted); font-size: 12px; }
.order-group__items { display: grid; gap: 8px; }

.order-item {
    position: relative; display: flex; align-items: center; gap: 10px; cursor: pointer;
    background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin: 0;
    transition: border-color .15s, box-shadow .15s;
}
.order-item:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(22, 87, 214, .08); }
.order-item.is-recommended { border-color: #cfe0ff; background: #f7faff; }
.order-item__badge {
    position: absolute; top: -8px; right: 8px; background: var(--accent, #ff8a00); color: #fff;
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    padding: 2px 7px; border-radius: 20px;
}
.order-item__thumb { width: 48px; height: 48px; object-fit: contain; background: var(--bg-soft); border-radius: 8px; padding: 3px; flex: none; }
.order-item__body { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.order-item__name { font-size: 13.5px; font-weight: 600; color: inherit; text-decoration: none; line-height: 1.3; }
.order-item__name:hover { color: var(--brand); }
.order-item__meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.order-qty { flex: none; width: 64px; }
.order-qty input { text-align: center; }
.order-item input[type=checkbox] { flex: none; margin: 0; }
.order-item:has(input[type=checkbox]:not(:checked)) { opacity: .78; }
.order-item:has(input[type=checkbox]:checked) { border-color: var(--brand); }

/* --- Итог --- */
.order-total {
    display: flex; flex-direction: column; gap: 2px; background: var(--bg-soft);
    border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 16px;
}
.order-total [data-order-sum] { font-size: 17px; font-weight: 700; }
.order-total__note { color: var(--muted); font-size: 12px; }

.order-contacts .form-label { font-size: 13px; margin-bottom: 2px; }

/* --- Подтверждение --- */
.order-success__icon {
    width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 50%; background: #e7f8ee; color: #12813f;
    font-size: 30px; display: flex; align-items: center; justify-content: center;
}

/* --- Кнопка «с монтажом» на карточке товара --- */
.product-card { position: relative; }
.product-flag {
    position: absolute; top: 10px; right: 10px; z-index: 3; width: 34px; height: 34px; border-radius: 50%;
    border: 0; background: rgba(255, 255, 255, .94); box-shadow: 0 3px 10px rgba(15, 45, 92, .16);
    font-size: 15px; line-height: 1; cursor: pointer;
}
.product-flag:hover { background: #fff; transform: translateY(-1px); }

@media (max-width: 575px) {
    .order-main { flex-wrap: wrap; }
    .order-main__qty { width: 100%; text-align: left; }
    .order-item { flex-wrap: wrap; }
    .order-qty { width: 72px; }
}

/* Шапка блока комплекта: текст + кнопка «добавить всё» */
.order-complete__head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.order-complete__text { min-width: 0; }
.order-complete__all { flex: none; white-space: nowrap; }
.order-total__hint { color: var(--muted); font-size: 12.5px; }
@media (max-width: 575px) {
    .order-complete__head { flex-direction: column; }
    .order-complete__all { width: 100%; }
}
