/* ==========================================================================
   Завод МАК — стиль «Инженерный чертёж»
   ========================================================================== */

:root {
	--ink: #0F1215;
	--ink-2: #151A1F;
	--ink-line: #232A31;
	--ink-line-2: #2A3038;
	--ink-border: #3A434D;
	--blue: #14A1D9;
	--blue-deep: #0B78A8;
	--blue-hover: #075A80;
	--text: #14181C;
	--text-2: #2B323A;
	--muted: #5A6470;
	--muted-dark: #9AA4AF;
	--on-dark: #B8C1CA;
	--on-dark-2: #C9D1D9;
	--line: #D5D9DE;
	--line-strong: #BFC6CD;
	--bg: #EEF0F2;
	--ph: #E3E7EB;
	--white: #FFFFFF;
	--error: #B42318;
	--ok: #1F7A4D;

	--font: var(--wp--preset--font-family--onest, Onest), system-ui, -apple-system, "Segoe UI", sans-serif;
	--mono: var(--wp--preset--font-family--mono, "JetBrains Mono"), ui-monospace, Menlo, Consolas, monospace;

	--pad: clamp(20px, 5.5vw, 80px);
	--maxw: 1440px;
	--sec: clamp(64px, 8.5vw, 120px);
	--radius: 2px;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.55; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-deep); text-decoration: none; }
a:hover { color: var(--blue-hover); }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }
:target { scroll-margin-top: 80px; }

.screen-reader-text { 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: 12px; top: -60px; z-index: 100; padding: 12px 16px; background: var(--white); color: var(--text); font-weight: 600; }
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.mono { font-family: var(--mono); letter-spacing: 0.02em; }
.text-muted { color: var(--muted); }
.lead { font-size: clamp(17px, 1.3vw, 19px); line-height: 1.55; max-width: 62ch; }
.on-dark { color: var(--on-dark); }

.h1 { font-size: clamp(32px, 3.3vw, 48px); font-weight: 700; letter-spacing: -0.015em; line-height: 1.08; }
.h2 { font-size: clamp(28px, 3vw, 44px); font-weight: 700; letter-spacing: -0.015em; line-height: 1.1; }
.h3 { font-size: clamp(24px, 2.1vw, 30px); font-weight: 700; line-height: 1.15; }

.kicker { font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em; color: var(--blue-deep); text-transform: uppercase; font-weight: 400; margin-bottom: 16px; }
.kicker--light, .dark .kicker { color: var(--blue); }
.kicker--line { display: flex; align-items: center; gap: 12px; }
.kicker--line::before { content: ""; width: 32px; height: 1px; background: currentColor; }

.dark { background: var(--ink); color: var(--white); }
.gridbg {
	background-color: var(--ink);
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
	background-size: 40px 40px;
}
.ph { background-color: var(--ph); background-image: repeating-linear-gradient(135deg, rgba(20, 24, 28, 0.05) 0 1px, transparent 1px 10px); width: 100%; height: 100%; min-height: 64px; }

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; background: var(--blue-deep); color: var(--white); border: 1px solid var(--blue-deep); border-radius: var(--radius); font-weight: 600; font-size: 15px; line-height: 1.2; text-align: center; white-space: nowrap; }
.btn:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: var(--white); }
.btn--lg { min-height: 56px; padding: 0 28px; font-size: 16px; }
.btn--ghost { background: transparent; border-color: var(--ink-border); color: var(--white); font-weight: 500; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--muted-dark); }
.btn--line { background: var(--white); border-color: var(--line-strong); color: var(--text); }
.btn--line:hover { background: var(--bg); border-color: var(--muted); color: var(--text); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--text); }
.link-strong { font-weight: 500; font-size: 16px; }

/* ---------- Верхняя строка и шапка ---------- */
.topbar { background: var(--ink); color: var(--muted-dark); font-size: 12px; border-bottom: 1px solid var(--ink-line); }
.topbar__in { display: flex; align-items: center; justify-content: space-between; min-height: 40px; gap: 24px; }
.topbar__facts { display: flex; gap: 28px; text-transform: uppercase; }
.topbar__contacts { display: flex; gap: 28px; font-family: var(--mono); }
.topbar__mail { color: var(--on-dark-2); }
.topbar__phone { color: var(--white); font-weight: 500; }
.topbar a:hover { color: var(--blue); }

