:root {
  --as-ink: #10283d;
  --as-ink-soft: #40596c;
  --as-blue: #006b91;
  --as-blue-dark: #00516f;
  --as-cyan: #58c3d5;
  --as-red: #d94a3a;
  --as-line: #cedbe1;
  --as-wash: #eef5f6;
  --as-paper: #ffffff;
  --as-warm: #f7f7f2;
  --as-focus: #f2b705;
  --as-content: 1320px;
}

html { scroll-behavior: smooth; }
body.aosong-b2b {
  background: var(--as-paper);
  color: var(--as-ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
}
body.aosong-b2b * { box-sizing: border-box; }
body.aosong-b2b :where(a, button, input, select, textarea) { touch-action: manipulation; }
body.aosong-b2b :where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--as-focus);
  outline-offset: 3px;
}
body.aosong-b2b :where(h1, h2, h3) {
  color: var(--as-ink);
  font-weight: 760;
  letter-spacing: 0;
  text-wrap: balance;
}
body.aosong-b2b a { color: var(--as-blue-dark); }
body.aosong-b2b img { max-width: 100%; }
body.aosong-b2b .content-area { margin-top: 0; }
body.aosong-b2b.home .entry-header { display: none; }
body.aosong-b2b.home .content-container,
body.aosong-b2b.home .site-main,
body.aosong-b2b.home .entry-content-wrap,
body.aosong-b2b.home .entry-content { max-width: none; margin: 0; padding: 0; }

