/* Заготовка сайта автоимпорта. Цвета — в переменных ниже. */
:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --text: #182031;
  --muted: #667085;
  --line: #e3e7ee;
  --primary: #1f5ad6;
  --primary-h: #1749b3;
  --primary-soft: #eaf0fd;
  --accent: #0e7a4d;
  --danger: #b42318;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-h: 0 8px 24px rgba(16, 24, 40, .10);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-h); }
img { max-width: 100%; display: block; }
h1 { font-size: 28px; line-height: 1.2; margin: 8px 0 12px; letter-spacing: -.01em; }
h2 { font-size: 21px; line-height: 1.25; margin: 0 0 14px; }
h3 { font-size: 16px; margin: 20px 0 8px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.lead { font-size: 16px; margin-top: -4px; }
main { min-height: 60vh; padding-bottom: 40px; }

/* Кнопки и поля */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 9px 18px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 600 15px/1.2 var(--font); cursor: pointer;
  transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn:hover { border-color: #c9d0dc; color: var(--text); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-h); border-color: var(--primary-h); color: #fff; }
.btn-ghost { background: transparent; }
.fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fld > span { font-size: 13px; color: var(--muted); }
.fld input, .fld select, .fld textarea, .sort select {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text);
  font: 15px/1.3 var(--font); appearance: none; -webkit-appearance: none; }
.fld select, .sort select { padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23667085' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.fld select:disabled { background-color: #f6f7f9; color: #a0a7b4; }
.fld input:focus, .fld select:focus, .fld textarea:focus, .sort select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.fld textarea { resize: vertical; }
.fld-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.err { color: var(--danger); font-size: 13px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.notice { background: #fff8e6; border: 1px solid #f3dfa8; border-radius: var(--radius); padding: 16px; margin: 0 0 16px; }
.notice .btn { margin-top: 10px; }

/* Демо-полоса */
.demo-bar { background: #10203f; color: #e7edf9; font-size: 14px; text-align: center; padding: 9px 16px; }
.demo-bar a { color: #9cc0ff; font-weight: 600; }
.demo-bar b { color: #fff; }

/* Шапка */
.hdr { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.hdr-in { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.logo:hover { color: var(--text); }
.logo-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--primary); color: #fff; display: grid; place-items: center; flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.logo-text b { font-size: 17px; }
.logo-text small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: var(--text); padding: 8px 10px; border-radius: 8px; font-weight: 500; font-size: 14.5px; }
.nav a:hover, .nav a.on { background: var(--primary-soft); color: var(--primary); }
.nav .nav-phone { font-weight: 700; margin-left: 6px; }
.nav-t, .nav-btn { display: none; }

/* Хлебные крошки */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); padding: 14px 0 0; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs .cur { color: var(--text); }

/* Главная */
.hero { background: linear-gradient(160deg, #eef3fd 0%, #f7f9fd 60%, var(--bg) 100%); border-bottom: 1px solid var(--line); padding: 36px 0 40px; }
.hero h1 { font-size: 34px; max-width: 820px; }
.hero-sub { color: var(--muted); font-size: 16px; max-width: 760px; margin: 0 0 22px; }
.search { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--shadow-h); }
.search-tabs { display: flex; gap: 6px; overflow-x: auto; position: relative; padding-bottom: 12px; scrollbar-width: none; }
.search-tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; flex: none; }
.tab input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.tab span { display: block; padding: 7px 14px; border-radius: 999px; background: #f2f4f8; font-weight: 600; font-size: 14px; white-space: nowrap; cursor: pointer; }
.tab input:checked + span { background: var(--primary); color: #fff; }
.tab input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.search-row { display: grid; grid-template-columns: 1.3fr 1.3fr 1fr 1fr auto; gap: 10px; align-items: end; }
.block { padding-top: 34px; }
.bases { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.base-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s; }
.base-card:hover { color: var(--text); box-shadow: var(--shadow-h); transform: translateY(-1px); }
.base-card b { font-size: 16px; }
.base-card .muted { font-size: 13.5px; }
.base-flag { width: 34px; height: 24px; border-radius: 4px; border: 1px solid var(--line); background: #fff; position: relative; overflow: hidden; }
.base-jp::after { content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #c8102e; left: 10px; top: 5px; }
.base-kr::after { content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(#cd2e3a 50%, #0047a0 50%); left: 10px; top: 5px; }
.base-cn { background: #de2910; border-color: #de2910; }
.base-cn::after { content: "★"; position: absolute; color: #ffde00; font-size: 11px; left: 4px; top: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; color: var(--text); font-weight: 500; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip i { font-style: normal; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.chips-sm .chip { padding: 5px 11px; font-size: 14px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: s; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 6px; counter-increment: s; }
.steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; display: grid; place-items: center; }
.steps span { color: var(--muted); font-size: 14px; }
.cta { display: flex; gap: 24px; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
.cta p { color: var(--muted); margin: 0; max-width: 640px; }
.cta-act { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

/* Каталог */
.cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.cat-head h1 { margin-bottom: 8px; }
.chips-scroll { margin-bottom: 16px; }
.cat { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }
.cat-f { position: sticky; top: 80px; }
.flt { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.flt summary { list-style: none; display: none; }
.flt summary::-webkit-details-marker { display: none; }
.flt form { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.flt-act { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 4px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sort { display: flex; align-items: center; gap: 8px; }
.sort span { color: var(--muted); font-size: 14px; }
.sort select { width: auto; min-height: 38px; padding-top: 7px; padding-bottom: 7px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text);
  box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s; }
.card:hover { color: var(--text); box-shadow: var(--shadow-h); transform: translateY(-1px); }
.card-img { position: relative; aspect-ratio: 4 / 3; background: #e9edf3; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-cnt { position: absolute; right: 8px; bottom: 8px; background: rgba(16, 24, 40, .65); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.badge { position: absolute; left: 8px; top: 8px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #fff; color: var(--text); }
.badge-sold { background: var(--accent); color: #fff; }
.badge-unsold { background: #667085; color: #fff; }
.badge-negotiation { background: #b54708; color: #fff; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-title { font-weight: 700; font-size: 16px; line-height: 1.3; }
.card-title span { color: var(--muted); font-weight: 500; }
.card-grade { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-specs { font-size: 13.5px; }
.card-auc { font-size: 13px; color: var(--muted); }
.card-auc b { color: var(--text); font-weight: 600; }
.card-price { margin-top: auto; padding-top: 8px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.card-price b { font-size: 18px; }
.card-price span { font-size: 13px; color: var(--muted); }
.noimg { display: block; width: 100%; height: 100%; min-height: 120px; background: #e9edf3 url("noimg.svg") center / 64px no-repeat; }
.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 24px 0 8px; }
.pager a, .pager b, .pager span { min-width: 40px; height: 40px; padding: 0 10px; display: grid; place-items: center; border-radius: 10px; font-weight: 600; }
.pager a { background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager b { background: var(--primary); color: #fff; }
.pager span { color: var(--muted); }

/* Карточка лота */
.lot-head { margin: 6px 0 16px; }
.lot-head h1 { margin-bottom: 4px; }
.lot-top { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.gal { min-width: 0; }
.gal-main { position: relative; border-radius: var(--radius); overflow: hidden; background: #e9edf3; }
.gal-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.gal-track::-webkit-scrollbar { display: none; }
.gal-item { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 4 / 3; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9);
  font-size: 26px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); color: var(--text); }
.gal-prev { left: 10px; }
.gal-next { right: 10px; }
.gal-cnt { position: absolute; right: 10px; bottom: 10px; background: rgba(16, 24, 40, .65); color: #fff; font-size: 13px; padding: 3px 10px; border-radius: 999px; }
.gal-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: thin; }
.gal-thumbs button { flex: 0 0 84px; height: 63px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #e9edf3; cursor: pointer; }
.gal-thumbs button.on { border-color: var(--primary); }
.gal-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.lot-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 80px; }
.price-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.price-main { font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
.price-box p { margin: 10px 0 0; }
.turnkey { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.turnkey b { font-size: 19px; }
.kv { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.kv li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.kv li:first-child { border-top: 0; }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; text-align: right; }
.lot-act { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lot-act .btn-primary { grid-column: 1 / -1; min-height: 48px; font-size: 16px; }
.lot-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; align-items: start; }
.spec { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.spec th, .spec td { text-align: left; padding: 8px 0; border-top: 1px solid var(--line); vertical-align: top; }
.spec tr:first-child th, .spec tr:first-child td { border-top: 0; }
.spec th { color: var(--muted); font-weight: 400; width: 45%; padding-right: 12px; }
.opts { columns: 2; padding-left: 18px; margin: 0; font-size: 14px; }
.calc-t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.calc-t th, .calc-t td { padding: 9px 0; border-top: 1px solid var(--line); vertical-align: top; }
.calc-t th { text-align: left; font-weight: 500; padding-right: 12px; }
.calc-t th small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; }
.calc-t td { text-align: right; white-space: nowrap; font-weight: 600; }
.calc-t .c-customs th { padding-left: 10px; border-left: 3px solid var(--primary-soft); }
.calc-t .c-sub th, .calc-t .c-sub td { color: var(--muted); font-weight: 500; }
.calc-t .c-total th, .calc-t .c-total td { font-size: 18px; font-weight: 800; border-top: 2px solid var(--text); padding-top: 12px; }

/* Калькулятор, контакты, сообщения */
.calc { display: grid; grid-template-columns: 380px 1fr; gap: 20px; align-items: start; }
.calc-f { display: flex; flex-direction: column; gap: 10px; }
.calc-r { min-height: 200px; transition: opacity .15s; }
.calc-r.busy { opacity: .5; }
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.contacts .kv { border: 0; margin: 0 -16px 12px; }
.form { display: flex; flex-direction: column; gap: 12px; }
.msg { padding: 40px 16px; max-width: 760px; }
.captcha-wrap { padding: 24px 16px 40px; }

/* Подвал */
.ftr { background: #0f1a2e; color: #c9d2e3; padding: 32px 0 20px; font-size: 14px; }
.ftr a { color: #e3e9f5; }
.ftr .muted { color: #8d99b0; }
.ftr-in { display: grid; grid-template-columns: 1.2fr 1.6fr 1fr; gap: 24px; }
.ftr-name { font-weight: 700; color: #fff; font-size: 16px; margin-bottom: 4px; }
.ftr-links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; align-content: start; }
.ftr-phone { font-size: 18px; font-weight: 700; }
.ftr-note { margin-top: 20px; padding-top: 16px; border-top: 1px solid #22304a; font-size: 12.5px; }

/* Лайтбокс */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(8, 12, 20, .94); display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.lb img { max-width: 100vw; max-height: 100vh; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: transform .2s; }
.lb button { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 28px; cursor: pointer; }
.lb button:hover { background: rgba(255, 255, 255, .22); }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-cnt { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 14px; }

/* Адаптив */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .search-row { grid-template-columns: 1fr 1fr 1fr 1fr; }
  .search-row .btn { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .nav-btn { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; margin-left: auto; cursor: pointer; border-radius: 10px; }
  .nav-btn span { display: block; height: 2px; margin: 0 11px; background: var(--text); border-radius: 2px; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 8px 16px 14px; box-shadow: var(--shadow-h); }
  .nav a { padding: 11px 8px; }
  .nav .nav-phone { margin-left: 0; }
  .nav-t:checked ~ .nav { display: flex; }
  .hdr-in { position: relative; }
  .cat { grid-template-columns: 1fr; }
  .cat-f { position: static; }
  .flt summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; font-weight: 700; cursor: pointer; }
  .flt summary i { font-style: normal; background: var(--primary); color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 8px; margin-left: auto; margin-right: 10px; }
  .flt summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin-top: -4px; }
  .flt[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
  .flt form { padding-top: 0; }
  .flt:not([open]) form { display: none; }
  .lot-top, .lot-cols, .calc, .contacts { grid-template-columns: 1fr; }
  .lot-side { position: static; }
  .ftr-in { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: stretch; }
  .cta-act { justify-content: stretch; }
  .cta-act .btn { flex: 1; }
}
@media (max-width: 640px) {
  h1 { font-size: 23px; }
  .hero { padding: 22px 0 26px; }
  .hero h1 { font-size: 25px; }
  .hero-sub { font-size: 14.5px; }
  .search-row { grid-template-columns: 1fr 1fr; }
  .logo-text small { display: none; }
  .grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .chips-scroll { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .chips-scroll::-webkit-scrollbar { display: none; }
  .chips-scroll .chip { flex: none; }
  .gal-main { margin: 0 -16px; border-radius: 0; }
  .gal-nav { display: none; }
  .opts { columns: 1; }
  .box { padding: 16px; }
  .ftr-links { grid-template-columns: 1fr; }
  .toolbar { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
