/* =========================================================
   АтлантСтрой18 — кровельные и фасадные материалы, Ижевск
   assets/css/style.css
   1/4 — :root, сброс, типографика, контейнер, кнопки, формы
   ========================================================= */

/* Атрибут hidden обязан скрывать: правило класса с display перебивает
   браузерное [hidden]{display:none}, и скрытый блок остаётся видимым. */
[hidden] { display: none !important; }

:root {
  /* Нейтральная палитра — цвет вносят только фотографии */
  --color-bg:          #FFFFFF;
  --color-text:        #000000;
  --color-text-muted:  #4B4B4B;
  --color-section:     #F6F7F6;
  --color-border:      #E2E8F0;

  /* Пастельные плашки-разделители секций */
  --color-sand:   #F0EADE;
  --color-blue:   #D3E4F4;
  --color-sage:   #ECF2F0;

  /* Футер */
  --color-footer-bg:      #000000;
  --color-footer-text:    #FFFFFF;
  --color-footer-muted:   rgba(255, 255, 255, .6);
  --color-footer-border:  rgba(255, 255, 255, .16);

  --font-main: 'PT Sans', 'Helvetica Neue', Arial, sans-serif;

  --container-w: 1280px;
  --text-col-w:  960px;

  --gap-section: clamp(48px, 7vw, 112px);
  --gap-lg: 40px;
  --gap-md: 24px;
  --gap-sm: 12px;

  --radius-pill: 9999px;
  --radius-0: 0;

  --transition: .18s ease;

  --shadow: none;
}

/* ---------- Сброс ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
img { height: auto; }

ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ---------- Типографика ---------- */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .5em;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.15;
  color: var(--color-text);
}

h1 { font-size: clamp(32px, 4.4vw, 51px); line-height: 1.12; }
h2 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.15; }
h3 { font-size: clamp(24px, 2.9vw, 32px); line-height: 1.2; }
h4 { font-size: 20px; line-height: 1.3; }

.section-intro {
  font-size: clamp(19px, 2.1vw, 24px);
  line-height: 1.35;
  color: var(--color-text-muted);
  font-weight: 400;
  max-width: 720px;
}

.section-eyebrow {
  display: block;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: .6em;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 8px; top: -48px;
  background: #000; color: #fff;
  padding: 12px 18px;
  z-index: 1000;
  transition: top var(--transition);
}
.skip-link:focus { top: 8px; }

/* ---------- Контейнер и сетка ---------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 20px;
}

.text-col {
  max-width: var(--text-col-w);
  padding-inline: 30px;
  margin-inline: auto;
}

section { position: relative; }

.section-pad {
  padding-block: var(--gap-section);
}

.section-head {
  margin-bottom: var(--gap-lg);
}

.section-head--split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--gap-md);
  flex-wrap: wrap;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 28px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-text);
  background: transparent;
  color: var(--color-text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.btn:hover,
.btn:focus-visible {
  background: var(--color-text);
  color: #fff;
}

.btn--accent {
  background: var(--color-text);
  color: #fff;
  border-color: var(--color-text);
}

.btn--accent:hover,
.btn--accent:focus-visible {
  background: #fff;
  color: var(--color-text);
}

.btn--sm {
  padding: 12px 20px;
  font-size: 14px;
}

.btn--full { width: 100%; }

.btn--ghost-light {
  border-color: rgba(255,255,255,.5);
  color: #fff;
}
.btn--ghost-light:hover,
.btn--ghost-light:focus-visible {
  background: #fff;
  color: #000;
}

/* Круглая иконка-кнопка (действия на карточке товара) */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  border: 1px solid var(--color-border);
  transition: background var(--transition), color var(--transition);
}
.icon-btn:hover,
.icon-btn:focus-visible {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* ---------- Формы ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: var(--gap-md);
}

.field label {
  font-size: 14px;
  color: var(--color-text-muted);
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="search"],
.field textarea,
.field select {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-0);
  padding: 14px 16px;
  background: #fff;
  color: var(--color-text);
  width: 100%;
  transition: border-color var(--transition);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--color-text);
}