.header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.header__in { display: flex; align-items: center; gap: 32px; min-height: 84px; }
.header__logo { flex-shrink: 0; }
.header__logo .logo { height: 44px; width: auto; }
.nav { flex: 1; display: flex; justify-content: center; }
.nav__list { display: flex; gap: clamp(20px, 2.5vw, 36px); font-size: 15px; font-weight: 500; }
.nav__list a { color: var(--text); padding: 8px 0; }
.nav__list a:hover, .nav__list .current-menu-item > a, .nav__list .current-menu-ancestor > a { color: var(--blue-deep); }
.nav__cta, .header__call, .header__burger { display: none; }
.header__burger .icon-close, .header__burger[aria-expanded="true"] .icon-open { display: none; }
.header__burger[aria-expanded="true"] .icon-close { display: block; }

/* ---------- Первый экран ---------- */
.hero__in { display: grid; grid-template-columns: minmax(0, 600px) minmax(0, 1fr); gap: 40px; align-items: center; min-height: 632px; padding-block: 56px; }
.hero__text { display: flex; flex-direction: column; gap: 28px; }
.hero__text .kicker { margin: 0; }
.hero__title { font-size: clamp(34px, 4.2vw, 60px); line-height: 1.04; font-weight: 700; letter-spacing: -0.02em; }
.hero__lead { font-size: clamp(17px, 1.3vw, 19px); color: var(--on-dark); max-width: 540px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.hero__visual { display: flex; justify-content: flex-end; }
.hero__scheme { width: 100%; max-width: 680px; }
.hero__scheme-text { font-family: var(--mono); }

.facts { border-top: 1px solid var(--ink-line); }
.facts__in { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-block: 0; }
.facts__item { display: flex; flex-direction: column-reverse; justify-content: center; gap: 6px; min-height: 128px; padding-left: 32px; border-left: 1px solid var(--ink-line); }
.facts__item:first-child { padding-left: 0; border-left: 0; }
.facts__item dd { margin: 0; font-size: clamp(28px, 2.5vw, 36px); font-weight: 600; line-height: 1.1; }
.facts__item dt { font-size: 12px; color: var(--muted-dark); text-transform: uppercase; }

/* ---------- Секции ---------- */
.section { padding-block: var(--sec); }
.section-sm { padding-block: clamp(40px, 5vw, 64px); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: 48px; }
.section-head__text { max-width: 460px; }
.page-head { padding-block: 24px 40px; display: flex; flex-direction: column; gap: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: clamp(32px, 5.5vw, 80px); }

.breadcrumbs { padding-top: 28px; font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.02em; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--blue-deep); }
.breadcrumbs .breadcrumb_last { color: var(--text); }

.badge { position: absolute; left: 16px; top: 16px; padding: 6px 10px; background: var(--ink); color: var(--white); font-family: var(--mono); font-size: 12px; }

/* ---------- Линейки ---------- */
.lines { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.line-card { display: flex; flex-direction: column; background: var(--white); color: var(--text); }
.line-card:hover { color: var(--text); }
.line-card:hover .line-card__title { color: var(--blue-deep); }
.line-card__media { position: relative; aspect-ratio: 430 / 260; overflow: hidden; background: var(--ph); }
.line-card:nth-child(n + 7) .line-card__media { aspect-ratio: 430 / 200; }
.line-card__media img { width: 100%; height: 100%; object-fit: cover; }
.line-card__body { display: flex; flex-direction: column; gap: 10px; padding: 24px 28px 28px; }
.line-card__num { font-size: 12px; color: var(--muted); }
.line-card__title { font-size: 22px; font-weight: 600; line-height: 1.2; }
.line-card__text { font-size: 15px; color: var(--muted); }

/* Изделия в линейке */
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.product-card { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); background: var(--white); }
.product-card__media { position: relative; background: var(--ph); min-height: 260px; }
.product-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product-card__body { display: flex; flex-direction: column; gap: 14px; padding: 28px; }
.product-card__title { font-size: 22px; font-weight: 600; }
.product-card__title a { color: var(--text); }
.product-card__title a:hover { color: var(--blue-deep); }

