/* ==========================================================================
   Регион-Опт · rgn1.ru
   Дизайн в стиле Aspiro MAX: синий акцент #365edc, Montserrat, светлый фон,
   белые карточки с тонкой рамкой, крупная шапка с поиском и каталогом.
   ========================================================================== */
@font-face {
  font-family: 'Montserrat';
  src: url('/static/fonts/montserrat-regular.woff2') format('woff2'),
       url('/static/fonts/montserrat-regular.woff') format('woff');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/static/fonts/montserrat-500.woff2') format('woff2'),
       url('/static/fonts/montserrat-500.woff') format('woff');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/static/fonts/montserrat-600.woff2') format('woff2'),
       url('/static/fonts/montserrat-600.woff') format('woff');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/static/fonts/montserrat-700.woff2') format('woff2'),
       url('/static/fonts/montserrat-700.woff') format('woff');
  font-weight: 700;
  font-display: swap;
}

:root {
  --blue: #365edc;
  --blue-dark: #244ed5;
  --blue-hover: #5073e1;
  --blue-light: #eef2ff;
  --blue-soft: #f4f6ff;
  --ink: #1d2029;
  --text: #333333;
  --muted: #777777;
  --muted-2: #999999;
  --line: #e7e7e7;
  --line-soft: #f0f0f0;
  --bg: #f5f5f5;
  --white: #ffffff;
  --green: #1f9d55;
  --red: #e62222;
  --orange: #f59e0b;
  --radius: 5px;
  --radius-lg: 8px;
  --shadow: 0 10px 30px rgba(29, 32, 41, .08);
  --shadow-sm: 0 4px 14px rgba(29, 32, 41, .06);
  --font: 'Montserrat', 'Ubuntu', 'Segoe UI', Arial, sans-serif;
  --container: 1348px;
  --accent: var(--blue);
  --navy: var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; transition: color .15s; }
a:hover { color: var(--blue-dark); }
h1, h2, h3, h4 { font-family: var(--font); color: var(--ink); margin: 0 0 12px; font-weight: 700; line-height: 1.22; }
h1 { font-size: 30px; }
h2 { font-size: 27px; }
h3 { font-size: 18px; }
h4 { font-size: 14px; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; }
button, input, select, textarea { font-family: inherit; font-size: 14px; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 30px; width: 100%; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 16px; }
.spacer { flex: 1; }
.hidden { display: none !important; }

