/* ==========================================================================
   Микрон-ГранитЪ — стили сайта
   Цвета и размеры — в переменных ниже. Чтобы поменять фирменный цвет,
   достаточно поправить --brand и --accent.
   ========================================================================== */

:root {
  --brand: #1559b5;
  --brand-dark: #0d3f86;
  --brand-soft: #e8f0fb;
  --accent: #ffc20e;
  --accent-dark: #e9ad00;
  --ink: #142033;
  --ink-2: #44526a;
  --muted: #7a879b;
  --line: #e3e8ef;
  --bg: #ffffff;
  --bg-alt: #f4f7fb;
  --ok: #1d9a58;
  --warn: #c97a00;
  --danger: #d43c3c;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 32, 51, .06), 0 6px 24px rgba(20, 32, 51, .06);
  --shadow-hover: 0 4px 10px rgba(20, 32, 51, .08), 0 16px 40px rgba(20, 32, 51, .10);
  --container: 1240px;
  --gutter: 20px;
  --font: "Inter", "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid rgba(21, 89, 181, .35); outline-offset: 2px; }
.icon { flex-shrink: 0; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: 900px; }
.main { min-height: 50vh; padding-bottom: 40px; }

/* --- Кнопки --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 10px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 15px; line-height: 1.2; white-space: nowrap; text-align: center;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: var(--accent-dark); color: var(--ink); }
.btn-outline { background: #fff; color: var(--brand); border-color: rgba(21, 89, 181, .35); }
.btn-outline:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.btn-light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-light:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-ghost:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 13px 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; min-height: 38px; padding: 0; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.btn-icon:hover { background: var(--brand); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; }
.link-more .icon { transition: transform .15s; }
.link-more:hover .icon { transform: translateX(3px); }

/* --- Шапка ------------------------------------------------------------------ */
.header { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 1px 0 var(--line); }
.topbar { background: var(--bg-alt); font-size: 13px; color: var(--ink-2); }
.topbar-inner { display: flex; gap: 28px; min-height: 36px; align-items: center; }
.topbar-item { display: inline-flex; align-items: center; gap: 6px; color: inherit; }
.topbar-item .icon { color: var(--brand); }
.topbar-inner > :last-child { margin-left: auto; }
.header-main { display: flex; align-items: center; gap: 24px; min-height: 80px; }
.logo img { width: 188px; height: auto; }
.burger, .header-call-icon { display: none; }
.search { position: relative; flex: 1; max-width: 460px; display: flex; }
.search input {
  width: 100%; height: 46px; padding: 0 48px 0 16px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--bg-alt); transition: border-color .15s, background .15s;
}
.search input:focus { outline: none; border-color: var(--brand); background: #fff; }
.search > button { position: absolute; right: 4px; top: 4px; width: 38px; height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); }
.search > button:hover { color: var(--brand); }
.search-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60; }
.suggest { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-hover); overflow: hidden; max-height: 70vh; overflow-y: auto; }
.suggest-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: var(--ink); border-bottom: 1px solid var(--line); }
.suggest-item:hover { background: var(--bg-alt); color: var(--ink); }
.suggest-item img, .suggest-noimg { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #fff; flex-shrink: 0; display: grid; place-items: center; color: var(--muted); }
.suggest-noimg { background: var(--bg-alt); }
.suggest-name { flex: 1; font-size: 14px; line-height: 1.3; }
.suggest-name small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.suggest-price { font-weight: 700; font-size: 14px; white-space: nowrap; }
.suggest-all, .suggest-empty { display: flex; align-items: center; gap: 6px; padding: 12px 14px; font-size: 14px; font-weight: 600; }
.suggest-empty { font-weight: 400; color: var(--ink-2); }
.header-contacts { display: flex; flex-direction: column; margin-left: auto; text-align: right; }
.header-phone { font-size: 20px; font-weight: 700; color: var(--ink); white-space: nowrap; letter-spacing: -.01em; }
.header-phone:hover { color: var(--brand); }
.header-hours { font-size: 13px; color: var(--muted); }

/* Меню */
.nav { border-top: 1px solid var(--line); }
.nav-inner { display: flex; }
.nav-mobile-head, .nav-mobile-contacts, .nav-toggle, .nav-search { display: none; }
.nav-list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; }
.nav-link { display: flex; align-items: center; gap: 4px; padding: 14px 16px; font-weight: 600; font-size: 15px; color: var(--ink); }
.nav-link:hover, .nav-item.is-active > .nav-link { color: var(--brand); }
.nav-item.is-active > .nav-link { box-shadow: inset 0 -3px 0 var(--brand); }
.nav-caret { transition: transform .2s; color: var(--muted); }
.drop {
  position: absolute; top: 100%; left: 0; min-width: 280px; padding: 10px; background: #fff; border: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow-hover);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s;
}
.has-drop:hover > .drop, .has-drop:focus-within > .drop, .nav-item:hover > .drop { opacity: 1; visibility: visible; transform: none; }
.has-drop:hover .nav-caret { transform: rotate(180deg); }
.drop-mega { display: grid; grid-template-columns: repeat(4, minmax(200px, 1fr)); gap: 18px 24px; padding: 22px 24px; width: min(1100px, calc(100vw - 40px)); }
.drop-col { display: flex; flex-direction: column; gap: 4px; }
.drop-title { font-weight: 700; color: var(--ink); font-size: 15px; margin-bottom: 2px; }
.drop-title:hover { color: var(--brand); }
.drop-link { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); font-size: 14px; }
.drop-mega .drop-link { padding: 3px 0; }
.drop-link:hover { color: var(--brand); background: var(--bg-alt); }
.drop-mega .drop-link:hover { background: none; }
.drop-link-icon .icon { color: var(--brand); }
.nav-backdrop { display: none; }