/* Ключ — значение */
.kv { margin: 0; border-top: 1px solid var(--line); font-size: 15px; }
.kv--top { border-top-color: var(--text); }
.kv__row { display: flex; justify-content: space-between; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.kv__row dt { color: var(--muted); }
.kv__row dd { margin: 0; font-weight: 600; text-align: right; }

/* ---------- Заказчики ---------- */
.clients { background: var(--white); border-block: 1px solid var(--line); padding-block: 56px; }
.clients__in { display: flex; align-items: center; gap: 64px; }
.clients__head { width: 300px; flex-shrink: 0; }
.clients__head .kicker { margin-bottom: 10px; }
.clients__title { font-size: 20px; font-weight: 600; line-height: 1.3; }
.clients__list { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.clients__list li { display: flex; align-items: center; justify-content: center; min-height: 88px; padding: 12px; background: var(--white); font-size: 18px; font-weight: 600; color: var(--text-2); text-align: center; }

/* ---------- Производство ---------- */
.production { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 64px; }
.production__text { display: flex; flex-direction: column; gap: 24px; }
.production__text .kicker { margin: 0; }
.production__img { width: 100%; aspect-ratio: 560 / 300; object-fit: cover; margin-top: 16px; }
.steps { border-top: 1px solid var(--text); counter-reset: none; }
.steps__item { display: flex; gap: 32px; align-items: baseline; padding: 28px 0; border-bottom: 1px solid var(--line); }
.steps__num { width: 40px; flex-shrink: 0; font-size: 13px; color: var(--blue-deep); }
.steps__title { font-size: 21px; font-weight: 600; margin-bottom: 6px; }
.steps__item p { font-size: 15px; }

/* ---------- Документы ---------- */
.designers { padding-block: clamp(64px, 8vw, 112px); }
.designers__in { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 80px; align-items: start; }
.designers__text { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.designers__text .kicker { margin: 0; }
.designers__text .btn { margin-top: 8px; }

.docs { background: var(--white); border: 1px solid var(--line); }
.doc { display: flex; align-items: center; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.doc:last-child { border-bottom: 0; }
.doc__ext { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 52px; height: 30px; border: 1px solid var(--blue-deep); color: var(--blue-deep); font-size: 11px; }
.doc__body { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.doc__title { font-size: 16px; font-weight: 500; }
.doc__meta { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.doc__link { font-weight: 500; font-size: 15px; padding: 8px 0; }
.docs--dark { background: var(--ink-2); border-color: var(--ink-line-2); }
.docs--dark .doc { border-color: var(--ink-line-2); padding: 24px 28px; }
.docs--dark .doc__ext { border-color: var(--blue); color: var(--blue); }
.docs--dark .doc__title { font-size: 17px; color: var(--white); }
.docs--dark .doc__meta { color: var(--muted-dark); }
.docs--dark .doc__link { color: var(--blue); }
.docs--dark .doc__link:hover { color: var(--white); }
.docs-groups { display: flex; flex-direction: column; gap: 32px; }
.docs-groups__title { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.docs-groups__title a { color: var(--text); }

/* ---------- Карта ---------- */
.section--map { padding-bottom: 0; }
.section--map .section-head { margin-bottom: 40px; }
.map { position: relative; height: 420px; border: 1px solid var(--line); background-color: var(--ph); background-image: repeating-linear-gradient(135deg, rgba(20, 24, 28, 0.05) 0 1px, transparent 1px 10px); overflow: hidden; }
.map--tall { height: min(640px, 75vh); }
.map__canvas { position: absolute; inset: 0; }
.map__empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; font-size: 12px; color: var(--muted); }
.map-card { position: absolute; z-index: 5; right: 24px; top: 24px; width: 340px; max-height: calc(100% - 48px); overflow: auto; background: var(--white); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(15, 18, 21, 0.18); }
.map-card__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.map-card__body { display: flex; flex-direction: column; gap: 8px; padding: 20px; }
.map-card__meta { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.map-card__meta:empty { display: none; }
.map-card__title { font-size: 19px; font-weight: 600; line-height: 1.25; padding-right: 32px; }
.map-card__text { font-size: 15px; color: var(--muted); }
.map-card__link { font-weight: 600; margin-top: 4px; }
.map-card__close { position: absolute; right: 4px; top: 4px; z-index: 1; background: var(--white); }

.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 28px; }
.project-card { background: var(--white); display: flex; flex-direction: column; }
.project-card__media { aspect-ratio: 3 / 2; background: var(--ph); overflow: hidden; }
.project-card__media img { width: 100%; height: 100%; object-fit: cover; }
.project-card__body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 6px; }
.project-card__meta { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.project-card__title { font-size: 18px; font-weight: 600; line-height: 1.3; }
.project-card__title a { color: var(--text); }
.project-card__title a:hover { color: var(--blue-deep); }

/* ---------- Запрос и формы ---------- */
.request { padding-block: var(--sec); }
.request__in { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: clamp(40px, 5.5vw, 80px); }
.request__info { display: flex; flex-direction: column; gap: 24px; }
.request__info .kicker { margin: 0; }
.request__contacts { display: flex; flex-direction: column; gap: 4px; padding-top: 24px; border-top: 1px solid var(--line); }
.request__phone { font-size: clamp(24px, 2vw, 30px); font-weight: 600; color: var(--text); }
.request__mail { font-size: 18px; }
.request__meta { font-size: 12px; color: var(--muted); padding-top: 12px; text-transform: uppercase; }
.request__form { background: var(--white); border: 1px solid var(--line); padding: clamp(24px, 3vw, 40px); }
.request__product { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.request__product strong { color: var(--text); }
.notice-admin { padding: 16px; border: 1px dashed var(--error); color: var(--error); font-size: 15px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 500; }
.field--full { grid-column: 1 / -1; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="number"], .field select, .field textarea {
	width: 100%; min-height: 52px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--white); font-size: 16px; font-weight: 400;
}
.field textarea { padding: 14px 16px; min-height: 120px; resize: vertical; }
.field select { padding: 0 12px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: var(--blue-deep); }
.field input[type="file"] { font-size: 15px; font-weight: 400; }
.field input[type="file"]::file-selector-button { margin-right: 12px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg); font: inherit; font-weight: 500; cursor: pointer; }
.field__hint { font-size: 13px; font-weight: 400; color: var(--muted); }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 8px; }
.consent { font-size: 14px; font-weight: 400; color: var(--muted); }
.consent .wpcf7-list-item { margin: 0; }
.consent label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--blue-deep); }
.zm-form .wpcf7-submit { min-height: 56px; padding: 0 32px; background: var(--blue-deep); color: var(--white); border: 0; border-radius: var(--radius); font-weight: 600; font-size: 16px; }
.zm-form .wpcf7-submit:hover { background: var(--blue-hover); }
.zm-form .wpcf7-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.zm-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.wpcf7 .hidden-fields-container { display: none; } /* служебные поля CF7; стили CF7 отключены, поэтому прячем сами */
.wpcf7-form-control-wrap { display: block; }
.wpcf7-not-valid { border-color: var(--error) !important; }
.wpcf7-not-valid-tip { display: block; margin-top: 6px; color: var(--error); font-size: 13px; font-weight: 400; }
.wpcf7-spinner { display: none; }
.zm-form.submitting .wpcf7-submit { opacity: 0.6; }
.wpcf7-response-output { margin: 20px 0 0 !important; padding: 12px 16px !important; border: 1px solid var(--line) !important; font-size: 15px; }
.zm-form.sent .wpcf7-response-output { border-color: var(--ok) !important; color: var(--ok); }
.zm-form.invalid .wpcf7-response-output, .zm-form.failed .wpcf7-response-output, .zm-form.spam .wpcf7-response-output, .zm-form.unaccepted .wpcf7-response-output { border-color: var(--error) !important; color: var(--error); }
.wpcf7-response-output:empty { display: none; }
.screen-reader-response { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Изделие ---------- */
.product-hero { display: grid; grid-template-columns: minmax(0, 720px) minmax(0, 1fr); gap: 56px; padding-block: 32px 96px; }
.gallery { display: flex; flex-direction: column; gap: 12px; }
.gallery__main { position: relative; aspect-ratio: 720 / 560; background: var(--ph); border: 1px solid var(--line); overflow: hidden; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__counter { position: absolute; right: 16px; bottom: 16px; padding: 6px 10px; background: rgba(15, 18, 21, 0.85); color: var(--white); font-size: 11px; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gallery__thumb { aspect-ratio: 170 / 110; padding: 0; border: 1px solid var(--line); background: var(--ph); overflow: hidden; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb[aria-current="true"] { border: 2px solid var(--blue-deep); }

.product-summary { display: flex; flex-direction: column; gap: 24px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 6px 10px; border: 1px solid var(--line-strong); color: var(--text-2); font-family: var(--mono); font-size: 12px; }
.tag--dark { background: var(--ink); border-color: var(--ink); color: var(--white); }
.buy { display: flex; flex-direction: column; gap: 18px; padding: 28px; background: var(--white); border: 1px solid var(--line); }
.buy__price { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.buy__price span { font-size: 15px; color: var(--muted); }
.buy__price strong { font-size: 24px; font-weight: 700; }
.buy__terms { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.buy__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.buy__cta { flex: 1; }

.product-body { background: var(--white); border-block: 1px solid var(--line); padding-bottom: clamp(48px, 6vw, 96px); }
.tabs { position: sticky; top: 84px; z-index: 10; background: var(--white); border-bottom: 1px solid var(--line); }
.tabs__in { display: flex; gap: 40px; overflow-x: auto; scrollbar-width: none; }
.tabs__in::-webkit-scrollbar { display: none; }
.tabs a { flex-shrink: 0; padding: 24px 0 20px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; }
.tabs a:hover, .tabs a[aria-current="true"] { color: var(--text); border-bottom-color: var(--blue-deep); }
.product-body .split { padding-top: 56px; scroll-margin-top: 150px; }

.specs { width: 100%; border-collapse: collapse; font-size: 16px; }
.specs th, .specs td { padding: 18px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.specs th { width: 50%; padding-right: 24px; font-weight: 400; color: var(--muted); }

.product-extra { display: grid; grid-template-columns: minmax(0, 720px) minmax(0, 1fr); gap: 56px; padding-block: clamp(56px, 6.5vw, 96px); }
.product-extra > div { scroll-margin-top: 150px; }
.product-extra .kicker { margin-bottom: 28px; }
.product-extra > #docs:only-child { grid-column: 1 / -1; }
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.features__item { display: flex; flex-direction: column; gap: 10px; padding: 28px; background: var(--white); }
.features__num { font-size: 12px; color: var(--blue-deep); }
.features__title { font-size: 19px; font-weight: 600; }
.features__item p { font-size: 15px; }

.related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 28px; background: var(--line); border: 1px solid var(--line); }
.related--col { grid-template-columns: 1fr; margin-top: 0; }
.related__item { display: flex; align-items: center; gap: 20px; height: 100%; padding: 20px; background: var(--white); color: var(--text); font-size: 18px; font-weight: 600; }
.related__item:hover { color: var(--blue-deep); }
.related__item img, .related__item .ph { width: 96px; height: 96px; flex-shrink: 0; object-fit: cover; min-height: 0; }
.related--col .related__item { font-size: 16px; }
.related--col .related__item img, .related--col .related__item .ph { width: 64px; height: 64px; }

/* ---------- Проект ---------- */
.project__meta { display: flex; flex-wrap: wrap; gap: 16px 48px; margin: 8px 0 0; }
.project__meta dt { font-size: 12px; color: var(--muted); text-transform: uppercase; margin-bottom: 4px; }
.project__meta dd { margin: 0; font-weight: 600; }
.pgallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 48px; }
.pgallery a { display: block; aspect-ratio: 720 / 520; background: var(--ph); overflow: hidden; }
.pgallery img { width: 100%; height: 100%; object-fit: cover; }
.pgallery a:hover img { opacity: 0.9; }
.project__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 56px; padding-bottom: 32px; }
.project__products .kicker { margin-bottom: 16px; }

.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(15, 18, 21, 0.94); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(15, 18, 21, 0.94); }
.lightbox img { max-width: calc(100vw - 160px); max-height: calc(100vh - 80px); width: auto; height: auto; object-fit: contain; }
.lightbox__btn { position: absolute; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border: 1px solid var(--ink-border); background: var(--ink); color: var(--white); }
.lightbox__btn:hover { border-color: var(--blue); }
.lightbox__prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__close { right: 20px; top: 20px; }

/* ---------- Новости и страницы ---------- */
.news { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.news-card { display: flex; flex-direction: column; background: var(--white); }
.news-card__media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--ph); }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; }
.news-card__body { display: flex; flex-direction: column; gap: 10px; padding: 24px; }
.news-card__date { font-size: 12px; color: var(--muted); }
.news-card__title { font-size: 20px; font-weight: 600; line-height: 1.3; }
.news-card__title a { color: var(--text); }
.news-card__title a:hover { color: var(--blue-deep); }
.news-card p { font-size: 15px; }

.navigation.pagination { margin-top: 40px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); background: var(--white); color: var(--text); font-family: var(--mono); font-size: 14px; }
.page-numbers.current { background: var(--ink); border-color: var(--ink); color: var(--white); }
.page-numbers.dots { border: 0; background: none; }

.page { padding-bottom: var(--sec); }
.page .page-head { padding-bottom: 32px; }
.page__cover { margin: 0 0 40px; max-width: 1040px; }
.page__cover img { width: 100%; }
.page__back { margin-top: 48px; font-weight: 500; }
.page-404 { padding-block: var(--sec); display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.page-404 .kicker { margin: 0; }

/* Контент из Gutenberg */
.entry { max-width: 760px; }
.entry > * + * { margin-top: 1.1em; }
.entry h2 { font-size: clamp(24px, 2.2vw, 30px); margin-top: 1.8em; }
.entry h3 { font-size: 21px; margin-top: 1.6em; }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry ul { list-style: square; }
.entry ol { list-style: decimal; }
.entry li + li { margin-top: 0.4em; }
.entry a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.entry blockquote { margin-inline: 0; padding-left: 24px; border-left: 2px solid var(--blue-deep); color: var(--text-2); }
.entry figure { margin-inline: 0; }
.entry figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.entry table { width: 100%; border-collapse: collapse; font-size: 15px; }
.entry th, .entry td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry .wp-block-table { overflow-x: auto; }
.entry .alignwide { max-width: 1280px; }
.entry .wp-block-button__link { display: inline-flex; min-height: 48px; align-items: center; padding: 0 24px; background: var(--blue-deep); color: var(--white); border-radius: var(--radius); text-decoration: none; font-weight: 600; }
.entry iframe { max-width: 100%; }

/* О заводе */
.about-hero__text { display: flex; flex-direction: column; gap: 24px; max-width: 860px; padding-block: 40px clamp(48px, 6vw, 88px); }
.about-hero .breadcrumbs, .about-hero .breadcrumbs a { color: var(--muted-dark); }
.about-hero .breadcrumbs .breadcrumb_last { color: var(--on-dark-2); }
.about-hero .breadcrumbs a:hover { color: var(--blue); }
.entry--about { font-size: 18px; }
.entry--about > p:first-child { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.5; color: var(--text-2); }
.about-prod { background: var(--white); border-top: 1px solid var(--line); }

/* Контакты */
.contacts .kv__row dd { text-align: left; font-weight: 500; }
.contacts .kv__row { display: grid; grid-template-columns: 160px 1fr; }

/* ---------- Подвал ---------- */
.footer { background: var(--ink); color: var(--muted-dark); padding-block: 64px 48px; }
.footer__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 48px; }
.footer__logo .logo { height: 38px; width: auto; }
.footer__cols { display: flex; gap: 64px; font-size: 15px; }
.footer__list { columns: 2; column-gap: 64px; }
.footer__list li { margin-bottom: 12px; break-inside: avoid; }
.footer a { color: var(--on-dark-2); }
.footer a:hover { color: var(--white); }
.footer__contacts { display: flex; flex-direction: column; gap: 12px; }
.footer__phone { color: var(--white) !important; font-weight: 600; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--ink-line); font-size: 12px; text-transform: uppercase; }
.footer__bottom a { color: var(--muted-dark); }

.mbar { display: none; }

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 1200px) {
	.hero__in { grid-template-columns: 1fr; min-height: 0; }
	.hero__visual { justify-content: center; }
	.hero__scheme { max-width: 560px; }
	.designers__in, .production { grid-template-columns: 1fr; gap: 48px; }
	.product-extra { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
	.header__in { min-height: 64px; gap: 8px; }
	.header__logo { margin-right: auto; }
	.header__logo .logo { height: 34px; }
	.header__call, .header__burger { display: inline-flex; }
	.nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; justify-content: flex-start; gap: 20px; padding: 16px var(--pad) 24px; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 16px 24px rgba(15, 18, 21, 0.08); max-height: calc(100vh - 64px); overflow-y: auto; }
	.nav.is-open { display: flex; }
	.nav__list { flex-direction: column; gap: 0; font-size: 18px; }
	.nav__list a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
	.nav__cta { display: inline-flex; }
	.header__cta { display: none; }
	.tabs { top: 64px; }
	.product-hero { grid-template-columns: 1fr; gap: 32px; padding-bottom: 64px; }
	.split { grid-template-columns: 1fr; gap: 24px; }
	.request__in { grid-template-columns: 1fr; }
	.clients__in { flex-direction: column; align-items: stretch; gap: 24px; }
	.clients__head { width: auto; }
	.project__body { grid-template-columns: 1fr; }
	.products { grid-template-columns: 1fr; }
}

