/* =========================================================================
   НТЦ Приводные Механизмы — общий слой сайта: шапка, подвал, типографика.
   «Полюс зацепления»: тушь, ватман, волосяные линии и одна оранжевая точка.
   Оранжевый — сигнал, не заливка: текст на нём только тушью.
   ========================================================================= */
:root {
    --ink: #26282a;
    --graphite: #5d6063;
    --paper: #f7f4ee;
    --sheet: #fdfbf7;
    --line: #dcd5c7;
    --acc: #fc600c;
    --acc-ink: #b8450a;
    --stamp: #4a3f9f;
    --f-disp: "Sofia Sans Semi Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
    --f-text: "IBM Plex Sans", Arial, sans-serif;
    --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
    --hw: 1px;
    --ease: cubic-bezier(.2, .8, .2, 1);
}
@media (min-resolution: 2dppx) { :root { --hw: .5px; } }

/* ---------- Типографика всего сайта ---------- */
body.ntc-site,
.ntc-site button,
.ntc-site input,
.ntc-site select,
.ntc-site textarea { font-family: var(--f-text); }
body.ntc-site { color: var(--ink); background: var(--paper); font-feature-settings: "tnum" 0; }
.ntc-site h1, .ntc-site h2, .ntc-site h3, .ntc-site h4 { font-family: var(--f-disp); text-wrap: balance; }
.ntc-site ::selection { background: var(--acc); color: var(--ink); }
/* Bono ставит ul:not([class])::before / p::before шириной 10em — в наших блоках не нужно */
:is(.ntc-hdr, .ntc-util, .ntc-ft, .ntcp, .ntcl, .ntcr) :is(ul, ol, p)::before { content: none !important; display: none !important; }
.ntc-site #page { overflow: clip; overflow-x: clip; }
/* Отступ от шапки до хлебных крошек карточки */
.ntcp-page #content { padding-top: 20px; }
/* Открытый каталог на телефоне не перекрываем нижней панелью запроса */
body:has(.ntc-cat[open]) .ntcp-bar { display: none !important; }

/* Та же сетка, что у контейнера Bono (.fixed): края шапки, контента и подвала совпадают */
.ntc-wrap { --gut: 15px; box-sizing: border-box; margin: 0 auto; padding: 0 var(--gut); }
@media (min-width: 768px) { .ntc-wrap { --gut: 45px; max-width: 720px; } }
@media (min-width: 992px) { .ntc-wrap { max-width: 960px; } }
@media (min-width: 1200px) { .ntc-wrap { max-width: 1190px; } }
@media (min-width: 1400px) { .ntc-wrap { max-width: 1390px; } }
.ntc-wrap *, .ntc-wrap *::before, .ntc-wrap *::after { box-sizing: border-box; }

