/* biomaster-spb.ru — стили сайта.
   Палитра и типографика сняты со старого сайта, чтобы облик не изменился:
   зелёный #4cb409 (меню, акценты), красный #dc450d (кнопки заявки),
   светло-зелёный #e5f4de (карточки), чёрный подвал.

   Вёрстка на flex/grid вместо абсолютных координат Тильды — поэтому текст
   можно менять любой длины, ничего никуда не наедет. */

/* Шрифт тот же, что был. ВНИМАНИЕ: файлы лежат на CDN Тильды — это
   наследство экспорта. Нужно либо купить лицензию и положить к себе,
   либо перейти на свободный шрифт (см. README). */
@font-face {
  font-family: 'MuseoSans';
  src: url('https://static.tildacdn.com/tild6137-3763-4164-b163-613034363833/MuseoSansLight.woff') format('woff');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'MuseoSans';
  src: url('https://static.tildacdn.com/tild6632-3463-4063-a635-346232333565/MuseoSansRegular.woff') format('woff');
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --green: #4cb409;
  --green-dark: #429c08;
  --green-pale: #e5f4de;
  --green-pale2: #ddf1d0;
  --red: #dc450d;
  --red-dark: #c33d0b;
  --ink: #000000;
  --text: #22282a;
  --muted: #6f7b7f;
  --line: #e6e6e6;
  --line-soft: #f1f3f2;
  --white: #ffffff;
  --shadow: 0 2px 8px rgba(0, 0, 0, .06), 0 12px 32px rgba(0, 0, 0, .07);
  --radius: 8px;
  --font: 'MuseoSans', 'Golos Text', 'Helvetica Neue', Arial, sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); }

h1, h2, h3 { font-weight: 700; line-height: 1.15; margin: 0 0 16px; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(26px, 4vw, 40px); }
h2 { font-size: clamp(21px, 2.6vw, 30px); }
h3 { font-size: 18px; }
p { margin: 0 0 14px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; }
.skip:focus { left: 8px; top: 8px; }

:where(a, button, input, [tabindex]):focus-visible {
  outline: 3px solid var(--green); outline-offset: 2px; border-radius: 3px;
}