.field--checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.field--checkbox input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: #000;
  flex-shrink: 0;
}

.field--checkbox a { color: var(--color-text); text-decoration: underline; }

.form-actions {
  display: flex;
  gap: var(--gap-sm);
  flex-wrap: wrap;
  align-items: center;
}

/* Подтверждение отправки формы (после POST) */
.form-sent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 640px;
  margin: 0 0 var(--gap-md);
  padding: 16px 20px;
  border: 1px solid var(--color-text);
  border-radius: 12px;
  background: var(--color-sage);
  color: var(--color-text);
}

.form-sent svg { flex-shrink: 0; margin-top: 2px; }

fieldset { border: none; padding: 0; margin: 0; }
legend { padding: 0; }

/* =========================================================
   2/4 — шапка, навигация, бургер, мобильное меню, футер
   ========================================================= */

/* ---------- Шапка: верхняя строка ---------- */
.site-header { position: relative; z-index: 100; background: var(--color-bg); }

.header-top { border-bottom: 1px solid var(--color-border); }

.header-top__inner {
  display: flex;
  align-items: center;
  gap: var(--gap-lg);
  padding-block: 18px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.logo__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.logo__text { display: flex; flex-direction: column; line-height: 1.2; }
.logo__name { font-size: 19px; }
.logo__domain { font-size: 12px; color: var(--color-text-muted); }

.header-claim {
  flex: 1 1 auto;
  min-width: 0;
  padding-left: var(--gap-lg);
  border-left: 1px solid var(--color-border);
}
.header-claim__title {
  font-weight: 700;
  font-size: 16px;
  margin: 0;
}
.header-claim__sub {
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--color-text-muted);
  margin: 2px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
  display: inline-block;
}

.header-search {
  display: flex;
  align-items: center;
  max-width: 320px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.header-search input {
  flex: 1 1 auto;
  border: none;
  padding: 9px 14px;
  font-size: 13px;
  min-width: 0;
}
.header-search input:focus { outline: none; }
.header-search button {
  flex: 0 0 auto;
  padding: 9px 14px;
  display: flex;
  align-items: center;
}

.header-contacts {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.header-phones { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; }
.header-phones li { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.header-phones a { font-size: 15px; }
.header-phones a:hover { text-decoration: underline; }
.header-phones__role { font-size: 11px; color: var(--color-text-muted); }
.header-email {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
}
.header-email:hover { color: var(--color-text); }

.burger {
  display: none;
  flex: 0 0 auto;
  padding: 6px;
}

/* ---------- Шапка: нижняя строка (навигация) ---------- */
.header-nav {
  border-bottom: 1px solid var(--color-border);
}
.header-nav__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-lg);
}

.main-nav__list {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.main-nav__item {
  position: relative;
  padding-block: 16px;
}
/* Мега-панель считаем от контейнера шапки, а не от пункта меню: скрытая панель
   шириной 720px, прижатая к левому краю своего пункта, вылезала за правый край окна
   и давала горизонтальную прокрутку на 901-1100 и 1101-1160px. */
.main-nav__item.has-mega { position: static; }
.main-nav__item > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  white-space: nowrap;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}
.main-nav__item > a:hover,
.main-nav__item.is-active > a {
  border-bottom-color: var(--color-text);
}
.main-nav__item .icon { transition: transform var(--transition); }
.main-nav__item.has-mega:hover .icon,
.main-nav__item.has-mega:focus-within .icon { transform: rotate(180deg); }

.header-cta { flex: 0 0 auto; }

/* Мега-меню */
.mega-menu {
  position: absolute;
  left: 20px;
  top: 100%;
  width: min(720px, 90vw);
  background: #fff;
  border: 1px solid var(--color-border);
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}
.main-nav__item.has-mega:hover .mega-menu,
.main-nav__item.has-mega:focus-within .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mega-menu__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 20px;
}
.mega-menu__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  font-size: 14px;
  border-bottom: 1px solid var(--color-section);
  white-space: nowrap;
}
.mega-menu__link:hover { color: var(--color-text-muted); }
.mega-menu__link .icon { flex: 0 0 auto; color: var(--color-text-muted); }

