/* Варианты оформления: гаммы (data-theme на <html>) и первые экраны главной (.hx--a … .hx--e).
   Пока владелец выбирает, здесь лежат все; после выбора остаётся один вариант. */

/* ---------- гаммы ---------- */
/* 1. Светлый красный: фирменный красный на светлом, чёрного — только подвал. */
html[data-theme="1"] {
  --brand: #c8102e; --brand-dark: #a50d26; --brand-soft: #fdecef; --brand-tint: #ffb3c0;
  --ink: #1f2430; --ink-2: #343a46; --bg: #f5f6f8;
  --top-bg: #eceef2; --top-fg: #4a5361; --top-hover: #1f2430; --foot-bg: #1f2430;
}
/* 2. Строительный жёлтый с графитом. Жёлтым по белому не пишут — у текста свой, тёмный тон. */
html[data-theme="2"] {
  --brand: #ffc20e; --brand-dark: #f0b300; --brand-soft: #fff4cc; --brand-ink: #8a5b00; --on-brand: #1d1f23; --brand-tint: #ffd95e;
  --ink: #1d1f23; --ink-2: #33363c; --bg: #f5f4f0; --line: #e6e3dc;
  --top-bg: #1d1f23; --foot-bg: #1d1f23;
}
/* 3. Деловой синий. */
html[data-theme="3"] {
  --brand: #1257c5; --brand-dark: #0e469f; --brand-soft: #e8f0fd; --brand-tint: #9cc0ff;
  --ink: #0f1f3d; --ink-2: #27365a; --bg: #f3f6fb; --line: #dfe5ef;
  --top-bg: #0f1f3d; --foot-bg: #0f1f3d;
}
/* 4. Оранжевый на тёплом сером. */
html[data-theme="4"] {
  --brand: #e85d0c; --brand-dark: #c94e07; --brand-soft: #ffeede; --brand-ink: #c2470a; --brand-tint: #ffc49c;
  --ink: #23201d; --ink-2: #3b3632; --bg: #f7f5f2; --line: #e8e3dc;
  --top-bg: #efebe5; --top-fg: #5c544c; --top-hover: #23201d; --foot-bg: #23201d;
}
/* 5. Зелёный. */
html[data-theme="5"] {
  --brand: #1a7f4f; --brand-dark: #14663f; --brand-soft: #e4f4ea; --brand-tint: #9be0b9;
  --ink: #14261d; --ink-2: #2c4236; --bg: #f2f6f4; --line: #dde6e1;
  --top-bg: #14261d; --foot-bg: #14261d;
}

.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-2); }
.chip--brand { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }

/* ---------- первые экраны ---------- */
.hx {
  background:
    radial-gradient(760px 380px at 92% -18%, var(--brand-soft), transparent 62%),
    linear-gradient(180deg, #fff, var(--bg));
  border-bottom: 1px solid var(--line);
  color: var(--text);
}
.hx h1 { font-size: clamp(2rem, 1.3rem + 2.7vw, 3.2rem); line-height: 1.08; color: var(--ink); }
.hx__eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 6px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: .84rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.hx__lead { margin: 18px 0 26px; max-width: 560px; color: var(--muted); font-size: 1.1rem; }
.hx__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hx__stats { display: flex; flex-wrap: wrap; gap: 14px 34px; margin: 34px 0 0; }
.hx__stats dt { font-size: 1.7rem; font-weight: 800; line-height: 1.1; color: var(--ink); }
.hx__stats dd { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.hx__split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 60px; }
.hx__center { max-width: 820px; margin: 0 auto; text-align: center; }
.hx__center .hx__lead { margin-inline: auto; }
.hx__center .hx__stats { justify-content: center; }

/* A. Товар крупно: студийное фото на белой карточке, под ним — три раздела. */
.showpiece { display: grid; gap: 12px; }
.showpiece__main { position: relative; display: block; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.showpiece__main:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.showpiece__main img { width: 100%; aspect-ratio: 930 / 568; object-fit: contain; padding: 10px 10px 0; }
.showpiece__tag { position: absolute; left: 16px; top: 16px; padding: 4px 11px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .78rem; font-weight: 700; }
.showpiece__cap { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 20px 18px; }
.showpiece__cap b { font-weight: 650; line-height: 1.3; }
.showpiece__cap i { font-style: normal; font-weight: 800; font-size: 1.15rem; white-space: nowrap; color: var(--ink); }
/* Карусель товаров, отмеченных для главной: лента с прилипанием (листается и пальцем),
   стрелки по бокам и точки; автолистание — в site.js. Один товар — просто карточка. */
.showpiece__slider { position: relative; min-width: 0; }
.showpiece__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 22px; overscroll-behavior-x: contain; }
.showpiece__track::-webkit-scrollbar { display: none; }
.showpiece__track > .showpiece__main { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
[data-carousel] .showpiece__main:hover { transform: none; }
/* Три главные цифры показанного товара (вариант 2 + 5 владельца); строка держит высоту,
   чтобы товар с двумя характеристиками или без них не дёргал первый экран. */
.showpiece__specs { min-height: 64px; }
.showpiece__spec-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.showpiece__spec-row > div { display: flex; flex-direction: column-reverse; justify-content: center; gap: 2px; min-width: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.showpiece__spec-row dd { margin: 0; font-size: 1.12rem; font-weight: 800; line-height: 1.2; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.showpiece__spec-row dt { font-size: .8rem; line-height: 1.2; color: var(--muted); overflow-wrap: anywhere; }
.hx--a .showpiece__spec-row > div { background: rgba(255, 255, 255, .9); border-color: rgba(255, 255, 255, .9); }
/* Под каруселью: номер товара, полоса времени до следующего (5 с, как в site.js) и стрелки. */
.showpiece__nav { display: flex; align-items: center; gap: 14px; padding: 5px 5px 5px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.hx--a .showpiece__nav { background: rgba(255, 255, 255, .95); border-color: rgba(255, 255, 255, .9); }
.showpiece__num { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.showpiece__num b { color: var(--ink); font-weight: 800; font-size: 1.1rem; }
.showpiece__line { flex: 1; height: 2px; border-radius: 2px; background: rgba(0, 0, 0, .12); overflow: hidden; }
.showpiece__line i { display: block; width: 0; height: 100%; background: var(--brand); }
.showpiece__line i.is-run { animation: showpiece-bar 5s linear forwards; }
@keyframes showpiece-bar { to { width: 100%; } }
.showpiece__arrow { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; transition: border-color .15s, color .15s; }
.showpiece__arrow:hover, .showpiece__arrow:focus-visible { border-color: var(--brand); color: var(--brand-ink); }
.showpiece__more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.showpiece__item { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; font-weight: 650; font-size: .94rem; line-height: 1.2; transition: border-color .15s, color .15s; }
.showpiece__item:hover { border-color: var(--brand); color: var(--brand-ink); }
.showpiece__item img { flex: none; width: 52px; height: 44px; object-fit: contain; }
.showpiece__item span { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }

/* B. Подбор по технике: плитки с рисунками машин прямо в первом экране. */
.hx--b { padding: 48px 0 44px; }
.hx--b .typetiles { margin-top: 30px; }
.hx__under { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 40px; margin-top: 28px; }
.hx__under .hx__stats { margin: 0; }

/* C. Поиск по центру. */
.hx--c { padding: 60px 0 56px; }
.hx__search { display: flex; gap: 10px; max-width: 720px; margin: 30px auto 0; text-align: left; }
.hx__search .search__input { height: 58px; padding: 0 20px; font-size: 1.06rem; background: #fff; border-width: 2px; border-radius: 14px; box-shadow: var(--shadow); }
.hx__find { flex: none; height: 58px; padding-inline: 26px; border-radius: 14px; font-size: 1.03rem; }
.hx__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 20px auto 0; max-width: 860px; }

/* D. Цветная полоса с заголовком и лента разделов, наполовину заходящая на неё. */
.hx--d { background: var(--bg); border-bottom: 0; padding-bottom: 8px; }
.hx__band { background: var(--brand); color: var(--on-brand); padding: 46px 0 108px; }
.hx--d h1 { color: inherit; font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.8rem); }
.hx--d .hx__lead { margin: 14px 0 0; color: inherit; opacity: .88; }
.hx__bandrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; }
.hx__bandside { display: grid; gap: 10px; }
.strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-top: -76px; }
.strip__item { display: flex; flex-direction: column; padding: 10px 14px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.strip__item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.strip__pic { display: block; aspect-ratio: 4 / 3; margin-bottom: 8px; }
.strip__pic img { width: 100%; height: 100%; object-fit: contain; }
.strip__item b { font-weight: 650; line-height: 1.25; }
.strip__item small { margin-top: 2px; color: var(--muted); font-size: .86rem; }

/* E. Преимущества вместо картинок. */
.hx__perks { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hperk { display: grid; gap: 4px; align-content: start; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.hperk .perk__icon { margin-bottom: 8px; }
.hperk b { font-size: 1.04rem; line-height: 1.25; }
.hperk span:last-child { color: var(--muted); font-size: .93rem; }

@media (max-width: 1100px) {
  .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hx__split { grid-template-columns: 1fr; gap: 30px; padding-top: 36px; padding-bottom: 40px; }
  .hx__bandrow { grid-template-columns: 1fr; gap: 22px; }
  .hx__bandside { grid-template-columns: 1fr 1fr; }
  .hx--b, .hx--c { padding: 36px 0; }
}
@media (max-width: 640px) {
  .hx__stats { gap: 12px 24px; margin-top: 26px; }
  .hx__stats dt { font-size: 1.4rem; }
  .hx__actions .btn, .hx__under .btn { width: 100%; }
  .hx__search { flex-direction: column; }
  .hx__find { width: 100%; }
  .hx__bandside { grid-template-columns: 1fr; }
  .hx__band { padding: 30px 0 92px; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .showpiece__more { grid-template-columns: 1fr; }
  .hx__perks { grid-template-columns: 1fr; }
}

/* ---------- панель примерки (только в режиме выбора) ---------- */
/* Первый ряд — темы; у исходной темы второй ряд — её гаммы и первые экраны. Шрифт свой, не темы. */
.dsw { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 90; display: grid; gap: 6px; max-width: calc(100vw - 20px); padding: 8px 12px; border-radius: 18px; background: #111418; color: #fff; box-shadow: 0 10px 34px -8px rgba(0, 0, 0, .5); font: 600 13px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.dsw__row { display: flex; align-items: center; gap: 6px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.dsw__row::-webkit-scrollbar { display: none; }
.dsw__label { margin: 0 2px 0 6px; color: #9aa2ae; font-weight: 500; }
.dsw__dot { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; background: linear-gradient(135deg, var(--c1) 0 50%, var(--c2) 50% 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.dsw__btn { flex: none; min-width: 26px; height: 26px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, .1); color: #fff; }
.dsw__btn--theme { padding: 0 11px; border-radius: 999px; }
.dsw__dot.is-on { border-color: #fff; }
.dsw__btn.is-on { background: #fff; color: #111418; }
.dsw__all { margin-left: auto; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; }
.dsw a:hover { filter: brightness(1.15); }
@media (max-width: 600px) { .dsw { left: 8px; right: 8px; bottom: 8px; transform: none; max-width: none; } }
@media print { .dsw { display: none; } }

/* ---------- страница выбора ---------- */
.dgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.dcard { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: grid; gap: 14px; align-content: start; }
.dcard.is-current { box-shadow: 0 0 0 3px var(--brand); }
.dcard__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.dcard__head h2 { font-size: 1.25rem; }
.dcard__num { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 8px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .95rem; }
.dcard__sw { display: flex; gap: 6px; }
.dcard__sw i { width: 34px; height: 34px; border-radius: 9px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.dcard__note { margin: 0; color: var(--muted); }
.dframe { position: relative; display: block; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; aspect-ratio: 1280 / 760; }
.dframe iframe { position: absolute; left: 0; top: 0; width: 1280px; height: 760px; border: 0; transform-origin: 0 0; pointer-events: none; }
.dframe span { position: absolute; left: 10px; top: 10px; z-index: 1; padding: 3px 9px; border-radius: 999px; background: rgba(17, 20, 24, .78); color: #fff; font-size: .76rem; font-weight: 650; }
.dcard__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dcard__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
@media (max-width: 1000px) { .dgrid { grid-template-columns: minmax(0, 1fr); } }
/* Темы — сверху, ранние гаммы — свёрнутым блоком ниже. */
.dsection { margin-bottom: 30px; }
.dsection__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 16px; }
.dsection__head p { margin: 0; color: var(--muted); }
.dcard__typo { margin: -6px 0 0; color: var(--muted); font-size: .9rem; }
.dmore { margin-top: 8px; }
.dmore summary { cursor: pointer; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 650; }
.dmore[open] summary { margin-bottom: 18px; }

/* Рисунки техники нарисованы красным. В гаммах другого цвета фильтр перекрашивает
   красный в цвет гаммы (чёрное и белое остаются как были) — сами файлы не меняются. */
html[data-theme="2"] .typetile__pic img { filter: hue-rotate(66deg) saturate(1.7) brightness(1.5); }
html[data-theme="3"] .typetile__pic img { filter: hue-rotate(218deg) saturate(1.15); }
html[data-theme="4"] .typetile__pic img { filter: hue-rotate(24deg) saturate(1.25) brightness(1.08); }
html[data-theme="5"] .typetile__pic img { filter: hue-rotate(142deg) saturate(.85) brightness(.95); }

/* Первый экран A: фоном — рисунок владельца (design/hero-bg-3.png, 13.10.2026; первый вариант — design/hero-bg.png): слева светлое
   поле под текст, справа техника. На телефоне блоки идут столбцом, поэтому рисунок стоит
   внизу, под карточкой товара, и вверху растворяется в белом — текст остаётся на чистом. */
.hx--a { background: #f8f8f9 url(../img/hero-bg-3.webp) right center / cover no-repeat; }
@media (max-width: 900px) {
  .hx--a {
    background:
      linear-gradient(180deg, #fbfbfc 0, #fbfbfc calc(100% - 330px), rgba(251, 251, 252, 0) calc(100% - 150px)),
      #f8f8f9 url(../img/hero-bg-3-m.webp) right bottom / auto 330px no-repeat;
  }
}

/* Карточка товара и плитки разделов поверх рисунка — полупрозрачные, техника с фона
   просвечивает. Фото товаров сняты на белом: режим умножения убирает белое поле снимка,
   иначе оно стояло бы на карточке глухим прямоугольником. Умножение работает, только пока
   карточка не образует собственный слой, — поэтому здесь нет сдвига при наведении и размытия. */
.hx--a .showpiece__main { background: rgba(255, 255, 255, .82); border-color: rgba(255, 255, 255, .9); }
.hx--a .showpiece__main:hover { transform: none; background: rgba(255, 255, 255, .9); }
.hx--a .showpiece__item { background: rgba(255, 255, 255, .7); border-color: rgba(255, 255, 255, .9); }
.hx--a .showpiece__item:hover { border-color: var(--brand); }
.hx--a .showpiece img { mix-blend-mode: multiply; }
/* Подпись с названием и ценой — на более плотной полосе: поверх техники текст терялся бы. */
.hx--a .showpiece__cap { margin-top: 6px; padding-top: 14px; background: rgba(255, 255, 255, .8); }
