/* Шаблон wp2026, этап 3: страницы каталога (хабы и разделы). Палитра — переменные из wp2026.css. */

.cat-page a { text-decoration: none; }
.cat-page a:hover { text-decoration: none; }

/* Шапка раздела */
.cat-head { padding-top: 28px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 20px; }
.cat-head .breadcrumbs { padding: 0; margin: 0; font-style: normal; display: flex; flex-wrap: wrap; gap: 4px 8px; height: auto; line-height: 1.5; position: static; float: none; width: auto; }
.cat-head .breadcrumbs > span { display: contents; }
.cat-head .breadcrumbs a { color: var(--muted); }
.cat-head .breadcrumbs a:hover { color: var(--accent); }
/* вводная строка всегда под заголовком: при переходе между разделами блок не прыгает влево-вправо */
.cat-title { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.cat-page h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1; margin: 0; padding: 0; border: 0; text-transform: none; color: var(--ink); }
.cat-title p { max-width: 520px; color: var(--text); line-height: 1.6; padding: 0; text-align: left; }

/* Чипы: соседние разделы; на узких экранах прокручиваются по горизонтали */
.cat-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-chips .chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; color: var(--ink); white-space: nowrap; }
.cat-chips .chip:hover { border-color: var(--accent); color: var(--accent); }
.cat-chips .chip.is-active { background: var(--dark); border-color: var(--dark); color: var(--dark-head); }

/* Карточки */
.cat-list { display: flex; flex-direction: column; gap: 20px; padding-bottom: 40px; }
.cat-count { font-size: 14px; color: var(--muted); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px 20px; }
.cat-card { display: flex; flex-direction: column; gap: 10px; color: var(--ink); }
.cat-card .ph { aspect-ratio: 4 / 5; }
.cat-card .ph img { transition: transform .4s; }
.cat-card:hover .ph img { transform: scale(1.03); }
.cat-card-title { font: 500 28px/1.1 "Cormorant Garamond", Georgia, serif; }
.cat-card:hover .cat-card-title { color: var(--accent); }
.cat-card-text { font-size: 14px; color: var(--muted); line-height: 1.5; }
.cat-card-price { font-size: 14px; }
.cat-card-price span { color: var(--muted); }
.cat-banner { grid-column: 1 / -1; background: var(--soft); display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding: 32px; }
.cat-banner > div { display: flex; flex-direction: column; gap: 8px; max-width: 620px; color: var(--text); font-size: 15px; }
.cat-banner-title { font: 500 32px/1.1 "Cormorant Garamond", Georgia, serif; color: var(--ink); }

