/* taste-skill / Redesign - Preserve: единый ритм существующего B2B-каталога.
   DESIGN_VARIANCE: 4; MOTION_INTENSITY: 2; VISUAL_DENSITY: 5.
   Шаг 8px. Отступ до подвала принадлежит main, а не последней карточке.
   Цвета, содержание, адреса, поля форм и навигация остаются в исходных слоях. */
body {
    --taste-space-section: 64px;
    --taste-space-content: 32px;
    --taste-space-card: 32px;
    --taste-space-gap: 24px;
    --taste-space-gutter: 40px;
}
html {padding-top: 0;}
body {padding-top: 72px;}
body .m-wrap {width: 100%;max-width: 1280px;padding-left: var(--taste-space-gutter);padding-right: var(--taste-space-gutter);}
body #main .m-wrap .m-wrap {padding-left: 0;padding-right: 0;}
body #header {height: 72px;padding: 15px 0;}
body #header .logo {display: inline-flex;align-items: center;margin: 0;padding: 0;}
body #header .logo img {display: block;}
body #menu-main-menu {margin: 0;padding: 0;min-height: 42px;align-items: center;}
body #bread {margin: 0;}
body #bread .breadcrumb {margin: 0;padding: 16px 0;line-height: 1.5;}
body #main {display: flow-root;padding-top: var(--taste-space-content);padding-bottom: var(--taste-space-section);}
body.taste-front #main {padding-top: 0;}
body #main > .m-wrap > h1,.taste-inner #main h1 {margin-top: 0;margin-bottom: var(--taste-space-content);}

/* Один внешний интервал вместо суммы section padding + margin. */
body #main :is(.geo-faq,.geo-requisites,.related-models,.m2-lead-form) {
    margin-top: 0;margin-bottom: var(--taste-space-section);padding-top: 0;padding-bottom: 0;
}
.taste-inner #main .m2-lead-form,.taste-front #main .m2-lead-form {
    margin-top: 0;margin-bottom: var(--taste-space-section);padding-top: 0;padding-bottom: 0;
}
.taste-inner #main :is(#manufactur,.category-page-single,.journal-single,#items,#articles,#tabl-pr,.catalog-table,.catalog-premium__guide) {
    margin-bottom: var(--taste-space-section);padding-top: 0;padding-bottom: 0;
}
.taste-inner #main .proizv {margin-bottom: var(--taste-space-section);}
.taste-inner #main .catalog-premium {padding-bottom: 0;}
.taste-inner #main .catalog-premium .catalog-premium__hero {padding-bottom: var(--taste-space-content);}
.taste-inner #main .about-cta {margin-top: 0;margin-bottom: var(--taste-space-section);padding-top: 0;padding-bottom: 0;}
.taste-journal #main > #catalog {margin-bottom: var(--taste-space-section);}

/* У каждой конечной секции внешний отступ задаёт её родитель. */
body #main :is(.geo-faq,.geo-requisites,.related-models,.m2-lead-form,#manufactur,.category-page-single,.journal-single,#items,#articles,#tabl-pr,.catalog-table,.catalog-premium__guide,.proizv):last-child,
body #main > :last-child {margin-bottom: 0;}

/* Вводный ответ и подбор аналога: полноценные поля вокруг текста. */
.taste-inner #main .geo-answer-intro {width: 100%;max-width: none;margin: 0 0 var(--taste-space-content);padding: var(--taste-space-card);}
body #main .geo-analog {width: 100%;max-width: none;margin: 0 0 var(--taste-space-section);padding: var(--taste-space-card);text-align: left;}
body #main .geo-analog p {width: auto;max-width: 78ch;margin: 0;padding: 0;font-size: 16px;line-height: 1.8;text-align: left;}
.taste-inner #main .geo-answer-intro p {margin: 0;}
body #main :is(.geo-analog,.geo-answer-intro) a {overflow-wrap: anywhere;}