/* Compact indexed search remains visible without displacing the brand. */
body.aosong-b2b > .aosong-live-search {
  position: relative;
  z-index: 40;
  border: 0;
  border-bottom: 1px solid var(--as-line);
  box-shadow: none;
  background: var(--as-ink);
}
body.aosong-b2b > .aosong-live-search .aosong-live-search__inner {
  max-width: var(--as-content);
  min-height: 52px;
  padding: 7px 24px;
  grid-template-columns: minmax(0, 1fr) auto;
}
body.aosong-b2b > .aosong-live-search .aosong-live-search__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
body.aosong-b2b > .aosong-live-search .aosong-live-search__form { gap: 0; }
body.aosong-b2b > .aosong-live-search .aosong-live-search__input {
  min-height: 38px;
  border: 1px solid #587083;
  border-right: 0;
  border-radius: 4px 0 0 4px;
  color: var(--as-ink);
}
body.aosong-b2b > .aosong-live-search .aosong-live-search__button {
  min-height: 38px;
  border-radius: 0 4px 4px 0;
  background: var(--as-red);
}
body.aosong-b2b > .aosong-live-search .aosong-live-search__map { color: #fff; }
body.aosong-b2b > .aosong-live-search .aosong-live-search__results { top: 48px; }

/* Kadence header becomes a quiet technical navigation bar. */
body.aosong-b2b .site-header { border-bottom: 1px solid var(--as-line); background: #fff; }
body.aosong-b2b .site-header-row-container-inner { max-width: var(--as-content); margin: 0 auto; }
body.aosong-b2b .site-branding .site-title,
body.aosong-b2b .site-branding .site-title a {
  color: var(--as-ink);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
}
body.aosong-b2b .site-branding .site-title a::after {
  content: "измерительные системы";
  display: block;
  margin-top: 4px;
  color: var(--as-blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
body.aosong-b2b .primary-menu-container > ul > li > a {
  min-height: 48px;
  color: var(--as-ink-soft);
  font-size: 14px;
  font-weight: 650;
}
body.aosong-b2b .primary-menu-container > ul > li > a:hover { color: var(--as-blue-dark); }

.aosong-b2b-home { overflow: hidden; }
.aosong-b2b-shell { width: min(100% - 48px, var(--as-content)); margin-inline: auto; }
.aosong-b2b-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--as-blue-dark);
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
}
.aosong-b2b-kicker::before { content: ""; width: 28px; height: 3px; background: var(--as-red); }

.aosong-b2b-hero {
  position: relative;
  min-height: 510px;
  isolation: isolate;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #eaf4f5;
  border-bottom: 1px solid var(--as-line);
}
.aosong-b2b-hero__copy { position: relative; z-index: 2; width: min(700px, 62%); padding: 74px 0 80px; }
.aosong-b2b-hero h1 { margin: 14px 0 18px; max-width: 660px; font-size: 64px; line-height: 1.02; }
.aosong-b2b-hero__lead { max-width: 660px; margin: 0; color: var(--as-ink-soft); font-size: 20px; line-height: 1.55; }
.aosong-b2b-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.aosong-b2b-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border: 1px solid var(--as-blue-dark);
  border-radius: 4px;
  background: transparent;
  color: var(--as-blue-dark);
  font-weight: 750;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.aosong-b2b-button:hover { transform: translateY(-1px); background: var(--as-wash); color: var(--as-blue-dark); }
body.aosong-b2b a.aosong-b2b-button--primary { border-color: var(--as-blue-dark); background: var(--as-blue-dark); color: #fff; }
body.aosong-b2b a.aosong-b2b-button--primary:hover { border-color: var(--as-red); background: var(--as-red); color: #fff; }
.aosong-b2b-hero__media { position: absolute; inset: 0 0 0 48%; z-index: 1; pointer-events: none; }
.aosong-b2b-hero__product {
  position: absolute;
  width: 330px;
  height: 330px;
  object-fit: contain;
  filter: drop-shadow(0 24px 24px rgba(16,40,61,.18));
}
.aosong-b2b-hero__product--one { right: 4%; top: 7%; }
.aosong-b2b-hero__product--two { right: 28%; bottom: -5%; width: 280px; height: 280px; }
.aosong-b2b-hero__product--three { right: -5%; bottom: -10%; width: 260px; height: 260px; }
.aosong-b2b-hero__note { margin-top: 22px; color: var(--as-ink-soft); font-size: 14px; }

.aosong-b2b-route { position: relative; z-index: 3; margin-top: -26px; }
.aosong-b2b-route__inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--as-line);
  background: #fff;
  box-shadow: 0 18px 38px rgba(16,40,61,.11);
}
.aosong-b2b-route a { min-width: 0; padding: 18px 20px; color: var(--as-ink); text-decoration: none; }
.aosong-b2b-route a + a { border-left: 1px solid var(--as-line); }
.aosong-b2b-route strong { display: block; margin-bottom: 4px; font-size: 15px; }
.aosong-b2b-route span { color: var(--as-ink-soft); font-size: 13px; }
.aosong-b2b-route a:hover { background: var(--as-wash); }

.aosong-b2b-section { padding: 78px 0; }
.aosong-b2b-section--wash { background: var(--as-wash); }
.aosong-b2b-section--warm { background: var(--as-warm); }
.aosong-b2b-section__head { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 30px; }
.aosong-b2b-section__head h2 { margin: 8px 0 0; font-size: 36px; line-height: 1.15; }
.aosong-b2b-section__head p { max-width: 610px; margin: 0; color: var(--as-ink-soft); }

.aosong-b2b-categories { border-top: 1px solid var(--as-line); }
.aosong-b2b-category-row {
  display: grid;
  grid-template-columns: 70px minmax(220px, .8fr) minmax(300px, 1.45fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 94px;
  padding: 16px 0;
  border-bottom: 1px solid var(--as-line);
  color: inherit;
  text-decoration: none;
}
.aosong-b2b-category-row:hover .aosong-b2b-category-row__name { color: var(--as-blue); }
.aosong-b2b-category-row__index { color: var(--as-red); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.aosong-b2b-category-row__name { font-size: 20px; font-weight: 760; }
.aosong-b2b-category-row__desc { color: var(--as-ink-soft); }
.aosong-b2b-category-row__count { color: var(--as-blue-dark); font-size: 13px; font-weight: 750; white-space: nowrap; }

.aosong-b2b-product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.aosong-b2b-product-card { min-width: 0; border: 1px solid var(--as-line); background: #fff; }
.aosong-b2b-product-card__image {
  display: flex;
  aspect-ratio: 4 / 3;
  align-items: center;
  justify-content: center;
  padding: 22px;
  overflow: hidden;
  background: #fff;
  border-bottom: 1px solid var(--as-line);
}
.aosong-b2b-product-card__image img { width: 100%; height: 100%; object-fit: contain; transition: transform .22s ease; }
.aosong-b2b-product-card:hover .aosong-b2b-product-card__image img { transform: scale(1.035); }
.aosong-b2b-product-card__body { min-height: 112px; padding: 16px 18px; }
.aosong-b2b-product-card__category { display: block; min-height: 20px; color: var(--as-blue); font-size: 12px; font-weight: 700; }
.aosong-b2b-product-card h3 { margin: 5px 0 0; font-size: 19px; line-height: 1.2; overflow-wrap: anywhere; }
.aosong-b2b-product-card h3 a { color: var(--as-ink); text-decoration: none; }
.aosong-b2b-product-card h3 a::after { content: "  →"; color: var(--as-red); }

.aosong-b2b-steps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--as-line); border-bottom: 1px solid var(--as-line); }
.aosong-b2b-step { padding: 24px 24px 28px 0; }
.aosong-b2b-step + .aosong-b2b-step { padding-left: 24px; border-left: 1px solid var(--as-line); }
.aosong-b2b-step__number { color: var(--as-red); font-weight: 800; font-variant-numeric: tabular-nums; }
.aosong-b2b-step h3 { margin: 10px 0 8px; font-size: 19px; }
.aosong-b2b-step p { margin: 0; color: var(--as-ink-soft); font-size: 14px; }

.aosong-b2b-docs { display: grid; grid-template-columns: 1.15fr .85fr; gap: 54px; align-items: start; }
.aosong-b2b-doc-list { border-top: 1px solid var(--as-line); }
.aosong-b2b-doc-list a { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--as-line); color: var(--as-ink); font-weight: 650; text-decoration: none; }
.aosong-b2b-doc-list a span { color: var(--as-red); }
.aosong-b2b-contact-panel { padding: 28px; border-left: 5px solid var(--as-red); background: var(--as-ink); color: #fff; }
.aosong-b2b-contact-panel h2 { margin: 0 0 12px; color: #fff; font-size: 28px; }
.aosong-b2b-contact-panel p { margin: 0 0 20px; color: #d9e5e9; }
.aosong-b2b-contact-panel a { color: #fff; }

/* Category archive */
.aosong-b2b-category { min-height: 70vh; padding: 54px 0 78px; background: var(--as-wash); }
.aosong-b2b-category__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: end; margin-bottom: 30px; padding-bottom: 26px; border-bottom: 1px solid var(--as-line); }
.aosong-b2b-category__head h1 { margin: 8px 0 10px; font-size: 46px; line-height: 1.1; }
.aosong-b2b-category__head p { max-width: 780px; margin: 0; color: var(--as-ink-soft); font-size: 17px; }
.aosong-b2b-category__count { color: var(--as-blue-dark); font-size: 14px; font-weight: 800; white-space: nowrap; }
.aosong-b2b-pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 32px; }
.aosong-b2b-pagination .page-numbers { display: inline-flex; min-width: 42px; min-height: 42px; align-items: center; justify-content: center; border: 1px solid var(--as-line); background: #fff; color: var(--as-ink); text-decoration: none; }
.aosong-b2b-pagination .current { border-color: var(--as-blue-dark); background: var(--as-blue-dark); color: #fff; }

/* Product and article pages */
body.aosong-b2b.single-post .content-container { max-width: 1180px; }
body.aosong-b2b.single-post .entry-content-wrap { padding: 38px clamp(20px, 5vw, 64px) 56px; border: 1px solid var(--as-line); box-shadow: none; }
body.aosong-b2b.single-post .entry-title { max-width: 920px; font-size: clamp(36px, 5vw, 58px); line-height: 1.03; overflow-wrap: anywhere; }
body.aosong-b2b.single-post .post-thumbnail { display: flex; min-height: 360px; align-items: center; justify-content: center; padding: 34px; background: var(--as-wash); }
body.aosong-b2b.single-post .post-thumbnail img { max-height: 440px; width: auto; object-fit: contain; }
body.aosong-b2b.single-post .entry-content { color: var(--as-ink-soft); font-size: 17px; }
body.aosong-b2b.single-post .post-navigation,
body.aosong-b2b.single-post .entry-related { display: none; }
body.aosong-b2b.single-post .entry-content h2 { scroll-margin-top: 28px; margin-top: 42px; padding-top: 20px; border-top: 1px solid var(--as-line); font-size: 27px; }
body.aosong-b2b.single-post .entry-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
body.aosong-b2b.single-post .entry-content th,
body.aosong-b2b.single-post .entry-content td { padding: 12px 14px; border: 1px solid var(--as-line); text-align: left; vertical-align: top; }
body.aosong-b2b.single-post .entry-content th { background: var(--as-wash); color: var(--as-ink); font-weight: 750; }
body.aosong-b2b.single-post .entry-content tr:nth-child(even) td { background: #fafcfb; }

/* Custom footer remains visible despite the legacy blanket footer rule. */
footer.aosong-b2b-footer { display: block !important; padding: 56px 0 28px; background: var(--as-ink); color: #d9e5e9; }
.aosong-b2b-footer__grid { display: grid; grid-template-columns: 1.2fr .9fr .9fr; gap: 54px; }
.aosong-b2b-footer__brand { color: #fff; font-size: 24px; font-weight: 800; }
.aosong-b2b-footer p { max-width: 440px; color: #b8cbd3; }
.aosong-b2b-footer h2 { margin: 0 0 14px; color: #fff; font-size: 15px; text-transform: uppercase; }
.aosong-b2b-footer nav { display: grid; gap: 9px; }
.aosong-b2b-footer a { color: #e8f4f6; text-underline-offset: 3px; }
.aosong-b2b-footer__bottom { margin-top: 42px; padding-top: 20px; border-top: 1px solid #375164; color: #95adb8; font-size: 13px; }

@media (max-width: 1100px) {
  .aosong-b2b-hero h1 { font-size: 52px; }
  .aosong-b2b-hero__media { left: 55%; opacity: .78; }
  .aosong-b2b-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .aosong-b2b-category-row { grid-template-columns: 54px minmax(200px, .8fr) minmax(240px, 1.2fr) auto; }
}

@media (max-width: 820px) {
  .aosong-b2b-shell { width: min(100% - 32px, var(--as-content)); }
  body.aosong-b2b > .aosong-live-search .aosong-live-search__inner { padding: 7px 16px; grid-template-columns: 1fr; }
  body.aosong-b2b > .aosong-live-search .aosong-live-search__map { display: none; }
  .aosong-b2b-hero { min-height: 520px; align-items: flex-start; }
  .aosong-b2b-hero__copy { width: 76%; padding: 58px 0 170px; }
  .aosong-b2b-hero h1 { font-size: 46px; }
  .aosong-b2b-hero__lead { font-size: 17px; }
  .aosong-b2b-hero__media { inset: auto 0 -44px 34%; height: 260px; opacity: .6; }
  .aosong-b2b-hero__product { width: 220px; height: 220px; }
  .aosong-b2b-hero__product--one { right: 0; top: 0; }
  .aosong-b2b-hero__product--two { right: 32%; bottom: -20px; width: 190px; height: 190px; }
  .aosong-b2b-hero__product--three { display: none; }
  .aosong-b2b-route__inner { grid-template-columns: repeat(2, 1fr); }
  .aosong-b2b-route a:nth-child(3) { border-left: 0; border-top: 1px solid var(--as-line); }
  .aosong-b2b-route a:nth-child(4) { border-top: 1px solid var(--as-line); }
  .aosong-b2b-section { padding: 58px 0; }
  .aosong-b2b-section__head { display: block; }
  .aosong-b2b-section__head p { margin-top: 14px; }
  .aosong-b2b-category-row { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 14px; }
  .aosong-b2b-category-row__desc { display: none; }
  .aosong-b2b-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aosong-b2b-steps { grid-template-columns: repeat(2, 1fr); }
  .aosong-b2b-step:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid var(--as-line); }
  .aosong-b2b-step:nth-child(4) { border-top: 1px solid var(--as-line); }
  .aosong-b2b-docs { grid-template-columns: 1fr; }
  .aosong-b2b-footer__grid { grid-template-columns: 1fr 1fr; }
  .aosong-b2b-footer__intro { grid-column: 1 / -1; }
  .aosong-b2b-category__head { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .aosong-b2b-shell { width: min(100% - 24px, var(--as-content)); }
  .aosong-b2b-hero { min-height: 560px; }
  .aosong-b2b-hero__copy { width: 100%; padding: 42px 0 190px; }
  .aosong-b2b-hero h1 { font-size: 42px; }
  .aosong-b2b-hero__actions { display: grid; }
  .aosong-b2b-hero__note { max-width: 290px; }
  .aosong-b2b-hero__media { left: 14%; opacity: .48; }
  .aosong-b2b-route { margin-top: 0; }
  .aosong-b2b-route__inner { grid-template-columns: 1fr 1fr; box-shadow: none; }
  .aosong-b2b-route a { padding: 15px 14px; }
  .aosong-b2b-route span { display: none; }
  .aosong-b2b-section__head h2 { font-size: 31px; }
  .aosong-b2b-category-row { grid-template-columns: 34px minmax(0, 1fr); min-height: 80px; }
  .aosong-b2b-category-row__count { grid-column: 2; }
  .aosong-b2b-product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .aosong-b2b-product-card__image { padding: 12px; }
  .aosong-b2b-product-card__body { min-height: 92px; padding: 12px; }
  .aosong-b2b-product-card h3 { font-size: 16px; }
  .aosong-b2b-product-card__category { display: none; }
  .aosong-b2b-steps { grid-template-columns: 1fr; }
  .aosong-b2b-step,
  .aosong-b2b-step + .aosong-b2b-step { padding: 20px 0; border-left: 0; border-top: 1px solid var(--as-line); }
  .aosong-b2b-step:first-child { border-top: 0; }
  .aosong-b2b-footer__grid { grid-template-columns: 1fr; }
  .aosong-b2b-category__head h1 { font-size: 36px; }
  body.aosong-b2b.single-post .entry-content-wrap { padding: 26px 16px 40px; }
  body.aosong-b2b.single-post .post-thumbnail { min-height: 260px; padding: 22px; }
  body.aosong-b2b.single-post .entry-content { font-size: 16px; }
  body.aosong-b2b.single-post .entry-content table { display: block; overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .aosong-b2b-button,
  .aosong-b2b-product-card__image img { transition: none; }
}
