/* Старый вид ALUMIRROR на платформе: только то, чего не было у прежнего сайта —
   блоки конструктора (cl-b-*), окно заявки, хлебные крошки, служебные состояния. Цвета и радиусы — токены styles.css. */

/* ---------- служебное */
/* скрипт прячет и показывает части страниц атрибутом hidden — классы прежнего сайта не должны его перебивать */
[hidden] { display: none !important; }
.cl-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cl-loading { padding: 24px 0; color: var(--text-muted); }
.cl-old-price { margin-left: 8px; font-size: .8em; font-weight: 500; color: var(--text-muted); }
.cl-autoload-hint { margin: 24px 0 0; text-align: center; font-size: var(--fs-caption); color: var(--text-muted); }
.cl-consent { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; font-size: 13px; color: var(--text-muted); }
.cl-consent input { margin-top: 3px; flex: none; }
/* галочка согласия на обработку ПД (partials/consent.njk): подпись со ссылкой на /soglasie, без согласия — красная */
.cl-consent { cursor: pointer; line-height: 1.45; }
.cl-consent input[type="checkbox"] { width: 18px; height: 18px; padding: 0; margin: 1px 0 0; accent-color: var(--accent, #0b2a24); cursor: pointer; }
.cl-consent a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.cl-consent.has-error { color: #b42318; }
.cl-consent.has-error input { outline: 2px solid #b42318; outline-offset: 1px; }
.cl-acc-actions { margin-top: 12px; }
.cl-acc-pay { margin-top: 14px; }
.cl-search-form { display: flex; gap: 12px; margin-bottom: 24px; }
.cl-search-form .filter-input { flex: 1; min-width: 0; }
.cl-plain-list { padding-top: 0; }
.cl-plain-list .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.checkbox.is-zero { opacity: .45; }
.field.has-error input, .field.has-error textarea { border-color: #c0392b; }
a.selector-chip { display: inline-flex; align-items: center; text-decoration: none; }
.selector-chip.is-inexact { border-style: dashed; opacity: .78; }
[data-cl-product].is-loading .product-detail-right { opacity: .6; transition: opacity .2s; }
.cl-siblings { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.cl-only-m { display: none; }
@media (max-width: 900px) { .cl-only-m { display: block; } }

/* ---------- хлебные крошки */
.cl-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; font-size: var(--fs-caption); color: var(--text-muted); }
.cl-crumbs li + li::before { content: "›"; margin-right: 6px; }
.cl-crumbs a { color: inherit; }

/* ---------- окно заявки */
.cl-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-soft); overflow: auto; }
.cl-dialog::backdrop { background: rgba(10, 20, 14, .55); }
.cl-dialog-box { position: relative; padding: 32px 28px 24px; }
.cl-dialog-box .order-form { margin-top: 16px; padding: 0; box-shadow: none; background: none; border: 0; }
.cl-dialog-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface-tint); font-size: 22px; cursor: pointer; }

/* ---------- оформление секции из вкладки «Оформление» конструктора */
.cl-b.pt-none { padding-top: 0; } .cl-b.pt-xs { padding-top: 8px; } .cl-b.pt-s { padding-top: 24px; } .cl-b.pt-m { padding-top: 48px; } .cl-b.pt-l { padding-top: 80px; } .cl-b.pt-xl { padding-top: 120px; }
.cl-b.pb-none { padding-bottom: 0; } .cl-b.pb-xs { padding-bottom: 8px; } .cl-b.pb-s { padding-bottom: 24px; } .cl-b.pb-m { padding-bottom: 48px; } .cl-b.pb-l { padding-bottom: 80px; } .cl-b.pb-xl { padding-bottom: 120px; }
.cl-b.bg-surface { background: var(--surface-tint); } .cl-b.bg-sand { background: #f6f1ea; } .cl-b.bg-brand { background: var(--accent); color: var(--text-on-dark); } .cl-b.bg-dark { background: #141515; color: var(--text-on-dark); }
.cl-b.bg-custom { background: var(--sec-bg); }
.cl-b.has-bg-img { background-image: linear-gradient(rgba(0, 0, 0, var(--sec-overlay, 0)), rgba(0, 0, 0, var(--sec-overlay, 0))), var(--sec-bg-img); background-size: cover; background-position: center; }
.cl-b.has-text-color { color: var(--sec-text); }
.cl-b.bg-brand .section-title, .cl-b.bg-dark .section-title, .cl-b.bg-brand .cms-lead, .cl-b.bg-dark .cms-lead { color: inherit; }
.cl-b.ta-center { text-align: center; } .cl-b.ta-right { text-align: right; } .cl-b.ta-center .cms-lead { margin-inline: auto; }
@media (max-width: 900px) { .cl-b.hide-m { display: none !important; } }
@media (min-width: 901px) { .cl-b.hide-d { display: none !important; } }

/* ---------- общие части блоков */
.cl-cms > .cl-b:first-child:not(.page-hero) { padding-top: 40px; }
.cl-b-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 24px; }
.cl-b-head > div > :last-child { margin-bottom: 0; }
.cl-b-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 24px; }
.cl-b-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 24px; }
.cl-b-grid { grid-template-columns: repeat(var(--cl-cols, 3), minmax(0, 1fr)); }
.cl-b-num { display: inline-block; margin-bottom: 10px; font-family: var(--font-display); font-weight: 600; color: var(--accent); letter-spacing: .04em; }
.cl-b-list { margin: 12px 0 0; padding-left: 18px; }
.cl-b-list li { margin: 6px 0; }
.cl-b-list--plus, .cl-b-list--minus { padding: 0; list-style: none; }
.cl-b-list--plus li::before { content: "✓"; margin-right: 8px; color: var(--accent); font-weight: 700; }
.cl-b-list--minus li::before { content: "—"; margin-right: 8px; color: var(--text-muted); }
.cl-b-photo { margin: -22px -22px 18px; border-radius: 24px 24px 0 0; overflow: hidden; aspect-ratio: 4 / 3; }
.cl-b-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cl-b-figure { margin: 0; }
.cl-b-figure figcaption { margin-top: 10px; font-size: var(--fs-caption); color: var(--text-muted); }
.cl-b-rows { display: grid; gap: 10px; margin: 14px 0 0; }
.cl-b-rows > div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border-soft); }
.cl-b-rows dt { color: var(--text-muted); } .cl-b-rows dd { margin: 0; text-align: right; font-weight: 500; }
.cl-b-rows--contacts > div { flex-direction: column; gap: 4px; } .cl-b-rows--contacts dd { text-align: left; }
.cl-b-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; }
.cl-b-tag { display: inline-block; margin-bottom: 10px; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; }
.cl-b-note { margin-top: 20px; }
.cl-b-second { margin-top: 32px; }
.cl-b-stats { flex-wrap: wrap; margin-top: 28px; font-size: inherit; }
.cl-b-stats .stat-number { display: block; font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px); font-weight: 600; color: var(--accent); }
.cl-b-wide-img img { aspect-ratio: 21 / 9; object-fit: cover; }