/* Карточка насоса: расстояние между колонками задаёт сетка. */
.taste-inner #main .cart-item {display: grid;grid-template-columns: minmax(0,1fr) minmax(0,1fr);gap: var(--taste-space-content);padding: var(--taste-space-card);margin-bottom: var(--taste-space-content);}
.taste-inner #main .cart-item::before,.taste-inner #main .cart-item::after {content: none;}
.taste-inner #main .cart-item > [class*=bl-deck] {width: 100%;min-width: 0;float: none;}
.taste-inner #main .cart-item .img-bg {min-height: 280px;}
.taste-inner #main .cart-item-cat-char {padding: 0;}
.taste-inner #main .empty-chars-table {width: 100%;padding: var(--taste-space-gap) 0;text-align: left;}
.taste-inner #main .empty-chars-table h2 {margin: 0 0 var(--taste-space-gap);}
.taste-inner #main .empty-chars-table .button {margin-top: 0;margin-bottom: 16px;box-shadow: none;}
.taste-inner #main .empty-chars-table .row {margin-left: 0;margin-right: 0;}
.taste-inner #main .anathe {margin: var(--taste-space-content) 0 var(--taste-space-section);}
.taste-inner #main .related-models-card {padding: var(--taste-space-gap);}
.taste-inner #main :is(.related-models__title,.m2-lead-form__title) {margin-top: 0;margin-bottom: var(--taste-space-gap);}
.taste-inner #main :is(.about_cat,.content-product,.m2-lead-form__form,.geo-contacts-card) {padding: var(--taste-space-card);}
.taste-inner #main .content-product {margin-bottom: var(--taste-space-section);}
body #main .content-product-block:last-child > :last-child {margin-bottom: 0;}
.taste-inner #main :is(.about_cat,.content-product) > :last-child {margin-bottom: 0;}
.taste-inner #main .series-compare {width: calc(100% - 2 * var(--taste-space-gutter));max-width: 1200px;margin-bottom: var(--taste-space-section);padding: var(--taste-space-card);}

/* Главная: тот же ритм при закрытой и раскрытой истории. */
.taste-front #main .taste-hero {padding-top: 48px;padding-bottom: 48px;}
.taste-front #main .taste-history {margin-bottom: var(--taste-space-section);}
.taste-front #main #items,.taste-front #main .front #articles {margin-bottom: var(--taste-space-section);padding-top: 0;padding-bottom: 0;}
.taste-front #main .taste-history #manufactur {margin-bottom: 0;}
.taste-front #main .taste-history .aboutfront {padding-bottom: var(--taste-space-gap);}
.taste-front #main .m2-lead-form__form {padding: var(--taste-space-card);}

/* Контакты, правовые тексты и карта замен используют те же внешние поля. */
body #main :is(.contacts-page,.zamena-page) {padding-top: 0;padding-bottom: 0;}
body #main .contacts-page .m2-lead-form__form {padding: var(--taste-space-card);}
body #main .about_cookies #manufactur {margin-bottom: 0;}
body #main .about_cookies .about .content {padding: var(--taste-space-card);}
body #main .about_cookies .about .content > :last-child {margin-bottom: 0;}
body #main .zamena-section {margin-bottom: var(--taste-space-section);}
body #main .zamena-guide {margin-bottom: var(--taste-space-gap);}
body #main .zamena-nav {margin-bottom: var(--taste-space-section);}
body #main .zamena-faq {margin-top: 0;padding: var(--taste-space-card);}

/* Подвал: собственные внутренние поля, отдельные от отступа main. */
body #footer {padding-top: 40px;}
body #footer .logo {padding-top: 0;margin-bottom: var(--taste-space-gap);}
body #footer .br-w {padding-top: var(--taste-space-content);padding-bottom: var(--taste-space-content);}
body #footer .br-w:first-child {padding-top: 0;}
body #footer .page-menu {margin: 0;padding: 0;gap: 8px 32px;}
body #footer .page-menu li {margin: 0;padding: 0;}
body #footer .page-menu a {display: inline-flex;align-items: center;min-height: 44px;}
body #footer .footer-zamena {margin-top: 16px;padding: 0;}
body #footer .br-w h2 {margin: 0 0 var(--taste-space-gap);}
body #footer .product-menu {margin: 0;padding: 0;gap: 12px 24px;}
body #footer .product-menu li {margin: 0;}
body #footer .footer-footer {padding-top: var(--taste-space-gap);padding-bottom: var(--taste-space-gap);gap: 16px;}

