/*
Theme Name: Пласт Профиль
Theme URI: https://www.plastprofil.ru
Author: PP
Description: Кастомная тема «Пласт Профиль» (трубный завод). Дизайн-система: индиго/акцент, PT Mono + Inter.
Version: 1.0
Text Domain: plastprofil
*/

/* ================= Дизайн-токены ================= */
:root {
  --c-primary: #6873ff;
  --c-primary-dark: #525be0;
  --c-accent: #f33c5f;
  --c-text: #3f3f3f;
  --c-muted: #7a7a8a;
  --c-bg: #ffffff;
  --c-bg-soft: #f7f7fa;
  --c-bg-tint: #ebebff;
  --c-line: #e7e7e7;
  --c-ok: #27ae60;
  --c-warn: #ff9b26;
  --c-danger: #f22f25;
  --c-info: #10bad1;
  --f-head: "PT Mono", "Courier New", monospace;
  --f-body: "Inter", "Open Sans", Arial, sans-serif;
  --r: 12px;
  --r-sm: 8px;
  --sh: 0 4px 20px rgba(63, 63, 63, .08);
  --sh-lg: 0 12px 40px rgba(104, 115, 255, .18);
  --w: 1280px;
}

/* ================= База ================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-dark); }
h1, h2, h3, h4, .h22 {
  font-family: var(--f-head);
  line-height: 1.2;
  margin: 0 0 20px;
  color: var(--c-text);
}
h1 { font-size: clamp(28px, 4vw, 48px); }
h2, .h22 { font-size: clamp(26px, 3.5vw, 44px); }
h3 { font-size: clamp(20px, 2.5vw, 28px); margin-bottom: 14px; }
p { margin: 0 0 16px; }
.container { max-width: var(--w); margin: 0 auto; padding: 0 20px; }
.section { padding: 60px 0; }
.section--soft { background: var(--c-bg-soft); }
.section--tint { background: var(--c-bg-tint); }
.entry-title { font-family: var(--f-head); font-size: clamp(26px, 3.5vw, 44px); line-height: 1.2; margin: 0 0 24px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--r-sm); border: 0; cursor: pointer;
  font-family: var(--f-body); font-size: 15px; font-weight: 600; line-height: 1.2;
  background: var(--c-primary); color: #fff; transition: background .15s, transform .1s;
}
.btn:hover { background: var(--c-primary-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--c-accent); }
.btn--accent:hover { background: #d92b4e; }
.btn--ghost { background: transparent; color: var(--c-primary); border: 1px solid var(--c-primary); }
.btn--ghost:hover { background: var(--c-bg-tint); color: var(--c-primary-dark); }
.btn--lg { padding: 15px 30px; font-size: 16px; }
.btn--block { width: 100%; }

/* ================= Шапка ================= */
.header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--c-line); }
.header__top { border-bottom: 1px solid var(--c-line); }
.header__top-inner {
  display: flex; align-items: center; gap: 20px; min-height: 44px;
  font-size: 14px; color: var(--c-muted);
}
.header__contacts { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.header__phone { color: var(--c-text); font-weight: 700; font-family: var(--f-head); font-size: 16px; white-space: nowrap; }
.header__email { color: var(--c-muted); white-space: nowrap; }
/* Кнопки звонка (мобильные) */
.header__call-btn {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--c-primary); color: #fff;
  transition: transform .15s, background .15s;
}
.header__call-btn:hover { background: var(--c-primary-dark); color: #fff; transform: scale(1.08); }
.header__call-btn:active { transform: scale(.95); }

/* Прогресс чтения в шапке */
.reading-progress { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: transparent; z-index: 101; }
.reading-progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
  transition: width .1s linear;
}
.header__main { display: flex; align-items: center; gap: 28px; padding: 14px 0; }
.header__logo { display: flex; align-items: center; gap: 12px; }
.header__logo img { height: 46px; width: auto; }
.header__logo-text { font-family: var(--f-head); font-size: 18px; font-weight: 700; color: var(--c-text); line-height: 1.15; }
.header__logo-sub { font-size: 12px; color: var(--c-muted); }
.header__cta { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.header__cart { position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; background: var(--c-bg-tint); color: var(--c-primary); }
.header__cart-count { position: absolute; top: -2px; right: -4px; background: var(--c-accent); color: #fff;
  font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 6px; }

/* Мега-меню */
.nav { background: #fff; }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav__item { position: relative; }
.nav__link {
  display: block; padding: 14px 18px; font-size: 15px; font-weight: 600; color: var(--c-text);
  border-radius: var(--r-sm); cursor: pointer;
}
.nav__item:hover > .nav__link, .nav__item.is-open > .nav__link { background: var(--c-bg-tint); color: var(--c-primary); }
.nav__item--cta .nav__link { color: var(--c-accent); }
.mega { display: none; position: absolute; left: 0; top: 100%; min-width: 720px;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--r);
  box-shadow: var(--sh-lg); padding: 24px; z-index: 200; }
.nav__item:hover .mega, .nav__item:focus-within .mega { display: block; }
.mega__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 28px; }
.mega__col-title { font-family: var(--f-head); font-weight: 700; font-size: 15px; margin: 0 0 8px; }
.mega__col-title a { color: var(--c-text); }
.mega__col-title a:hover { color: var(--c-primary); }
.mega__sub { list-style: none; margin: 0 0 4px; padding: 0; }
.mega__sub a { display: block; padding: 4px 0; font-size: 14px; color: var(--c-muted); }
.mega__sub a:hover { color: var(--c-primary); }
.mega__sub--inner { padding-left: 10px; }
.mega__sub--inner a { font-size: 13px; color: #9a9aad; }

/* Мобильный выбор категории */
.cat-select { display: none; width: 100%; padding: 10px 12px; border: 1px solid var(--c-line);
  border-radius: var(--r-sm); font-family: var(--f-body); font-size: 14px; background: #fff; }

/* Фокус для клавиатуры */
a:focus-visible, button:focus-visible, .btn:focus-visible, .header__cart:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}

/* Бургер (компактный, с анимацией в крест) */
.header__burger {
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--r-sm);
  background: var(--c-bg-tint); cursor: pointer; transition: background .2s;
}
.header__burger:hover { background: var(--c-bg-tint); }
.header__burger span {
  display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--c-primary);
  transition: transform .25s ease, opacity .2s ease;
}
.header__burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.header__burger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.header__burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ================= Карточка товара ================= */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card { position: relative; display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--c-line); border-radius: var(--r); overflow: hidden; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: var(--sh); transform: translateY(-2px); }
.card__photo { position: relative; aspect-ratio: 4/3; background: var(--c-bg-soft); }
.card__photo img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.card__labels { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge--ok { background: var(--c-ok); color: #fff; }
.badge--warn { background: var(--c-warn); color: #fff; }
.badge--accent { background: var(--c-accent); color: #fff; }
.badge--info { background: var(--c-info); color: #fff; }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 16px; gap: 8px; }
.card__title { font-family: var(--f-head); font-size: 15px; font-weight: 700; line-height: 1.35; margin: 0; }
.card__title a { color: var(--c-text); }
.card__title a:hover { color: var(--c-primary); }
.card__tech { font-size: 13px; color: var(--c-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-family: var(--f-head); font-weight: 700; font-size: 16px; color: var(--c-text); }
.price--empty { color: var(--c-muted); font-weight: 400; font-size: 14px; }
.card__btn { padding: 9px 14px; font-size: 13px; }

/* ================= Каталог ================= */
.catalog-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.breadcrumbs { font-size: 13px; color: var(--c-muted); margin-bottom: 16px; }
.breadcrumbs a { color: var(--c-muted); }
.breadcrumbs a:hover { color: var(--c-primary); }
.breadcrumbs span[aria-current] { color: var(--c-text); }
.catalog-side { display: grid; grid-template-columns: 260px 1fr; gap: 32px; }
.cat-tree { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.cat-tree ul { list-style: none; margin: 0; padding-left: 14px; }
.cat-tree a { display: block; padding: 5px 0; color: var(--c-text); }
.cat-tree a:hover, .cat-tree a.is-active { color: var(--c-primary); }
.cat-tree .is-active { font-weight: 700; }

/* ================= Карточка товара (single) ================= */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.product__gallery { position: relative; }
.swiper { border-radius: var(--r); overflow: hidden; border: 1px solid var(--c-line); }
.swiper-slide img { width: 100%; height: 100%; object-fit: contain; }
.product__slider { aspect-ratio: 4/3; background: var(--c-bg-soft); }
.product__thumbs { margin-top: 12px; }
.product__thumbs .swiper-slide { width: 90px; height: 70px; cursor: pointer; border: 2px solid transparent; border-radius: var(--r-sm); overflow: hidden; background: var(--c-bg-soft); }
.product__thumbs .swiper-slide-thumb-active { border-color: var(--c-primary); }
.product__info h1 { margin-bottom: 10px; }
.product__labels { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.product__sku { color: var(--c-muted); font-size: 14px; margin-bottom: 14px; }
.product__price-row { display: flex; align-items: baseline; gap: 14px; margin: 18px 0; }
.product__price { font-family: var(--f-head); font-size: 30px; font-weight: 700; }
.product__price--empty { font-size: 22px; color: var(--c-muted); font-weight: 400; }
.product__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.product__warranty { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--c-ok); font-weight: 600; }
.product__desc { border-top: 1px solid var(--c-line); padding-top: 18px; }
.product__desc h2 { font-size: 22px; margin-bottom: 12px; }

/* Таблицы характеристик (.opsan из HostCMS) */
table.opsan { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
table.opsan td, table.opsan th { border: 1px solid var(--c-line); padding: 8px 12px; text-align: left; vertical-align: top; }
table.opsan tr:nth-child(odd) { background: var(--c-bg-soft); }
.table-scroll { overflow-x: auto; }

/* ================= Главная ================= */
.hero { position: relative; background: var(--c-bg-tint); }
.hero .swiper-slide { height: auto; }
.hero__slide { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; padding: 60px 0; }
.hero__title { font-size: clamp(28px, 4.5vw, 52px); margin-bottom: 18px; }
.hero__text { font-size: 17px; color: var(--c-muted); margin-bottom: 24px; }
.hero__img img { max-height: 380px; margin: 0 auto; border-radius: var(--r); }
.hero__pager { text-align: center; padding: 0 0 18px; }
.hero__pager .swiper-pagination-bullet { background: var(--c-primary); opacity: .3; }
.hero__pager .swiper-pagination-bullet-active { opacity: 1; }

.section-title { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.promo { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
  background: var(--c-primary); color: #fff; border-radius: var(--r); padding: 48px; }
.promo h2 { color: #fff; }
.promo p { color: rgba(255,255,255,.85); }
.promo .btn { background: #fff; color: var(--c-primary); }
.promo .btn:hover { background: var(--c-bg-tint); }

.reviews-slider .swiper-slide { height: auto; }
.review-card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r); padding: 24px; height: 100%; }
.review-card__author { font-family: var(--f-head); font-weight: 700; margin-bottom: 10px; }
.review-card__text { font-size: 14px; color: var(--c-muted); }

/* ================= Формы ================= */
.form-wrap { max-width: 560px; margin: 0 auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-field input, .form-field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--c-line); border-radius: var(--r-sm);
  font-family: var(--f-body); font-size: 15px; color: var(--c-text); background: #fff;
}
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--c-primary); outline-offset: -1px; border-color: var(--c-primary); }
.wpcf7-not-valid-tip { font-size: 12px; color: var(--c-danger); margin-top: 4px; }
.wpcf7 form.sent .wpcf7-response-output { border-color: var(--c-ok); color: var(--c-ok); }

/* Модалка заявки */
.modal { display: none; position: fixed; inset: 0; z-index: 300; background: rgba(31,31,46,.55); padding: 20px; overflow: auto; }
.modal.is-open { display: flex; align-items: flex-start; justify-content: center; }
.modal__box { background: #fff; border-radius: var(--r); padding: 32px; width: 100%; max-width: 520px; margin: auto; position: relative; }
.modal__close { position: absolute; top: 12px; right: 16px; border: 0; background: none; font-size: 26px; cursor: pointer; color: var(--c-muted); }
.modal__title { font-family: var(--f-head); font-size: 22px; margin-bottom: 8px; }
.modal__product { font-size: 14px; color: var(--c-muted); margin-bottom: 18px; }

/* ================= Страницы-деревья (FAQ и т.п.) ================= */
.tree-list { display: flex; flex-direction: column; gap: 10px; }
.tree-item { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-sm); padding: 16px 20px; }
.tree-item__title { font-weight: 700; margin-bottom: 6px; }
.tree-item__title a { color: var(--c-text); }
.tree-item__title a:hover { color: var(--c-primary); }
.tree-item__meta { font-size: 13px; color: var(--c-muted); }

/* ================= Галерея объекта ================= */
.object-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.object-gallery a { border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--c-line); }
.object-gallery img { aspect-ratio: 4/3; object-fit: cover; width: 100%; transition: transform .15s; }
.object-gallery a:hover img { transform: scale(1.03); }

/* ================= Поиск ================= */
.search-page { max-width: 680px; }
.search-page__form { display: flex; gap: 10px; margin-bottom: 18px; }
.search-page__hints { font-size: 16px; color: var(--c-muted); min-height: 28px; }
.search-page__hints-label { margin-right: 6px; }
.js-typewriter { font-family: var(--f-head); color: var(--c-primary); font-weight: 700; }
.typewriter-cursor { color: var(--c-primary); animation: pp-blink 1s step-end infinite; font-weight: 700; }
@keyframes pp-blink { 50% { opacity: 0; } }
@media (max-width: 560px) {
  .search-page__form { flex-direction: column; }
}

/* ================= Марки сырья ================= */
.marks-slider { padding: 6px 2px; }
.mark-card {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
  height: 120px; padding: 16px; background: #fff; border: 1px solid var(--c-line);
  border-radius: var(--r); text-align: center; transition: border-color .15s, box-shadow .15s;
}
.mark-card:hover { border-color: var(--c-primary); box-shadow: var(--sh); }
.mark-card__name { font-family: var(--f-head); font-weight: 700; font-size: 20px; color: var(--c-text); }
.mark-card__desc { font-size: 12px; color: var(--c-muted); line-height: 1.35; }

/* ================= FAQ-аккордеон ================= */
.faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 860px; }
.faq-item { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r); overflow: hidden; transition: border-color .15s; }
.faq-item.is-open { border-color: var(--c-primary); }
.faq-item__q {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; padding: 16px 20px; border: 0; background: none; cursor: pointer;
  font-family: var(--f-body); font-size: 16px; font-weight: 600; color: var(--c-text); text-align: left;
}
.faq-item__q:hover { color: var(--c-primary); }
.faq-item__icon { position: relative; flex: 0 0 20px; width: 20px; height: 20px; }
.faq-item__icon::before, .faq-item__icon::after {
  content: ""; position: absolute; top: 50%; left: 50%; background: var(--c-primary);
  transition: transform .25s ease;
}
.faq-item__icon::before { width: 12px; height: 2px; transform: translate(-50%, -50%); }
.faq-item__icon::after { width: 2px; height: 12px; transform: translate(-50%, -50%); }
.faq-item.is-open .faq-item__icon::after { transform: translate(-50%, -50%) rotate(90deg) scaleX(0); }
.faq-item__a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-item__a-inner { padding: 0 20px 18px; }
.faq-item__link { font-size: 13px; color: var(--c-muted); }

/* ================= Кнопка «наверх» с прогрессом ================= */
.back-to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 150;
  width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%;
  background: #fff; box-shadow: var(--sh-lg); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s, visibility .25s, transform .25s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.back-to-top__track { fill: none; stroke: var(--c-bg-tint); stroke-width: 3; }
.back-to-top__progress { fill: none; stroke: var(--c-primary); stroke-width: 3; stroke-linecap: round; }
.back-to-top__arrow {
  position: relative; display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--c-primary); transition: transform .2s;
}
.back-to-top:hover .back-to-top__arrow { transform: translateY(-3px); }
.back-to-top:hover { box-shadow: 0 14px 40px rgba(104, 115, 255, .35); }

/* ================= 404 ================= */
.error-page { padding: 80px 0; }
.error-page__code {
  font-family: var(--f-head);
  font-size: clamp(96px, 18vw, 180px);
  font-weight: 700;
  line-height: 1;
  color: var(--c-primary);
  margin-bottom: 8px;
  text-shadow: 6px 6px 0 var(--c-bg-tint);
}
.error-page__text { max-width: 560px; margin: 0 auto 28px; color: var(--c-muted); font-size: 17px; }
.error-page__search { display: flex; gap: 10px; max-width: 520px; margin: 0 auto 24px; }
.error-page__search input {
  flex: 1; padding: 13px 16px; border: 1px solid var(--c-line); border-radius: var(--r-sm);
  font-family: var(--f-body); font-size: 15px; background: #fff; color: var(--c-text);
}
.error-page__search input:focus { outline: 2px solid var(--c-primary); outline-offset: -1px; border-color: var(--c-primary); }
.error-page__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 44px; }
.error-page__links h3 { font-size: 18px; margin-bottom: 12px; }
.error-page__links ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px 26px; flex-wrap: wrap; justify-content: center; }
.error-page__links a { font-size: 15px; }
@media (max-width: 560px) {
  .error-page__search { flex-direction: column; }
}

/* ================= Подвал ================= */
.footer { background: #23233a; color: rgba(255,255,255,.75); margin-top: 60px; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding: 48px 20px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer a { color: rgba(255,255,255,.75); }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; font-size: 14px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 20px; font-size: 13px; color: rgba(255,255,255,.5); }
.footer__logo-sub { font-size: 12px; color: rgba(255,255,255,.5); margin-top: 10px; }

/* ================= Контент ================= */
.content { max-width: 860px; }
.content img { border-radius: var(--r-sm); }
.content table { max-width: 100%; border-collapse: collapse; margin: 16px 0; }
.content table td, .content table th { border: 1px solid var(--c-line); padding: 8px 12px; }
.content blockquote { border-left: 4px solid var(--c-primary); margin: 16px 0; padding: 8px 20px; background: var(--c-bg-soft); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.alignleft { float: left; margin: 6px 20px 12px 0; }
.alignright { float: right; margin: 6px 0 12px 20px; }
.aligncenter { margin: 12px auto; }

/* Пагинация */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--c-line); border-radius: var(--r-sm); color: var(--c-text); }
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

/* ================= Адаптив ================= */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .mega { min-width: 520px; }
  .nav__link { padding: 14px 12px; font-size: 14px; }
  .header__main { gap: 16px; }
}
@media (max-width: 1020px) {
  .header__cta .btn { display: none; }
}
@media (max-width: 900px) {
  .cat-select { display: block; margin-bottom: 14px; }
  .cat-tree { display: none; }
}
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .product { grid-template-columns: 1fr; }
  .catalog-side { grid-template-columns: 1fr; }
  .catalog-side .cat-tree { display: none; }
  .hero__slide { grid-template-columns: 1fr; padding: 40px 0; }
  .promo { grid-template-columns: 1fr; padding: 32px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .object-gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .header__burger { display: flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff;
    border-bottom: 1px solid var(--c-line); box-shadow: var(--sh); max-height: calc(100vh - 90px); overflow: auto; }
  .nav.is-open { display: block; animation: pp-menu-in .25s ease; }
  @keyframes pp-menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
  .nav__list { flex-direction: column; padding: 12px; }
  .nav__item .mega { position: static; display: none; box-shadow: none; border: 0; min-width: 0; padding: 8px 0 8px 16px; }
  .nav__item.is-open > .mega { display: block; }
  .mega__grid { grid-template-columns: 1fr; gap: 8px; }
  .header__cta .btn { display: none; }
  .header__email--desktop { display: none; }
  .header__phone--desktop { display: none; }
  .header__call-btn { display: inline-flex; }
  .header__tagline { display: none; }
  .header__main { gap: 10px; }
  .header__logo-sub { display: none; }
  .cards { grid-template-columns: 1fr; }
  .object-gallery { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  /* Футер: компактный, в 2 колонки */
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 20px 24px; padding: 28px 16px; }
  .footer h4 { margin-bottom: 8px; }
  .footer li { margin-bottom: 6px; }
  .footer__bottom { padding: 12px 16px; font-size: 12px; }
  /* Модалка заявки: шторка снизу */
  .modal { padding: 0; align-items: flex-end; }
  .modal__box {
    max-width: 100%; margin: 0; border-radius: var(--r) var(--r) 0 0;
    padding: 24px 18px calc(24px + env(safe-area-inset-bottom));
    animation: pp-sheet-up .3s ease;
  }
  @keyframes pp-sheet-up { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
  .back-to-top { right: 14px; bottom: 14px; width: 48px; height: 48px; }
}