/* ---------- кнопки ---------- */
.btn {
  display: inline-block; border: 0; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .02em;
  padding: 12px 22px; border-radius: 5px; text-decoration: none;
  transition: background-color .15s ease;
}
.btn--accent { background: var(--red); color: #fff; }
.btn--accent:hover { background: var(--red-dark); }
.btn--ghost { background: var(--green); color: #fff; }
.btn--ghost:hover { background: var(--green-dark); }
.btn--wide { width: 100%; text-align: center; }
.btn--lg { padding: 15px 30px; font-size: 15px; }

/* ---------- шапка ---------- */
.hdr { border-bottom: 1px solid var(--line); }
.hdr__top { display: flex; align-items: center; gap: 20px 28px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.hdr__logo { display: block; text-decoration: none; flex: 0 0 auto; }
.hdr__logo img { width: 176px; height: auto; }
.hdr__tagline { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.hdr__info { display: none; font-size: 13.5px; line-height: 1.35; max-width: 210px; }
.hdr__label { display: block; color: var(--muted); }
.hdr__value { display: block; color: var(--text); font-weight: 700; }
.hdr__call { display: none; margin-left: auto; text-align: right; }
.hdr__phone { display: block; font-size: 19px; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; margin-bottom: 7px; }
.hdr__phone:hover { color: var(--green-dark); }

.burger {
  margin-left: auto; width: 44px; height: 44px; padding: 11px;
  background: var(--green); border: 0; border-radius: 50%; cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between;
}
.burger span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- меню ---------- */
.nav { background: var(--green); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav__list { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.nav__item > a {
  display: block; padding: 15px 18px; color: #fff; text-decoration: none;
  font-size: 13.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
}
.nav__item > a:hover, .nav__item:focus-within > a { background: var(--green-dark); }
.nav__item--has-sub { position: relative; }
.nav__sub {
  position: absolute; left: 0; top: 100%; z-index: 30; min-width: 260px;
  list-style: none; margin: 0; padding: 6px 0; background: #fff;
  box-shadow: var(--shadow); border-radius: 0 0 var(--radius) var(--radius); display: none;
}
.nav__item--has-sub:hover .nav__sub, .nav__item--has-sub:focus-within .nav__sub { display: block; }
.nav__sub a { display: block; padding: 9px 18px; color: var(--text); text-decoration: none; font-size: 14.5px; }
.nav__sub a:hover { background: var(--green-pale); color: var(--green-dark); }
.nav__call { display: none; }

/* мобильное меню (до 980px, как было на старом сайте) */
@media (max-width: 979px) {
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 86vw); z-index: 60;
    transform: translateX(100%); transition: transform .25s ease;
    overflow-y: auto; padding: 74px 0 30px;
  }
  .nav[data-open="true"] { transform: translateX(0); }
  .nav__inner { display: block; }
  .nav__list { display: block; }
  .nav__item > a { padding: 13px 22px; font-size: 15px; }
  .nav__sub { position: static; display: block; box-shadow: none; background: transparent; padding: 0 0 6px; }
  .nav__sub a { color: rgba(255, 255, 255, .9); padding: 8px 22px 8px 36px; font-size: 14px; }
  .nav__sub a:hover { background: var(--green-dark); color: #fff; }
  .nav__call { display: block; margin: 18px 22px 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .28); }
  .nav__phone { display: block; font-size: 22px; font-weight: 700; color: #fff; text-decoration: none; margin-bottom: 12px; }
  .nav__call .btn { display: block; text-align: center; }
  .nav__hours { display: block; margin-top: 10px; font-size: 13px; color: rgba(255, 255, 255, .85); }
  .nav-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .45); }
  body[data-menu="open"] { overflow: hidden; }
}
@media (min-width: 980px) {
  .hdr__info, .hdr__call { display: block; }
  .burger { display: none; }
}

/* ---------- хлебные крошки ---------- */
.crumbs { padding-top: 16px; font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--green-dark); }
.crumbs span { margin: 0 7px; }
.crumbs span[aria-current] { margin: 0; color: var(--text); }

/* ---------- первый экран ---------- */
.hero { padding: 26px 0 10px; }
.hero__inner {
  display: grid; gap: 26px; align-items: center;
  background: linear-gradient(180deg, var(--green-pale) 0%, #fff 70%);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 24px;
}
.hero__lead { font-size: 18px; }
.hero__points { list-style: none; margin: 0 0 18px; padding: 0; }
.hero__points li { padding-left: 26px; position: relative; margin-bottom: 7px; }
.hero__points li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 13px; height: 7px; border-left: 2.5px solid var(--green);
  border-bottom: 2.5px solid var(--green); transform: rotate(-45deg);
}
.hero__price { font-size: 19px; margin-bottom: 18px; }
.hero__price b { font-size: 26px; color: var(--ink); }
@media (min-width: 900px) { .hero__inner { grid-template-columns: 1fr 1fr; padding: 44px 40px; } }

/* ---------- карточки каталога ---------- */
.cards__head { margin: 36px 0 20px; }
.cards { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card {
  display: flex; flex-direction: column; gap: 8px;
  background: linear-gradient(180deg, var(--green-pale2) 0%, #fff 55%);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 20px; text-align: center;
}
.card__link { text-decoration: none; color: inherit; }
/* Картинка карточки: фиксированная площадка одной высоты у всех карточек.
   Ограничение висит на самой картинке, а не на обёртке <picture>, иначе
   вертикальные модели (например «Септик 0.5») вылезают на заголовок. */
.card__img { height: 170px; margin: 0 0 10px; display: flex; align-items: center; justify-content: center; }
.card__img img,
.card__img picture { max-height: 170px; width: auto; max-width: 100%; object-fit: contain; }
.card__title { font-size: 17px; margin: 0; }
.card__spec { font-size: 14px; color: var(--muted); margin: 0; }
.card__price { margin: 2px 0 10px; font-size: 15px; }
.card__price b { font-size: 20px; color: var(--ink); }
.card__price s { color: var(--muted); font-weight: 400; margin-right: 6px; }
.card__ask { color: var(--muted); }
.card .btn { margin-top: auto; }

/* ---------- страница товара ---------- */
.product { display: grid; gap: 26px; padding-top: 22px; padding-bottom: 10px; }
/* Площадка под фото товара одной высоты у всех карточек, картинка по центру:
   вертикальные модели (например «Септик 0.5») уже горизонтальных и иначе
   прижимаются к левому краю. */
.product__photo {
  width: 100%; border-radius: var(--radius); background: var(--green-pale); padding: 18px;
  min-height: 320px; display: flex; align-items: center; justify-content: center;
}
.product__photo picture { display: flex; }
.product__photo img { max-height: 380px; width: auto; max-width: 100%; object-fit: contain; }
.product__price { margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.product__now, .product__new { font-size: 32px; font-weight: 700; color: var(--ink); }
.product__new { color: var(--red); }
.product__old { color: var(--muted); font-size: 21px; }
.product__ask { font-size: 22px; font-weight: 700; color: var(--muted); }
.product__promo { background: var(--red); color: #fff; font-size: 12.5px; font-weight: 700; padding: 4px 9px; border-radius: 4px; text-transform: uppercase; }
.product__note { font-size: 13.5px; color: var(--muted); margin-top: 12px; }
@media (min-width: 860px) { .product { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }

.specs { margin: 0 0 22px; }
.specs__row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.specs__row:last-child { border-bottom: 0; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 700; text-align: right; }

/* ---------- галерея ---------- */
.gallery { padding-top: 26px; }
.gallery__grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.gallery__grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--line-soft); }

/* ---------- текстовые страницы ---------- */
.section-head { padding-top: 20px; }
.prose { max-width: 68ch; }

.advantages { padding-top: 34px; }
.advantages__grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.advantages h3 { margin-bottom: 6px; color: var(--green-dark); }
.advantages p { margin: 0; }

/* ---------- контакты ---------- */
.contacts { display: grid; gap: 18px; padding-bottom: 10px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.contacts__card { background: var(--green-pale); border-radius: var(--radius); padding: 22px; }
.contacts__card h2 { font-size: 17px; margin-bottom: 10px; }
.contacts__card p { margin-bottom: 8px; }
.contacts__phone { display: block; font-size: 24px; font-weight: 700; color: var(--ink); text-decoration: none; margin-bottom: 8px; }

/* ---------- блок заявки ---------- */
.cta { background: var(--green-pale); margin-top: 46px; padding: 40px 0; }
.cta__inner { display: grid; gap: 26px; align-items: center; }
.cta__title { margin-bottom: 8px; }
.cta__text p { margin: 0; max-width: 46ch; }
@media (min-width: 900px) { .cta__inner { grid-template-columns: 1.1fr 1fr; } }

.lead { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.lead__field { display: block; margin-bottom: 14px; }
.lead__label { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 5px; }
.lead input[type="text"], .lead input[type="tel"] {
  width: 100%; font-family: inherit; font-size: 16px; color: var(--text);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 5px; background: #fff;
}
.lead input:focus { border-color: var(--green); outline: none; }
.lead__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lead__note { text-align: center; font-size: 14px; color: var(--muted); margin: 12px 0 0; }
.lead__note a { color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.lead__consent { font-size: 12px; line-height: 1.45; color: var(--muted); text-align: center; margin: 10px 0 0; }
.lead__consent a { color: var(--muted); }
.lead__result { margin: 10px 0 0; font-size: 14.5px; text-align: center; }
.lead__result[data-state="ok"] { color: var(--green-dark); font-weight: 700; }
.lead__result[data-state="error"] { color: var(--red); }
.lead[data-sent="true"] .lead__field,
.lead[data-sent="true"] .btn,
.lead[data-sent="true"] .lead__note,
.lead[data-sent="true"] .lead__consent { display: none; }

/* ---------- подвал ---------- */
.ftr { background: var(--ink); color: rgba(255, 255, 255, .8); padding: 42px 0 34px; }
.ftr__grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.ftr__head { font-size: 15px; color: #fff; margin-bottom: 12px; }
.ftr__col ul { list-style: none; margin: 0; padding: 0; }
.ftr__col li { margin-bottom: 8px; }
.ftr a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.ftr a:hover { color: var(--green); }
.ftr__tagline { font-size: 13.5px; margin: 10px 0 14px; }
.ftr__legal, .ftr__dev { font-size: 12.5px; color: rgba(255, 255, 255, .55); }
.ftr__phone { display: block; font-size: 21px; font-weight: 700; color: #fff; text-decoration: none; margin-bottom: 12px; }
.ftr__contacts .btn { margin-bottom: 14px; }
.ftr__contacts p { font-size: 14px; }

/* ---------- попап ---------- */
.popup { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 18px; }
.popup[hidden] { display: none; }
.popup__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); }
.popup__box {
  position: relative; z-index: 1; background: #fff; border-radius: var(--radius);
  width: min(460px, 100%); max-height: 92vh; overflow-y: auto; padding: 30px 26px 26px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.popup__close { position: absolute; top: 6px; right: 8px; width: 38px; height: 38px; background: none; border: 0; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; }
.popup__close:hover { color: var(--ink); }
.popup__title { text-align: center; margin-bottom: 6px; }
.popup__sub { text-align: center; color: var(--muted); font-size: 14.5px; margin-bottom: 18px; }
.popup .lead { box-shadow: none; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
.product__thumbs{display:flex;gap:10px;margin-top:12px;flex-wrap:wrap}
.product__thumbs img{width:88px;height:66px;object-fit:contain;background:var(--green-pale);border-radius:6px;padding:6px}

.policy p{font-size:15px;line-height:1.6;color:var(--text)}
.policy{max-width:74ch}

.offer{list-style:none;margin:0 0 20px;padding:0;display:grid;gap:8px;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
.offer li{background:var(--green-pale);border-radius:6px;padding:12px 16px;font-size:15px}

/* ---------- переключатель объёмов на карточке товара ---------- */
.volumes { margin: 0 0 22px; }
.volumes__label { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.volumes__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.volumes__item {
  display: block; padding: 8px 13px; border: 1px solid var(--line); border-radius: 5px;
  font-size: 14px; font-weight: 700; color: var(--text); text-decoration: none; white-space: nowrap;
}
a.volumes__item:hover { border-color: var(--green); color: var(--green-dark); background: var(--green-pale); }
.volumes__item.is-current { background: var(--green); border-color: var(--green); color: #fff; }

/* ---------- миниатюры товара ---------- */
.product__thumb {
  padding: 0; border: 2px solid transparent; border-radius: 8px;
  background: var(--green-pale); cursor: pointer; line-height: 0; overflow: hidden;
}
.product__thumb.is-active { border-color: var(--green); }
.product__thumb:hover { border-color: var(--green-dark); }
.product__thumb img { width: 88px; height: 66px; object-fit: contain; padding: 6px; }

/* ---------- виды монтажа ---------- */
.services {
  list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.service {
  display: flex; flex-direction: column; text-align: center;
  background: linear-gradient(180deg, var(--green-pale) 0%, #fff 40%);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 22px;
}
.service__photo { margin-bottom: 14px; }
.service__photo img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: 6px; background: var(--line-soft);
}
.service__title { font-size: 18px; margin: 0 0 8px; }
.service__price { color: var(--red); font-weight: 700; font-size: 17px; margin: 0 0 10px; }
.service__note { font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.service__btn { margin-top: auto; }

/* ---------- подбор по числу жильцов ---------- */
.picker { background: var(--green-pale); padding: 40px 0 44px; margin-top: 40px; }
.picker__title { margin-bottom: 6px; }
.picker__lead { color: var(--text); margin-bottom: 22px; max-width: 60ch; }
.picker__tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.picker__tab {
  flex: 1 1 190px; text-align: left; cursor: pointer; font-family: inherit;
  background: #fff; border: 2px solid transparent; border-radius: var(--radius);
  padding: 14px 18px; transition: border-color .15s ease;
}
.picker__tab b { display: block; font-size: 17px; color: var(--ink); }
.picker__tab span { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.picker__tab:hover { border-color: var(--green); }
.picker__tab.is-active { border-color: var(--green); box-shadow: var(--shadow); }
.picker__panel .cards { margin-bottom: 16px; }
.picker__panel .card { background: #fff; }
.picker__note { font-size: 14.5px; color: var(--text); margin: 0; }
.picker__ask {
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  color: var(--green-dark); text-decoration: underline;
}

/* ---------- условия оплаты на карточке товара ---------- */
.pay { margin-top: 20px; padding: 18px 20px; background: var(--green-pale); border-radius: var(--radius); }
.pay__head { font-weight: 700; font-size: 16px; margin: 0 0 4px; color: var(--ink); }
.pay__lead { font-size: 14.5px; color: var(--text); margin: 0 0 12px; }
.pay__list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.pay__list li { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 14px; align-items: baseline; }
.pay__list b { font-weight: 700; color: var(--ink); }
.pay__list span { color: var(--muted); }
.pay__delivery { font-size: 14px; color: var(--green-dark); font-weight: 600; margin: 0; }

/* ---------- отзывы ---------- */
.reviews { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 16px; }
@media (min-width: 760px) { .reviews { grid-template-columns: 1fr 1fr; } }
.review {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; display: flex; flex-direction: column;
}
.review__head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 8px; }
.review__author { font-weight: 700; color: var(--ink); }
.review__date { font-size: 13px; color: var(--muted); }
.review__head::after { content: "★★★★★"; color: #f5a623; font-size: 14px; letter-spacing: 1px; margin-left: auto; }
.review__text { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text); }
.reviews__note { font-size: 13.5px; color: var(--muted); max-width: 72ch; }