/* ---------- Компактная строка на внутренних страницах ---------- */
.header-compact { background: var(--color-section); }
.header-compact__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
  padding-block: 12px;
  flex-wrap: wrap;
}
.header-compact__catalog {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  flex: 0 0 auto;
}
.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.quick-actions__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 9px 16px;
  border: 1px solid var(--color-text);
  border-radius: var(--radius-pill);
  background: #fff;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.quick-actions__btn:hover,
.quick-actions__btn:focus-visible { background: var(--color-text); color: #fff; }
.quick-actions__btn--accent {
  background: var(--color-text);
  color: #fff;
}
.quick-actions__btn--accent:hover,
.quick-actions__btn--accent:focus-visible {
  background: #fff;
  color: var(--color-text);
}

/* ---------- Хлебные крошки ---------- */
.breadcrumbs { background: var(--color-section); }
.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-block: 14px;
  font-size: 13px;
  color: var(--color-text-muted);
}
.breadcrumbs__item:not(:last-child)::after {
  content: '/';
  margin-left: 6px;
  color: var(--color-border);
}
.breadcrumbs__item a:hover { color: var(--color-text); text-decoration: underline; }
.breadcrumbs__item [aria-current="page"] { color: var(--color-text); }

/* ---------- Мобильное меню ---------- */
.mobile-menu {
  position: fixed;
  top: 0; right: 0;
  width: min(360px, 88vw);
  height: 100%;
  background: #fff;
  z-index: 300;
  transform: translateX(100%);
  transition: transform var(--transition);
  overflow-y: auto;
  border-left: 1px solid var(--color-border);
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu__inner { padding: 20px; display: flex; flex-direction: column; gap: 20px; }

.mobile-menu__search {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.mobile-menu__search input { flex: 1 1 auto; border: none; padding: 10px 14px; min-width: 0; }
.mobile-menu__search input:focus { outline: none; }
.mobile-menu__search button { padding: 10px 14px; }

.mobile-nav__item { border-bottom: 1px solid var(--color-section); }
.mobile-nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-nav__row a { display: block; padding: 13px 0; font-size: 15px; flex: 1 1 auto; }
.mobile-nav__expand { padding: 13px 6px; transition: transform var(--transition); }
.mobile-nav__expand[aria-expanded="true"] { transform: rotate(180deg); }
.mobile-nav__sub { display: none; padding: 0 0 10px 14px; }
.mobile-nav__sub.is-open { display: block; }
.mobile-nav__sub li a { display: block; padding: 7px 0; font-size: 13px; color: var(--color-text-muted); }

.mobile-menu__phones { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.mobile-menu__phones li { display: flex; flex-direction: column; }
.mobile-menu__phones a { font-size: 16px; }
.mobile-menu__phones span { font-size: 11px; color: var(--color-text-muted); }

.mobile-menu__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 290;
}

/* ---------- Плавающие кнопки связи ---------- */
.floating-actions {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
}
.floating-actions__btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #000;
  transition: background var(--transition), color var(--transition);
}
.floating-actions__btn:hover,
.floating-actions__btn:focus-visible {
  background: #fff;
  color: #000;
}

/* ---------- Футер ---------- */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  margin-top: var(--gap-section);
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-lg);
  padding-block: 56px;
}