@media (max-width: 1100px) {
    body {--taste-space-gutter: 28px;--taste-space-card: 24px;}
    body #header .bl-deck-6 {width: auto;}
    body #header .menu-block {margin-left: auto;}
}
@media (max-width: 804px) {
    body {--taste-space-section: 40px;--taste-space-content: 24px;--taste-space-card: 20px;--taste-space-gutter: 20px;}
    body #header .logo img {width: 154px;height: auto;}
    body #header .mob-nav {padding-bottom: 0;}
    .taste-inner #main .cart-item {grid-template-columns: minmax(0,1fr);}
    .taste-inner #main .cart-item .img-bg {min-height: 230px;}
    .taste-front #main .taste-hero {padding-top: 32px;padding-bottom: 32px;}
    body #footer {padding-top: 32px;}
    body #footer .footer-footer {flex-wrap: wrap;}
    body #footer .footer-footer > div {width: 100%;}
}

/* Готовность JS сохраняет прежнее меню как запасной вариант загрузки. */
@media (max-width: 804px) {
    body.taste-menu-ready #header #mob-menu {position: absolute;top: 100%;left: 0;right: auto;display: none;width: 100%;max-height: calc(100dvh - 72px);overflow-y: auto;margin: 0;padding: 16px var(--taste-space-gutter) 24px;border-top: 1px solid var(--taste-line,#515965);background: var(--taste-header,#282828);}
    body.taste-menu-ready #header #mob-menu.active {display: block !important;visibility: visible;}
    body.taste-menu-ready #header #mob-menu > .mobile-menu {position: static;display: flex;flex-direction: column;align-items: stretch;gap: 8px;width: 100%;min-height: 0;margin: 0;padding: 0;background: transparent;}
    body.taste-menu-ready #header #mob-menu .menu li {width: 100%;margin: 0;padding: 0;}
    body.taste-menu-ready #header #mob-menu .menu a {display: flex;align-items: center;min-height: 48px;padding: 12px 16px;border-radius: 10px;font-size: 16px;line-height: 1.5;text-align: left;}
    body.taste-menu-ready #header #mob-menu .menu a:is(:hover,:focus-visible) {background: rgba(255,255,255,.08);}
}
body .m2-lead-form__result {scroll-margin-top: 96px;}
body .m2-lead-form__result:focus-visible {outline: 3px solid var(--taste-accent,#a92538);outline-offset: 4px;}

/* Переход к содержимому учитывает фиксированную шапку, без сдвига обычной страницы. */
body #main {scroll-margin-top: 72px;}
body.taste-inner #main #tabl-pr .name-block .pagination {margin-top: 0;}

/* Первый визит: уведомление читабельно и остаётся в пределах низкого окна. */
body #cookie-consent {max-height: calc(100dvh - 96px);overflow-y: auto;justify-content: space-between;gap: 16px;padding: 16px var(--taste-space-gutter,20px);border-top: 1px solid var(--taste-line,#d9dce1);background: var(--taste-surface,#fdfdfe);color: var(--taste-text,#25282c);}
body #cookie-consent small {min-width: 0;font-size: 13px;line-height: 1.65;}
body #cookie-consent a {color: var(--taste-text,#25282c);text-underline-offset: 3px;}
body #cookie-consent #accept-cookies {flex: 0 0 auto;min-height: 44px;padding: 10px 20px;border: 1px solid var(--taste-accent,#a92538);border-radius: 10px;background: var(--taste-accent,#a92538);color: var(--taste-on-accent,#fdfdfe);font-weight: 700;line-height: 1.5;}
body #cookie-consent #accept-cookies:is(:hover,:focus-visible) {border-color: var(--taste-accent-hover,#8a1d2d);background: var(--taste-accent-hover,#8a1d2d);color: var(--taste-on-accent,#fdfdfe);}
@media (max-width: 804px) {
    body #footer .product-menu a {display: inline-flex;align-items: center;min-height: 44px;padding-top: 4px;padding-bottom: 4px;}
}
@media (max-width: 560px) {
    body #cookie-consent {display: grid;grid-template-columns: minmax(0,1fr);gap: 12px;}
    body #cookie-consent #accept-cookies {width: 100%;}
}