/* --- Хлебные крошки, заголовки ---------------------------------------------------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 22px; padding-bottom: 6px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs-sep { opacity: .5; }
.page-title { font-size: clamp(26px, 3.2vw, 38px); margin: 10px 0 18px; }
.section { padding: 56px 0; }
.section-tight { padding: 36px 0; }
.section-flush { padding: 40px 0 0; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head .section-title { margin: 0; }
.section-title { font-size: clamp(22px, 2.4vw, 30px); }
.section-title-gap { margin-top: 40px; }
.section-lead { font-size: 17px; color: var(--ink-2); max-width: 860px; }

/* --- Слайдер на главной ------------------------------------------------------------ */
.hero { background: linear-gradient(120deg, #0b2f66 0%, var(--brand) 55%, #2f7de0 100%); color: #fff; overflow: hidden; }
.hero-slide { position: relative; min-height: 460px; display: flex; align-items: center; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-slide.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 30, 66, .88) 0%, rgba(8, 30, 66, .55) 55%, rgba(8, 30, 66, .1) 100%); }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 64px; }
.hero-title { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.08; margin-bottom: 18px; color: #fff; }
.hero-lead { font-size: 18px; opacity: .9; max-width: 560px; margin-bottom: 28px; }
.hero-art { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 420px; justify-self: end; }
.hero-art-card {
  display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: 18px; color: #fff; font-weight: 600;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(6px);
}
.hero-art-card .icon { color: var(--accent); }
.hero-art-card.c2, .hero-art-card.c4 { transform: translateY(26px); }
.hero-pagination { bottom: 20px !important; }
.hero .swiper-pagination-bullet { background: #fff; opacity: .45; width: 10px; height: 10px; }
.hero .swiper-pagination-bullet-active { opacity: 1; width: 28px; border-radius: 5px; }

/* --- Преимущества ------------------------------------------------------------------- */
.adv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.adv { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.adv-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); flex-shrink: 0; }
.adv-title { font-weight: 700; margin-bottom: 2px; }
.adv-text { font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.adv-grid-compact { margin: 28px 0 8px; }
.adv-grid-compact .adv { padding: 14px; }
.adv-grid-compact .adv-icon { width: 40px; height: 40px; }

/* --- Разделы каталога --------------------------------------------------------------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.cat {
  display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 22px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--line); transition: box-shadow .2s, border-color .2s;
}
.cat:hover { box-shadow: var(--shadow-hover); border-color: transparent; }
.cat-img { display: grid; place-items: center; height: 130px; }
.cat-img img { max-height: 130px; object-fit: contain; transition: transform .3s; }
.cat:hover .cat-img img { transform: scale(1.04); }
.cat-title { font-size: 19px; margin-bottom: 6px; }
.cat-title a { color: var(--ink); }
.cat-title a:hover { color: var(--brand); }
.cat-text { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.chips, .subcats { display: flex; flex-wrap: wrap; gap: 8px; }
.subcats { margin: 0 0 20px; }
.chip {
  display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: var(--bg-alt); color: var(--ink-2); border: 1px solid transparent; transition: all .15s;
}
.chip:hover { color: var(--brand); border-color: rgba(21, 89, 181, .3); background: #fff; }
.chip.is-active { background: var(--brand); color: #fff; }
.subcats .chip { padding: 9px 16px; font-size: 14px; }
.noimg { display: grid; place-items: center; width: 100%; height: 100%; color: #c4cdd9; background: var(--bg-alt); border-radius: var(--radius-sm); }

/* --- Карточка товара в списке --------------------------------------------------------- */
.pgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pcard {
  position: relative; display: flex; flex-direction: column; height: 100%; padding: 16px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--line); transition: box-shadow .2s, border-color .2s, transform .2s;
}
.pcard:hover { box-shadow: var(--shadow-hover); border-color: transparent; transform: translateY(-2px); }
.pcard-img { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; margin-bottom: 14px; border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.pcard-img img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.pcard-body { flex: 1; display: flex; flex-direction: column; }
.pcard-title { font-size: 15px; font-weight: 600; line-height: 1.35; margin: 6px 0 10px; }
.pcard-title a { color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-title a:hover { color: var(--brand); }
.pcard-title a::after { content: ""; position: absolute; inset: 0; }   /* вся карточка кликабельна */
.pcard-price { margin-top: auto; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.pcard-actions { position: relative; z-index: 1; display: flex; gap: 8px; margin-top: 14px; }
.pcard-actions .btn-primary { flex: 1; }
.price { font-size: 20px; font-weight: 800; color: var(--ink); white-space: nowrap; letter-spacing: -.01em; }
.price-lg { font-size: 32px; }
.price-ask { font-size: 16px; font-weight: 700; color: var(--ink-2); }
.price-old { color: var(--muted); font-size: 14px; }
.stock { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stock-yes { color: var(--ok); }
.stock-order { color: var(--warn); }
.badge { position: absolute; top: 10px; left: 10px; z-index: 1; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; color: #fff; background: var(--brand); }
.badge-new { background: #1d9a58; }
.badge-sale { background: #e5484d; }
.badge-hit { background: #f07b10; }
.badge-recommend { background: var(--brand); }
.badge-lg { top: 16px; left: 16px; font-size: 13px; padding: 6px 12px; }

/* Панель фильтров */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-bottom: 20px; padding: 12px 16px; background: var(--bg-alt); border-radius: var(--radius-sm); }
.toolbar-count { font-weight: 600; color: var(--ink-2); margin-right: auto; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; user-select: none; }
.switch input { position: absolute; opacity: 0; }
.switch-ui { position: relative; width: 42px; height: 24px; border-radius: 12px; background: #cfd7e3; transition: background .15s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .switch-ui { background: var(--brand); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid rgba(21, 89, 181, .35); }
.select { position: relative; display: inline-flex; align-items: center; }
.select select { appearance: none; height: 40px; padding: 0 36px 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.select .icon { position: absolute; right: 12px; pointer-events: none; color: var(--muted); }
.product-list-wrap { transition: opacity .2s; }
.product-list-wrap.htmx-request { opacity: .5; }
.more { display: flex; justify-content: center; margin-top: 28px; }
.empty { grid-column: 1 / -1; padding: 40px; text-align: center; background: var(--bg-alt); border-radius: var(--radius); }
.category-about { margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--line); max-width: 900px; }

/* --- Страница товара ------------------------------------------------------------------- */
.product { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 44px; margin-top: 12px; }
.product-gallery { position: relative; min-width: 0; }
.gallery-main { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.gallery-main .swiper-slide { display: grid; place-items: center; aspect-ratio: 1 / 1; padding: 28px; }
.gallery-main img { max-height: 100%; width: auto; object-fit: contain; }
.gallery-prev, .gallery-next { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
.gallery-thumbs { margin-top: 12px; }
.gallery-thumbs .swiper-slide { width: 84px; height: 84px; padding: 6px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; opacity: .7; background: #fff; }
.gallery-thumbs .swiper-slide-thumb-active { border-color: var(--brand); opacity: 1; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.gallery-empty { display: grid; place-items: center; gap: 8px; aspect-ratio: 1 / 1; border-radius: var(--radius); background: var(--bg-alt); color: #b7c2d1; align-content: center; justify-items: center; }
.product-title { font-size: clamp(24px, 2.8vw, 34px); margin-bottom: 10px; }
.product-meta { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-bottom: 20px; font-size: 14px; }
.product-announce { color: var(--ink-2); margin: 22px 0 18px; }
.buy-box { padding: 22px; border-radius: var(--radius); background: var(--bg-alt); border: 1px solid var(--line); }
.buy-box-sticky { position: sticky; top: 150px; background: #fff; box-shadow: var(--shadow); }
.buy-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.buy-note { font-size: 14px; color: var(--ink-2); margin-bottom: 16px; }
.buy-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.buy-actions .btn { flex: 1 1 200px; }
.buy-actions-col { flex-direction: column; }
.buy-actions-col .btn { flex: none; width: 100%; }
.buy-hours { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.specs { margin: 0; }
.spec { display: flex; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.spec dt { flex: 0 0 44%; color: var(--muted); }
.spec dd { margin: 0; font-weight: 500; }
.specs-short { margin-bottom: 10px; }
.specs-short .spec { padding: 7px 0; font-size: 14px; }

/* Вкладки */
.tabs { margin-top: 36px; }
.tabs-head { display: flex; gap: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { padding: 14px 20px; border: 0; background: none; font-weight: 600; color: var(--ink-2); white-space: nowrap; box-shadow: inset 0 -3px 0 transparent; }
.tab:hover { color: var(--brand); }
.tab.is-active { color: var(--brand); box-shadow: inset 0 -3px 0 var(--brand); }
.tab-panel { display: none; padding: 26px 0; max-width: 920px; }
.tab-panel.is-active { display: block; }

/* Тексты из редактора */
.rich { color: var(--ink-2); font-size: 16px; }
.rich h2 { font-size: 24px; color: var(--ink); margin-top: 1.4em; }
.rich h3 { font-size: 19px; color: var(--ink); margin-top: 1.5em; margin-bottom: .5em; }
.rich > :first-child { margin-top: 0; }
.rich ul, .rich ol { padding-left: 1.3em; margin: 0 0 1em; }
.rich li { margin-bottom: .35em; }
.rich ul li::marker { color: var(--brand); }
.rich table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 15px; }
.rich td, .rich th { padding: 9px 12px; border: 1px solid var(--line); text-align: left; }
.rich img { border-radius: var(--radius-sm); margin: 1em 0; }
.rich { overflow-wrap: break-word; }
.rich .lines { margin: 0 0 1em; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--bg-alt); font-size: 15px; }
.rich .lines p { margin: 0; padding: 4px 0; }
@media (max-width: 680px) { .rich table { display: block; overflow-x: auto; } }

/* --- Услуги ------------------------------------------------------------------------------ */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.svc { padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; transition: box-shadow .2s; }
.svc:hover { box-shadow: var(--shadow-hover); }
.svc-head { display: flex; gap: 14px; align-items: center; color: var(--ink); margin-bottom: 12px; }
.svc-head:hover .svc-title { color: var(--brand); }
.svc-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: var(--brand); color: #fff; flex-shrink: 0; }
.svc-title, .svc-section-title { display: block; font-weight: 700; font-size: 18px; line-height: 1.25; }
.svc-sub { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
.svc-list { list-style: none; margin: 0; padding: 0; }
.svc-list a { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 15px; }
.svc-list a:hover { color: var(--brand); }
.svc-price { font-weight: 700; color: var(--ink); white-space: nowrap; }
.svc-section { margin-bottom: 40px; }
.svc-section-head { display: flex; align-items: center; gap: 16px; color: var(--ink); margin-bottom: 16px; }
.svc-section-head .svc-section-title { font-size: 22px; }
.svc-section-head:hover .svc-section-title { color: var(--brand); }
.svc-arrow { margin-left: auto; color: var(--brand); }
.scard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.scard-list { display: flex; flex-direction: column; gap: 14px; }
.scard { display: flex; gap: 20px; padding: 20px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); transition: box-shadow .2s; }
.scard:hover { box-shadow: var(--shadow-hover); }
.scard-grid .scard { flex-direction: column; }
.scard-img { flex: 0 0 200px; }
.scard-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); }
.scard-body { display: flex; flex-direction: column; flex: 1; }
.scard-title { font-size: 18px; margin-bottom: 8px; }
.scard-title a { color: var(--ink); }
.scard-title a:hover { color: var(--brand); }
.scard-text { color: var(--ink-2); font-size: 15px; }
.scard-foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 14px; margin-top: auto; }
.scard-foot .price { font-size: 18px; }
.scard-foot .link-more { margin-left: auto; }
.service-hero { width: 100%; max-height: 380px; object-fit: cover; border-radius: var(--radius); margin-bottom: 26px; }

.layout-aside { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 40px; align-items: start; }
.layout-aside-right { grid-template-columns: minmax(0, 1fr) 340px; }
.aside { position: sticky; top: 150px; display: flex; flex-direction: column; gap: 20px; }
.aside-nav { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: var(--radius); background: var(--bg-alt); }
.aside-title { padding: 8px 12px 4px; font-weight: 700; font-size: 14px; }
.aside-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 500; font-size: 15px; }
.aside-link .icon { color: var(--brand); }
.aside-link:hover { background: #fff; color: var(--brand); }
.aside-link.is-active { background: #fff; color: var(--brand); font-weight: 700; box-shadow: var(--shadow); }
.aside-nav-small .aside-link { font-size: 14px; padding: 8px 12px; }

/* --- О компании ---------------------------------------------------------------------------- */
.about-home { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.stats-wide { grid-template-columns: repeat(4, 1fr); margin: 36px 0; }
.stat { padding: 22px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.stat-value { font-size: clamp(28px, 3vw, 40px); font-weight: 800; color: var(--brand); line-height: 1.1; letter-spacing: -.02em; }
.stat-label { color: var(--ink-2); font-size: 14px; margin-top: 6px; }
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.about:not(:has(.about-img)) { grid-template-columns: 1fr; max-width: 900px; }
.about-img { border-radius: var(--radius); }
.partner-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.partner-card { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); color: var(--ink); background: #fff; transition: box-shadow .2s; }
a.partner-card:hover { box-shadow: var(--shadow-hover); color: var(--ink); }
.partner-logo { display: grid; place-items: center; width: 120px; height: 64px; flex-shrink: 0; }
.partner-logo img { max-height: 64px; object-fit: contain; }
.partner-info { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.partner-info strong { font-size: 16px; }
.partner { display: grid; place-items: center; height: 96px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; color: var(--ink-2); }
.partner img { max-height: 60px; object-fit: contain; filter: grayscale(1); opacity: .8; transition: all .2s; }
.partner:hover img { filter: none; opacity: 1; }
.partner-name { font-weight: 800; font-size: 18px; color: var(--ink-2); text-align: center; letter-spacing: -.01em; }
.requisites { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.req { display: grid; grid-template-columns: 240px 1fr; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.req:last-child { border-bottom: 0; }
.req:nth-child(odd) { background: var(--bg-alt); }
.req dt { color: var(--muted); }
.req dd { margin: 0; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; font-weight: 500; }
.copy { flex-shrink: 0; border: 0; background: none; color: var(--brand); font-size: 13px; padding: 2px 4px; opacity: .7; }
.copy:hover { opacity: 1; }
.copy.is-done { color: var(--ok); }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.faq-item summary { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 18px 20px; font-weight: 600; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-caret { color: var(--brand); transition: transform .2s; }
.faq-item[open] .faq-caret { transform: rotate(180deg); }
.faq-answer { padding: 0 20px 18px; }

/* Контакты */
.contacts { display: grid; grid-template-columns: 1fr 1.3fr; gap: 36px; align-items: stretch; }
.contacts-info { display: flex; flex-direction: column; gap: 22px; }
.contact-row { display: flex; gap: 16px; }
.contact-row > .icon { color: var(--brand); margin-top: 2px; }
.contact-row > div { display: flex; flex-direction: column; gap: 2px; }
.contact-big { font-size: 24px; font-weight: 800; color: var(--ink); }
.map { min-height: 380px; border-radius: var(--radius); overflow: hidden; background: var(--bg-alt); }
.map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; }

/* --- Призыв позвонить ------------------------------------------------------------------- */
.cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-top: 48px;
  padding: 32px 36px; border-radius: 20px; color: #fff; background: linear-gradient(120deg, #0b2f66, var(--brand));
}
.cta-title { font-size: clamp(22px, 2.4vw, 28px); margin-bottom: 8px; color: #fff; }
.cta-text { max-width: 620px; }
.cta-text p { margin: 0; opacity: .9; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.callback-band { display: grid; grid-template-columns: 1fr 420px; gap: 40px; align-items: center; padding: 40px; border-radius: 22px; background: var(--brand-soft); }
.callback-band-phone { display: inline-flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 800; color: var(--ink); margin-bottom: 4px; }
.callback-band-text .muted { display: block; }
.callback-band-form { padding: 24px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); min-height: 200px; }

/* --- Формы и окно ------------------------------------------------------------------------- */
.modal { width: min(460px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: 20px; box-shadow: 0 30px 80px rgba(10, 25, 50, .35); color: var(--ink); }
.modal::backdrop { background: rgba(12, 22, 40, .55); backdrop-filter: blur(2px); }
.modal[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-body { padding: 30px 28px 26px; }
.modal-close { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--muted); }
.modal-close:hover { background: var(--bg-alt); color: var(--ink); }
.modal-title { font-size: 24px; margin-bottom: 8px; padding-right: 32px; }
.callback-form { display: flex; flex-direction: column; gap: 14px; }
.callback-form > p { margin: 0; font-size: 15px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 14px; font-weight: 600; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; transition: border-color .15s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); }
.field textarea { resize: vertical; min-height: 80px; }
.has-error input, .has-error textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 13px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand); flex-shrink: 0; }
.form-note { text-align: center; font-size: 14px; color: var(--muted); margin: 0; }
.callback-done { text-align: center; padding: 10px 0; }
.callback-done-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: #e3f6ec; color: var(--ok); margin-bottom: 14px; }
.callback-done .modal-title { padding: 0; }
.spinner { width: 34px; height: 34px; margin: 30px auto; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Swiper: общие стрелки ----------------------------------------------------------------- */
.swiper-nav { display: flex; gap: 8px; }
.swiper-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); transition: all .15s; }
.swiper-btn:hover { border-color: var(--brand); color: var(--brand); }
.swiper-btn.swiper-button-disabled { opacity: .35; pointer-events: none; }
.cards-swiper { overflow: hidden; padding: 4px; margin: -4px; }
.cards-swiper .swiper-slide { height: auto; }

/* --- Подвал -------------------------------------------------------------------------------- */
.footer { margin-top: 40px; background: #0f1b2d; color: #b6c0cf; font-size: 14px; }
.footer a { color: #d6dde8; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr .8fr 1.2fr; gap: 32px; padding-top: 52px; padding-bottom: 36px; }
.footer-logo { width: 170px; background: #fff; padding: 8px 12px; border-radius: 10px; margin-bottom: 16px; }
.footer-title { color: #fff; font-size: 15px; font-weight: 700; line-height: 1.2; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-contacts { display: flex; flex-direction: column; gap: 10px; }
.footer-contacts > * { display: flex; gap: 10px; align-items: flex-start; }
.footer-contacts .icon { color: var(--accent); margin-top: 2px; }
.footer-phone { font-size: 18px; font-weight: 700; color: #fff !important; }
.footer-phone-2 { font-size: 15px; padding-left: 28px; margin-top: -6px; }
.footer-social { display: flex; gap: 8px; }
.footer-social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.08); }
.footer-bottom { padding-top: 18px; padding-bottom: 22px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; color: #7f8ba0; }

.to-top {
  position: fixed; right: 20px; bottom: 24px; z-index: 40; display: grid; place-items: center; width: 46px; height: 46px; border: 0;
  border-radius: 50%; background: var(--brand); color: #fff; box-shadow: var(--shadow-hover); opacity: 0; visibility: hidden; transition: all .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.page-404 { text-align: center; padding: 60px var(--gutter); max-width: 640px; }
.page-404 .btn-row { justify-content: center; }
.e404 { font-size: 120px; font-weight: 900; line-height: 1; color: var(--brand-soft); -webkit-text-stroke: 2px var(--brand); margin-bottom: 10px; }
.search-page { max-width: 640px; margin-bottom: 26px; gap: 10px; }
.search-page input { padding-right: 16px; }

/* ==========================================================================
   Планшеты и телефоны
   ========================================================================== */
@media (max-width: 1180px) {
  .pgrid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-about { grid-column: 1 / -1; }
  .drop-mega { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
  .header-callback { display: none; }
}

@media (max-width: 1024px) {
  .topbar { display: none; }
  .header-main { min-height: 68px; gap: 14px; }
  .logo img { width: 150px; }
  .burger { display: grid; place-items: center; width: 44px; height: 44px; margin-left: -8px; border: 0; background: none; color: var(--ink); }
  .header-call-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand); color: #fff; }
  .header-call-icon:hover { color: #fff; }
  .header-contacts { display: none; }
  .search { order: 3; }
  /* Меню выезжает слева */
  .nav {
    position: fixed; inset: 0 auto 0 0; z-index: 70; width: min(360px, 88vw); border: 0; background: #fff;
    transform: translateX(-100%); transition: transform .25s ease; overflow-y: auto; box-shadow: var(--shadow-hover);
  }
  .nav.is-open { transform: none; }
  .nav-backdrop { position: fixed; inset: 0; z-index: 65; background: rgba(12, 22, 40, .5); opacity: 0; visibility: hidden; transition: opacity .25s; display: block; }
  .nav.is-open + .nav-backdrop { opacity: 1; visibility: visible; }
  .nav-inner { flex-direction: column; padding: 0; }
  .nav-mobile-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .nav-close { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-item { border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; }
  .nav-link { flex: 1; padding: 16px 20px; font-size: 16px; }
  .nav-item.is-active > .nav-link { box-shadow: inset 3px 0 0 var(--brand); }
  .nav-caret { display: none; }
  .nav-toggle { display: grid; place-items: center; width: 56px; border: 0; border-left: 1px solid var(--line); background: none; color: var(--ink-2); }
  .nav-toggle .icon { transition: transform .2s; }
  .nav-item.is-open .nav-toggle .icon { transform: rotate(180deg); }
  .drop, .drop-mega {
    position: static; display: none; width: 100%; min-width: 0; padding: 4px 20px 14px; border: 0; border-radius: 0;
    box-shadow: none; opacity: 1; visibility: visible; transform: none; grid-template-columns: 1fr; gap: 12px; background: var(--bg-alt);
  }
  .has-drop:hover > .drop { display: none; }
  .nav-item.is-open > .drop { display: flex; flex-direction: column; }
  .nav-item.is-open > .drop-mega { display: grid; }
  .drop-link { padding: 8px 0; }
  .nav-mobile-contacts { display: flex; flex-direction: column; gap: 6px; padding: 20px; font-size: 14px; color: var(--ink-2); }
  .nav-mobile-contacts .header-phone { font-size: 22px; }

  .adv-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: minmax(0, 1fr); }
  .svc-grid, .scard-grid, .partner-grid { grid-template-columns: repeat(2, 1fr); }
  .product { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .layout-aside, .layout-aside-right { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .aside { position: static; min-width: 0; }
  .layout-aside:not(.layout-aside-right) .aside-nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .layout-aside:not(.layout-aside-right) .aside-link { white-space: nowrap; }
  .about-home, .about, .contacts { grid-template-columns: minmax(0, 1fr); }
  .stats-wide { grid-template-columns: repeat(2, 1fr); }
  .callback-band { grid-template-columns: minmax(0, 1fr); padding: 28px; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-art { display: none; }
  .hero-slide { min-height: 400px; }
  .buy-box-sticky { position: static; }
}

@media (max-width: 680px) {
  :root { --gutter: 16px; }
  body { font-size: 15px; }
  .search { display: none; }
  .nav-search { display: flex; position: relative; margin: 12px 16px; }
  .nav-search input { width: 100%; height: 46px; padding: 0 46px 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg-alt); }
  .nav-search button { position: absolute; right: 4px; top: 4px; width: 38px; height: 38px; border: 0; background: none; color: var(--ink-2); }
  .header-main { justify-content: space-between; }
  .logo { margin-right: auto; }
  .section { padding: 40px 0; }
  .section-tight { padding: 28px 0; }
  .section-head { flex-wrap: wrap; }
  .pgrid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pcard { padding: 10px; }
  .pcard-title { font-size: 14px; }
  .price { font-size: 17px; }
  .price-lg { font-size: 28px; }
  .pcard-actions .btn-primary { font-size: 13px; padding: 6px 8px; }
  .badge { top: 6px; left: 6px; font-size: 11px; padding: 3px 7px; }
  .adv-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .adv { padding: 14px; }
  .cat { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 14px; align-items: start; }
  .cat-body { min-width: 0; }
  .cat-text { font-size: 13px; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  /* подразделы — одной строкой с прокруткой, чтобы карточки не растягивались на экран */
  .chips, .subcats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .chips::-webkit-scrollbar, .subcats::-webkit-scrollbar { display: none; }
  .chip { white-space: nowrap; flex-shrink: 0; }
  .cat .chips { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 24px; }
  .subcats { margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); padding: 0 var(--gutter); }
  .cat-img { height: 72px; }
  .cat-img img { max-height: 72px; }
  .cat-title { font-size: 17px; }
  .svc-grid, .scard-grid, .partner-grid { grid-template-columns: minmax(0, 1fr); }
  .scard { flex-direction: column; }
  .scard-img { flex: none; }
  .stats { gap: 10px; }
  .stat { padding: 16px; }
  .req { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .spec { flex-direction: column; gap: 2px; }
  .toolbar { gap: 10px 16px; }
  .toolbar-count { width: 100%; }
  .cta { padding: 24px 20px; margin-top: 36px; }
  .cta-actions, .cta-actions .btn { width: 100%; }
  .hero-slide { min-height: 0; }
  .hero-inner { padding-top: 40px; padding-bottom: 56px; }
  .hero-lead { font-size: 16px; }
  .hero .btn-row .btn { flex: 1 1 100%; }
  .callback-band { padding: 20px; }
  .callback-band-form { padding: 18px; }
  .callback-band-phone { font-size: 22px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; padding-top: 36px; }
  .footer-contacts { grid-column: 1 / -1; }
  .gallery-main .swiper-slide { padding: 16px; }
  .gallery-thumbs .swiper-slide { width: 64px; height: 64px; }
  .tab { padding: 12px 14px; }
  .buy-actions .btn { flex: 1 1 100%; }
  .modal { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .modal-body { padding: 26px 18px 22px; }
  .to-top { bottom: 16px; right: 14px; width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
a[href^="tel:"] { white-space: nowrap; }