.footer-col__title {
  /* Это h2, а глобальное правило h1…h6 задаёт тёмный --color-text и перебивает
     наследуемый белый цвет футера: на чёрном фоне заголовок становился невидим. */
  color: var(--color-footer-text);
  font-size: 17px;
  font-weight: 400;
  margin-bottom: 18px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a,
.footer-col span { font-size: 14px; color: var(--color-footer-muted); }
.footer-col a:hover { color: var(--color-footer-text); }

.footer-contacts li { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.footer-contacts a { color: var(--color-footer-text); font-size: 14px; }
.footer-contacts li span { font-size: 11px; }
.footer-contacts__address { color: var(--color-footer-muted); }

.footer-bottom { border-top: 1px solid var(--color-footer-border); }
.footer-bottom__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
  padding-block: 20px;
  flex-wrap: wrap;
}
.footer-bottom p {
  font-size: 12px;
  color: var(--color-footer-muted);
  max-width: 760px;
}
.footer-bottom a:hover { color: var(--color-footer-text); }

/* =========================================================
   3/4 — стили всех секций
   ========================================================= */

/* ---------- Пастельные секции-разделители ---------- */
.section-sand { background: var(--color-sand); }
.section-blue { background: var(--color-blue); }
.section-sage { background: var(--color-sage); }
.section-grey { background: var(--color-section); }

/* ---------- Hero / карусель акций ---------- */
.hero {
  position: relative;
  color: #fff;
  overflow: hidden;
}
.hero__slides { position: relative; height: clamp(360px, 52vw, 620px); }
.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease;
}
.hero__slide.is-active { opacity: 1; visibility: visible; }
.hero__slide img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.45) 100%);
}
.hero__content {
  position: absolute;
  left: 0; right: 0; bottom: 64px;
  text-align: center;
  padding-inline: 20px;
}
.hero__content h1,
.hero__content p { color: #fff; }
.hero__content h1 { margin-bottom: .4em; }
.hero__content .btn { border-color: #fff; color: #fff; }
.hero__content .btn:hover { background: #fff; color: #000; }

.hero__controls {
  position: absolute;
  left: 0; right: 0; bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-inline: 20px;
}
.hero__play {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.6);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex: 0 0 auto;
}
.hero__track {
  flex: 1 1 auto;
  max-width: 420px;
  height: 2px;
  background: rgba(255,255,255,.35);
  position: relative;
}
.hero__track-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: #fff;
  width: 20%;
  transition: width .3s linear;
}
.hero__dots { display: flex; gap: 8px; flex: 0 0 auto; }
.hero__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
}
.hero__dot.is-active { background: #fff; }

/* ---------- Продуктовая карусель / плитки-товары ---------- */
.tile-carousel { position: relative; }
.tile-carousel__track {
  display: flex;
  gap: var(--gap-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.tile-carousel__track::-webkit-scrollbar { display: none; }
.tile-carousel__item {
  flex: 0 0 clamp(200px, 22vw, 260px);
  scroll-snap-align: start;
}
.tile-carousel__frame {
  aspect-ratio: 4/5;
  background: var(--color-section);
  border: 1px solid var(--color-border);
  overflow: hidden;
  margin-bottom: 14px;
}
.tile-carousel__frame img { width: 100%; height: 100%; object-fit: cover; }
.tile-carousel__name { font-size: 15px; margin-bottom: 10px; }

.tile-carousel__progress {
  height: 1px;
  background: var(--color-border);
  margin-top: var(--gap-md);
  position: relative;
}
.tile-carousel__progress-fill {
  position: absolute; left: 0; top: -1px;
  height: 2px; width: 22%;
  background: var(--color-text);
}

/* ---------- Двухколоночные блоки (новости+преимущества, статьи+о компании) ---------- */
.split-block {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: var(--gap-lg);
  align-items: start;
}

.news-list { display: flex; flex-direction: column; }
.news-item {
  padding-block: 22px;
  border-bottom: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--gap-md);
}
.news-item:first-child { padding-top: 0; }
.news-item__date { font-size: 13px; color: var(--color-text-muted); }
.news-item__title { font-size: 17px; margin-bottom: 6px; }
.news-item__text { font-size: 14px; color: var(--color-text-muted); }
.news-item__link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; margin-top: 10px;
}
.news-item__link:hover { text-decoration: underline; }

.advantages-list {
  columns: 2;
  column-gap: var(--gap-md);
}
.advantages-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  break-inside: avoid;
  padding-block: 10px;
  font-size: 15px;
}
.advantages-list li .icon { flex: 0 0 auto; margin-top: 3px; color: var(--color-text-muted); }