@media (max-width: 1000px) {
	.lines, .projects, .news, .related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.section-head { flex-direction: column; align-items: flex-start; gap: 16px; }
	.facts__in { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 0; }
	.facts__item, .facts__item:first-child { padding: 20px var(--pad); border-left: 0; min-height: 0; border-bottom: 1px solid var(--ink-line); }
	.facts__item:nth-child(odd) { border-right: 1px solid var(--ink-line); }
	.topbar__facts { display: none; }
	.topbar__in { justify-content: flex-end; }
	.footer__top, .footer__cols { flex-direction: column; gap: 32px; }
}

@media (max-width: 700px) {
	body { font-size: 16px; }
	.topbar { display: none; }
	.hero__visual { display: none; }
	.hero__in { padding-block: 36px 32px; gap: 0; }
	.hero__text { gap: 20px; }
	.hero__actions .btn { flex: 1 1 100%; }
	.facts__item dt { font-size: 10px; }

	.lines { grid-template-columns: 1fr; }
	.line-card { flex-direction: row; align-items: center; gap: 14px; padding: 12px 16px; }
	.line-card__media, .line-card:nth-child(n + 7) .line-card__media { width: 56px; height: 56px; flex-shrink: 0; aspect-ratio: 1; }
	.line-card__media .badge { display: none; }
	.line-card__body { flex-direction: row; align-items: center; gap: 12px; padding: 0; flex: 1; }
	.line-card__num { display: none; }
	.line-card__title { font-size: 17px; }
	.line-card__text { display: none; }

	.product-card { grid-template-columns: 1fr; }
	.product-card__media { min-height: 0; aspect-ratio: 3 / 2; }
	.projects, .news, .related, .features, .pgallery { grid-template-columns: 1fr; }
	.kv__row { flex-direction: column; gap: 4px; }
	.kv__row dd { text-align: left; }
	.contacts .kv__row { grid-template-columns: 1fr; }
	.specs th, .specs td { display: block; width: 100%; padding: 0; border: 0; }
	.specs th { padding-top: 14px; font-size: 14px; }
	.specs td { padding: 4px 0 14px; border-bottom: 1px solid var(--line); }
	.tabs__in { gap: 24px; }
	.buy { padding: 20px; }
	.buy__actions .btn { flex: 1 1 100%; }
	.form-grid { grid-template-columns: 1fr; }
	.form-foot { flex-direction: column; align-items: stretch; }
	.zm-form .wpcf7-submit { width: 100%; }
	.doc { padding: 16px; gap: 14px; }
	.docs--dark .doc { padding: 18px 16px; }
	.clients__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.clients__list li { min-height: 64px; font-size: 16px; }
	.map { height: 360px; }
	.map-card { left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; max-height: 70%; }
	.map-card__img { display: none; }
	.lightbox img { max-width: 100vw; }
	.lightbox__prev, .lightbox__next { top: auto; bottom: 20px; transform: none; }

	.mbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--line); }
	.mbar .btn { min-height: 52px; }
	.mbar .btn--line { width: 120px; }
	.mbar .btn:not(.btn--line) { flex: 1; }
	body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
	.footer__list { columns: 1; }
}