/* ---------- 0. Служебная строка (не липкая) ---------- */
.ntc-util { background: var(--paper); border-bottom: var(--hw) solid var(--line); color: var(--graphite); font: 500 12px/32px var(--f-text); }
.ntc-util .ntc-wrap { display: flex; justify-content: space-between; gap: 24px; }
.ntc-util p { margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ntc-util p::before { content: none; }
.ntc-util nav { display: flex; gap: 22px; }
.ntc-util a { color: var(--ink) !important; text-decoration: none; white-space: nowrap; }
.ntc-util a:hover, .ntc-util a[aria-current] { color: var(--acc-ink) !important; }
.ntc-util a[aria-current] { box-shadow: inset 0 -2px 0 var(--acc); }

/* ---------- 1. Основная строка (липкая) ---------- */
.ntc-hdr { position: sticky; top: 0; z-index: 1000; background: var(--sheet); border-bottom: var(--hw) solid var(--ink); }
.admin-bar .ntc-hdr { top: 32px; }
.ntc-hdr__row { position: relative; display: flex; align-items: center; gap: 20px; height: 76px; }
.ntc-logo { flex: none; margin-right: 12px; line-height: 0; }
.ntc-logo svg { width: 236px; height: auto; }
.ntc-logo .g1, .ntc-logo .g2 { transform-box: fill-box; transform-origin: center; transition: transform 1.2s var(--ease); }
/* Передаточное отношение 13,5 : 9 = 1,5 — осевые встают точно на место */
.ntc-logo:hover .g1 { transform: rotate(-180deg); }
.ntc-logo:hover .g2 { transform: rotate(270deg); }

/* Каталог: <details>, работает без JS */
.ntc-cat { position: static; flex: none; }
.ntc-cat summary { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px; background: var(--ink); color: var(--paper); font: 700 17px/1 var(--f-disp); letter-spacing: .05em; text-transform: uppercase; list-style: none; cursor: pointer; transition: background .2s; }
.ntc-cat summary::-webkit-details-marker { display: none; }
.ntc-cat summary small { color: var(--acc); font: 500 11px var(--f-mono); letter-spacing: 0; }
.ntc-cat[open] summary, .ntc-cat summary:hover { background: #000; }
.ntc-cat__panel { position: absolute; top: calc(100% + 1px); right: var(--gut); left: var(--gut); z-index: 5; background: var(--sheet); border: var(--hw) solid var(--ink); box-shadow: 0 24px 48px -24px rgba(38, 40, 42, .35); animation: ntc-drop .22s var(--ease); }
@keyframes ntc-drop { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
.ntc-cat__head { display: flex; justify-content: space-between; padding: 12px 20px; border-bottom: var(--hw) solid var(--ink); color: var(--graphite); font: 500 11px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.ntc-cat__grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.ntc-cat__grid a { display: grid; grid-template-columns: 28px 1fr auto; align-items: baseline; gap: 10px; padding: 13px 20px; border-right: var(--hw) solid var(--line); border-bottom: var(--hw) solid var(--line); color: var(--ink) !important; font: 500 14px/1.3 var(--f-text); text-decoration: none; transition: box-shadow .2s var(--ease), background .2s; }
.ntc-cat__grid a:nth-child(3n) { border-right: 0; }
.ntc-cat__grid em { font-style: normal; }
.ntc-cat__grid b, .ntc-cat__grid span { color: var(--graphite); font: 500 11px var(--f-mono); font-variant-numeric: tabular-nums; }
.ntc-cat__grid a:hover { background: var(--paper); box-shadow: inset 3px 0 0 var(--acc); }
.ntc-cat__foot { display: flex; flex-wrap: wrap; gap: 6px 26px; padding: 12px 20px; font: 600 14px var(--f-text); }
.ntc-cat__foot a { color: var(--acc-ink) !important; text-decoration: none; }
.ntc-cat__foot a::after { content: " →"; }
.ntc-cat__foot a:hover { color: var(--ink) !important; }
.ntc-cat__more { display: none; }

/* Поиск по артикулу — главный инструмент */
.ntc-search { position: relative; display: flex; flex: 1 1 auto; min-width: 300px; height: 48px; margin: 0; background: #fff; border: 1.5px solid var(--ink); }
.ntc-search label { display: flex; align-items: center; margin: 0; padding: 0 12px; background: var(--paper); border-right: var(--hw) solid var(--line); color: var(--graphite); font: 600 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.ntc-search input[type="search"] { flex: 1; min-width: 0; height: auto; margin: 0; padding: 0 14px; border: 0; border-radius: 0; outline: 0; background: none; box-shadow: none; color: var(--ink); font: 500 16px var(--f-mono); letter-spacing: .02em; }
.ntc-search input::placeholder { color: #736d63; font: 400 15px var(--f-text); }
.ntc-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.ntc-search button { display: flex; flex: none; align-items: center; gap: 8px; margin: 0; padding: 0 22px; border: 0; border-radius: 0; background: var(--ink); color: var(--paper); font: 700 16px var(--f-disp); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: background .2s, color .2s; }
.ntc-search button:hover { background: var(--acc); color: var(--ink); }
/* Угловые метки при фокусе — как у рамки «Рис. 1» на карточке */
.ntc-search::before, .ntc-search::after { content: ""; position: absolute; width: 12px; height: 12px; border: 0 solid var(--acc); opacity: 0; pointer-events: none; transition: transform .25s var(--ease), opacity .25s; }
.ntc-search::before { top: -7px; left: -7px; border-width: 2px 0 0 2px; transform: translate(-6px, -6px); }
.ntc-search::after { right: -7px; bottom: -7px; border-width: 0 2px 2px 0; transform: translate(6px, 6px); }
.ntc-search:focus-within::before, .ntc-search:focus-within::after { opacity: 1; transform: none; }

/* Подсказки поиска */
.ntc-sug { position: absolute; top: calc(100% + 1.5px); right: -1.5px; left: -1.5px; z-index: 6; max-height: min(70vh, 520px); overflow: auto; background: var(--sheet); border: 1.5px solid var(--ink); border-top: 0; box-shadow: 0 24px 48px -24px rgba(38, 40, 42, .4); }
.ntc-sug[hidden] { display: none; }
.ntc-sug a { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; min-height: 44px; padding: 11px 14px; border-bottom: var(--hw) solid var(--line); color: var(--ink) !important; text-decoration: none; outline: 0; }
.ntc-sug a:hover, .ntc-sug a:focus { background: #fff; box-shadow: inset 3px 0 0 var(--acc); }
.ntc-sug b { font: 600 15px var(--f-mono); overflow-wrap: anywhere; }
.ntc-sug span { flex: none; color: var(--graphite); font: 400 13px var(--f-text); }
.ntc-sug .is-brand b { font-family: var(--f-text); }
.ntc-sug .is-all { justify-content: flex-start; color: var(--acc-ink) !important; font: 600 14px var(--f-text); }

/* Телефон и почта с копированием */
.ntc-contact { display: grid; flex: none; justify-items: start; gap: 3px; }
.ntc-tel { color: var(--ink) !important; font: 700 21px/1 var(--f-disp); letter-spacing: .01em; font-variant-numeric: tabular-nums; text-decoration: none; white-space: nowrap; }
.ntc-mail { display: inline-flex; align-items: center; gap: 2px; font: 400 13px/1 var(--f-text); }
.ntc-mail a { color: var(--graphite) !important; text-decoration: none; border-bottom: var(--hw) solid var(--line); }
.ntc-mail a:hover { color: var(--ink) !important; border-color: var(--ink); }
.ntc-copy { position: relative; display: inline-grid; place-items: center; width: 26px; height: 26px; margin: 0; padding: 0; border: 0; background: none; color: var(--graphite); cursor: pointer; }
.ntc-copy:hover { color: var(--acc-ink); }
/* Штамп «СКОПИРОВАНО» ложится на адрес */
/* Штамп ставится над кнопкой, не закрывая скопированный адрес */
.ntc-copy.is-done::after { content: "СКОПИРОВАНО"; position: absolute; right: -6px; bottom: calc(100% + 4px); z-index: 30; padding: 2px 6px; background: var(--sheet); border: 1.5px solid var(--stamp); color: var(--stamp); font: 600 10px/1.3 var(--f-mono); letter-spacing: .08em; white-space: nowrap; transform: rotate(-4deg); animation: ntc-stamp .28s var(--ease); }
@keyframes ntc-stamp { from { opacity: 0; transform: rotate(-4deg) scale(1.8); } }

.ntc-cta { display: flex; flex: none; align-items: center; height: 48px; padding: 0 18px; border: 1.5px solid var(--ink); color: var(--ink) !important; font: 700 16px var(--f-disp); letter-spacing: .06em; text-decoration: none; text-transform: uppercase; transition: background .2s, color .2s; }
.ntc-cta:hover { background: var(--ink); color: var(--paper) !important; }
/* Счётчик списка запроса */
.ntc-cta__n, .ntc-req__n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 8px; padding: 0 6px; background: var(--acc); color: var(--ink); font: 600 12px/1 var(--f-mono); letter-spacing: 0; }
.ntc-cta__n[hidden], .ntc-req__n[hidden] { display: none; }
.ntc-req { position: relative; display: none; flex: none; place-items: center; width: 48px; height: 48px; border: 1.5px solid var(--ink); color: var(--ink) !important; }
.ntc-req:hover { background: var(--ink); color: var(--paper) !important; }
.ntc-req__n { position: absolute; top: -8px; right: -8px; margin: 0; }
:where(.ntc-hdr, .ntc-util, .ntc-ft) :focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

/* Тень «линейка над листом» при прокрутке — без JS */
@supports (animation-timeline: scroll()) {
    .ntc-hdr { animation: ntc-lift linear both; animation-timeline: scroll(root); animation-range: 0 96px; }
    @keyframes ntc-lift { to { box-shadow: 0 10px 24px -18px rgba(38, 40, 42, .45); } }
}

/* ---------- Подвал: основная надпись ---------- */
.ntc-ft { background: var(--ink); color: #b9b5ad; font: 400 14px/1.55 var(--f-text); }
.ntc-ft a { text-decoration: none; }
.ntc-ft p { margin: 0; }
.ntc-ft p::before { content: none; }
.ntc-ft__head { display: flex; align-items: center; gap: 36px; padding: 44px 0 32px; border-bottom: 1px solid rgba(247, 244, 238, .14); }
.ntc-ft__logo svg { width: 236px; }
.ntc-ft__lead { flex: 1; max-width: 60ch; color: #b9b5ad; font-size: 15px; }
.ntc-ft__cta { display: flex; flex: none; align-items: center; height: 48px; margin-left: auto; padding: 0 22px; background: var(--acc); color: var(--ink) !important; font: 700 17px var(--f-disp); letter-spacing: .06em; text-transform: uppercase; transition: background .2s; }
.ntc-ft__cta:hover { background: #ff8440; }
.ntc-ft__grid { display: grid; grid-template-columns: 2fr 1fr 1.15fr; gap: 40px; padding: 36px 0 40px; }
.ntc-ft .ntc-ft__col h2 { margin: 0 0 16px; padding: 0; color: #aaa69f; font: 600 11px/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; }
.ntc-ft ul { margin: 0; padding: 0; list-style: none; }
.ntc-ft li { margin: 0 0 8px; padding: 0; break-inside: avoid; }
.ntc-ft li::before { content: none; }
.ntc-ft__col--cat ul { columns: 2; column-gap: 32px; }
.ntc-ft li a { color: #dcd8cf !important; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
.ntc-ft li a:hover { color: #fff !important; border-color: var(--acc); }
.ntc-ft__tel { display: block; margin-bottom: 8px; color: #fff !important; font: 700 28px/1.1 var(--f-disp); font-variant-numeric: tabular-nums; }
.ntc-ft__mail { font-size: 15px; }
.ntc-ft__mail a { color: #f7f4ee !important; border-bottom-color: rgba(247, 244, 238, .3); }
.ntc-ft .ntc-copy { color: #aaa69f; }
.ntc-ft .ntc-copy:hover { color: var(--acc); }
.ntc-ft__call p { margin-top: 12px; color: #aaa69f; font-size: 13px; }
.ntc-ft > .ntc-wrap { padding-bottom: 32px; }
.ntc-ft__stamp { position: relative; display: grid; grid-template-columns: 2.1fr 1.4fr 1.2fr .9fr .9fr; border: 1px solid rgba(247, 244, 238, .38); }
/* Точка P в углу основной надписи */
.ntc-ft__stamp::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; background: var(--acc); }
.ntc-ft__cell { display: flex; flex-direction: column; gap: 3px; padding: 9px 14px; border-right: 1px solid rgba(247, 244, 238, .2); }
.ntc-ft__cell:last-child { border-right: 0; }
.ntc-ft__cell span { color: #aaa69f; font: 500 10px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; }
.ntc-ft__cell b { color: #f7f4ee; font: 500 13px/1.35 var(--f-mono); }

/* ---------- Плашка cookie (Clearfy) ---------- */
.ntc-site .clearfy-cookie { background: var(--ink) !important; color: #d9d5cc !important; font: 400 13px/1.45 var(--f-text) !important; box-shadow: 0 -12px 30px -20px rgba(0, 0, 0, .6); }
.ntc-site .clearfy-cookie-accept { margin-left: 12px; padding: 7px 16px !important; border: 0 !important; border-radius: 0 !important; background: var(--acc) !important; color: var(--ink) !important; font: 700 14px var(--f-disp) !important; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }

/* ---------- Адаптив ---------- */
@media (max-width: 1399px) {
    .ntc-hdr .ntc-cta { display: none; }
    .ntc-req { display: grid; }
    .ntc-logo svg { width: 212px; }
}
@media (max-width: 1199px) {
    /* Строка с логотипом уезжает, каталог и поиск остаются */
    .ntc-util { display: none; }
    .ntc-hdr, .admin-bar .ntc-hdr { top: -56px; }
    .ntc-hdr__row { flex-wrap: wrap; gap: 0 8px; height: auto; padding-bottom: 8px; }
    .ntc-logo { display: flex; align-items: center; height: 56px; margin: 0 auto 0 0; }
    .ntc-logo svg { width: 200px; }
    .ntc-contact { justify-items: end; }
    /* Перенос: логотип и связь — первая строка, каталог и поиск — вторая */
    .ntc-hdr__row::after { content: ""; order: 1; flex-basis: 100%; height: 0; }
    .ntc-cat { order: 2; }
    .ntc-cat summary { justify-content: center; width: 48px; padding: 0; }
    .ntc-cat summary span, .ntc-cat summary small { display: none; }
    .ntc-cat__panel { top: 100%; max-height: calc(100dvh - 128px); overflow: auto; overscroll-behavior: contain; }
    /* Зоны нажатия ≥ 24 px: телефон и почта в шапке */
    .ntc-tel { display: inline-block; padding: 4px 0; }
    .ntc-mail a { display: inline-block; padding: 5px 0 4px; }
    .ntc-cat__grid { grid-template-columns: 1fr; }
    .ntc-cat__grid a { padding: 12px 16px; border-right: 0; font-size: 15px; }
    .ntc-cat__foot { padding: 12px 16px; }
    .ntc-cat__more { display: grid; grid-template-columns: 1fr 1fr; border-top: var(--hw) solid var(--ink); background: var(--paper); }
    .ntc-cat__more a { display: flex; align-items: center; min-height: 46px; padding: 0 16px; border-bottom: var(--hw) solid var(--line); color: var(--ink) !important; font: 500 15px var(--f-text); text-decoration: none; }
    .ntc-cat__more a:nth-child(odd) { border-right: var(--hw) solid var(--line); }
    .ntc-cat__more .ntc-cat__tel { font: 700 17px var(--f-disp); font-variant-numeric: tabular-nums; }
    .ntc-search { order: 3; flex: 1 1 calc(100% - 128px); min-width: 0; }
    .ntc-req { order: 4; }
    .ntc-search label, .ntc-search button span { display: none; }
    .ntc-search button { justify-content: center; width: 48px; padding: 0; }

    .ntc-ft__head { flex-wrap: wrap; gap: 20px; padding: 36px 0 26px; }
    .ntc-ft__lead { flex-basis: 100%; order: 2; }
    .ntc-ft__cta { order: 3; margin-left: 0; }
    .ntc-ft__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .ntc-ft__col--cat { grid-column: 1 / -1; }
    .ntc-ft__stamp { grid-template-columns: 1fr 1fr; }
    .ntc-ft__cell { border-bottom: 1px solid rgba(247, 244, 238, .2); }
    .ntc-ft__cell.is-wide { grid-column: 1 / -1; }
    .ntc-ft__cell:nth-child(odd):not(.is-wide) { border-right: 0; }
}
@media (max-width: 767px) {
    .ntc-cat__panel { right: 0; left: 0; border-width: var(--hw) 0; }
    .ntcp-page #content { padding-top: 14px; }
}
@media (max-width: 600px) {
    .ntc-ft__grid { grid-template-columns: 1fr; }
    .ntc-ft__col--cat ul { columns: 1; }
    .ntc-ft__cta { justify-content: center; width: 100%; }
}
@media (max-width: 480px) {
    .ntc-logo svg { width: 160px; }
    .ntc-tel { font-size: 17px; }
    .ntc-mail { font-size: 12px; }
    .ntc-ft__logo svg { width: 200px; }
}
@media (prefers-reduced-motion: reduce) {
    .ntc-hdr *, .ntc-ft * { transition: none !important; animation: none !important; }
}

/* Открытое меню каталога на телефоне — страница под ним не прокручивается */
html.ntc-lock, html.ntc-lock body { overflow: hidden; }