/* ---------- Сетка каталога на главной (кровля / фасады): 5 колонок ---------- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
}
.tile-grid__item {
  background: #fff;
  display: flex;
  flex-direction: column;
}
.tile-grid__frame {
  aspect-ratio: 1/1;
  background: var(--color-section);
  overflow: hidden;
  position: relative;
}
.tile-grid__frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.tile-grid__item:hover .tile-grid__frame img { transform: scale(1.04); }
.tile-grid__caption {
  padding: 14px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tile-grid__caption .icon { color: var(--color-text-muted); flex: 0 0 auto; }

/* ---------- Каталог товаров (страница категории): 3 колонки ---------- */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-md);
}
.catalog-card {
  border: 1px solid var(--color-border);
}
.catalog-card__media {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--color-section);
  overflow: hidden;
}
.catalog-card__media img { width: 100%; height: 100%; object-fit: cover; }
.catalog-card__actions {
  position: absolute;
  right: 10px; bottom: 10px;
  display: flex;
  gap: 8px;
}
.catalog-card__body { padding: 18px; }
.catalog-card__title { font-size: 16px; margin-bottom: 6px; }
.catalog-card__desc { font-size: 13px; color: var(--color-text-muted); margin-bottom: 12px; }
.catalog-card__price { font-size: 15px; font-weight: 700; }

/* ---------- Секции About-типа (узкая текстовая колонка) ---------- */
.prose { max-width: var(--text-col-w); }
.prose p { margin-bottom: 1.2em; font-size: 16px; color: var(--color-text-muted); }
.prose h2, .prose h3 { color: var(--color-text); }
.prose ul { display: flex; flex-direction: column; gap: 10px; margin: 1.2em 0; }
.prose ul li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.prose ul li .icon { flex: 0 0 auto; margin-top: 3px; }

/* ---------- Акцент / цитата (пастельная плашка) ---------- */
.accent-card {
  background: var(--color-sage);
  padding: 44px;
  max-width: 480px;
  margin-left: auto;
}
.accent-card h3 { margin-bottom: .5em; }
.accent-card p { color: var(--color-text-muted); margin-bottom: 20px; }

/* ---------- Спецпредложения (2 слайда) ---------- */
.offer-slider { position: relative; }
.offer-slider__track {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap-lg);
}
.offer-card {
  background: var(--color-sand);
  padding: 36px;
}
.offer-card h3 { margin-bottom: .4em; }
.offer-card p { color: var(--color-text-muted); }

.slider-arrows { display: flex; gap: 10px; margin-top: var(--gap-md); }
.slider-arrow {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-text);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.slider-arrow:hover, .slider-arrow:focus-visible { background: var(--color-text); color: #fff; }

/* ---------- Ряд иконок-преимуществ (7 шт.) ---------- */
.benefits-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--gap-sm);
}
.benefits-row__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 20px 8px;
}
.benefits-row__item .icon { color: var(--color-text); }
.benefits-row__item span { font-size: 13px; color: var(--color-text-muted); }

/* ---------- Панель быстрых действий / виджет CTA «Заявка на расчёт» ---------- */
.cta-widget {
  background: var(--color-blue);
  padding: 40px;
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: var(--gap-lg);
  align-items: center;
}
.cta-widget__phones { display: flex; flex-direction: column; gap: 6px; }
.cta-widget__phones a { font-size: 20px; }
.cta-widget__phones span { font-size: 12px; color: var(--color-text-muted); }
.cta-widget .btn { background: #000; color: #fff; border-color: #000; }
.cta-widget .btn:hover { background: transparent; color: #000; }

/* ---------- Боковой сайдбар вторичной навигации ---------- */
.page-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--gap-lg);
  align-items: start;
}
/* Колонка 1fr по умолчанию не уже своего min-content: таблица цен с min-width: 480px
   растягивала её на узких экранах, и страница уезжала в горизонтальную прокрутку
   вместо того, чтобы скроллиться внутри .price-table-wrap. */
.page-layout > * { min-width: 0; }
.sidebar-nav {
  border: 1px solid var(--color-border);
}
.sidebar-nav li { border-bottom: 1px solid var(--color-border); }
.sidebar-nav li:last-child { border-bottom: none; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  font-size: 14px;
}
.sidebar-nav a:hover { background: var(--color-section); }
.sidebar-nav li.is-active a { font-weight: 700; background: var(--color-section); }

