/* Тема ТехПром: стальной тёмно-синий, рабочий оранжевый акцент, плотная таблица. */
/* Двойной :root — чтобы цвета темы были сильнее переменных модуля оформления */
:root:root {
    --accent: #D9481E;
    --accent-dim: rgba(217, 72, 30, .12);
    --accent-2: #1E3A5F;
    --text: #15202E;
    --text-b: #22303F;
    --text-mid: #4B5A6B;
    --text-muted: #8493A3;
    --bg-card: #F4F6F9;
    --bg-card-h: #E9EDF2;
    --border: #E2E7ED;
    --border-b: #CFD7E0;
    --tp-navy: #1E3A5F;
    --tp-navy-d: #142A47;
    --f-display: 'Manrope', sans-serif;
}

body::after { display: none; }
h1, h2, h3 { font-family: var(--f-display); letter-spacing: -.01em; }

/* Шапка */
.site-header { box-shadow: 0 1px 0 var(--border); }
.header-top { background: var(--tp-navy-d); border: 0; }
.header-top .nav-link, .header-top .nav-phone, .header-top .nav-email, .header-top a { color: #DCE4EE; }
.header-top .nav-link:hover, .header-top .nav-phone:hover, .header-top a:hover { color: #fff; }
.lang-switch { display: none; } /* сайт только на русском */
@media (max-width: 700px) {
    .header-top .nav-email { display: none; }
    .header-main-inner { gap: 8px; }
    .header-actions { gap: 6px; margin-right: 8px; }
}
.header-logo-img { height: 72px; }
@media (min-width: 901px) { .header-logo { margin-right: 32px; } }
.header-main-inner { min-height: 92px; }
.catbar { background: var(--tp-navy); }
.catbar-link { color: #fff; font-weight: 600; }
.catbar-link:hover { color: #FFC9B5; }

/* Кнопки */
.tp-btn { display: inline-block; background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: 6px; padding: 13px 26px; font-weight: 700; font-size: 15px; font-family: var(--f-body); cursor: pointer; text-align: center; transition: background .15s; }
.tp-btn:hover { background: #BF3B14; color: #fff; }
.tp-btn--ghost { background: transparent; border-color: rgba(255, 255, 255, .45); }
.tp-btn--ghost:hover { background: rgba(255, 255, 255, .1); }
.tp-btn--wide { width: 100%; }

/* Чертёж */
.tp-drawing { width: 100%; height: auto; display: block; }
.tp-d-metal { fill: #AEB9C6; stroke: #5D6C7E; stroke-width: 1.5; }
.tp-d-dim { stroke: #5D6C7E; stroke-width: 1; }
.tp-d-text { font: 600 13px var(--f-body); fill: var(--text); text-anchor: middle; }

/* Главная */
.tp-hero { position: relative; overflow: hidden; background: linear-gradient(115deg, var(--tp-navy-d), var(--tp-navy)); color: #fff; padding: 72px 0; }
/* Чертёжная сетка на фоне медленно сдвигается и уходит при скролле */
.tp-hero::before { content: ''; position: absolute; inset: -120px; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 44px 44px; transform: translateY(var(--tp-grid-shift, 0)); animation: tp-grid-drift 26s linear infinite; }
@keyframes tp-grid-drift { to { background-position: 44px 44px; } }
.tp-hero-inner { position: relative; }
.tp-pre .tp-hero-copy, .tp-pre .tp-hero-art { visibility: hidden; }
.tp-word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.tp-word > span { display: inline-block; }
.tp-hero-art .tp-drawing { transition: transform .3s ease-out, opacity .3s ease-out; will-change: transform; }
@media (prefers-reduced-motion: reduce) { .tp-hero::before { animation: none; } }
.tp-hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.tp-eyebrow { color: #FFB59D; font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.tp-hero h1 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.08; font-weight: 800; color: #fff; }
.tp-hero-text { margin-top: 18px; font-size: 18px; color: #D4DDE8; max-width: 620px; }
.tp-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.tp-hero-art { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.tp-hero-art .tp-drawing { background: rgba(255, 255, 255, .06); border-radius: 10px; }
.tp-hero-art .tp-d-metal { fill: #9DB0C6; stroke: #E5ECF4; }
.tp-hero-art .tp-d-dim { stroke: #AFC0D3; }
.tp-hero-art .tp-d-text { fill: #fff; }

.tp-section { padding: 52px 0; }
.tp-section--tight { padding-top: 14px; }
.tp-section--alt { background: var(--bg-card); }
.tp-h2 { font-size: 30px; font-weight: 800; margin-bottom: 26px; }

.tp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.tp-tile { border: 1px solid var(--border); border-radius: 10px; padding: 20px; background: #fff; display: flex; flex-direction: column; }
.tp-tile-head { display: flex; align-items: center; gap: 14px; color: var(--text); }
.tp-tile-art { flex: 0 0 74px; width: 74px; background: var(--bg-card); border-radius: 8px; display: block; }
.tp-tile-art .tp-d-text, .tp-tile-art .tp-d-dim { display: none; }
.tp-tile-name { font-size: 20px; font-weight: 800; }
.tp-tile-head:hover .tp-tile-name { color: var(--accent); }
.tp-tile-list { list-style: none; margin: 14px 0; padding: 0; flex: 1; }
.tp-tile-list li { padding: 3px 0; }
.tp-tile-list a { color: var(--text-mid); font-size: 15px; }
.tp-tile-list a:hover, .tp-tile-all:hover { color: var(--accent); }
.tp-tile-all { font-weight: 700; font-size: 14px; color: var(--tp-navy); }

.tp-info { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.tp-info h3 { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.tp-info p { color: var(--text-mid); font-size: 15px; margin-bottom: 6px; }
.tp-info a { color: var(--text); font-weight: 600; }

/* О компании и новости */
.tp-about p { max-width: var(--text-max); color: var(--text-b); margin-bottom: 10px; }
.tp-h2-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.tp-h2-row a { font-weight: 700; color: var(--tp-navy); }
.tp-h2-row a:hover { color: var(--accent); }
.tp-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.tp-post { display: flex; flex-direction: column; color: var(--text); }
.tp-post-img { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--bg-card); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.tp-post-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tp-post-date { position: absolute; left: 0; top: 12px; background: var(--tp-navy-d); color: #fff; font-size: 13px; font-weight: 600; padding: 4px 10px; }
.tp-post-title { font-size: 18px; font-weight: 800; line-height: 1.25; }
.tp-post:hover .tp-post-title { color: var(--accent); }
.tp-post-text { margin-top: 8px; font-size: 14.5px; color: var(--text-mid); }
.tp-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tp-tab { padding: 9px 20px; border: 1px solid var(--border-b); border-radius: 8px; font-weight: 700; font-size: 15px; color: var(--text); }
.tp-tab:hover { border-color: var(--tp-navy); }
.tp-tab.is-active { background: var(--tp-navy); border-color: var(--tp-navy); color: #fff; }
.tp-listing.tp-listing--plain { grid-template-columns: minmax(0, 1fr); }

/* Страницы ядра: статья, текстовые, контакты, корзина */
.page-hero, body.shop-context .page-hero { padding: 34px 0 22px; }
.page-hero h1 { text-align: left; font-size: clamp(28px, 3vw, 40px); font-weight: 800; text-transform: none; letter-spacing: -.01em; }
.page-hero-eyebrow { display: none; }

/* Заголовок страниц */
.tp-head { padding: 26px 0 0; }
.tp-head h1 { font-size: clamp(28px, 3vw, 40px); font-weight: 800; margin-top: 10px; }
.tp-crumbs { display: flex; flex-wrap: wrap; font-size: 14px; color: var(--text-muted); }
.tp-crumbs a { color: var(--tp-navy); }
.tp-crumbs a:hover { color: var(--accent); }
.tp-crumbs > *:not(:last-child)::after { content: '›'; margin: 0 9px; color: var(--text-muted); }

.tp-subcats { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.tp-subcat { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-weight: 700; }
.tp-subcat:hover { border-color: var(--accent); color: var(--accent); }

/* Раздел с таблицей */
.tp-listing { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 30px; align-items: start; }
.tp-filter { position: sticky; top: 16px; background: var(--bg-card); border-radius: 10px; padding: 18px; }
.tp-filter-group { margin-bottom: 18px; }
.tp-filter-title { font-weight: 800; font-size: 15px; margin-bottom: 10px; }
.tp-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 240px; overflow-y: auto; }
.tp-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.tp-chip span { display: inline-block; padding: 5px 10px; font-size: 13px; background: #fff; border: 1px solid var(--border-b); border-radius: 6px; cursor: pointer; }
.tp-chip input:checked + span { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.tp-chip input:focus-visible + span { outline: 2px solid var(--accent); }
.tp-filter-reset { display: block; text-align: center; margin-top: 10px; font-size: 14px; color: var(--text-mid); }

.tp-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tp-table thead th { text-align: left; font-size: 13px; color: var(--text-mid); font-weight: 700; padding: 10px 12px; border-bottom: 2px solid var(--tp-navy); white-space: nowrap; }
.tp-table tbody td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tp-table tbody tr:hover { background: var(--bg-card); }
.tp-table-link { color: var(--text); font-weight: 600; }
.tp-table-link:hover { color: var(--accent); }
.tp-table-num { text-align: right !important; white-space: nowrap; }
.tp-unit { color: var(--text-muted); font-size: 13px; }
.tp-buy { display: flex; justify-content: flex-end; gap: 6px; }
.tp-buy input[type=number] { width: 62px; padding: 7px; border: 1px solid var(--border-b); border-radius: 6px; font: inherit; }
.tp-buy button { background: var(--accent); color: #fff; border: 0; border-radius: 6px; width: 40px; cursor: pointer; display: grid; place-items: center; }
.tp-buy button:hover { background: #BF3B14; }
.tp-pages { margin-top: 26px; display: flex; justify-content: center; }

/* Карточка */
.tp-product { display: grid; grid-template-columns: clamp(280px, 24vw, 460px) minmax(0, 1fr) clamp(280px, 20vw, 360px); gap: 34px; align-items: start; }
.tp-product-art { background: var(--bg-card); border-radius: 12px; padding: 14px; }
.tp-product-art img { width: 100%; border-radius: 8px; margin-bottom: 10px; }
.tp-product-main h1 { font-size: clamp(26px, 2.6vw, 34px); font-weight: 800; line-height: 1.15; margin-bottom: 22px; }
.tp-picker { margin-bottom: 18px; }
.tp-picker-title { font-size: 14px; color: var(--text-mid); margin-bottom: 8px; }
.tp-options { display: flex; flex-wrap: wrap; gap: 7px; max-height: 190px; overflow-y: auto; }
.tp-option { padding: 8px 13px; min-width: 46px; text-align: center; font-weight: 600; font-size: 14px; color: var(--text); border: 1px solid var(--border-b); border-radius: 8px; }
.tp-option:hover { border-color: var(--tp-navy); }
.tp-option.is-off { color: var(--text-muted); background: var(--bg-card); border-color: var(--border); }
.tp-option.is-selected { border: 2px solid var(--accent); color: var(--accent); padding: 7px 12px; }
.tp-buybox { border: 1px solid var(--border); border-radius: 12px; padding: 22px; position: sticky; top: 16px; }
.tp-price { font-size: 32px; font-weight: 800; white-space: nowrap; }
.tp-price span { font-size: 16px; font-weight: 500; color: var(--text-mid); }
.tp-note { font-size: 14px; color: var(--text-mid); margin-top: 8px; }
.tp-buybox-form { margin: 16px 0; }
.tp-buybox-form label { display: block; font-size: 14px; color: var(--text-mid); margin-bottom: 10px; }
.tp-buybox-form input[type=number] { display: block; width: 100%; margin-top: 6px; padding: 10px; border: 1px solid var(--border-b); border-radius: 6px; font: inherit; }
.tp-related { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 30px; }
.tp-related a { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; color: var(--text); border-bottom: 1px solid var(--border); }
.tp-related a:hover { color: var(--accent); }

@media (max-width: 1100px) {
    .tp-product { grid-template-columns: 240px minmax(0, 1fr); }
    .tp-buybox { grid-column: 1 / -1; position: static; }
    .tp-info { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
    .tp-hero-inner, .tp-listing, .tp-product { grid-template-columns: 1fr; }
    .tp-hero { padding: 44px 0; }
    .tp-hero-art { display: none; }
    .tp-filter { position: static; }
    .tp-product-art { max-width: 300px; }
}
@media (max-width: 560px) {
    .site-header .header-logo-img { height: 54px; }
    .tp-tiles, .tp-subcats, .tp-info, .tp-related { grid-template-columns: minmax(0, 1fr); }
    .tp-table { font-size: 14px; }
    .tp-table th:nth-child(2), .tp-table td:nth-child(2), .tp-table th:nth-child(3), .tp-table td:nth-child(3) { display: none; }
    .tp-buy input[type=number] { width: 46px; }
}

/* Новости на главной: пять в ряд на компьютере */
@media (min-width: 1200px) { .tp-posts--row { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; } }

/* Страница каталога */
.tp-tile-count { display: block; margin-top: 3px; font-size: 13.5px; color: var(--text-muted); font-weight: 500; }
.tp-lead { margin-top: 10px; max-width: var(--text-max); color: var(--text-mid); }

/* Искры первого экрана */
.tp-hero-sparks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }

/* Контакты: плашки сверху, форма и карта рядом */
.tp-contact-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.tp-contact-card { display: block; background: var(--bg-card); border-radius: 12px; padding: 20px 22px; color: var(--text); }
a.tp-contact-card:hover .tp-contact-value { color: var(--accent); }
.tp-contact-label { display: block; font-size: 13.5px; color: var(--text-mid); margin-bottom: 6px; }
.tp-contact-value { display: block; font-size: 17px; font-weight: 700; line-height: 1.3; }
.tp-contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: stretch; }
.tp-contact-form { display: flex; }
.tp-contact-form section { padding: 0; width: 100%; display: flex; }
.tp-contact-form .container { padding: 0; max-width: none; width: 100%; }
.tp-contact-form .inner-card { max-width: none !important; margin: 0 !important; height: 100%; padding: 30px !important; border: 0; border-radius: 12px; background: var(--bg-card); opacity: 1; transform: none; }
.tp-contact-form .c-info-title { font-family: var(--f-display); font-size: 24px; font-weight: 800; text-transform: none; letter-spacing: -.01em; }
.tp-contact-form .f-label { font-family: var(--f-body); font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--text-mid); }
.tp-contact-form .f-input, .tp-contact-form .f-textarea { border-radius: 8px; padding: 11px 14px; }
.tp-contact-form .f-textarea { min-height: 96px; height: 96px; }
.tp-contact-form .f-group { margin-bottom: 14px; }
.tp-contact-form .btn-submit { border-radius: 8px; font-family: var(--f-body); font-size: 15px; font-weight: 700; letter-spacing: 0; text-transform: none; padding: 14px 24px; }
.tp-contact-map { border-radius: 12px; overflow: hidden; min-height: 460px; background: var(--bg-card); }
.tp-contact-map iframe { display: block; width: 100%; height: 100%; min-height: 460px; border: 0; }
@media (max-width: 1000px) {
    .tp-contact-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tp-contact-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) { .tp-contact-cards { grid-template-columns: minmax(0, 1fr); } }

.tp-tile-art img { width: 100%; height: 74px; object-fit: contain; display: block; }

/* Цены за метр и от тонны */
.tp-table th small { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.tp-buy select { padding: 7px 6px; border: 1px solid var(--border-b); border-radius: 6px; font: inherit; font-size: 13px; background: #fff; }
.tp-variants { display: flex; flex-direction: column; gap: 8px; }
.tp-variant { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--border-b); border-radius: 8px; cursor: pointer; color: var(--text) !important; margin: 0 !important; }
.tp-variant:has(input:checked) { border: 2px solid var(--accent); padding: 10px 12px; }
.tp-variant input { accent-color: var(--accent); }
.tp-variant-label { font-size: 14px; color: var(--text-mid); }
.tp-variant-price { margin-left: auto; font-size: 20px; font-weight: 800; white-space: nowrap; }
.tp-mt { margin-top: 14px; }
.tp-price--ask { font-size: 22px; }
.tp-old-price { color: var(--text-muted); text-decoration: line-through; margin-top: 2px; }
.tp-product-desc { margin-top: 22px; color: var(--text-b); max-width: var(--text-max); }
.tp-product-desc p { margin-bottom: 10px; }

/* Картинки разделов на белом фоне: серая подложка только под чертежами */
.tp-tile-art:has(img) { background: transparent; }

/* Вид цены: кнопка и сумма слева, подпись в конце строки */
.tp-buybox-form .tp-variant { display: flex; align-items: center; gap: 10px; }
.tp-variant-price { order: 2; margin-left: 0; }
.tp-variant-label { order: 3; margin-left: auto; white-space: nowrap; }

/* Меню каталога: витрина разделов */
.catalog-mega.tp-mega { display: block; padding: 0; border-radius: 14px; overflow: hidden auto; max-height: min(80vh, 760px); box-shadow: 0 24px 60px rgba(20, 42, 71, .28); animation: tp-mega-in .22s ease-out both; }
@keyframes tp-mega-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.tp-mega-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; padding: 18px; }
.tp-mega-tile { position: relative; border: 1px solid var(--border); border-radius: 12px; background: #fff; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; animation: tp-tile-in .42s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 28ms + 40ms); }
@keyframes tp-tile-in { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
.tp-mega-tile::after { content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 3px; background: linear-gradient(90deg, #FFB066, var(--accent)); box-shadow: 0 0 10px rgba(255, 138, 76, .9); transition: right .3s ease; }
.tp-mega-tile:hover { transform: translateY(-4px); border-color: var(--border-b); box-shadow: 0 12px 26px rgba(20, 42, 71, .16); }
.tp-mega-tile:hover::after { right: 0; }
.tp-mega-link { display: flex; flex-direction: column; align-items: center; text-align: center; height: 100%; padding: 12px 10px 14px; color: var(--text); }
.tp-mega-img { display: flex; align-items: center; justify-content: center; width: 100%; height: 92px; }
.tp-mega-img img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .25s ease; }
.tp-mega-tile:hover .tp-mega-img img { transform: scale(1.08); }
.tp-mega-name { margin-top: 8px; font-size: 14.5px; font-weight: 700; line-height: 1.2; }
.tp-mega-tile:hover .tp-mega-name { color: var(--accent); }
.tp-mega-count { margin-top: 3px; font-size: 12.5px; color: var(--text-muted); }

/* Подразделы всплывают поверх плитки */
.tp-mega-subs { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 12px; background: var(--tp-navy-d); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease, visibility .18s; }
.tp-mega-tile:hover .tp-mega-subs, .tp-mega-tile:focus-within .tp-mega-subs { opacity: 1; visibility: visible; transform: none; }
.tp-mega-subs a { color: #DCE4EE; font-size: 13px; line-height: 1.2; }
.tp-mega-subs a:hover { color: #FFB59D; }
.tp-mega-subs .tp-mega-subs-title { color: #fff; font-size: 14px; font-weight: 800; }

/* Нижняя полоса */
.tp-mega-bar { display: flex; align-items: center; gap: 22px; padding: 14px 18px; background: linear-gradient(115deg, var(--tp-navy-d), var(--tp-navy)); color: #fff; }
.tp-mega-note { margin-right: auto; font-size: 14.5px; color: #D4DDE8; }
.tp-mega-phone { color: #fff; font-size: 17px; font-weight: 800; white-space: nowrap; }
.tp-mega-phone:hover { color: #FFB59D; }
.tp-mega-bar .tp-btn { padding: 10px 20px; white-space: nowrap; }

@media (max-width: 1300px) { .tp-mega-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 900px) {
    .tp-mega-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 12px; gap: 8px; }
    .tp-mega-subs { display: none; }
    .tp-mega-bar { flex-wrap: wrap; gap: 10px 16px; }
    .tp-mega-note { flex: 1 1 100%; margin-right: 0; }
    .tp-mega-img { height: 66px; }
}
@media (max-width: 520px) { .tp-mega-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .catalog-mega.tp-mega, .tp-mega-tile { animation: none; } }

/* Знак рубля: в шрифте сайта его нет, поэтому рисуем той же толщины, что и цифры */
.tp-rub { display: inline-block; width: .66em; height: .72em; margin-left: .04em; vertical-align: -.01em; overflow: hidden; text-indent: -9999px; background-color: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 66 72' fill='none' stroke='black' stroke-width='13'%3E%3Cpath d='M18 72V7h22a16.5 16.5 0 0 1 0 33H4M4 56h36'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 66 72' fill='none' stroke='black' stroke-width='13'%3E%3Cpath d='M18 72V7h22a16.5 16.5 0 0 1 0 33H4M4 56h36'/%3E%3C/svg%3E") center / contain no-repeat; }
.tp-price span.tp-rub { font-size: inherit; color: inherit; font-weight: inherit; }
/* Описания со старого сайта приходят со своим шрифтом */
.tp-product-desc, .tp-product-desc * { font-family: var(--f-body) !important; font-size: 15.5px; line-height: 1.6; }

/* Избранное и сравнение в строке таблицы */
.tp-row-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }
.tp-row-actions { display: flex; gap: 6px; }
.tp-table .card-action { width: 40px; height: 40px; }

/* Счётчики и кнопка «Показать» в фильтре, «Купить в 1 клик» */
.tp-chip.search-facet-checkbox { display: inline-flex; padding: 0; gap: 6px; font-size: inherit; }
.tp-chip .facet-quick-apply { margin-left: 0; padding: 5px 10px; border-radius: 6px; background: var(--accent); color: #fff; font-family: inherit; font-size: 12px; font-weight: 700; }
.tp-filter .search-price-range { margin-top: 0; }
.tp-filter .search-facet-item { padding: 4px 0; }
.tp-btn--ghost { margin-top: 10px; background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.tp-btn--ghost:hover { background: var(--accent); color: #fff; }

/* Страница доставки: текст и карта рядом */
.tp-delivery { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.tp-delivery .page-content { max-width: none; margin: 0; }
.tp-delivery-map { position: sticky; top: 16px; border-radius: 12px; overflow: hidden; background: var(--bg-card); }
.tp-delivery-map iframe { display: block; width: 100%; height: min(720px, calc(100vh - 32px)); min-height: 460px; border: 0; }
@media (max-width: 1000px) {
    .tp-delivery { grid-template-columns: minmax(0, 1fr); }
    .tp-delivery-map { position: static; }
}

/* Меню на телефоне открывается белой панелью: ссылки тёмные, а не как на тёмной полосе */
.header-top .header-top-menu.open a { color: var(--text); }
.header-top .header-top-menu.open a:hover { color: var(--accent); }

/* Кнопка меню на телефоне и планшете живёт в тёмной полосе над панелью, которую открывает */
@media (max-width: 1024px) {
    .site-header .burger { position: absolute; top: -46px; left: var(--container-pad); height: 46px; margin: 0; padding: 0; justify-content: center; z-index: 211; }
    .site-header .burger span { background: #fff; }
    .header-top-inner { justify-content: flex-end; }
}
@media (max-width: 760px) {
    .site-header .burger { top: -40px; left: 16px; height: 40px; }
    .header-top-inner { justify-content: flex-end; }
    .header-actions { margin-right: 0; }
}
@media (max-width: 380px) {
    .header-actions .nav-cart { width: 34px; }
    .header-main .catalog-menu-btn { padding: 0 12px; }
}

/* Телефон и планшет: чертежи сменяются в одной карточке справа от кнопок */
@media (max-width: 820px) {
    .tp-hero-art.tp-art-cycle { display: grid; grid-template-columns: 1fr; gap: 0; position: absolute; right: var(--container-pad); bottom: 0; width: min(132px, calc(100% - 2 * var(--container-pad) - 196px)); pointer-events: none; }
    .tp-art-cycle .tp-drawing { grid-area: 1 / 1; opacity: 0; transition: opacity .5s ease; }
    .tp-art-cycle .tp-drawing.is-on { opacity: 1; }
}
@media (max-width: 760px) {
    .tp-hero-art.tp-art-cycle { right: 16px; width: min(152px, calc(100% - 32px - 186px)); }
    .tp-hero-actions { flex-direction: column; align-items: flex-start; }
    .tp-hero-actions .tp-btn { padding-left: 20px; padding-right: 20px; }
}

/* Плитки разделов каталога на телефоне: два ряда, картинка над названием */
@media (max-width: 760px) {
    .tp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 560px) {
    .tp-tile { padding: 14px; }
    .tp-tile-head { flex-direction: column; align-items: flex-start; gap: 10px; }
    .tp-tile-art { flex: 0 0 auto; width: 100%; }
    .tp-tile-name { font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; }
    .tp-tile-list { margin: 10px 0; }
    .tp-tile-list a { font-size: 14px; }
}