/* первый экран и обложки */
.cl-b-hero-title { margin: 0 0 16px; font-family: var(--font-display); font-size: var(--fs-h1); line-height: var(--lh-tight); }
.cl-b-tagline { margin-top: 18px; }
.cl-b-imghero { position: relative; min-height: 420px; display: flex; align-items: flex-end; border-radius: var(--radius-xl); overflow: hidden; background: var(--surface-green); }
.cl-b-imghero-media, .cl-b-imghero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cl-b-imghero:not(.is-plain)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .55)); }
.cl-b-imghero-copy { position: relative; z-index: 1; max-width: 720px; padding: 40px; }
.cl-b-imghero:not(.is-plain) .cl-b-imghero-copy { color: #fff; }
.cl-b-imghero:not(.is-plain) .eyebrow, .cl-b-imghero:not(.is-plain) .page-hero-text { color: rgba(255, 255, 255, .88); }
.cl-b-imghero h1, .cl-b-imghero h2 { margin: 0 0 12px; font-family: var(--font-display); font-size: var(--fs-h1); line-height: var(--lh-tight); }
.cl-b-intro { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: end; }
.cl-b--pageIntro.is-wide .cl-b-intro { grid-template-columns: 1fr 1fr; }
.cl-b--pageIntro.is-xl h1, .cl-b--pageIntro.is-xl h2 { font-size: clamp(2.6rem, 7vw, 4rem); }
.cl-b--pageIntro.has-line .container { padding-bottom: 24px; border-bottom: 1px solid var(--border-soft); }
.cl-b--pageIntro .page-hero-text { margin: 0; }
.cl-b--richText.is-narrow .container > * { max-width: 760px; }

/* преимущества, этапы, сравнение, вкладки */
.cl-b-features { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 0; padding: 20px 0; list-style: none; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.cl-b-feature { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.cl-ico { flex: none; color: var(--accent); }
.cl-b-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin: 24px 0 0; padding: 0; list-style: none; }
.cl-b-versus { margin-top: 24px; }
.cl-b-vs-right { border-color: var(--accent); background: var(--accent-soft); }
.cl-b-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.cl-b-tab { padding: 10px 16px; border: 1px solid rgba(0, 59, 54, .16); border-radius: 999px; background: #fff; color: var(--text-main); font: inherit; font-size: 14px; cursor: pointer; }
.cl-b-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.cl-b-tab small { opacity: .7; margin-left: 4px; }

/* призывы, акции, таймер */
.cl-b-cta .cms-lead { margin-inline: auto; }
.cl-b-cta .cl-b-actions { justify-content: center; }
.cl-b-cta.is-brand { background: linear-gradient(135deg, var(--accent), #006b5e); border-color: transparent; color: var(--text-on-dark); }
.cl-b-cta.is-brand .section-title, .cl-b-cta.is-brand .cms-lead, .cl-b-cta.is-brand .eyebrow, .cl-b-cta.is-brand .ghost-link { color: inherit; }
.cl-b-cta.is-brand .btn-primary { background: #fff; color: var(--accent); }
.cl-b-promo { position: relative; display: block; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-green); color: inherit; text-decoration: none; }
.cl-b-promo-media, .cl-b-promo-media img { display: block; width: 100%; height: auto; }
.cl-b-promo-ph { display: block; padding: 80px 24px; text-align: center; color: var(--text-muted); }
.cl-b-promo-cap { position: absolute; left: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .92); font-size: 13px; }
.cl-b-promo-btn { position: absolute; right: 20px; bottom: 20px; }
.cl-b-clock { display: flex; justify-content: center; gap: 12px; margin: 22px 0 0; }
.cl-b-clock > div { min-width: 72px; padding: 12px 8px; border-radius: 16px; background: rgba(255, 255, 255, .14); }
.cl-b-clock b { display: block; font-family: var(--font-display); font-size: 28px; }
.cl-b-clock span { font-size: 12px; opacity: .8; }
.cl-b-ended { margin-top: 16px; font-weight: 600; }

/* портфолио, галерея, карта */
.cl-b-pf-grid .cl-b-project { padding: 0 0 18px; overflow: hidden; }
.cl-b-project > :not(.cl-b-project-media) { margin-left: 18px; margin-right: 18px; }
.cl-b-project h3 { margin-top: 4px; } .cl-b-project h3 a { color: inherit; text-decoration: none; }
.cl-b-project-media { position: relative; display: block; width: 100%; margin-bottom: 14px; padding: 0; border: 0; background: var(--surface-green); aspect-ratio: 4 / 3; cursor: zoom-in; }
a.cl-b-project-media { cursor: pointer; }
.cl-b-project-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cl-b-project-count { position: absolute; right: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(10, 20, 14, .7); color: #fff; font-size: 12px; }
.cl-b-pf-quote { margin-top: 12px; padding: 16px; }
.cms-gallery[style*="--cl-cols"] { grid-template-columns: repeat(var(--cl-cols), minmax(0, 1fr)); }
.cl-b-gal-btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.cl-b--gallery .cms-gallery-item img { aspect-ratio: var(--cl-ar, 4 / 5); object-fit: cover; }
.cl-b-map { min-height: 360px; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-green); }
.cl-b-map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }
.cl-b-contacts { align-items: stretch; margin-top: 24px; }

/* видео, бегущая строка, отступ */
.cl-video { position: relative; aspect-ratio: var(--cl-ar, 16 / 9); border-radius: var(--radius-lg); overflow: hidden; background: #0e1a14; }
.cl-video > img, .cl-video > video, .cl-video > iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.cl-video-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 72px; height: 72px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--accent); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); }
.video-review-media.cl-video { aspect-ratio: auto; border-radius: inherit; background: none; }
.video-review-media.cl-video.is-playing { aspect-ratio: 9 / 16; }
.cl-b-review-cap { display: flex; flex-direction: column; gap: 2px; padding: 12px 4px 0; font-size: 14px; }
.cl-marquee { overflow: hidden; padding: 18px 0; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.cl-marquee-track { display: flex; width: max-content; animation: cl-marquee var(--cl-speed, 40s) linear infinite; }
.cl-marquee-run { display: flex; align-items: center; gap: 28px; padding-right: 28px; font-family: var(--font-display); font-size: clamp(18px, 2.4vw, 26px); white-space: nowrap; }
.cl-marquee-sep { color: var(--brown); }
@keyframes cl-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .cl-marquee-track { animation: none; } }
.cl-spacer { display: flex; align-items: center; }
.cl-spacer--xs { height: 8px; } .cl-spacer--s { height: 24px; } .cl-spacer--m { height: 48px; } .cl-spacer--l { height: 80px; } .cl-spacer--xl { height: 120px; }
.cl-spacer .container { width: 100%; } .cl-spacer-line { margin: 0; border: 0; border-top: 1px solid var(--border-soft); }
.cl-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.cl-rail > * { scroll-snap-align: start; }
@media (min-width: 1024px) { .cl-b .catalog-categories-grid[style*="--cl-cols"] { grid-template-columns: repeat(var(--cl-cols), minmax(0, 1fr)); } }

@media (max-width: 900px) {
  .cl-b-grid, .cms-gallery[style*="--cl-cols"] { grid-template-columns: minmax(0, 1fr); }
  .cl-b-cols, .cl-b-intro, .cl-b--pageIntro.is-wide .cl-b-intro { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .cl-b-head { flex-direction: column; align-items: flex-start; }
  .cl-b-imghero { min-height: 340px; } .cl-b-imghero-copy { padding: 24px; }
  .cl-b-promo-btn { position: static; margin: 12px; } .cl-b-promo-cap { position: static; margin: 12px 12px 0; }
  .cl-b-clock > div { min-width: 60px; } .cl-b-clock b { font-size: 22px; }
  .cl-search-form { flex-direction: column; }
}
@media (min-width: 560px) and (max-width: 900px) {
  .cl-b-grid, .cms-gallery[style*="--cl-cols"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   1.1.17 — аудит вёрстки (блоки cl-*; файл подключается последним, поэтому правила здесь перебивают styles.css)
   ========================================================================== */

/* Ссылки «соседних разделов» каталога (category.njk) были голыми синими подчёркнутыми ссылками, текущий раздел не выделялся */
.cl-sibling { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border: 1px solid rgba(0, 59, 54, .16); border-radius: 999px; background: #fff; color: var(--text-main); font-size: 13px; line-height: 1.2; text-decoration: none; transition: border-color .15s, color .15s; }
.cl-sibling:hover, .cl-sibling:focus-visible { border-color: var(--accent); color: var(--accent); }
.cl-sibling.is-current { background: var(--accent); border-color: var(--accent); color: #fff; }
/* длинный список (в разделе M9 их 38) — одна строка с горизонтальной прокруткой вместо стены в несколько экранов
   (1.1.17: и на планшете и компьютере — там 31–38 «таблеток» уводили товары на ~1100 px вниз); текущий раздел
   скрипт прокручивает в середину строки (main.js) */
.cl-siblings { flex-wrap: nowrap; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.cl-sibling { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 640px) {
  .cl-siblings { margin-inline: -24px; padding: 2px 24px 8px; }
}

/* Форма поиска на планшете: поле и кнопка в строку (в столбец она складывалась до 900 px), поле той же высоты, что кнопка */
.cl-search-form .filter-input { min-height: 46px; }
@media (min-width: 561px) and (max-width: 900px) { .cl-search-form { flex-direction: row; } }

/* Обложки блока imageHero: белый текст на светлом фото или заглушке не читался — общий тёмный слой под текстом */
.cl-b-imghero:not(.is-plain)::after { background: linear-gradient(180deg, rgba(0, 0, 0, .22) 0%, rgba(0, 0, 0, .28) 30%, rgba(0, 0, 0, .62) 100%); }
.cl-b-imghero:not(.is-plain) .cl-b-imghero-copy { text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }

/* Сетки блоков конструктора на планшете (561–900 px): нечётный «хвост» оставлял пустую ячейку или одну карточку в ряду из трёх
   («Как мы создаём ваше зеркало» — 3+1, «Материалы и конструкция» — 2+1). Портфолио шло одной колонкой с карточками по 800 px. */
@media (min-width: 561px) and (max-width: 900px) {
  .cl-b-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 1.1.17: три карточки — две в ряд и третья во всю ширину (три колонки по ~225 px давали рваный тесный текст) */
  .cl-b-steps > :nth-child(3):last-child, .cl-b-grid > :nth-child(3):last-child { grid-column: 1 / -1; }
}
@media (min-width: 561px) and (max-width: 1024px) { .cl-b-pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Заголовок обложки («Партнёрство») на 320 px был шире экрана и растягивал страницу (344 px при окне 320): блок не сжимался из-за длинного слова */
.cl-b-imghero-copy { min-width: 0; max-width: 100%; }
.cl-b-imghero h1, .cl-b-imghero h2 { overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 480px) { .cl-b-imghero h1, .cl-b-imghero h2 { font-size: clamp(26px, 8.4vw, var(--fs-h1)); } }
/* Длинные слова в заголовках блоков конструктора («производственный» в карточке партнёрства) выходили за карточку на 320 px и растягивали страницу до 344 px */
.cl-b .section-title, .cl-b h2, .cl-b h3 { overflow-wrap: break-word; hyphens: auto; }
/* Карточка направления партнёрства на телефоне: заголовок чуть меньше и поля карточки 18 px, чтобы «производственный» помещалось без разрыва по слогам */
@media (max-width: 480px) { .cl-b-pane { padding: 18px; } .cl-b-pane .section-title { font-size: clamp(20px, 6vw, 26px); } }