/* ---------- Таблицы цен ---------- */
.price-table-wrap { overflow-x: auto; margin-bottom: var(--gap-lg); }
.price-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.price-table caption {
  text-align: left;
  font-size: 20px;
  padding-bottom: 14px;
  caption-side: top;
}
.price-table th, .price-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
}
.price-table th { color: var(--color-text-muted); font-weight: 400; }
.price-table td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }

/* ---------- Карточка контактов ---------- */
.contact-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-md);
}
.contact-fact {
  border: 1px solid var(--color-border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contact-fact .icon { color: var(--color-text-muted); }
.contact-fact strong { font-size: 15px; }
.contact-fact span { font-size: 13px; color: var(--color-text-muted); }

/* ---------- Карта ---------- */
.map-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16/7;
  background: var(--color-section);
  border: 1px solid var(--color-border);
}
.map-embed iframe { width: 100%; height: 100%; border: 0; }
.map-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; }
.map-link:hover { text-decoration: underline; }

/* ---------- Галерея объекта 2×2 ---------- */
.gallery-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap-sm);
}
.gallery-2x2__frame {
  aspect-ratio: 4/3;
  background: var(--color-section);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.gallery-2x2__frame img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- FAQ / аккордеон ---------- */
.accordion__item { border-bottom: 1px solid var(--color-border); }
.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
  padding: 20px 0;
  text-align: left;
  font-size: 16px;
}
.accordion__trigger .icon { flex: 0 0 auto; transition: transform var(--transition); }
.accordion__trigger[aria-expanded="true"] .icon { transform: rotate(45deg); }
.accordion__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.accordion__panel-inner { padding-bottom: 20px; font-size: 14px; color: var(--color-text-muted); max-width: var(--text-col-w); }

/* ---------- Табы ---------- */
.tabs__list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--gap-md); }
.tabs__btn {
  padding: 11px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: 14px;
}
.tabs__btn.is-active { border-color: var(--color-text); background: var(--color-text); color: #fff; }
.tabs__panel { display: none; }
.tabs__panel.is-active { display: block; }

/* ---------- Модальное окно ---------- */
.modal { position: fixed; inset: 0; z-index: 400; display: none; }
.modal.is-open { display: block; }
.modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.modal__dialog {
  position: relative;
  background: #fff;
  max-width: 480px;
  width: min(480px, 92vw);
  margin: 8vh auto;
  padding: 36px;
}
.modal__close { position: absolute; top: 14px; right: 14px; }

/* ---------- Статьи ---------- */
.article-list { display: flex; flex-direction: column; gap: var(--gap-md); }
.article-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--gap-md);
  padding-block: var(--gap-md);
  border-bottom: 1px solid var(--color-border);
}
.article-card__frame { aspect-ratio: 4/3; background: var(--color-section); overflow: hidden; }
.article-card__frame img { width: 100%; height: 100%; object-fit: cover; }
.article-card__date { font-size: 12px; color: var(--color-text-muted); margin-bottom: 6px; }
.article-card__title { font-size: 18px; margin-bottom: 8px; }
.article-card__excerpt { font-size: 14px; color: var(--color-text-muted); }

/* ---------- Появление при скролле ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Карта сайта ---------- */
.sitemap-list { display: flex; flex-direction: column; gap: 4px; }
.sitemap-list li { border-bottom: 1px solid var(--color-section); }
.sitemap-list a { display: block; padding: 10px 0; font-size: 14px; color: var(--color-text-muted); }
.sitemap-list a:hover { color: var(--color-text); text-decoration: underline; }

/* ---------- Партнёры ---------- */
.partners-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-lg);
  align-items: center;
  padding-block: var(--gap-md);
}
.partners-row span {
  font-size: 18px;
  color: var(--color-text-muted);
}

/* =========================================================
   4/4 — медиазапросы, focus-visible, prefers-reduced-motion, печать
   ========================================================= */