@media print {
	.topbar, .header, .mbar, .tabs, .request, .map, .footer { display: none !important; }
	body { background: #fff; }
}

/* Hero: заголовок компактнее, чертёж крупнее */
.hero__in { grid-template-columns: minmax(0, 500px) minmax(0, 1fr); gap: 48px; }
.hero__title { font-size: clamp(32px, 3.3vw, 48px); line-height: 1.06; }
.hero__lead { font-size: 17px; max-width: 480px; }
.hero__scheme { max-width: 820px; }
@media (max-width: 1200px) {
	.hero__in { grid-template-columns: minmax(0, 1fr); }
	.hero__scheme { max-width: 680px; }
}

/* ==========================================================================
   Каталог: переключатель «плитка / список», фото без обрезки
   ========================================================================== */
.catalog-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.catalog-bar__count { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.view-toggle { display: inline-flex; border: 1px solid var(--line-strong); background: var(--white); }
.view-toggle button { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--muted); }
.view-toggle button + button { border-left: 1px solid var(--line-strong); }
.view-toggle button:hover { color: var(--text); }
.view-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--white); }

/* Фото целиком, вписано в рамку (без обрезки) */
.line-card__media, .product-card__media, .gallery__main, .gallery__thumb { background-color: var(--white); }
.line-card__media img, .product-card__media img, .gallery__main img, .gallery__thumb img, .related__item img { object-fit: contain; }
.line-card__media img, .product-card__media img { padding: 12px; box-sizing: border-box; }
.gallery__main img { padding: 16px; box-sizing: border-box; }
.gallery__thumb img { padding: 4px; box-sizing: border-box; }
.line-card__media { border-bottom: 1px solid var(--line); }