/* ------------------------------- шапка ---------------------------------- */
.topline { background: #f5f5f5; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.topline-inner { display: flex; align-items: center; justify-content: space-between; height: 38px; gap: 16px; }
.topline-left, .topline-right { display: flex; align-items: center; gap: 18px; min-width: 0; }
.topline-city { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topline-hours { color: var(--muted-2); white-space: nowrap; }
.topline-right a { color: var(--text); font-weight: 500; }
.topline-right a:hover { color: var(--blue); }
.topline-login { color: var(--blue) !important; }

.site-header { background: var(--white); position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 0 rgba(0,0,0,.04); transition: box-shadow .2s; }
.site-header.is-scrolled { box-shadow: 0 6px 22px rgba(29,32,41,.09); }
.header-main { display: flex; align-items: center; gap: 26px; height: 84px; }
.logo { display: flex; align-items: center; gap: 11px; flex-shrink: 0; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo-mark {
  width: 42px; height: 42px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue), #244ed5); color: #fff; flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-text b { font-size: 19px; letter-spacing: .04em; font-weight: 700; }
.logo-text i { font-style: normal; font-size: 8.5px; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }

.header-search { flex: 1; max-width: 560px; display: flex; height: 44px; position: relative; }
.header-search input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-right: 0; border-radius: var(--radius) 0 0 var(--radius);
  background: #f7f7f7; padding: 0 16px; outline: none; color: var(--ink);
}
.header-search input:focus { border-color: var(--blue); background: #fff; }
.header-search button {
  width: 50px; border: 0; border-radius: 0 var(--radius) var(--radius) 0; background: var(--blue); color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.header-search button:hover { background: var(--blue-dark); }

.header-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.h-action { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text); position: relative; }
.h-action:hover { color: var(--blue); }
.h-ico { position: relative; display: inline-flex; }
.h-badge {
  position: absolute; top: -7px; right: -9px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--blue); color: #fff; font-size: 10px; font-style: normal; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.h-label { font-size: 10px; color: var(--muted); white-space: nowrap; }
.header-phone { padding-left: 22px; border-left: 1px solid var(--line); text-align: right; flex-shrink: 0; }
.header-phone > span { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.header-phone > a { display: block; font-size: 17px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.header-phone > a:hover { color: var(--blue); }
.phone-link { border: 0; background: none; padding: 0; color: var(--blue); font-size: 11px; cursor: pointer; border-bottom: 1px dashed rgba(54,94,220,.5); }

.header-nav { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.nav-inner { display: flex; align-items: center; gap: 26px; height: 52px; }
.catalog-btn {
  height: 38px; padding: 0 20px; border-radius: var(--radius); background: var(--blue); color: #fff !important;
  display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 13px; text-transform: uppercase;
  letter-spacing: .04em; flex-shrink: 0;
}
.catalog-btn:hover { background: var(--blue-dark); }
.main-nav { display: flex; align-items: center; gap: 24px; flex: 1; }
.main-nav a { color: var(--text); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.main-nav a:hover { color: var(--blue); }
.nav-cta {
  margin-left: auto; height: 36px; padding: 0 16px; border: 1px solid var(--blue); border-radius: var(--radius);
  color: var(--blue); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; white-space: nowrap;
}
.nav-cta:hover { background: var(--blue); color: #fff; }

/* ------------------------------ кнопки ---------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 18px;
  border: 1px solid transparent; border-radius: 4px; font-family: var(--font); font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
  text-align: center; line-height: 1;
}
.btn-primary, .btn-accent, .btn-navy { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover, .btn-accent:hover, .btn-navy:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn-outline { background: #fff; border-color: #d5d5d5; color: var(--text); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-light { background: #fff; border-color: #fff; color: var(--blue); }
.btn-light:hover { background: #f4f6ff; color: var(--blue-dark); }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,.65); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--blue); padding: 0 8px; }
.btn-ghost:hover { color: var(--blue-dark); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #c81c1c; color: #fff; }
.btn-sm { height: 32px; padding: 0 13px; font-size: 12px; }
.btn-xs { height: 25px; padding: 0 9px; font-size: 11px; border-radius: 3px; }
.btn-lg { height: 48px; padding: 0 26px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-icon { width: 40px; padding: 0; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* -------------------------------- hero ---------------------------------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(118deg, #365edc 0%, #2a52da 48%, #1c3fbf 100%);
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  background: rgba(255,255,255,.07);
}
.hero::before { width: 520px; height: 520px; right: -120px; top: -180px; }
.hero::after { width: 320px; height: 320px; left: -140px; bottom: -190px; background: rgba(255,255,255,.05); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: 46px; align-items: center; padding: 54px 0 58px; }
.hero-copy { max-width: 620px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .12em; color: rgba(255,255,255,.72); margin-bottom: 16px;
}
.hero-eyebrow::before { content: ""; width: 26px; height: 1px; background: rgba(255,255,255,.55); }
.hero h1 { color: #fff; font-size: 41px; line-height: 1.12; letter-spacing: -.01em; margin-bottom: 18px; }
.hero-lead { color: rgba(255,255,255,.82); font-size: 14.5px; line-height: 1.7; max-width: 540px; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 34px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, max-content); gap: 30px; }
.hero-stats > div { display: flex; flex-direction: column; }
.hero-stats b { font-size: 25px; line-height: 1.1; color: #fff; }
.hero-stats span { font-size: 10.5px; color: rgba(255,255,255,.66); margin-top: 4px; text-transform: uppercase; letter-spacing: .05em; }
.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-card {
  position: relative; width: 330px; background: #fff; border-radius: 10px; padding: 18px;
  color: var(--ink); box-shadow: 0 26px 60px rgba(11, 24, 70, .35); transform: rotate(-2deg);
}
.hero-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.hero-card-brand { font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.hero-card img { width: 100%; height: 240px; object-fit: contain; background: #fff; border-radius: 6px; }
.hero-card-name { font-size: 13px; font-weight: 600; line-height: 1.35; margin: 12px 0 8px; min-height: 36px; }
.hero-card-bottom { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 11px; }
.hero-card-bottom span { font-size: 17px; font-weight: 700; color: var(--ink); }
.hero-card-bottom a { font-size: 12px; font-weight: 600; }
.hero-badge-float {
  position: absolute; right: -26px; top: 34px; background: #fff; color: var(--ink); border-radius: 8px;
  padding: 12px 16px; box-shadow: 0 12px 30px rgba(11, 24, 70, .25); text-align: center;
}
.hero-badge-float b { display: block; font-size: 20px; color: var(--blue); line-height: 1; }
.hero-badge-float span { font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* ------------------------------ секции ---------------------------------- */
.section { padding: 54px 0; }
.section-gray { background: #f5f5f5; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-head h1, .section-head h2 { margin-bottom: 6px; }
.section-head p { margin: 0; color: var(--muted); font-size: 13px; max-width: 680px; }
.section-link { font-size: 12.5px; font-weight: 600; color: var(--blue); white-space: nowrap; }
.section-link span { display: inline-block; margin-left: 5px; transition: transform .15s; }
.section-link:hover span { transform: translateX(4px); }

.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cat-card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; color: var(--ink); display: flex; flex-direction: column; gap: 7px;
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.cat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #dcdcdc; color: var(--ink); }
.cat-ico {
  width: 50px; height: 50px; border-radius: 50%; background: var(--blue-light); color: var(--blue);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 7px;
}
.cat-card b { font-size: 14px; font-weight: 600; line-height: 1.35; padding-right: 18px; }
.cat-count { font-size: 11.5px; color: var(--muted); }
.cat-arrow { position: absolute; right: 18px; bottom: 20px; color: var(--muted-2); font-size: 15px; transition: .18s; }
.cat-card:hover .cat-arrow { color: var(--blue); transform: translateX(3px); }

.advantages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.adv { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px; }
.adv-ico { width: 46px; height: 46px; border-radius: 50%; background: var(--blue-light); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.adv b { display: block; font-size: 14px; margin-bottom: 6px; }
.adv p { color: var(--muted); font-size: 12.5px; line-height: 1.6; margin: 0; }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel h3 { font-size: 17px; margin-bottom: 12px; }
.panel p { font-size: 13px; line-height: 1.65; }
.panel-num { font-size: 11px; font-weight: 700; color: var(--blue); letter-spacing: .12em; display: block; margin-bottom: 8px; }
.steps { padding-left: 18px; font-size: 12.5px; color: var(--muted); line-height: 1.75; margin-bottom: 16px; }

.cta-band { background: linear-gradient(118deg, #365edc, #1c3fbf); color: #fff; padding: 42px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.cta-inner h2 { color: #fff; font-size: 25px; margin-bottom: 6px; }
.cta-inner p { color: rgba(255,255,255,.78); margin: 0; font-size: 13px; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* --------------------------- карточка товара ---------------------------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: flex;
  flex-direction: column; position: relative; transition: box-shadow .18s, transform .18s, border-color .18s;
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #dcdcdc; }
.pc-badges { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; gap: 5px; }
.badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 3px;
  background: #f0f0f0; color: var(--muted); font-size: 10px; font-weight: 600; white-space: nowrap;
}
.badge-ok, .badge-stock { background: #e8f7ee; color: #157a41; }
.badge-hit { background: var(--blue); color: #fff; }
.badge-accent { background: var(--blue-light); color: var(--blue); }
.badge-err { background: #fdecec; color: #b42318; }
.badge-warn { background: #fff5e6; color: #b45309; }
.pc-photo { position: relative; display: block; padding: 18px 18px 6px; }
.pc-photo img {
  width: 100%; height: 190px; object-fit: contain; transition: transform .25s;
}
.product-card:hover .pc-photo img { transform: scale(1.04); }
.pc-quick {
  position: absolute; left: 18px; right: 18px; bottom: 10px; height: 32px; border-radius: 4px;
  background: rgba(29,32,41,.78); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; opacity: 0; transition: opacity .18s;
}
.product-card:hover .pc-quick { opacity: 1; }
.pc-body { padding: 8px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.pc-brand { font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 5px; }
.pc-name {
  font-size: 13px; font-weight: 500; color: var(--ink); line-height: 1.38; min-height: 36px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 7px;
}
.pc-name:hover { color: var(--blue); }
.pc-feats { font-size: 11px; color: var(--muted); line-height: 1.45; min-height: 30px; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-feats span + span::before { content: " · "; }
.pc-stock { font-size: 10.5px; margin-bottom: 9px; }
.stock-in { color: var(--green); }
.stock-out { color: var(--muted); }
.pc-price { margin-top: auto; padding-top: 4px; }
.pc-gross { font-size: 19px; font-weight: 700; color: var(--ink); line-height: 1.1; }
.pc-gross small { font-size: 12px; font-weight: 500; color: var(--muted); }
.pc-request { font-size: 14px; color: var(--blue); }
.pc-net { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.pc-actions { display: flex; gap: 7px; margin-top: 11px; }
.pc-actions .btn { flex: 1; }
.pc-cmp {
  width: 36px; height: 34px; flex-shrink: 0; border: 1px solid #d5d5d5; border-radius: 4px; background: #fff;
  color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.pc-cmp:hover, .pc-cmp.is-on { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }

/* ------------------------------ каталог --------------------------------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 20px 0 0; font-size: 11.5px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--blue); }
.crumbs span { color: var(--muted-2); }
.catalog-layout { display: grid; grid-template-columns: 258px 1fr; gap: 28px; padding: 22px 0 54px; align-items: start; }
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 20px; position: sticky; top: 150px; }
.filters h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink); margin: 18px 0 9px; }
.filters h4:first-child { margin-top: 0; }
.filter-list { display: flex; flex-direction: column; gap: 1px; }
.filter-list label { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 5px 0; cursor: pointer; color: var(--text); }
.filter-list label:hover { color: var(--blue); }
.filter-block { border-top: 1px solid var(--line-soft); padding-top: 8px; margin-top: 8px; }
.filter-subtitle { font-size: 11px; font-weight: 600; color: var(--muted); margin: 2px 0 4px; }
.filter-block label { display: flex; align-items: flex-start; gap: 7px; font-size: 11.5px; line-height: 1.35; padding: 3px 0; cursor: pointer; color: var(--text); }
.filter-block label:hover { color: var(--blue); }
.filter-block label input[type="checkbox"] { width: 13px; height: 13px; margin: 1px 0 0; accent-color: var(--blue); flex-shrink: 0; }
.filter-block label .cnt { margin-left: auto; color: var(--muted-2); font-size: 10px; padding-left: 4px; }
.filter-sections { max-height: 340px; overflow: auto; padding-right: 2px; }
.filter-hint { font-size: 11.5px; line-height: 1.55; color: var(--muted); background: var(--blue-soft); border-left: 2px solid var(--blue); padding: 9px 10px; margin: 12px 0; }
.filter-list input[type="checkbox"] { accent-color: var(--blue); width: 14px; height: 14px; margin: 0; }
.filter-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; color: var(--text); font-size: 12.5px; }
.filter-item:hover { color: var(--blue); }
.filter-item .cnt { font-size: 10.5px; color: var(--muted-2); }
.filters select, .filters input[type="number"] { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 3px; padding: 0 8px; background: #fff; color: var(--text); }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.checkbox { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text); }
.checkbox input { accent-color: var(--blue); }
.catalog-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.catalog-title { margin: 0 0 4px; font-size: 26px; }
.result-count { font-size: 12px; color: var(--muted); }
.sort-select { height: 34px; border: 1px solid var(--line); border-radius: 4px; background: #fff; padding: 0 9px; color: var(--text); font-size: 12px; }
.catalog-layout .cards { grid-template-columns: repeat(3, 1fr); }
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 32px; }
.pagination a, .pagination span {
  min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; background: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: var(--text);
}
.pagination a:hover { border-color: var(--blue); color: var(--blue); }
.pagination .active { background: var(--blue); border-color: var(--blue); color: #fff; }
.empty { background: #fff; border: 1px dashed #d5d5d5; border-radius: var(--radius); padding: 44px 20px; text-align: center; }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--muted); font-size: 13px; }

/* --------------------------- карточка товара ---------------------------- */
.product-layout { display: grid; grid-template-columns: 1fr 1.08fr; gap: 38px; padding: 22px 0 10px; align-items: start; }
.product-gallery { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: 150px; }
.main-img { display: flex; align-items: center; justify-content: center; min-height: 360px; }
.main-img img { max-height: 430px; object-fit: contain; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.thumbs img { width: 58px; height: 58px; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.thumbs img:hover { border-color: var(--blue); }
.product-info h1 { font-size: 25px; line-height: 1.3; margin: 4px 0 12px; }
.product-info .brand, .product-info .pc-brand { color: var(--blue); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; }
.product-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 11.5px; color: var(--muted); margin-bottom: 16px; }
.product-meta b { color: var(--text); }
.buy-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 22px; }
.buy-price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.buy-price .price { font-size: 30px; font-weight: 700; color: var(--ink); }
.buy-price .vat { font-size: 11.5px; color: var(--muted); }
.buy-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.buy-actions .btn-primary { flex: 1; min-width: 190px; }
.key-feats { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.key-feats li {
  font-size: 11px; background: var(--blue-soft); border: 1px solid #e3e9ff; color: #2f4fbf;
  padding: 4px 9px; border-radius: 3px;
}
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button {
  border: 0; background: none; padding: 11px 16px; font-size: 12.5px; font-weight: 600; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs button:hover { color: var(--blue); }
.tabs button.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.props { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.props td { padding: 9px 13px; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; vertical-align: top; }
.props tr:last-child td { border-bottom: 0; }
.props td:first-child { width: 42%; color: var(--muted); background: #fafafa; }
.spec-block { white-space: pre-line; font-size: 13px; line-height: 1.7; color: var(--text); }
.doc-list { display: flex; flex-direction: column; gap: 8px; }
.doc-row { display: flex; gap: 11px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 11px 13px; }
.doc-ico { width: 34px; height: 34px; border-radius: 3px; background: var(--blue-light); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; flex-shrink: 0; }

/* ------------------------------- прайс ---------------------------------- */
.price-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.price-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; max-height: 74vh; }
.price-table { width: 100%; border-collapse: collapse; font-size: 11.5px; min-width: 980px; }
.price-table thead th {
  position: sticky; top: 0; z-index: 2; background: var(--blue); color: #fff; font-size: 10.5px; font-weight: 600;
  text-align: left; padding: 10px 10px; border-right: 1px solid rgba(255,255,255,.16); white-space: nowrap;
}
.price-table thead th:last-child { border-right: 0; }
.price-table td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.price-table tbody tr:hover td { background: #fafbff; }
.price-table .price-group td {
  background: var(--blue-light); color: var(--blue-dark); font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; position: sticky; top: 37px; z-index: 1;
}
.price-table .muted { color: var(--muted-2); }
.tech-table { min-width: 1380px; }
.feat-cell { min-width: 250px; }
.feat { display: inline-block; font-size: 10.5px; background: var(--blue-soft); color: #2f4fbf; border-radius: 3px; padding: 2px 6px; margin: 1px 2px 1px 0; white-space: nowrap; }

/* ----------------------------- сравнение -------------------------------- */
.compare-scroll { overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.compare-table { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 12px; }
.compare-table th, .compare-table td { border: 1px solid var(--line); padding: 10px; vertical-align: top; }
.compare-table th { background: #fafafa; font-weight: 600; }
.compare-table .cmp-name { font-size: 12.5px; font-weight: 600; }
.compare-table .cmp-price { font-size: 16px; font-weight: 700; }

/* ------------------------------- формы ---------------------------------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
.field input, .field select, .field textarea, .form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; border: 1px solid #d5d5d5; border-radius: 4px; background: #fff; padding: 9px 11px;
  outline: none; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus,
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(54,94,220,.1);
}
.field textarea, .form-grid textarea { min-height: 90px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.chk { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.chk input { accent-color: var(--blue); }
.attrs-editor { display: flex; flex-direction: column; gap: 7px; }
.attr-row { display: grid; grid-template-columns: 1fr 1fr auto auto auto; gap: 7px; align-items: center; }
.attr-row input[type="text"] { height: 34px; border: 1px solid #d5d5d5; border-radius: 3px; padding: 0 9px; width: 100%; }
.attr-row .del { width: 28px; height: 28px; border: 1px solid var(--line); background: #fff; color: var(--red); border-radius: 3px; cursor: pointer; }
.alert { border-radius: 4px; padding: 11px 14px; font-size: 12.5px; margin-bottom: 14px; border: 1px solid transparent; }
.alert-info { background: var(--blue-light); border-color: #dbe4ff; color: #24428f; }
.alert-warn { background: #fff7e8; border-color: #f5e1b8; color: #8a5b00; }
.alert-err { background: #fdecec; border-color: #f5c2c0; color: #b42318; }
.flash-wrap { padding-top: 14px; }
.flash { border-radius: 4px; padding: 10px 14px; font-size: 12.5px; }
.flash-ok { background: #e8f7ee; color: #157a41; border: 1px solid #c7ecd6; }
.flash-err { background: #fdecec; color: #b42318; border: 1px solid #f5c2c0; }

/* ------------------------------- подвал --------------------------------- */
.site-footer { background: #1d2029; color: rgba(255,255,255,.72); padding: 42px 0 0; margin-top: 10px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.1fr; gap: 34px; padding-bottom: 30px; }
.site-footer h4 { color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 13px; }
.site-footer a { display: block; color: rgba(255,255,255,.7); font-size: 12.5px; margin-bottom: 8px; }
.site-footer a:hover { color: #fff; }
.site-footer p { font-size: 12px; line-height: 1.6; margin: 0 0 8px; }
.footer-logo { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 700; letter-spacing: .05em; font-size: 16px; margin-bottom: 12px; }
.footer-logo .logo-mark { width: 34px; height: 34px; }
.footer-phone { font-size: 16px !important; font-weight: 700; color: #fff !important; }
.footer-addr { color: rgba(255,255,255,.55); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding: 16px 30px; display: flex; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; font-size: 10.5px; color: rgba(255,255,255,.42);
}
.to-top {
  position: fixed; right: 22px; bottom: 22px; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--text); cursor: pointer;
  display: none; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); z-index: 90;
}
.to-top.show { display: flex; }

/* --------------------------- сетки/утилиты ------------------------------ */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 16px; }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 12px; }
table.table th { background: #fafafa; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); text-align: left; padding: 9px 11px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.table td { padding: 9px 11px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.table tr:last-child td { border-bottom: 0; }
table.table tbody tr:hover td { background: #fafbff; }
.cart-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cart-table th { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10.5px; text-transform: uppercase; }
.cart-table td { padding: 8px; border-bottom: 1px solid var(--line-soft); }
.cart-name { font-weight: 500; }
.cart-art { font-size: 10.5px; color: var(--muted); }
.totals-box { background: #fafafa; border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; }
.totals-row { display: flex; justify-content: space-between; gap: 18px; font-size: 12.5px; padding: 4px 0; }
.totals-row.total { border-top: 1px solid var(--line); margin-top: 7px; padding-top: 9px; font-size: 15px; font-weight: 700; }
.hint-box { background: #fafafa; border-left: 2px solid var(--blue); padding: 9px 12px; font-size: 11.5px; color: var(--muted); }
.search-results { position: absolute; z-index: 50; left: 0; right: 0; top: 46px; background: #fff; border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow); max-height: 420px; overflow: auto; display: none; }
.search-results.open { display: block; }
.sr-item { display: flex; gap: 10px; padding: 9px 11px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.sr-item:hover { background: #fafbff; }
.sr-item img { width: 38px; height: 38px; object-fit: contain; }
.sr-item .nm { font-size: 12px; font-weight: 500; }
.sr-item .mt-info { font-size: 10.5px; color: var(--muted); }

/* ------------------------------- кабинет -------------------------------- */
.admin-body { background: #f5f5f5; }
.admin-shell { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }
.admin-side { background: #1d2029; color: rgba(255,255,255,.7); padding: 20px 0; position: sticky; top: 0; height: 100vh; overflow: auto; }
.admin-brand { padding: 0 20px 20px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 14px; }
.admin-brand b { display: block; color: #fff; font-size: 15px; letter-spacing: .04em; }
.admin-brand span { font-size: 9px; text-transform: uppercase; letter-spacing: .09em; color: rgba(255,255,255,.42); }
.admin-nav { display: flex; flex-direction: column; padding: 0 10px; }
.admin-nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; color: rgba(255,255,255,.68);
  font-size: 12px; padding: 8px 11px; border-radius: 4px; margin-bottom: 1px;
}
.admin-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-nav a.active { background: var(--blue); color: #fff; }
.nav-sep { font-size: 9px; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.35); padding: 15px 11px 6px; }
.nav-badge { background: #fff; color: var(--blue); border-radius: 8px; min-width: 17px; height: 17px; padding: 0 4px; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.admin-main { padding: 22px 28px 40px; min-width: 0; }
.admin-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.admin-top h1 { font-size: 23px; margin: 0; }
.admin-user { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 8px 11px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--blue-light); color: var(--blue); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.admin-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.admin-panel { background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 16px 18px; }
.stat b { display: block; font-size: 24px; line-height: 1.1; color: var(--ink); }
.stat span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.name-cell { display: flex; align-items: center; gap: 9px; }
.name-cell img { width: 34px; height: 34px; object-fit: contain; background: #fafafa; border-radius: 3px; }
.builder { display: grid; grid-template-columns: 360px 1fr; gap: 18px; align-items: start; }
.builder-search { position: relative; }
.builder-search input { width: 100%; height: 40px; border: 1px solid #d5d5d5; border-radius: 4px; padding: 0 11px; }
.builder-cart { background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 14px; }
.price-input { width: 92px; height: 30px; border: 1px solid #d5d5d5; border-radius: 3px; padding: 0 7px; text-align: right; }

/* ------------------------------ адаптив --------------------------------- */
@media (max-width: 1200px) {
  .cards, .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 34px; }
  .catalog-layout { grid-template-columns: 230px 1fr; }
  .catalog-layout .cards { grid-template-columns: repeat(2, 1fr); }
  .admin-cards, .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-grid > div:last-child { grid-column: 1 / -1; }
}
@media (max-width: 992px) {
  .header-main { height: auto; padding: 14px 0; flex-wrap: wrap; gap: 12px; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
  .header-phone { margin-left: auto; }
  .nav-inner { height: auto; padding: 8px 0; flex-wrap: wrap; gap: 10px; }
  .main-nav { order: 3; flex-basis: 100%; gap: 16px; overflow-x: auto; padding-bottom: 2px; }
  .nav-cta { margin-left: 0; }
  .hero-grid { grid-template-columns: 1fr; padding: 40px 0 46px; }
  .hero-visual { display: none; }
  .hero h1 { font-size: 32px; }
  .advantages { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: 1fr; }
  .catalog-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .product-layout { grid-template-columns: 1fr; }
  .product-gallery { position: static; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .nav-sep { display: none; }
  .builder { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .container { padding: 0 18px; }
  .topline-hours { display: none; }
  .topline-left { flex: 1; overflow: hidden; }
  .topline-right { gap: 10px; }
  .topline-right a:not(.topline-login) { display: none; }
  .header-actions { gap: 12px; }
  .h-label { display: none; }
  .header-phone { border-left: 0; padding-left: 0; }
  .header-phone > span, .phone-link { display: none; }
  .hero h1 { font-size: 27px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .section { padding: 38px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .cards, .cat-grid, .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .catalog-layout .cards { grid-template-columns: repeat(2, 1fr); }
  .advantages { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-cards, .stat-grid { grid-template-columns: 1fr; }
  .form-grid, .field-row { grid-template-columns: 1fr; }
  .attr-row { grid-template-columns: 1fr 1fr; }
  .admin-main { padding: 16px 14px 30px; }
  .admin-top { flex-direction: column; }
  .price-table { min-width: 820px; }
}
@media (max-width: 520px) {
  .cards, .cat-grid, .grid-2, .grid-3, .grid-4, .catalog-layout .cards { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .pc-photo img { height: 220px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ------------------------------- печать --------------------------------- */
@media print {
  .topline, .site-header, .site-footer, .filters, .catalog-top, .pagination, .no-print, .to-top { display: none !important; }
  body { background: #fff; }
  .container { max-width: none; padding: 0; }
  .price-wrap { max-height: none; border: 0; }
  .price-table thead th { background: #eee !important; color: #000 !important; }
}

/* -------- живой поиск и фильтры -------- */
.is-loading { opacity: .5; transition: opacity .15s; pointer-events: none; }
.catalog-layout.is-live .live-hide { display: none; }
.live-status { min-height: 18px; margin-bottom: 6px; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60; background: #fff;
  border: 1px solid var(--line, #dfe4ee); border-radius: 12px; box-shadow: 0 14px 40px rgba(20, 40, 80, .18);
  max-height: 70vh; overflow: auto; }
.suggest[hidden] { display: none; }
.sg-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; color: inherit; text-decoration: none;
  border-bottom: 1px solid var(--line-soft, #eef1f7); }
.sg-item:hover, .sg-item.is-active { background: #f3f6fd; }
.sg-item img { width: 44px; height: 44px; object-fit: contain; flex: none; background: #fff; border-radius: 6px; }
.sg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sg-name { font-size: 14px; font-weight: 600; line-height: 1.25; overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sg-meta { font-size: 12px; color: #63708a; }
.sg-in { color: #0f7b4f; font-weight: 600; }
.sg-price { font-weight: 700; font-size: 14px; white-space: nowrap; }
.sg-all { display: block; padding: 11px 14px; text-align: center; font-weight: 600; font-size: 13.5px; color: var(--blue, #1f5bd6); text-decoration: none; }
.sg-all:hover { background: #f3f6fd; }
.sg-empty { padding: 14px; font-size: 13.5px; color: #63708a; }
@media (max-width: 640px) { .sg-item img { width: 36px; height: 36px; } .sg-price { font-size: 13px; } }

/* -------- сотрудники и права, публикация в общий прайс -------- */
.preset-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 4px 0 10px; }
.rights-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-bottom: 14px; }
.right-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line, #dfe4ee);
  border-radius: 10px; background: #fff; cursor: pointer; }
.right-item:hover { border-color: var(--blue, #1f5bd6); }
.right-item input { margin-top: 3px; flex: none; }
.right-item span { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.right-item small { color: #63708a; font-size: 12px; line-height: 1.35; }
.pub-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px;
  background: #f3f6fd; border: 1px solid var(--line, #dfe4ee); border-radius: 10px; position: sticky; top: 8px; z-index: 20; }
.pub-bar.is-active { background: #e8f0ff; border-color: var(--blue, #1f5bd6); }
.sel-col { width: 34px; text-align: center; }
.is-hidden-row td { background: #fffaf0; }

/* -------- роли и заявки на регистрацию -------- */
.roles-help { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; margin-bottom: 10px; }
.roles-help > div { background: #fff; border: 1px solid var(--line, #dfe4ee); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.roles-help span { font-size: 12.5px; color: #63708a; line-height: 1.35; }
.role-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 10px; }
.pending-panel { border-color: #e0a100; background: #fffaf0; }
[hidden] { display: none !important; }

/* кнопка «Регистрация» рядом со входом */
.topline-right a.topline-reg { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px;
  background: var(--blue); color: #fff !important; font-weight: 600; white-space: nowrap; }
.topline-right a.topline-reg:hover { background: var(--blue-dark, #1747a8); color: #fff; }
.header-reg { white-space: nowrap; }
@media (max-width: 992px) { .header-reg { display: none; } }
