/* ==========================================================================
   TPMarket — «технологичный» слой дизайна и удобство пользования (v1.1)
   Подключается после main.css. Десктопные правила — в @media (min-width: 901px),
   мобильные доработки — в конце файла.
   1. Переменные   2. Верхняя полоса и шапка   3. Живой поиск   4. Меню и мега-меню
   5. Макет        6. Главная                  7. Каталог и карточки
   8. Карточка товара  9. Мелочи (наверх, уведомление, 404)  10. Мобильные  11. Печать
   ========================================================================== */

/* 1. Переменные ----------------------------------------------------------- */
:root {
	--ink: #071a2f;
	--ink-2: #0a2a4a;
	--cyan: #19b6e8;
	--mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
	--grid-line: rgba(25, 182, 232, .12);
	--shadow-lg: 0 12px 32px rgba(7, 26, 47, .16);
	--radius-lg: 12px;
}

.btn--lg { padding: 14px 24px; font-size: 16px; }
.btn--light { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn--light:hover { background: #fff; color: var(--ink-2); }
.btn--accent { box-shadow: 0 4px 14px rgba(240, 138, 0, .35); }
.btn { transition: background .15s, color .15s, border-color .15s, box-shadow .15s, transform .1s; }
.btn:active { transform: translateY(1px); }

.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin: 32px 0 16px; }
.section-head .section-title { margin: 0; }
.section-title { position: relative; border-bottom: 0; padding: 0 0 0 14px; font-size: 22px; }
.section-title::before { content: ""; position: absolute; left: 0; top: .15em; bottom: .15em; width: 4px; border-radius: 2px; background: linear-gradient(var(--c-accent), #ffb74d); }
.home-section { margin-top: 8px; }

.link-btn { padding: 8px 0; border: 0; background: none; color: var(--c-muted); font-size: 14px; text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--c-primary); }

/* 2. Верхняя полоса и шапка ------------------------------------------------ */
.topbar { display: none; }
.header-search-btn { display: none; }
.header-search__hint { display: none; }

@media (min-width: 901px) {
	html { scroll-padding-top: 130px; }
	.topbar { display: block; background: var(--ink); color: #9db4cb; font-size: 13px; }
	.topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 36px; }
	.topbar__org { display: flex; flex-wrap: wrap; gap: 0 12px; margin: 0; }
	.topbar__org strong { color: #fff; letter-spacing: .04em; }
	.topbar__org span { text-transform: uppercase; letter-spacing: .03em; font-size: 12px; }
	.topbar__info { display: flex; gap: 22px; margin: 0; padding: 0; list-style: none; }
	.topbar__info li { display: inline-flex; align-items: center; gap: 6px; }
	.topbar__info a { color: #cfe3f5; }
	.topbar__info svg { color: var(--cyan); }

	.site-header { position: sticky; top: 0; z-index: 700; background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: saturate(1.4) blur(8px); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 0; box-shadow: 0 1px 0 var(--c-border); transition: box-shadow .2s; }
	.site-header.is-stuck { box-shadow: 0 6px 24px rgba(7, 26, 47, .14); }
	.site-header__top { grid-template-columns: auto minmax(260px, 1fr) auto; gap: 28px; padding-top: 10px; padding-bottom: 10px; }
	.site-logo img, .site-logo .custom-logo { max-height: 56px; }
	.site-contacts { align-items: center; gap: 18px; }
	.site-contacts__phones a { line-height: 1.25; }
	.site-contacts__phones a:first-of-type { font-family: var(--mono); font-size: 17px; letter-spacing: -.01em; }
	.site-contacts__cta { white-space: nowrap; }
	.site-contacts__mail { display: none; }

	.header-search { position: relative; max-width: 560px; justify-self: stretch; }
	.header-search .search-form { margin: 0; max-width: none; }
	.header-search .search-form__input { padding-right: 76px; background: #f3f6f9; border-radius: 999px; }
	.header-search .search-form__input:focus { background: #fff; }
	.header-search__hint { position: absolute; right: 52px; top: 50%; display: block; transform: translateY(-50%); pointer-events: none; }
	.header-search kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border: 1px solid var(--c-border); border-bottom-width: 2px; border-radius: 4px; background: #fff; color: var(--c-muted); font: 12px/1.5 var(--mono); text-align: center; }
	.header-search .search-form:focus-within + .header-search__hint { display: none; }
	.header-search .search-form__btn { border-radius: 0 999px 999px 0; }
}

/* Поле поиска (общие стили) */
.search-form { position: relative; display: flex; max-width: 100%; }
.search-form__input { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid var(--c-border); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); background: #fff; color: var(--c-text); }
.search-form__input:focus { border-color: var(--c-primary); outline: 0; box-shadow: 0 0 0 3px rgba(13, 79, 139, .15); }
.search-form__btn { width: 44px; border: 0; border-radius: 0 var(--radius) var(--radius) 0; background: var(--c-primary); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.search-form__btn:hover { background: var(--c-accent); }

/* 3. Живой поиск ---------------------------------------------------------- */
.live { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 900; max-height: min(70vh, 520px); overflow-y: auto; overscroll-behavior: contain; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); text-align: left; }
.live[hidden] { display: none; }
.live__group { margin: 0; padding: 10px 14px 4px; color: var(--c-muted); font: 700 11px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.live__list { margin: 0; padding: 0 0 6px; list-style: none; }
.live__item a { display: flex; align-items: center; gap: 12px; padding: 8px 14px; color: var(--c-text); text-decoration: none; }
.live__item a:hover, .live__item.is-active a { background: #eaf3fb; }
.live__item img { flex: none; width: 56px; height: 42px; object-fit: cover; border-radius: 4px; background: #eef4fa; }
.live__item--cat img { display: none; }
.live__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.live__title { font-weight: 600; overflow-wrap: anywhere; }
.live__title mark { background: #ffe2a8; color: inherit; border-radius: 2px; }
.live__sub { color: var(--c-muted); font-size: 12.5px; }
.live__all { display: block; padding: 12px 14px; border-top: 1px solid var(--c-border); background: #f6f9fc; font-weight: 700; text-align: center; }
.live__empty { margin: 0; padding: 16px 14px; color: var(--c-muted); }
.side-block .live { position: static; max-height: none; margin: 0; border-width: 1px 0 0; border-radius: 0; box-shadow: none; }

/* 4. Меню и мега-меню ------------------------------------------------------ */
.main-nav { position: relative; background: linear-gradient(90deg, var(--c-primary-dark), var(--c-primary)); }
.main-nav__in { display: flex; align-items: stretch; flex-wrap: wrap; }
.main-nav__list a { position: relative; }
.main-nav__list > li > a::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: 6px; height: 2px; background: var(--c-accent); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.main-nav__list > li:hover > a::after, .main-nav__list > .current-menu-item > a::after, .main-nav__list > .current-menu-ancestor > a::after { transform: scaleX(1); }
.main-nav__list > li:hover > a, .main-nav__list > .current-menu-item > a, .main-nav__list > .current-menu-ancestor > a { background: rgba(255, 255, 255, .08); }
.mega__btn { display: inline-flex; align-items: center; gap: 10px; height: 100%; padding: 0 22px; border: 0; background: var(--c-accent); color: #fff; font-weight: 700; font-size: 16px; cursor: pointer; }
.mega__btn:hover, .mega__btn[aria-expanded="true"] { background: var(--c-accent-dark); }
.mega__icon { width: 16px; height: 2px; background: currentColor; box-shadow: 0 5px 0 currentColor, 0 -5px 0 currentColor; }
.mega__panel { position: absolute; left: 0; right: 0; top: 100%; z-index: 880; max-height: calc(100vh - 230px); overflow-y: auto; background: #fff; border-bottom: 4px solid var(--c-accent); box-shadow: var(--shadow-lg); }
.mega__panel[hidden] { display: none; }
.mega__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 28px; max-width: var(--container); margin: 0 auto; padding: 24px 16px 28px; }
.mega__head { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; margin-bottom: 6px; border-bottom: 1px solid var(--c-border); color: var(--c-primary-dark); font-weight: 700; line-height: 1.25; text-decoration: none; }
.mega__head img { flex: none; width: 44px; height: 33px; object-fit: cover; border-radius: 4px; background: #eef4fa; }
.mega__head:hover span { color: var(--c-accent-dark); }
.mega__col ul { margin: 0; padding: 0; list-style: none; }
.mega__col li a { display: block; padding: 4px 0; color: var(--c-text); font-size: 14px; line-height: 1.35; text-decoration: none; }
.mega__col li a:hover { color: var(--c-primary); text-decoration: underline; }
.mega__more a { color: var(--c-accent-dark); font-weight: 600; }
@media (max-width: 1100px) { .mega__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* 5. Макет ---------------------------------------------------------------- */
@media (min-width: 901px) { .side-block--search { display: none; } }
.sidebar > * { flex: none; }
/* Виджеты (в т.ч. блочные из WP) */
.widget { border-radius: var(--radius-lg); }
.widget > :not(.widget__title):not(h2):not(h3) { margin-left: 16px; margin-right: 16px; }
.widget h2, .widget h3, .widget .wp-block-heading, .widget__title { margin: 0 0 10px; padding: 12px 16px; background: linear-gradient(90deg, var(--ink-2), var(--c-primary)); color: #fff; font: 700 13px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.widget ul { margin-bottom: 12px; padding-left: 0; list-style: none; }
.widget li { padding: 4px 0; }
.widget form { margin-bottom: 14px; }
.widget input[type="search"] { width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid var(--c-border); border-radius: var(--radius); }
.widget button, .widget .wp-block-search__button { min-height: 40px; padding: 0 14px; border: 0; border-radius: var(--radius); background: var(--c-primary); color: #fff; cursor: pointer; }
.site-footer .widget { background: transparent; border: 0; color: #cfe3f5; }
.site-footer .widget h2, .site-footer .widget h3, .site-footer .widget__title { padding-left: 0; background: none; color: #fff; }
.site-footer .widget > :not(h2):not(h3):not(.widget__title) { margin-left: 0; margin-right: 0; }
.site-footer .widget a { color: #fff; }
@media (min-width: 901px) {
	.sidebar { position: static; height: auto; max-height: none; overflow: visible; }
	.layout { padding-top: 22px; }
	.content { border-radius: var(--radius-lg); }
	.side-block { border-radius: var(--radius-lg); }
	.side-block__title { background: linear-gradient(90deg, var(--ink-2), var(--c-primary)); font: 700 13px/1.2 var(--mono); letter-spacing: .1em; }
}
.cat-tree a { transition: background .12s, color .12s, padding .12s; }
.cat-tree a:hover { padding-left: 20px; }
.material-list a { display: flex; align-items: center; gap: 10px; }
.material-list .mat-icon { flex: none; width: 24px; height: 24px; }

/* 6. Главная -------------------------------------------------------------- */
@media (min-width: 901px) {
	.home .layout { grid-template-columns: minmax(0, 1fr); }
	.home .sidebar { display: none; }
}
.home .content { padding: 0; background: transparent; border: 0; box-shadow: none; }

.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 12px; padding: 36px 40px; overflow: hidden; border-radius: var(--radius-lg); color: #dcebf8; background:
	radial-gradient(900px 420px at 85% 40%, rgba(25, 182, 232, .22), transparent 65%),
	linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 32px 32px,
	linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 32px 32px,
	linear-gradient(135deg, var(--ink), var(--ink-2)); }
.hero::after { content: ""; position: absolute; left: 0; bottom: 0; width: 120px; height: 4px; background: var(--c-accent); }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--cyan); font: 700 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.hero__eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 0 4px rgba(240, 138, 0, .25); animation: tp-pulse 2.4s ease-in-out infinite; }
.hero__title { margin: 0 0 14px; color: #fff; font-size: clamp(22px, 2.5vw, 32px); line-height: 1.2; }
.hero__lead { max-width: 52ch; margin: 0 0 24px; color: #b8cfe4; font-size: 16.5px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__art { position: relative; }
.hero__art img { display: block; width: 100%; height: auto; }
@keyframes tp-pulse { 50% { box-shadow: 0 0 0 8px rgba(240, 138, 0, 0); } }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 16px 0 0; padding: 0; list-style: none; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.stats__item { display: flex; flex-direction: column; gap: 4px; padding: 18px 22px; color: var(--c-muted); font-size: 13.5px; line-height: 1.35; }
.stats__item + .stats__item { border-left: 1px solid var(--c-border); }
.stats__num { color: var(--c-primary); font: 800 30px/1.1 var(--mono); letter-spacing: -.02em; }
.stats__num--sm { font-size: 18px; line-height: 1.5; letter-spacing: 0; }

.pick { margin-top: 24px; padding: 26px 28px; background: #fff; border: 1px solid var(--c-border); border-top: 4px solid var(--c-accent); border-radius: var(--radius-lg); box-shadow: var(--shadow); scroll-margin-top: 130px; }
.pick__head p { margin: 0 0 18px; color: var(--c-muted); }
.pick__title { margin: 0 0 4px; font-size: 22px; }
.pick__form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 24px; align-items: end; }
.pick__types { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 0; border: 0; }
.pick__step { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 0; color: var(--c-primary-dark); font-weight: 700; }
.pick__step span { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--c-primary); color: #fff; font: 700 13px/1 var(--mono); }
.pick__step small { color: var(--c-muted); font-weight: 400; }
.pick__chips { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.pick-chip { position: relative; display: block; cursor: pointer; }
.pick-chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pick-chip__box { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; padding: 12px 6px 10px; border: 2px solid var(--c-border); border-radius: 10px; background: #f8fafc; color: var(--c-text); font-size: 14px; font-weight: 600; text-align: center; line-height: 1.25; transition: border-color .15s, background .15s, box-shadow .15s, transform .15s; }
.pick-chip__box img { width: 40px; height: 40px; }
.pick-chip:hover .pick-chip__box { border-color: var(--cyan); transform: translateY(-2px); }
.pick-chip input:checked + .pick-chip__box { border-color: var(--c-primary); background: #eaf3fb; box-shadow: 0 0 0 3px rgba(13, 79, 139, .15); color: var(--c-primary-dark); }
.pick-chip input:focus-visible + .pick-chip__box { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.pick__mat select { width: 100%; min-width: 220px; min-height: 48px; padding: 0 12px; border: 1px solid var(--c-border); border-radius: var(--radius); background: #fff; color: var(--c-text); font-size: 16px; }
.pick__go { min-height: 48px; }

.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 8px; padding: 0; list-style: none; }
.svc-card a { display: flex; flex-direction: column; height: 100%; overflow: hidden; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg); color: var(--c-text); text-decoration: none; transition: border-color .15s, box-shadow .2s, transform .2s; }
.svc-card a:hover { border-color: var(--c-primary); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.svc-card img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #eef4fa; }
.svc-card__title { padding: 12px 16px 2px; color: var(--c-primary-dark); font-weight: 700; line-height: 1.3; }
.svc-card__text { padding: 0 16px 16px; color: var(--c-muted); font-size: 14px; line-height: 1.4; }
.svc-grid--wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 24px; }

.about .entry { max-width: none; }
.home .about, .home .home-section > .entry { padding: 0; }

.advantages__item a { background: #fff; border-radius: var(--radius-lg); transition: border-color .15s, box-shadow .2s, transform .2s; }
.advantages__item a:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.advantages__icon { width: 56px; height: 56px; }

.news-list { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 4px 18px; }
.news-list__item:last-child { border-bottom: 0; }
.post-date { font-family: var(--mono); }

.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; margin-top: 32px; padding: 28px 32px; overflow: hidden; border-radius: var(--radius-lg); color: #cfe3f5; background:
	linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 28px 28px,
	linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 28px 28px,
	linear-gradient(120deg, var(--c-primary-dark), var(--ink)); }
.cta-band__title { margin: 0 0 4px; color: #fff; font-size: 22px; }
.cta-band p { margin: 0; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-inline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 24px; padding: 16px 20px; background: #eef4fa; border-left: 4px solid var(--c-accent); border-radius: var(--radius); }
.cta-inline p { margin: 0; font-weight: 600; }

.featured__item a { border-radius: var(--radius-lg); transition: border-color .15s, box-shadow .2s, transform .2s; }
.featured__item a:hover { border-color: var(--c-primary); box-shadow: var(--shadow-lg); transform: translateY(-3px); text-decoration: none; }
.featured__item img { background: #eef4fa; }
.featured__title { font-weight: 600; color: var(--c-primary-dark); }

/* 7. Каталог и карточки ---------------------------------------------------- */
.page-head { padding-bottom: 14px; border-bottom: 1px solid var(--c-border); }
.page-title { position: relative; }

.term-card a { position: relative; border-radius: var(--radius-lg); }
.term-card a:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.term-card a { transition: transform .2s, box-shadow .2s, border-color .15s; }
.term-card__img { position: relative; overflow: hidden; background: #eef4fa; }
.term-card__img img { transition: transform .35s ease; }
.term-card a:hover .term-card__img img { transform: scale(1.05); }
.term-card__title { position: relative; padding-right: 38px; color: var(--c-primary-dark); }
.term-card__go { position: absolute; right: 12px; bottom: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--c-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d4f8b' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 12px no-repeat; transition: background-color .15s, transform .2s; }
.term-card a:hover .term-card__go { background-color: var(--c-accent); transform: translateX(3px); }

.product-card { position: relative; border-radius: var(--radius-lg); transition: border-color .15s, box-shadow .2s, transform .2s; }
.product-card::before { content: ""; position: absolute; top: 0; left: 0; z-index: 1; width: 28px; height: 28px; border-top: 3px solid var(--c-accent); border-left: 3px solid var(--c-accent); border-top-left-radius: var(--radius-lg); opacity: 0; transition: opacity .2s; pointer-events: none; }
.product-card:hover { border-color: var(--c-primary); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.product-card:hover::before { opacity: 1; }
.product-card__img { overflow: hidden; background: #eef4fa; }
.product-card__title a { text-decoration: none; }
.product-card__title a:hover { color: var(--c-primary); }
.product-card__price { color: var(--c-primary-dark); }

/* Чипы ключевых параметров */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.chips__item { display: inline-flex; align-items: baseline; gap: 5px; max-width: 100%; padding: 3px 9px; border: 1px solid #cfe0f0; border-radius: 999px; background: #f0f6fc; color: var(--c-muted); font-size: 12.5px; line-height: 1.4; }
.chips__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips__item b { flex: none; color: var(--c-primary-dark); font-family: var(--mono); font-size: 12.5px; }
.chips--lg { gap: 8px; margin: 12px 0 14px; }
.chips--lg .chips__item { padding: 6px 12px; font-size: 14px; }
.chips--lg .chips__item b { font-size: 14px; }

/* Панель сортировки */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 18px; padding: 10px 14px; background: #f3f7fb; border: 1px solid var(--c-border); border-radius: var(--radius-lg); }
.toolbar__count { margin: 0 auto 0 0; color: var(--c-muted); font-size: 14px; }
.toolbar__count b { color: var(--c-primary-dark); font-family: var(--mono); font-size: 16px; }
.toolbar__reset { margin-left: 10px; font-size: 13px; }
.toolbar__field { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--c-muted); font-size: 13px; }
.toolbar__field select { min-height: 38px; padding: 0 28px 0 10px; border: 1px solid var(--c-border); border-radius: var(--radius); background-color: #fff; color: var(--c-text); font-size: 14px; max-width: 220px; }
.toolbar__view { display: inline-flex; border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.toolbar__vbtn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 38px; padding: 0; border: 0; background: transparent; color: var(--c-muted); cursor: pointer; }
.toolbar__vbtn + .toolbar__vbtn { border-left: 1px solid var(--c-border); }
.toolbar__vbtn.is-active { background: var(--c-primary); color: #fff; }

/* Режим «список» */
.product-grid.is-list { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.product-grid.is-list .product-card { flex-direction: row; }
.product-grid.is-list .product-card__img { flex: none; width: 220px; aspect-ratio: auto; }
.product-grid.is-list .product-card__img img { height: 100%; min-height: 150px; }
.product-grid.is-list .product-card__body { padding: 16px 20px; }
.product-grid.is-list .product-card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.product-grid.is-list .product-card__price { margin: 0; }

/* 8. Карточка товара ------------------------------------------------------- */
.gallery--ill .gallery__main { display: block; overflow: hidden; background: #eef4fa; border: 1px solid var(--c-border); border-radius: var(--radius-lg); cursor: default; }
.gallery__ill { display: block; width: 100%; height: auto; }
.gallery__note { margin: 8px 2px 0; color: var(--c-muted); font-size: 12.5px; }
.product__tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.tool-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--c-border); border-radius: 999px; background: #fff; color: var(--c-muted); font-size: 13.5px; cursor: pointer; transition: border-color .15s, color .15s; }
.tool-btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.specs tr:nth-child(even) td, .specs tr:nth-child(even) th[scope="row"] { background: #f8fafc; }
.specs td { font-family: var(--mono); font-size: 14px; }
.tabs__link.is-active { box-shadow: inset 0 -3px 0 var(--c-accent); }

.recent__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.recent__list a { display: flex; flex-direction: column; height: 100%; overflow: hidden; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg); color: var(--c-primary-dark); font-size: 13.5px; font-weight: 600; line-height: 1.3; text-decoration: none; }
.recent__list a:hover { border-color: var(--c-primary); }
.recent__list img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #eef4fa; }
.recent__list span { padding: 8px 10px 10px; }

/* 9. Мелочи ---------------------------------------------------------------- */
.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 600; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: var(--c-primary); color: #fff; box-shadow: var(--shadow-lg); cursor: pointer; opacity: 0; transform: translateY(12px); transition: opacity .2s, transform .2s, background .15s; }
.to-top[hidden] { display: none; }
.to-top.is-visible { opacity: 1; transform: none; }
.to-top:hover { background: var(--c-accent); }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 1200; max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: var(--shadow-lg); transform: translateX(-50%); animation: tp-toast .25s ease-out; }
.toast[hidden] { display: none; }
@keyframes tp-toast { from { opacity: 0; transform: translate(-50%, 10px); } }

.e404 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 32px; align-items: center; }
.e404__img { grid-column: 2; grid-row: 1 / span 3; width: 100%; height: auto; border-radius: var(--radius-lg); }
.e404 > :not(.e404__img) { grid-column: 1; }

.site-footer { background: linear-gradient(180deg, var(--c-primary-dark), var(--ink)); border-top: 4px solid var(--c-accent); }
.footer-menu a { color: #cfe3f5; }
.footer-menu a:hover { color: #fff; }

/* Плавное появление блоков (включается скриптом, без JS всё видно) */
.will-reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.will-reveal.is-in { opacity: 1; transform: none; }

/* 10. Мобильные ------------------------------------------------------------- */
@media (max-width: 900px) {
	.site-header__top { grid-template-columns: minmax(0, 1fr) auto auto auto; }
	.header-search, .site-contacts { display: none; }
	.header-search-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--c-border); border-radius: 50%; background: #fff; color: var(--c-primary); cursor: pointer; }
	.main-nav { background: var(--c-primary); }
	.main-nav__in { display: block; }
	.mega { display: none; }
	.main-nav__list > li > a::after { display: none; }
	.cat-tree a:hover { padding-left: 16px; }

	.hero { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 24px 16px 8px; border-radius: var(--radius-lg); }
	.hero__title { font-size: 22px; }
	.hero__lead { font-size: 15.5px; margin-bottom: 18px; }
	.hero__cta .btn { flex: 1 1 100%; }
	.hero__art { margin: 0 -8px; }
	.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 12px 0 0; border-width: 1px; border-radius: var(--radius-lg); }
	.stats__item { padding: 14px 16px; font-size: 12.5px; }
	.stats__item:nth-child(3) { border-left: 0; }
	.stats__item:nth-child(n+3) { border-top: 1px solid var(--c-border); }
	.stats__num { font-size: 24px; }
	.stats__num--sm { font-size: 15px; }

	.pick { margin: 16px 0 0; padding: 18px 14px; scroll-margin-top: 70px; }
	.pick__form { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.pick__chips { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
	.pick__chips .pick-chip__box { padding: 10px 4px 8px; font-size: 13px; min-height: 44px; }
	.pick__mat select { min-width: 0; }
	.pick__go { width: 100%; min-height: 52px; }

	/* Все блоки главной — одинаковой ширины: отступ 12px с обеих сторон */
	.home .hero, .home .stats, .home .pick, .home .featured, .home .home-section, .home .cta-band { margin-left: 12px; margin-right: 12px; }
	.home .hero { margin-top: 12px; }
	.home .featured { padding-left: 0; }
	.home .section-head { margin: 22px 0 12px; }
	.section-title { font-size: 19px; }
	.svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.svc-card__title { padding: 10px 12px 2px; font-size: 14px; }
	.svc-card__text { padding: 0 12px 12px; font-size: 12.5px; }
	.svc-grid--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cta-band { padding: 22px 16px; border-radius: var(--radius-lg); }
	.cta-band__actions, .cta-band__actions .btn { width: 100%; }
	.news-list { padding: 0 14px; }

	.toolbar { gap: 8px 10px; padding: 10px; }
	.toolbar__count { flex: 1 1 100%; }
	.toolbar__field { flex: 1 1 calc(50% - 10px); flex-direction: column; align-items: stretch; gap: 3px; }
	.toolbar__field select { width: 100%; max-width: none; min-height: 44px; font-size: 16px; }
	.toolbar__view { display: none; }
	.toolbar__reset { display: inline-flex; align-items: center; min-height: 44px; }
	.chips__item { font-size: 12px; }

	.to-top { right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); width: 44px; height: 44px; }
	.single-product .to-top { bottom: calc(78px + env(safe-area-inset-bottom)); }
	.toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
	.product__tools { margin-top: 10px; }
	.tool-btn { min-height: 44px; padding: 0 14px; }
	.recent__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.live { position: static; max-height: none; margin: 0; border-width: 1px 0 0; border-radius: 0; box-shadow: none; }
	.live__item a { min-height: 48px; }
	.custom-logo-link { display: flex; align-items: center; min-height: 44px; }
	.more-link { display: inline-flex; align-items: center; min-height: 44px; }
	.widget li a, .widget a { display: inline-block; padding: 8px 0; }
	.contacts a { display: inline-block; padding: 10px 0; }
	.product-card__title a { display: flex; align-items: center; min-height: 44px; }
	.e404 { grid-template-columns: minmax(0, 1fr); }
	.e404__img, .e404 > :not(.e404__img) { grid-column: 1; grid-row: auto; }
	.e404__img { order: -1; }
}

@media (max-width: 560px) {
	.svc-card__title { font-size: 13.5px; }
	.advantages__icon { width: 48px; height: 48px; }
	.hero__eyebrow { font-size: 11px; letter-spacing: .1em; }
}

@media (prefers-reduced-motion: reduce) {
	.will-reveal { opacity: 1; transform: none; }
	.hero__eyebrow::before { animation: none; }
}

/* 11. Печать --------------------------------------------------------------- */
@media print {
	.topbar, .to-top, .toast, .product__tools, .toolbar, .recent, .cta-band, .cta-inline, .pick, .header-search { display: none !important; }
	.product-card::before { display: none; }
}

/* 12. Данные из импорта: таблицы характеристик, видео, примечания ---------- */
.specs__title { margin: 22px 0 8px; padding-left: 12px; border-left: 4px solid var(--c-accent); font-size: 16px; }
.specs__title:first-child { margin-top: 0; }
.specs--matrix { width: auto; min-width: 100%; font-size: 13.5px; }
.specs--matrix thead th { position: sticky; top: 0; background: var(--c-primary); color: #fff; font-weight: 600; white-space: nowrap; }
.specs--matrix th[scope="row"] { min-width: 180px; width: auto; }
.specs--matrix td { font-family: var(--mono); white-space: nowrap; }
.entry .video { position: relative; max-width: 720px; margin: 0 0 1.2em; aspect-ratio: 16 / 9; background: #0a1d33; border-radius: var(--radius); overflow: hidden; }
.entry .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.entry h3 { margin: 1.4em 0 .5em; font-size: 18px; }
.entry small { color: var(--c-muted); }
@media (max-width: 900px) {
	.specs--matrix { display: table; min-width: 520px; }
	.specs--matrix tbody { display: table-row-group; }
	.specs--matrix thead { display: table-header-group; }
	.specs--matrix tr { display: table-row; }
	.specs--matrix th, .specs--matrix td { display: table-cell; padding: 6px 8px; border: 1px solid var(--c-border); font-size: 13px; }
	.specs--matrix th[scope="row"] { width: auto; min-width: 140px; padding: 6px 8px; background: #fafbfc; color: var(--c-text); font-weight: 600; }
	.specs--matrix td { padding-bottom: 6px; font-weight: 400; }
}

/* 13. Страницы и новости из импорта --------------------------------------- */
.entry::after { content: ""; display: table; clear: both; }
.page-article__img { margin: 0 0 18px; }
.page-article__img img { width: auto; max-width: 100%; max-height: 560px; border-radius: var(--radius); }
.page-article__img--small { float: right; max-width: 320px; margin: 0 0 14px 22px; }
.post-item__img--ill { display: flex; align-items: center; justify-content: center; background: var(--c-bg); border-radius: var(--radius); }
.post-item__img--ill img { width: 100%; height: auto; opacity: .9; }
.entry .lead { font-size: 18px; line-height: 1.55; font-weight: 600; color: var(--c-primary); }
.entry .note { padding: 12px 16px; border-left: 4px solid var(--c-accent); background: var(--c-bg); border-radius: 0 var(--radius) var(--radius) 0; }
.entry table.data-table thead th, .entry table.data-table tr:first-child th { background: var(--c-primary); color: #fff; font-weight: 600; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin: 1em 0 1.8em; }
.doc-grid figure { display: flex; flex-direction: column; margin: 0; overflow: hidden; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); }
.doc-grid a { display: block; padding: 10px; background: var(--c-bg); text-decoration: none; }
.doc-grid img { width: 100%; height: 220px; object-fit: contain; border-radius: 0; }
.doc-grid figcaption { padding: 10px 12px; color: var(--c-muted); font-size: 13px; line-height: 1.4; }
.messengers { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 1em; padding: 0; list-style: none; }
.entry a.messenger { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); font-weight: 600; text-decoration: none; }
.entry a.messenger:hover { border-color: var(--c-accent); }
.map-embed { position: relative; max-width: 900px; margin: 0 0 1em; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--radius); background: var(--c-bg); }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-item { margin: 0 0 1.6em; }
.video-item figcaption { margin-top: 8px; color: var(--c-muted); font-size: 14px; font-style: italic; }
@media (max-width: 640px) {
	.page-article__img--small { float: none; max-width: 100%; margin: 0 0 14px; }
	.entry .alignleft, .entry .alignright { float: none; display: block; margin: 0 auto 14px; }
	.doc-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.doc-grid img { height: 160px; }
	.map-embed { aspect-ratio: 4 / 3; }
}
@media (max-width: 640px) {
	.post-nav { display: grid; grid-template-columns: 1fr; gap: 12px; }
	.post-nav span { display: block; }
}

/* 14. Фото вписаны в окно просмотра, без прыжков и обрезки --------------- */
.gallery__main { position: relative; aspect-ratio: 4 / 3; background: #fff; }
.gallery__main img, .gallery__main .gallery__ill { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 6px; object-fit: contain; transition: opacity .15s; }
.gallery__main.is-loading img { opacity: .35; }
.gallery--ill .gallery__main { background: #eef4fa; }
.gallery--ill .gallery__main img { padding: 0; }
.gallery__thumb { background: #fff; }
.gallery__thumb img { height: 64px; padding: 2px; object-fit: contain; }
.product-card__img, .term-card__img { aspect-ratio: 4 / 3; }
.product-card__img { background: #fff; }
.product-card__img img { padding: 6px; object-fit: contain; }
.product-card__img img[src$=".svg"] { padding: 0; }
.featured__item img, .recent__list img { padding: 4px; object-fit: contain; background: #fff; }
.featured__item img[src$=".svg"], .recent__list img[src$=".svg"] { padding: 0; background: #eef4fa; }
.product-grid.is-list .product-card__img { aspect-ratio: 4 / 3; }
.product-grid.is-list .product-card__img img { min-height: 0; }
@media (max-width: 560px) {
	.product-card__img { aspect-ratio: 4 / 3; }
	.product-grid.is-list .product-card__img { width: 120px; aspect-ratio: 1; }
}
.term-card__img { background: #fff; }
.term-card__img img { padding: 6px; object-fit: contain; }
.term-card__img img[src$=".svg"] { padding: 0; background: #eef4fa; }

/* 15. Просмотр всех фото товара ------------------------------------------- */
body.has-lightbox { overflow: hidden; }
.lightbox { flex-direction: column; gap: 10px; padding: 16px 16px 12px; cursor: default; }
.lightbox__stage { position: relative; display: flex; flex: 1; align-items: center; justify-content: center; width: 100%; min-height: 0; cursor: zoom-out; }
.lightbox__img { max-width: 100%; max-height: 100%; background: #fff; border-radius: 4px; object-fit: contain; transition: opacity .15s; cursor: default; }
.lightbox.is-loading .lightbox__img { opacity: .3; }
.lightbox__nav { position: absolute; top: 50%; z-index: 2; width: 52px; height: 52px; margin-top: -40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--c-primary); font-size: 34px; line-height: 1; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.lightbox__nav:hover { background: #fff; color: var(--c-accent-dark); }
.lightbox__nav--prev { left: 14px; }
.lightbox__nav--next { right: 14px; }
.lightbox__count { flex: none; color: #fff; font: 600 13px/1 var(--mono); letter-spacing: .08em; }
.lightbox__thumbs { display: flex; flex: none; gap: 8px; max-width: 100%; margin: 0; padding: 0 0 2px; overflow-x: auto; list-style: none; scrollbar-width: none; }
.lightbox__thumbs::-webkit-scrollbar { display: none; }
.lightbox__thumbs li { flex: none; }
.lightbox__thumb { display: block; width: 72px; height: 54px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 4px; background: #fff; opacity: .65; cursor: pointer; }
.lightbox__thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.lightbox__thumb.is-active, .lightbox__thumb:hover { border-color: var(--c-accent); opacity: 1; }
@media (max-width: 640px) {
	.lightbox__nav { width: 44px; height: 44px; font-size: 28px; }
	.lightbox__nav--prev { left: 6px; }
	.lightbox__nav--next { right: 6px; }
	.lightbox__thumb { width: 60px; height: 46px; }
}

/* 16. ГОСТы товара и описание раздела ------------------------------------- */
.product__gost { margin: 0 0 12px; font-size: 14px; color: var(--c-muted); }
.product__gost-label { font-weight: 600; color: var(--c-primary-dark); }
.gost-table th[scope="row"] { width: 32%; min-width: 150px; white-space: nowrap; }
.gost-table th[scope="row"] a { color: var(--c-primary); font-weight: 600; text-decoration: none; border-bottom: 1px dashed currentColor; }
.gost-table th[scope="row"] a:hover { color: var(--c-accent-dark); }
.term-desc { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--c-border); }
.term-desc::after { content: ""; display: table; clear: both; }
.term-desc img.alignleft, .term-desc img.alignright { max-width: 45%; }
.term-desc .aligncenter { display: block; margin: 0 auto 14px; }
@media (max-width: 640px) { .term-desc img.alignleft, .term-desc img.alignright { float: none; display: block; max-width: 100%; margin: 0 auto 14px; } }

/* 17. Защита формы: CAPTCHA -------------------------------------------------- */
.inq-form__captcha { margin: 0 0 14px; min-height: 0; }
.inq-form__captcha label { display: block; font-weight: 600; font-size: 14px; }
.inq-form__captcha input[type="text"] { display: block; width: 100%; max-width: 160px; margin-top: 6px; }
.inq-form__captcha iframe { max-width: 100%; }

/* 18. Встроенные видео без обёртки (вставлены редактором): не шире экрана -------- */
.entry iframe, .entry video, .entry embed, .entry object { max-width: 100%; border: 0; }
.entry iframe[data-fit] { display: block; height: auto; margin-left: auto; margin-right: auto; }

/* 19. Cookie-баннер ---------------------------------------------------------- */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 900; max-width: 980px; margin: 0 auto; display: flex; align-items: center; gap: 20px; padding: 16px 20px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 14px; box-shadow: 0 10px 40px rgba(10, 58, 104, .22); opacity: 0; transform: translateY(20px); transition: opacity .25s, transform .25s; }
.cookie[hidden] { display: none; }
.cookie.is-visible { opacity: 1; transform: none; }
.cookie__text { flex: 1; min-width: 0; font-size: 14px; line-height: 1.5; color: var(--c-text); }
.cookie__text b { display: block; margin-bottom: 2px; color: var(--c-primary-dark); font-size: 15px; }
.cookie__text p { margin: 0; color: var(--c-muted); }
.cookie__text a { color: var(--c-primary); text-decoration: underline; white-space: nowrap; }
.cookie__actions { display: flex; flex-wrap: wrap; gap: 8px; flex: none; }
.cookie__actions .btn { padding: 9px 16px; font-size: 14px; white-space: nowrap; }
.has-cookie-bar .to-top { bottom: 150px; }
.linklike { padding: 0; border: 0; background: none; font: inherit; color: var(--c-primary); text-decoration: underline; cursor: pointer; }
.site-footer__legal p { margin: 0 0 8px; }
.site-footer__legal-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 10px 0 0; }
.site-footer__legal .linklike, .site-footer__legal-links a { color: #cfe3f5; text-decoration: underline; text-underline-offset: 3px; }
.site-footer__legal .linklike:hover, .site-footer__legal-links a:hover { color: #fff; }
.site-footer__legal .linklike:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
@media (max-width: 640px) {
	.cookie { left: 8px; right: 8px; bottom: 8px; flex-direction: column; align-items: stretch; gap: 12px; padding: 14px; }
	.cookie__actions .btn { flex: 1; }
	.has-cookie-bar .to-top { bottom: 230px; }
}
@media (prefers-reduced-motion: reduce) { .cookie { transition: none; } }