/* Тёмный блок «Не знаете, что выбрать?» */
.cat-help { background: var(--dark); color: var(--dark-text); padding: 32px; display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; margin: 16px 0 8px; }
.cat-help > div { display: flex; flex-direction: column; gap: 8px; max-width: 640px; font-size: 15px; line-height: 1.5; }
.cat-help-title { font: 500 30px/1.1 "Cormorant Garamond", Georgia, serif; color: var(--dark-head); }
.cat-page .cat-help .btn, .cat-page .cat-help .btn:hover { color: #fff; }

/* Текст страницы (SEO) в новой типографике */
.cat-text { max-width: 880px; padding-top: 48px; padding-bottom: 80px; font-size: 16px; line-height: 1.7; color: var(--text); }
.cat-text p { padding: 0; margin: 0 0 14px; text-align: left; color: var(--text); line-height: 1.7; }
.cat-text h2, .cat-text h3, .cat-text h4, .cat-text .naz, .cat-text .nazv { font: 500 32px/1.15 "Cormorant Garamond", Georgia, serif; color: var(--ink); text-transform: none; border: 0; padding: 0; margin: 32px 0 14px; letter-spacing: -0.01em; text-align: left; }
.cat-text h3, .cat-text h4 { font-size: 26px; }
.cat-text ul, .cat-text ol { padding: 0 0 14px 22px; }
.cat-text li { padding: 0 0 6px; }
.cat-text a { color: var(--accent); }
.cat-text a:hover { color: var(--accent-hover); text-decoration: underline; }
.cat-text img { max-width: 100%; height: auto; }
.cat-text [style*="font-family"], .cat-text [style*="font-size"] { font-family: inherit !important; font-size: inherit !important; color: inherit !important; background: none !important; }
.cat-text table { max-width: 100%; display: block; overflow-x: auto; }
/* картинка отсутствует на сервере (404 и на старом шаблоне) */
.cat-text img[src*="/medialibrary/52e/shtory002.png"] { display: none !important; }
.cat-text .slick-slider, .cat-text .slider-content, .cat-text .bx-wrapper { max-width: 100%; overflow: hidden; }
/* Старые декоративные блоки страницы заменены шапкой раздела и карточками */
.cat-text .inner_page_img, .cat-text .rim-banner, .cat-text .wrapper-2.wr, .cat-text .utp, .cat-text .nazakaz.hewie, .cat-text .inner_watermark { display: none !important; }
.cat-text .inner_button_wrapper { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 24px; }
.cat-text .inner_button_wrapper .inner_page_button { display: inline-flex !important; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px !important; border: 1px solid var(--ink) !important; border-radius: 2px !important; color: var(--ink) !important; font: 600 14px/1.2 Manrope, system-ui, sans-serif !important; text-transform: none !important; background: transparent !important; box-shadow: none !important; width: auto !important; height: auto !important; float: none !important; margin: 0 !important; }
.cat-text .inner_button_wrapper .inner_page_button::before, .cat-text .inner_button_wrapper .inner_page_button::after { display: none !important; }
.cat-text .inner_button_wrapper .inner_page_button:hover { color: var(--accent) !important; border-color: var(--accent) !important; text-decoration: none; }

/* Этап 4: посадочные страницы моделей, комнат, стилей и карнизов */
.lp-head { padding-bottom: 24px; }
.lp-top { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding-bottom: 56px; }
.lp-gallery { flex: 1 1 560px; min-width: 0; display: flex; gap: 12px; }
.lp-thumbs { display: flex; flex-direction: column; gap: 12px; flex: 0 0 88px; }
.lp-thumbs button { height: 110px; border: 0; padding: 0; cursor: pointer; outline-offset: 2px; }
.lp-thumbs button.is-active { outline: 2px solid var(--ink); }
.lp-photo { flex: 1 1 auto; min-height: 560px; }
.lp-info { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.lp-page .lp-info h1 { font-size: clamp(40px, 4.6vw, 60px); }
.lp-lead { font-size: 17px; line-height: 1.6; color: var(--text); padding: 0; text-align: left; }
.lp-price { background: var(--surface); border: 1px solid var(--line); padding: 22px 24px; display: flex; flex-direction: column; gap: 8px; color: var(--ink); }
.lp-price .price { font-size: 44px; line-height: 1; }
.lp-price:hover { border-color: var(--line-strong); }
.lp-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-actions > * { flex: 1 1 200px; }
.lp-page .lp-actions .btn, .lp-page .lp-actions .btn:hover { color: #fff; }
.lp-page .lp-actions .btn-outline { color: var(--ink); }
.lp-ticks { list-style: none; margin: 0; padding: 20px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.lp-ticks li { padding: 0 0 0 32px; position: relative; }
.lp-ticks li::before { content: ""; position: absolute; left: 4px; top: 4px; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

/* Текст посадочной: картинки ровной сеткой вместо обтекания, старые баннеры и плашки скрыты */
.lp-text { padding-top: 8px; max-width: 920px; }
.lp-text .rim-banner, .lp-text .utp-seo, .lp-text .wrap_seo, .lp-text .main-kart, .lp-text .block_zak, .lp-text .rg-gallery { display: none !important; }
.lp-text img { float: none !important; display: block; width: auto !important; max-width: 100% !important; height: auto !important; margin: 16px 0 !important; }
.lp-text .img-gallery, .lp-text .range-flex, .lp-text .flex-img-row, .lp-text .gall2 { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; width: auto !important; height: auto !important; margin: 16px 0 24px; }
.lp-text .img-gallery > a, .lp-text .img-gallery-item, .lp-text .hover-img { width: auto !important; height: auto !important; float: none !important; margin: 0 !important; position: relative; }
.lp-text .img-gallery img, .lp-text .flex-img-row img { width: 100% !important; aspect-ratio: 4 / 3; object-fit: cover; margin: 0 !important; }
.lp-text .hover-img-p, .lp-text .img-gallery-item-desc { position: static !important; background: none !important; color: var(--muted) !important; font-size: 13px !important; padding: 6px 0 0 !important; opacity: 1 !important; text-align: left !important; }
.lp-text table, .lp-text .new-seo-table table { display: table; width: 100% !important; border-collapse: collapse; margin: 16px 0 24px; background: var(--surface); }
.lp-text .new-seo-table { overflow-x: auto; max-width: 100%; }
.lp-text td, .lp-text th { padding: 10px 12px !important; border: 0 !important; border-bottom: 1px solid var(--line) !important; text-align: left; font-size: 14px; width: auto !important; vertical-align: top; }
.lp-text td p { margin: 0; }
.lp-text .img-gallery *, .lp-text .gall2 * { min-height: 0 !important; }
.lp-text .img-gallery-item, .lp-text .hover-img, .lp-text .hover-img-p, .lp-text .img-gallery-item-desc { height: auto !important; width: auto !important; }
.lp-text .hover-img-p p { margin: 0 !important; font-weight: 600; color: var(--ink); }
.lp-text .hover-img-p br { display: none; }
.lp-page .section { width: auto; display: block; }
.lp-page .section-head h2 { font-size: clamp(32px, 4vw, 44px); line-height: 1.05; color: var(--ink); padding: 0; margin: 0; }
.lp-page .link-more { color: var(--ink); }
.lp-portfolio { padding-top: 56px; }
.lp-portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.lp-portfolio-grid .ph { height: 300px; }

@media (max-width: 1024px) {
	.lp-photo { min-height: 440px; }
}
@media (max-width: 760px) {
	.lp-top { gap: 24px; padding-bottom: 32px; }
	.lp-gallery { flex-direction: column-reverse; margin: 0 -16px; }
	.lp-thumbs { flex-direction: row; flex: none; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
	.lp-thumbs::-webkit-scrollbar { display: none; }
	.lp-thumbs button { flex: 0 0 72px; height: 72px; }
	.lp-photo { min-height: 320px; }
	.lp-price .price { font-size: 36px; }
	.lp-portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.lp-portfolio-grid .ph { height: 180px; }
}

/* Карточки-примеры с ценой в тексте посадочных (.img-gallery): сетка на всю ширину контейнера,
   белые карточки как ценовые на главной. Текст и цифры не меняются, только оформление. */
.lp-text .img-gallery { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important; gap: 32px 24px !important; margin: 32px 0 !important; width: auto !important; height: auto !important; max-width: none !important; }
.lp-text .img-gallery + .img-gallery { margin-top: 0 !important; }
.lp-text .img-gallery > .example-image-link { display: flex !important; width: auto !important; height: auto !important; float: none !important; margin: 0 !important; padding: 0 !important; color: var(--ink) !important; text-decoration: none !important; }
.lp-text .img-gallery .img-gallery-item { display: flex !important; flex-direction: column; width: 100% !important; height: auto !important; float: none !important; margin: 0 !important; padding: 0 0 22px !important; background: var(--surface) !important; border: 1px solid var(--line) !important; box-shadow: none !important; transition: border-color .2s; }
.lp-text .img-gallery > a:hover .img-gallery-item { border-color: var(--line-strong) !important; }
.lp-text .img-gallery .hover-img { display: flex !important; flex-direction: column; width: auto !important; height: auto !important; margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
.lp-text .img-gallery .hover-img img { width: 100% !important; height: auto !important; aspect-ratio: 4 / 3; object-fit: cover; margin: 0 !important; border: 0 !important; transform: none !important; }
.lp-text .img-gallery .hover-img-p { position: static !important; display: block !important; width: auto !important; height: auto !important; margin: 0 !important; padding: 20px 22px 0 !important; background: none !important; opacity: 1 !important; transform: none !important; }
.lp-text .img-gallery .hover-img-p p { font: 500 24px/1.15 "Cormorant Garamond", Georgia, serif !important; letter-spacing: .02em !important; color: var(--ink) !important; text-align: left !important; margin: 0 !important; padding: 0 !important; }
.lp-text .img-gallery .img-gallery-item-desc { font: 400 15px/1.6 Manrope, system-ui, sans-serif !important; font-style: normal !important; color: var(--muted) !important; text-align: left !important; margin: 0 !important; padding: 10px 22px 0 !important; width: auto !important; height: auto !important; flex: 1 1 auto; }
.lp-text .img-gallery .img-gallery-item > p:last-child { font: 600 11px/1.4 Manrope, system-ui, sans-serif !important; letter-spacing: .14em; text-transform: uppercase; color: var(--muted) !important; margin: 0 !important; padding: 16px 22px 0 !important; text-align: left !important; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.lp-text .img-gallery .img-gallery-item > p:last-child span { font: 500 30px/1 "Cormorant Garamond", Georgia, serif !important; letter-spacing: 0; text-transform: none; color: var(--accent) !important; }
/* старые разделители и декор карточек */
.lp-text .img-gallery *::before, .lp-text .img-gallery *::after { display: none !important; content: none !important; }
.lp-text .img-gallery p, .lp-text .img-gallery span, .lp-text .img-gallery div { border: 0 !important; }
.lp-text .img-gallery-item-desc span:empty { display: none !important; }
@media (max-width: 760px) {
	.lp-text .img-gallery { grid-template-columns: 1fr !important; gap: 20px !important; }
}

/* Текст страниц каталога и посадочных: контейнер на всю ширину шапки, текст — удобной ширины чтения,
   визуальные блоки (таблицы, ткани, письма, слайдер, галереи) — на всю ширину. */
.cat-text, .lp-text { max-width: none; }
.cat-text p, .cat-text h2, .cat-text h3, .cat-text h4, .cat-text ol, .cat-text ul:not(.slider-content):not(.imgs-with-cap):not(.bxslider) { max-width: 820px; }
.cat-text .img-gallery p, .cat-text table p, .cat-text .imgs-with-cap p { max-width: none; }
.cat-text .section_text, .cat-text .new-seo-table, .cat-text .range-flex, .cat-text .letter-flex { max-width: none !important; width: auto !important; float: none !important; }

/* 1. Таблицы-сметы: белая карточка на всю ширину, шапка на мягком фоне, суммы справа, итог акцентом */
.cat-text .new-seo-table { margin: 24px 0 32px !important; overflow: visible; }
.cat-text table.fuck-table, .cat-text table.table-price, .cat-text table.content-price, .cat-text table.rewq { display: table !important; width: 100% !important; max-width: none !important; margin: 24px 0 32px !important; border-collapse: separate !important; border-spacing: 0; background: var(--surface) !important; border: 1px solid var(--line) !important; font-size: 15px; }
.cat-text .new-seo-table table.fuck-table { margin: 0 !important; }
.cat-text table.fuck-table td, .cat-text table.table-price td, .cat-text table.content-price td, .cat-text table.rewq td,
.cat-text table.fuck-table th, .cat-text table.table-price th, .cat-text table.content-price th, .cat-text table.rewq th { padding: 14px 16px !important; border: 0 !important; border-bottom: 1px solid var(--line) !important; background: none; color: var(--text); font: 400 15px/1.5 Manrope, system-ui, sans-serif !important; vertical-align: top; text-align: left; height: auto !important; }
.cat-text :is(table.fuck-table, table.table-price, table.content-price, table.rewq) tr:first-child td, .cat-text :is(table.fuck-table, table.table-price, table.content-price, table.rewq) tr:first-child th, .cat-text :is(table.fuck-table, table.table-price, table.content-price, table.rewq) thead td, .cat-text :is(table.fuck-table, table.table-price, table.content-price, table.rewq) thead th { background: var(--soft) !important; color: var(--muted) !important; font: 600 11px/1.4 Manrope, system-ui, sans-serif !important; letter-spacing: .12em; text-transform: uppercase; }
.cat-text table.fuck-table td:nth-last-child(-n+3), .cat-text table.table-price td:nth-last-child(-n+2), .cat-text table.content-price td:nth-last-child(-n+2) { text-align: right; white-space: nowrap; }
.cat-text table.fuck-table td:nth-last-child(-n+3) p, .cat-text table.table-price td:nth-last-child(-n+2) p, .cat-text table.content-price td:nth-last-child(-n+2) p { text-align: right !important; }
.cat-text :is(table.fuck-table, table.table-price, table.content-price, table.rewq) tr:last-child td { border-bottom: 0 !important; }
.cat-text :is(table.fuck-table, table.table-price, table.content-price, table.rewq) tr:last-child td .bold, .cat-text :is(table.fuck-table, table.table-price, table.content-price, table.rewq) tr:last-child td b, .cat-text :is(table.fuck-table, table.table-price, table.content-price, table.rewq) tr:last-child td strong { font: 600 15px/1.4 Manrope, system-ui, sans-serif; color: var(--ink); }
.cat-text :is(table.fuck-table, table.table-price, table.content-price, table.rewq) tr:last-child td:last-child, .cat-text :is(table.fuck-table, table.table-price, table.content-price, table.rewq) tr:last-child td:last-child * { font: 500 28px/1.1 "Cormorant Garamond", Georgia, serif !important; color: var(--accent) !important; }
.cat-text table td img { display: block; width: 100% !important; max-width: 100% !important; height: auto !important; margin: 0 0 8px !important; float: none !important; }
.cat-text table td p { margin: 0 !important; }

/* Таблица-коллаж на странице цен (photo-table): большое фото, ткань и карниз — сеткой, без вида таблицы */
.cat-text table.photo-table { display: grid !important; grid-template-columns: 2fr 1fr 1fr; gap: 16px; width: 100% !important; max-width: none !important; margin: 24px 0 16px !important; border: 0 !important; background: none !important; }
.cat-text table.photo-table > tbody, .cat-text table.photo-table tr { display: contents; }
.cat-text table.photo-table td { display: block; padding: 0 !important; border: 0 !important; background: none !important; width: auto !important; height: auto !important; font: 600 11px/1.4 Manrope, system-ui, sans-serif !important; letter-spacing: .12em; text-transform: uppercase; color: var(--muted) !important; }
.cat-text table.photo-table td[rowspan] { grid-row: span 2; }
.cat-text table.photo-table td img { width: 100% !important; height: 100% !important; max-height: 520px; aspect-ratio: 1 / 1; object-fit: cover; margin: 0 !important; }
.cat-text table.photo-table td[rowspan] img { aspect-ratio: auto; height: 100% !important; min-height: 320px; }
@media (max-width: 760px) {
	.cat-text table.photo-table { grid-template-columns: 1fr 1fr; gap: 10px; }
	.cat-text table.photo-table td[rowspan] { grid-column: 1 / -1; grid-row: auto; }
}

/* 2. Ткани-кружки: ровная сетка, все круги одинаковые */
.cat-text .range-flex { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important; gap: 24px !important; margin: 24px 0 32px !important; height: auto !important; }
.cat-text .range-flex > a { display: block !important; width: auto !important; height: auto !important; margin: 0 !important; padding: 0 !important; float: none !important; }
.cat-text .range-flex img { display: block !important; width: 100% !important; height: auto !important; max-width: none !important; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 50% !important; margin: 0 !important; transition: transform .3s; }
.cat-text .range-flex a:hover img { transform: scale(1.03); }

/* 3. Благодарственные письма: одинаковые листы 3:4 */
.cat-text .letter-flex { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important; gap: 24px !important; margin: 24px 0 32px !important; height: auto !important; }
.cat-text .letter-flex > a { display: block !important; width: auto !important; height: auto !important; margin: 0 !important; padding: 0 !important; background: #fff; border: 1px solid var(--line); transition: box-shadow .2s; float: none !important; }
.cat-text .letter-flex > a:hover { box-shadow: 0 8px 24px rgba(34, 38, 31, .12); }
.cat-text .letter-flex img { display: block !important; width: 100% !important; height: auto !important; max-width: none !important; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; margin: 0 !important; }

/* 4. Слайдер фото (slick): по краям контейнера, одинаковая высота кадров */
.cat-text .slider-content { max-width: none !important; width: auto !important; margin: 24px 0 32px !important; padding: 0 !important; list-style: none; }
.cat-text .slider-content .slick-list { margin: 0 -8px; }
.cat-text .slider-content .slick-slide { padding: 0 8px !important; margin: 0 !important; }
.cat-text .slider-content li { padding: 0 !important; }
.cat-text .slider-content img { width: 100% !important; height: 300px !important; max-width: none !important; object-fit: cover; margin: 0 !important; }
.cat-text .slider-content .slick-prev { left: 8px; z-index: 2; }
.cat-text .slider-content .slick-next { right: 8px; z-index: 2; }

/* 5. Прочие старые галереи и фото-ряды: ровная сетка на всю ширину */
.cat-text .gall2, .cat-text .gall, .cat-text .galery_img, .cat-text .img_gal, .cat-text .images-table, .cat-text .imgs-with-cap { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important; gap: 20px !important; width: auto !important; max-width: none !important; height: auto !important; margin: 24px 0 32px !important; padding: 0 !important; list-style: none; float: none !important; }
.cat-text .gall2 > *, .cat-text .gall > *, .cat-text .galery_img > *, .cat-text .img_gal > *, .cat-text .images-table > *, .cat-text .imgs-with-cap > li { width: auto !important; height: auto !important; margin: 0 !important; padding: 0 !important; float: none !important; }
.cat-text .gall2 img, .cat-text .gall img, .cat-text .galery_img img, .cat-text .img_gal img, .cat-text .images-table img, .cat-text .imgs-with-cap img { display: block; width: 100% !important; height: auto !important; max-width: none !important; aspect-ratio: 4 / 3; object-fit: cover; margin: 0 0 8px !important; }

/* 6. Полоса «Наши работы»: фото во всю карточку */
.lp-portfolio-grid .ph { height: auto; aspect-ratio: 4 / 3; padding: 0; }

@media (max-width: 760px) {
	.cat-text .new-seo-table, .cat-text table.table-price, .cat-text table.content-price, .cat-text table.rewq { overflow-x: auto; -webkit-overflow-scrolling: touch; }
	.cat-text table.table-price, .cat-text table.content-price, .cat-text table.rewq { display: block !important; }
	.cat-text table.fuck-table { min-width: 640px; }
	.cat-text table.table-price > tbody, .cat-text table.content-price > tbody, .cat-text table.rewq > tbody { display: table; width: 100%; min-width: 560px; }
	.cat-text .range-flex, .cat-text .letter-flex { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 16px !important; }
	.cat-text .slider-content img { height: 220px !important; }
	.cat-text .gall2, .cat-text .gall, .cat-text .galery_img, .cat-text .img_gal, .cat-text .images-table, .cat-text .imgs-with-cap { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
}

/* Этап 6: остальные страницы (общий макет page/page.php) */
.pg-text { padding-top: 16px; }
.pg-text > h1 { font: 500 32px/1.15 "Cormorant Garamond", Georgia, serif; color: var(--ink); text-transform: none; border: 0; padding: 0; margin: 24px 0 12px; }
.pg-text hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; max-width: none; }
.pg-text .biggest-text { font: 500 26px/1.2 "Cormorant Garamond", Georgia, serif !important; color: var(--ink) !important; margin: 28px 0 10px !important; }
.pg-text .big-text { font-weight: 600 !important; color: var(--ink) !important; }
.pg-text [align="justify"], .pg-text p[style*="justify"] { text-align: left !important; }

/* Новости и статьи: карточки вместо старого списка */
.pg-cards-wrap { padding-bottom: 8px; }
.pg-card .ph { display: flex; align-items: center; justify-content: center; }
.pg-card-mark { font: italic 500 32px/1 "Cormorant Garamond", Georgia, serif; color: var(--line-strong); }
.pg-card-date { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--eyebrow); }
.pg-text-news .news-list { display: none !important; }

/* Отзывы: письма ровной сеткой, отзывы — карточки */
.pg-text .pisma { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important; gap: 24px !important; width: auto !important; max-width: none !important; height: auto !important; margin: 24px 0 40px !important; float: none !important; }
.pg-text .pisma > a { display: block !important; width: auto !important; height: auto !important; margin: 0 !important; padding: 0 !important; float: none !important; background: #fff; border: 1px solid var(--line); transition: box-shadow .2s; }
.pg-text .pisma > a:hover { box-shadow: 0 8px 24px rgba(34, 38, 31, .12); }
.pg-text .pisma img { display: block !important; width: 100% !important; height: auto !important; max-width: none !important; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; margin: 0 !important; }
/* отзывы лежат прямо в тексте страницы: сам блок текста становится сеткой, всё остальное — на всю строку */
.pg-reviews .pg-text { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; align-items: start; }
.pg-reviews .pg-text > :not(.review) { grid-column: 1 / -1; }
.pg-text .review { text-align: left !important; background: var(--surface); border: 1px solid var(--line) !important; padding: 24px 26px !important; margin: 0 !important; width: auto !important; float: none !important; font-size: 15px; line-height: 1.65; color: var(--text); background-image: none !important; }
.pg-text .review .name { font: 500 22px/1.2 "Cormorant Garamond", Georgia, serif !important; color: var(--ink) !important; margin: 0 0 10px !important; padding: 0 !important; background: none !important; }
.pg-text .form { max-width: 640px !important; width: auto !important; background: var(--surface); border: 1px solid var(--line); padding: 28px !important; margin: 32px 0 !important; float: none !important; }
.pg-text .form input[type=text], .pg-text .form textarea { width: 100% !important; box-sizing: border-box; min-height: 44px; border: 1px solid var(--line-strong) !important; border-radius: 2px; padding: 10px 12px; font: 15px Manrope, system-ui, sans-serif; background: #fff; }
.pg-text .form .form_title { font: 500 28px/1.15 "Cormorant Garamond", Georgia, serif; text-transform: none; border: 0; color: var(--ink); }

/* Карточки разделов (услуги, наши работы) */
.pg-text .catalog { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; width: auto !important; max-width: none !important; margin: 24px 0 40px; }
.pg-text .catalog > br { display: none; }
.pg-text .catalog .item { width: auto !important; height: auto !important; margin: 0 !important; padding: 0 !important; float: none !important; background: none !important; }
.pg-text .catalog .bg_t, .pg-text .catalog .bg_b { background: none !important; padding: 0 !important; width: auto !important; height: auto !important; }
.pg-text .catalog img { width: 100% !important; height: auto !important; aspect-ratio: 4 / 3; object-fit: cover; margin: 0 0 10px !important; }
.pg-text .catalog .caption, .pg-text .catalog .caption a { font: 500 24px/1.15 "Cormorant Garamond", Georgia, serif !important; color: var(--ink) !important; text-align: left !important; font-style: normal !important; position: static !important; background: none !important; padding: 0 !important; }

/* Ассортимент тканей: ровная сетка фото, открываются крупно */
.pg-text .range-flex1 { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important; gap: 20px !important; width: auto !important; max-width: none !important; margin: 24px 0 40px !important; }
.pg-text .range-flex1 img { width: 100% !important; height: auto !important; max-width: none !important; aspect-ratio: 1 / 1; object-fit: cover; margin: 0 !important; cursor: zoom-in; }

/* Контакты: текст и карта в белой карточке, фото фасада по ширине */
.pg-contacts .pg-text > div[itemscope] { background: var(--surface); border: 1px solid var(--line); padding: 32px 36px !important; max-width: none; }
.pg-contacts .pg-text > div[itemscope] > p:first-child { font: 500 28px/1.2 "Cormorant Garamond", Georgia, serif; color: var(--ink); }
.pg-contacts .pg-text a[href^="tel:"] span { font-size: 20px; color: var(--ink); }
.pg-contacts .pg-text [class*="ymaps"], .pg-contacts .pg-text iframe { max-width: 100% !important; }
.pg-contacts .pg-text img[src*="expostroy"] { width: 100% !important; max-width: 820px !important; height: auto !important; }
.pg-lead { margin-top: 48px; }
.pg-lead h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.05; color: var(--ink); padding: 0; margin: 0; }
.pg-lead .lead-text p { color: var(--text); font-size: 17px; padding: 0; }
.pg-lead .lead-form .ds-form { width: auto !important; max-width: none !important; margin: 0 !important; box-shadow: none !important; background: transparent !important; }
.pg-lead .lead-form .ds-form input[type=text], .pg-lead .lead-form .ds-form textarea { width: 100% !important; box-sizing: border-box; min-height: 48px; border: 1px solid var(--line-strong); border-radius: 2px; padding: 12px 14px; font: 16px Manrope, system-ui, sans-serif; }
.pg-lead .lead-form .ds-form button, .pg-lead .lead-form .ds-form input[type=submit] { min-height: 52px; padding: 0 28px; background: var(--accent); color: #fff; border: 0; border-radius: 2px; font: 600 15px Manrope, system-ui, sans-serif; cursor: pointer; }

@media (max-width: 760px) {
	.pg-text .pisma, .pg-text .range-flex1 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
	.pg-reviews .pg-text { grid-template-columns: 1fr; }
	.pg-contacts .pg-text > div[itemscope] { padding: 20px 16px !important; }
}

/* Этап 5: портфолио и «До и после» */
.cat-chips button.chip { background: transparent; font: inherit; font-size: 14px; cursor: pointer; border: 1px solid var(--line-strong); border-radius: 999px; }
.pf-list { padding-bottom: 40px; }
.pf-cover { aspect-ratio: 4 / 3; }
.pf-page .cat-card .ph.pf-cover { aspect-ratio: 4 / 3; }
.pf-gallery-wrap { padding-bottom: 24px; }
.pf-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 380px; grid-auto-flow: dense; gap: 16px; }
.pf-gallery .pf-wide { grid-column: span 2; }
.pf-gallery [hidden] { display: none; }
.pf-tile { display: block; cursor: zoom-in; }
.pf-tile img { transition: transform .4s; }
.pf-tile:hover img { transform: scale(1.02); }
.pf-more-wrap { display: flex; justify-content: center; margin-top: 24px; }
.pf-page .pf-text .rg-gallery, .pf-page .pf-text #rg-gallery, .pf-page .pf-text .main_jobs [class^="our_jobs"], .pf-page .pf-text .clearcontainer { display: none !important; }
.pf-text:empty { display: none; }
/* на /portfolio/ старый список разделов (заголовки групп и плитки) дублирует сетку карточек; абзацы текста остаются */
.pf-text-list .catalog, .pf-text-list > h2, .pf-text-list br.clear { display: none !important; }
.pf-text-list { padding-top: 0; padding-bottom: 16px; }
/* старые float внутри текста не выходят за блок; тёмный блок всегда с новой строки */
.cat-text { display: flow-root; }
.cat-help { clear: both; }
.pf-page .section { width: auto; display: block; }
.pf-page .section-head h2 { font-size: clamp(32px, 4vw, 44px); line-height: 1.05; color: var(--ink); padding: 0; margin: 0; }
.pf-page .link-more { color: var(--ink); }
.pf-other { padding-top: 56px; }

/* Полноэкранный просмотр */
.pf-viewer { position: fixed; inset: 0; z-index: 10000; background: rgba(20, 22, 18, .94); display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.pf-viewer[hidden] { display: none; }
.pf-viewer img { max-width: calc(100vw - 120px); max-height: calc(100vh - 80px); object-fit: contain; user-select: none; -webkit-user-drag: none; }
.pf-viewer button { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; font: 300 48px/1 Manrope, system-ui, sans-serif; width: 56px; height: 56px; }
.pf-v-close { top: 12px; right: 12px; font-size: 40px !important; }
.pf-v-prev { left: 8px; top: 50%; margin-top: -28px; }
.pf-v-next { right: 8px; top: 50%; margin-top: -28px; }
.pf-v-count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #ddd; font-size: 14px; }

/* До и после: сравнение ползунком */
.pf-ba { padding-bottom: 24px; }
.pf-page .pf-ba-title { font: 500 34px/1.1 "Cormorant Garamond", Georgia, serif; color: var(--ink); margin: 40px 0 20px; padding: 0; border: 0; text-transform: none; }
.pf-ba-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 24px; }
.pf-ba-item { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ba-compare { --pos: 50%; position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--soft); user-select: none; touch-action: pan-y; cursor: ew-resize; }
.ba-compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; margin: 0; pointer-events: none; }
.ba-compare .ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.ba-handle::after { content: "‹ ›"; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 18px; box-shadow: 0 2px 10px rgba(0, 0, 0, .2); }
.ba-label { position: absolute; bottom: 12px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #fff; background: rgba(30, 27, 24, .6); padding: 5px 9px; border-radius: 2px; pointer-events: none; }
.ba-label-before { left: 12px; }
.ba-label-after { right: 12px; }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.ba-range:focus-visible + * , .ba-compare:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
/* старые карточки jobs_N.png (300×316): фото в белой рамке с вшитой подписью «До / После» — убираем рамку кадрированием, свои подписи не дублируем */
.ba-compare.ba-jobs { aspect-ratio: 280 / 250; }
.ba-compare.ba-jobs img { inset: auto; left: -4.5%; top: -4.5%; width: 114%; max-width: none; height: auto; object-fit: fill; }
.ba-compare.ba-jobs .ba-label { display: none; }
.pf-ba-row { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.ba-sketch { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; cursor: zoom-in; }
.ba-sketch img { width: 64px; height: 48px; object-fit: cover; background: #fff; border: 1px solid var(--line); margin: 0; }

@media (max-width: 1024px) {
	.pf-gallery { grid-auto-rows: 300px; }
}
@media (max-width: 760px) {
	.pf-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 180px; gap: 8px; }
	.pf-gallery .pf-wide { grid-column: span 2; }
	.pf-ba-row { grid-template-columns: 1fr; }
	.pf-viewer img { max-width: 100vw; max-height: calc(100vh - 120px); }
	.pf-v-prev, .pf-v-next { top: auto !important; bottom: 4px; margin: 0 !important; }
}

@media (max-width: 760px) {
	.cat-head { padding-top: 16px; gap: 16px; }
	.cat-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
	.cat-chips::-webkit-scrollbar { display: none; }
	.cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
	.cat-card-title { font-size: 22px; }
	.cat-banner, .cat-help { padding: 24px 16px; }
	.cat-banner-title { font-size: 26px; }
	.cat-text { padding-top: 32px; padding-bottom: 48px; }
}