/* ---------- focus-visible ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.icon-btn:focus-visible,
.mobile-nav__expand:focus-visible,
.tile-grid__item a:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}
.header-search input:focus-visible,
.mobile-menu__search input:focus-visible { outline: none; }

/* ---------- ≤1439px: сжимаем контейнер и мега-меню ---------- */
@media (max-width: 1439px) {
  .benefits-row { grid-template-columns: repeat(4, 1fr); }
  .tile-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- ≤1100px: планшет, компактная шапка, 2 колонки каталога ---------- */
@media (max-width: 1100px) {
  .header-claim { display: none; }
  .header-contacts { align-items: center; }
  .header-phones { align-items: flex-end; }

  .main-nav__list { gap: 18px; }
  .mega-menu { width: min(560px, 92vw); }
  .mega-menu__grid { grid-template-columns: repeat(2, 1fr); }

  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .tile-grid { grid-template-columns: repeat(3, 1fr); }
  .benefits-row { grid-template-columns: repeat(4, 1fr); row-gap: var(--gap-md); }

  .split-block { grid-template-columns: 1fr; gap: var(--gap-lg); }
  .advantages-list { columns: 1; }

  .page-layout { grid-template-columns: 1fr; }
  .sidebar-nav { display: flex; flex-wrap: wrap; }
  .sidebar-nav li { border-bottom: none; border-right: 1px solid var(--color-border); }
  .sidebar-nav li:last-child { border-right: none; }

  .cta-widget { grid-template-columns: 1fr; text-align: left; }
  .contact-facts { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- ≤900px: навигация уходит в бургер ---------- */
@media (max-width: 900px) {
  .header-nav .main-nav,
  .header-nav .header-cta,
  .header-contacts,
  .header-search { display: none; }

  .header-nav__inner { justify-content: flex-end; }
  .header-nav { padding-block: 4px; }

  .burger { display: inline-flex; }

  .header-compact__inner { justify-content: space-between; }
  .quick-actions__btn span,
  .quick-actions__btn { font-size: 12px; padding: 9px 12px; }

  .offer-slider__track { grid-template-columns: 1fr; }
  .article-card { grid-template-columns: 1fr; }
  .gallery-2x2 { grid-template-columns: 1fr; }
}

/* ---------- ≤768px: мобильная сетка ---------- */
@media (max-width: 768px) {
  :root { --gap-lg: 28px; --gap-md: 18px; }

  h1 { font-size: clamp(28px, 8vw, 38px); }

  .hero__content { bottom: 40px; }
  .hero__slides { height: 70vw; min-height: 320px; }

  .tile-grid { grid-template-columns: repeat(2, 1fr); }
  .catalog-grid { grid-template-columns: 1fr; }
  .benefits-row { grid-template-columns: repeat(2, 1fr); }

  .footer-top { grid-template-columns: repeat(2, 1fr); gap: var(--gap-lg) var(--gap-md); }

  .contact-facts { grid-template-columns: 1fr; }

  .accent-card { margin-left: 0; max-width: none; padding: 28px; }

  .tile-carousel__item { flex-basis: 68vw; }

  .footer-bottom__inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- ≤560px: узкие телефоны ---------- */
@media (max-width: 560px) {
  .container, .text-col { padding-inline: 16px; }

  .header-top__inner { padding-block: 12px; gap: 12px; }
  .logo__domain { display: none; }

  .footer-top { grid-template-columns: 1fr; padding-block: 40px; gap: var(--gap-md); }

  .quick-actions { width: 100%; }
  .quick-actions__btn { flex: 1 1 auto; justify-content: center; }

  .floating-actions { right: 12px; bottom: 12px; }
  .floating-actions__btn { width: 46px; height: 46px; }

  .accent-card { padding: 22px; }
  .cta-widget { padding: 24px; }
}

/* ---------- prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Печать ---------- */
@media print {
  .site-header, .header-compact, .breadcrumbs, .floating-actions,
  .mobile-menu, .mobile-menu__overlay, .footer-bottom, .hero__controls,
  .quick-actions, .cta-widget, .site-footer nav, .icon-btn { display: none !important; }

  body { color: #000; background: #fff; }
  a { color: #000; text-decoration: underline; }
  .container { max-width: 100%; padding: 0; }
  .catalog-card, .contact-fact, .price-table th, .price-table td { border-color: #999; }
}