/* Изделия плиткой: вертикальные карточки в 3 колонки */
.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-card { display: flex; flex-direction: column; }
.product-card__media { position: relative; aspect-ratio: 4 / 3; min-height: 0; border-bottom: 1px solid var(--line); }
.product-card__title { font-size: 20px; }
@media (max-width: 1100px) { .products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Список (только на планшете и десктопе; на телефоне карточки и так компактные) */
@media (min-width: 701px) {
	html[data-zm-view="list"] [data-view-root] { grid-template-columns: minmax(0, 1fr); }

	html[data-zm-view="list"] .line-card { flex-direction: row; align-items: stretch; }
	html[data-zm-view="list"] .line-card__media,
	html[data-zm-view="list"] .line-card:nth-child(n + 7) .line-card__media { width: 200px; flex-shrink: 0; aspect-ratio: 4 / 3; border-bottom: 0; border-right: 1px solid var(--line); }
	html[data-zm-view="list"] .line-card__body { flex: 1; justify-content: center; padding: 20px 28px; }
	html[data-zm-view="list"] .line-card .badge { left: 10px; top: 10px; }

	html[data-zm-view="list"] .product-card { display: grid; grid-template-columns: 240px minmax(0, 1fr); }
	html[data-zm-view="list"] .product-card__media { aspect-ratio: 4 / 3; border-bottom: 0; border-right: 1px solid var(--line); }
	html[data-zm-view="list"] .product-card__body { justify-content: center; padding: 20px 28px; }
	html[data-zm-view="list"] .product-card .kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; border-top: 0; }
	html[data-zm-view="list"] .product-card .kv__row { flex-direction: column; gap: 2px; border-bottom: 0; border-top: 1px solid var(--line); padding: 10px 0 0; }
	html[data-zm-view="list"] .product-card .kv__row dd { text-align: left; }
}
@media (max-width: 700px) {
	.view-toggle { display: none; }
	.products { grid-template-columns: minmax(0, 1fr); }
}