/* ==========================================================================
   MAUNFELD B2B — portal stylesheet
   Layout, components, CMS page typography.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  /* No smooth scrolling: the catalog compensates scroll after swapping
     results, and an animated compensation reads as a jump. */
}

body {
  margin: 0;
  background: var(--mf-white);
  color: var(--mf-text);
  font-family: var(--mf-font-text);
  font-size: var(--mf-fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--mf-navy);
  color: #fff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--mf-navy-700);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--mf-red-800);
}

h1,
h2,
h3,
h4 {
  font-family: var(--mf-font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  color: var(--mf-ink);
}

h1 {
  font-size: var(--mf-fs-h1);
  font-weight: 800;
}

h2 {
  font-size: var(--mf-fs-h2);
  font-weight: 700;
}

h3 {
  font-size: var(--mf-fs-h3);
  font-weight: 600;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

:focus-visible {
  outline: 2px solid var(--mf-navy-700);
  outline-offset: 2px;
  box-shadow: 0 0 0 1px #fff, var(--mf-focus);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Guarantees no horizontal page scroll from overflowing flex rows. */
  overflow-x: clip;
}

.shell__main {
  flex: 1 0 auto;
}

.container {
  width: 100%;
  max-width: var(--mf-container);
  margin: 0 auto;
  padding: 0 var(--mf-gutter);
}

.container--narrow {
  max-width: 880px;
}

.section {
  /* padding-block, не padding: иначе обнуляются боковые отступы .container */
  padding-block: clamp(2.5rem, 1.5rem + 3vw, 5rem);
}

.section--tight {
  padding-block: clamp(1.75rem, 1.2rem + 1.6vw, 3rem);
}

/* Catalog pages have a tall filter panel beside the results, so the section
   above it is kept short — the list must start near the top of the screen. */
.section--catalog {
  padding-block: 1.15rem 2.75rem;
}

.section--lav {
  background: var(--mf-lav-050);
  border-top: 1px solid var(--mf-lav-200);
  border-bottom: 1px solid var(--mf-lav-200);
}

.section--ink {
  background: var(--mf-ink);
  color: rgba(255, 255, 255, 0.82);
}

.section--ink h2,
.section--ink h3 {
  color: #fff;
}

.section__head {
  max-width: 760px;
  margin-bottom: 2rem;
}

.section__eyebrow {
  display: inline-block;
  font-size: var(--mf-fs-micro);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mf-navy-700);
  margin-bottom: 0.75rem;
}

.section--ink .section__eyebrow {
  color: var(--mf-lav-400);
}

.section__lead {
  font-size: var(--mf-fs-lead);
  color: var(--mf-muted);
  max-width: 68ch;
}

.section--ink .section__lead {
  color: rgba(255, 255, 255, 0.72);
}

.grid {
  display: grid;
  gap: 1.25rem;
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.row--between {
  justify-content: space-between;
}

/* ── Top bar ──────────────────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--mf-ink);
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--mf-fs-small);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 40px;
}

.topbar a {
  color: #fff;
}

.topbar a:hover {
  color: var(--mf-lav-300);
}

.topbar__meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.topbar__tools {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.topbar__price-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.topbar__price-form,
.topbar__peek-form {
  display: inline-flex;
  margin: 0;
}

.topbar__price-btn {
  min-width: 26px;
  height: 24px;
  padding: 0 6px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.topbar__price-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.topbar__price-btn.is-active {
  background: #fff;
  color: var(--mf-ink);
}

.topbar__price-btn.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.topbar__price-btn:focus-visible,
.topbar__peek input:focus-visible + span {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.topbar__peek {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 800;
  font-style: italic;
  cursor: pointer;
}

.topbar__peek input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar__peek input:checked + span {
  color: inherit;
}

.topbar__peek:has(input:checked) {
  background: #fff;
  color: var(--mf-ink);
  border-color: #fff;
}

.topbar__peek:has(input:checked) > span[aria-hidden="true"] {
  color: var(--mf-ink);
}

.topbar__peek .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Header ───────────────────────────────────────────────────────────────── */

.header {
  position: sticky;
  top: 40px;
  z-index: 50;
  background: var(--mf-white);
  border-bottom: 1px solid var(--mf-line);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 76px;
  min-width: 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.logo__mark {
  height: 26px;
  width: auto;
}

.logo__suffix {
  font-family: var(--mf-font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mf-navy);
  border-left: 2px solid var(--mf-red);
  padding-left: 0.6rem;
  line-height: 1.2;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: auto;
  min-width: 0;
}

.nav__link {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--mf-text);
  padding: 0.4rem 0;
  white-space: nowrap;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--mf-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav__link:hover {
  color: var(--mf-navy);
}

.nav__link:hover::after,
.nav__link--active::after {
  transform: scaleX(1);
}

.nav__link--active {
  color: var(--mf-navy);
  font-weight: 600;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.header__phone {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  text-align: right;
}

.header__phone b {
  font-family: var(--mf-font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--mf-ink);
}

.header__phone span {
  font-size: var(--mf-fs-micro);
  color: var(--mf-muted);
}

.header__toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0 0.7rem;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius);
  background: var(--mf-white);
  color: var(--mf-navy);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.header__toggle-lines,
.header__toggle-lines::before,
.header__toggle-lines::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.header__toggle-lines {
  position: relative;
}

.header__toggle-lines::before,
.header__toggle-lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.header__toggle-lines::before {
  top: -5px;
}

.header__toggle-lines::after {
  top: 5px;
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 60;
  max-height: calc(100dvh - 76px);
  overflow: auto;
  padding: 1rem;
  background: var(--mf-white);
  border-bottom: 1px solid var(--mf-line);
  box-shadow: 0 18px 35px rgba(20, 33, 61, 0.14);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu__inner {
  display: grid;
  gap: 1rem;
}

.mobile-menu__links {
  display: grid;
  gap: 0.2rem;
}

.mobile-menu__links a {
  padding: 0.65rem 0.25rem;
  border-bottom: 1px solid var(--mf-line-soft);
  font-weight: 600;
  color: var(--mf-text);
}

.mobile-menu__account {
  display: grid;
  gap: 0.5rem;
  padding-top: 0.25rem;
}

.mobile-menu__company {
  font-size: 0.8125rem;
  color: var(--mf-muted);
}

.filters__mobile-head {
  display: none;
}

.filters__close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--mf-line);
  border-radius: 50%;
  background: var(--mf-white);
  color: var(--mf-navy);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.filters-overlay {
  display: none;
}

.filter-options {
  display: grid;
  gap: 0.15rem;
  max-height: 240px;
  overflow: auto;
  padding-right: 0.25rem;
}

.filter-options .checkbox--compact {
  margin: 0;
}

.filter-options .filter-count {
  margin-left: auto;
  font-size: 0.6875rem;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--mf-radius);
  font-family: var(--mf-font-text);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: normal;
  text-align: center;
}

.btn--primary {
  background: var(--mf-navy);
  color: #fff;
}

.btn--primary:hover {
  background: var(--mf-navy-700);
  color: #fff;
}

.btn--accent {
  background: var(--mf-red-700);
  color: #fff;
  text-transform: none;
  letter-spacing: 0.01em;
}

.btn--accent:hover {
  background: var(--mf-red-800);
  color: #fff;
}

.btn--constructor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  border-color: rgba(255, 255, 255, 0.42);
  background: linear-gradient(135deg, #ff6438 0%, #ed342f 48%, #c9152d 100%);
  color: #fff;
  text-transform: none;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 30px rgba(210, 34, 44, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  text-shadow: 0 1px 2px rgba(110, 8, 19, 0.18);
}

.btn--constructor span {
  font-size: 1.25rem;
  line-height: 0.8;
  transition: transform 0.15s ease;
}

.btn--constructor:hover {
  background: linear-gradient(135deg, #ff7048 0%, #f13c32 48%, #d21c34 100%);
  color: #fff;
  box-shadow: 0 15px 36px rgba(210, 34, 44, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.btn--constructor:hover span {
  transform: translateX(4px);
}

.btn--light {
  background: var(--mf-lav-100);
  color: var(--mf-navy);
}

.btn--light:hover {
  background: var(--mf-lav-200);
  color: var(--mf-navy);
}

.btn--outline {
  background: transparent;
  border-color: var(--mf-navy-500);
  color: var(--mf-navy);
}

.btn--outline:hover {
  background: var(--mf-lav-100);
  border-color: var(--mf-navy);
  color: var(--mf-navy);
}

.btn--ghost-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.btn--ghost-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
}

.btn--xs {
  min-height: 34px;
  padding: 0 0.85rem;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
}

.btn--sm {
  min-height: 38px;
  padding: 0 1rem;
  font-size: 0.8125rem;
}

.btn--block {
  width: 100%;
}

.btn[disabled],
.btn--disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */


.page-head--account { padding-top: 1.1rem; padding-bottom: 0.55rem; }
.page-head--account h1 { font-size: clamp(1.55rem, 2.6vw, 2.15rem); }
.account-start {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0 auto 0.65rem;
}
.account-start__item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 66px;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius);
  background: #fff;
  color: var(--mf-text);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(6, 5, 36, 0.04);
}
.account-start__item:hover { border-color: var(--mf-navy); box-shadow: 0 5px 16px rgba(6, 5, 36, 0.08); }
.account-start__icon { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; background: var(--mf-lav-100); color: var(--mf-navy); font-size: 1.1rem; }
.account-start__item b { display: block; color: var(--mf-ink); font-size: 0.9rem; }
.account-start__item small { display: block; margin-top: 2px; color: var(--mf-muted); font-size: 0.72rem; }
.account-start__arrow { margin-left: auto; color: var(--mf-muted); }
.price-mode__help { margin-top: 0.3rem; color: var(--mf-muted); font-size: 0.75rem; }
.price-mode__help summary { cursor: pointer; color: var(--mf-navy); font-weight: 600; }
.price-mode__help .price-mode__hint { margin-top: 0.3rem; }
.account-manager .row--between { align-items: center; }
@media (max-width: 900px) {
  .account-start { grid-template-columns: 1fr; }
}

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--mf-ink) 0%, var(--mf-navy-900) 55%, var(--mf-navy) 100%);
  color: #fff;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(174, 187, 234, 0.16) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(120deg, transparent 35%, #000 100%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(3rem, 2rem + 5vw, 6.5rem);
}

.hero__title {
  color: #fff;
  margin-bottom: 1rem;
  max-width: 880px;
  text-wrap: balance;
}

.hero__title em {
  font-style: normal;
  color: var(--mf-red-600);
}

.hero__lead {
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  color: rgba(255, 255, 255, 0.78);
  max-width: 620px;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 1.75rem;
}

.hero__stat b {
  display: block;
  font-family: var(--mf-font-display);
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.hero__stat span {
  font-size: var(--mf-fs-small);
  color: rgba(255, 255, 255, 0.62);
}

/* ── Cards ────────────────────────────────────────────────────────────────── */

.card {
  background: var(--mf-white);
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius-md);
  padding: 1.5rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.card--hover:hover {
  border-color: var(--mf-lav-400);
  box-shadow: var(--mf-shadow-md);
}

.card__title {
  font-family: var(--mf-font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--mf-ink);
}

.card__text {
  font-size: var(--mf-fs-small);
  color: var(--mf-muted);
  margin: 0;
}

.card__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--mf-lav-100);
  color: var(--mf-navy);
  font-family: var(--mf-font-display);
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* ── Steps ────────────────────────────────────────────────────────────────── */

.step {
  position: relative;
  padding-top: 1.5rem;
  border-top: 2px solid var(--mf-lav-200);
}

.step__num {
  font-family: var(--mf-font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--mf-red-800);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.5rem;
}

.step__title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
}

.step__text {
  font-size: var(--mf-fs-small);
  color: var(--mf-muted);
  margin: 0;
}

/* ── Partner tiers ────────────────────────────────────────────────────────── */

.tier {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius-md);
  padding: 1.75rem 1.5rem;
  background: var(--mf-white);
}

.tier--featured {
  border-color: var(--mf-navy);
  box-shadow: var(--mf-shadow-md);
}

.tier__name {
  font-family: var(--mf-font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.tier__discount {
  font-family: var(--mf-font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--mf-navy);
  line-height: 1;
  margin: 1rem 0 0.25rem;
}

.tier__discount small {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--mf-muted);
  letter-spacing: 0;
}

.tier__list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 1.5rem;
  display: grid;
  gap: 0.6rem;
  font-size: var(--mf-fs-small);
  color: var(--mf-text);
}

.tier__list li {
  position: relative;
  padding-left: 1.5rem;
}

.tier__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--mf-red);
}

.tier__cta {
  margin-top: auto;
}

/* ── Tags and statuses ────────────────────────────────────────────────────── */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: 3px;
  font-size: var(--mf-fs-micro);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
}

.tag--new {
  background: var(--mf-navy);
  color: #fff;
  text-transform: none;
  letter-spacing: 0.02em;
}

.tag--hit {
  background: var(--mf-ink);
  color: #fff;
}

.tag--promo {
  background: var(--mf-red-700);
  color: #fff;
}

.tag--sale {
  background: #f2b01e;
  color: var(--mf-ink);
}

.tag--soft {
  background: var(--mf-lav-100);
  color: var(--mf-navy);
}

.tag--success {
  background: var(--mf-success-bg);
  color: #146c3a;
}

.tag--warning {
  background: var(--mf-warning-bg);
  color: var(--mf-warning);
}

.tag--danger {
  background: var(--mf-danger-bg);
  color: var(--mf-danger);
}

.tag--neutral {
  background: var(--mf-line-soft);
  color: var(--mf-muted);
}

/* ── Alerts ───────────────────────────────────────────────────────────────── */

.alert {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--mf-radius-md);
  border: 1px solid var(--mf-line);
  background: var(--mf-lav-050);
  font-size: var(--mf-fs-small);
}

.alert--info {
  border-color: var(--mf-lav-300);
  background: var(--mf-lav-100);
  color: var(--mf-navy-900);
}

.alert--success {
  border-color: #bfe3cd;
  background: var(--mf-success-bg);
  color: #145c33;
}

.alert--warning {
  border-color: #f0d9b0;
  background: var(--mf-warning-bg);
  color: #7a4a00;
}

.alert--danger {
  border-color: #f3c2bd;
  background: var(--mf-danger-bg);
  color: #8e1f13;
}

.alert b {
  font-weight: 700;
}

/* ── Tables ───────────────────────────────────────────────────────────────── */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius-md);
  background: var(--mf-white);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.table th,
.table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--mf-line-soft);
  vertical-align: middle;
}

.table th {
  background: var(--mf-lav-050);
  font-size: var(--mf-fs-micro);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mf-muted);
  border-bottom: 1px solid var(--mf-line);
  white-space: nowrap;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover {
  background: var(--mf-lav-050);
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.table__sku {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  color: var(--mf-muted);
  white-space: nowrap;
}

/* Borderless table for requisites: label column + value column. */
.table--plain tbody tr:hover {
  background: transparent;
}

.table--plain th {
  width: 42%;
  background: transparent;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--mf-muted);
  border-bottom: 1px solid var(--mf-line-soft);
}

.table--plain td {
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--mf-line-soft);
}

/* ── Forms ────────────────────────────────────────────────────────────────── */

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.label {
  font-size: var(--mf-fs-small);
  font-weight: 600;
  color: var(--mf-ink);
}

.label span {
  color: var(--mf-red-800);
}

.hint {
  font-size: var(--mf-fs-micro);
  color: var(--mf-muted);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius);
  background: var(--mf-white);
  font-family: var(--mf-font-text);
  font-size: 0.9375rem;
  color: var(--mf-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.textarea {
  min-height: 110px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: 2px solid var(--mf-navy-700);
  outline-offset: 1px;
  border-color: var(--mf-navy-700);
  box-shadow: var(--mf-focus);
}

.input--error {
  border-color: var(--mf-danger);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1rem;
}

.form-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field--full {
  grid-column: 1 / -1;
}

.checkbox {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: var(--mf-fs-small);
  color: var(--mf-muted);
  margin-bottom: 1rem;
}

.checkbox input {
  margin-top: 0.2rem;
  width: 16px;
  height: 16px;
  accent-color: var(--mf-navy);
}

.errors {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  list-style: none;
  border-radius: var(--mf-radius);
  background: var(--mf-danger-bg);
  color: #8e1f13;
  font-size: var(--mf-fs-small);
}

/* ── Breadcrumbs ──────────────────────────────────────────────────────────── */

.breadcrumbs {
  padding: 1rem 0;
  font-size: var(--mf-fs-small);
  color: var(--mf-muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--mf-lav-400);
}

/* ── Page header ──────────────────────────────────────────────────────────── */


.price-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  margin: 0 0 1rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.8125rem;
}
.price-switch__label { color: var(--mf-muted); font-weight: 600; }
.price-switch__buttons { display: inline-flex; gap: 0.2rem; padding: 0.15rem; border-radius: 7px; background: var(--mf-lav-100); }
.price-switch__item { border: 0; border-radius: 5px; background: transparent; color: var(--mf-muted); padding: 0.38rem 0.65rem; font: inherit; font-size: 0.8125rem; font-weight: 700; cursor: pointer; }
.price-switch__item:hover { color: var(--mf-navy); }
.price-switch__item.is-active { background: var(--mf-white); color: var(--mf-navy); box-shadow: 0 1px 3px rgba(6, 5, 36, 0.1); }
.price-switch__state { color: var(--mf-muted); font-size: 0.75rem; }
@media (max-width: 560px) {
  .price-switch { align-items: flex-start; }
  .price-switch__state { flex-basis: 100%; }
}

.page-head {
  padding: clamp(1.75rem, 1.2rem + 1.6vw, 3rem) 0 clamp(1rem, 0.8rem + 1vw, 1.75rem);
  border-bottom: 1px solid var(--mf-line);
  margin-bottom: clamp(1.5rem, 1rem + 1.6vw, 2.5rem);
}

.page-head h1 {
  margin-bottom: 0.5rem;
}

.page-head__lead {
  color: var(--mf-muted);
  max-width: 70ch;
  margin: 0;
}

/* Catalog and category pages: a shorter header, because the filter panel and
   the results grid must begin within the first screen. */
.page-head--compact {
  padding: clamp(1.1rem, 0.9rem + 0.8vw, 1.6rem) 0 clamp(0.85rem, 0.7rem + 0.6vw, 1.15rem);
  margin-bottom: clamp(1rem, 0.8rem + 0.8vw, 1.5rem);
}

.page-head--compact h1 {
  font-size: clamp(1.7rem, 1.2rem + 1.5vw, 2.5rem);
}

.page-head--compact .page-head__lead {
  font-size: 0.9375rem;
}

/* ── CMS content typography ───────────────────────────────────────────────── */

.prose {
  max-width: 78ch;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2 {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  margin: 2rem 0 0.75rem;
}

.prose h3 {
  margin: 1.75rem 0 0.6rem;
}

.prose ul li,
.prose ol li {
  margin-bottom: 0.4rem;
}

.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  border-left: 3px solid var(--mf-red);
  background: var(--mf-lav-050);
  color: var(--mf-muted);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  margin: 1.25rem 0;
}

.prose table th,
.prose table td {
  border: 1px solid var(--mf-line);
  padding: 0.6rem 0.8rem;
  text-align: left;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */

.footer {
  background: var(--mf-ink);
  color: rgba(255, 255, 255, 0.62);
  font-size: var(--mf-fs-small);
  margin-top: auto;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2rem;
  padding: clamp(2.5rem, 2rem + 2vw, 4rem) var(--mf-gutter) 2.5rem;
}

.footer__title {
  font-family: var(--mf-font-display);
  font-size: var(--mf-fs-micro);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 1rem;
}

.footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.82);
}

.footer a:hover {
  color: #fff;
}

.footer__brand img {
  height: 24px;
  width: auto;
  margin-bottom: 1rem;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.5rem var(--mf-gutter) 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: var(--mf-fs-micro);
  color: rgba(255, 255, 255, 0.65);
}

/* ── CTA band ─────────────────────────────────────────────────────────────── */

.cta-band {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, auto);
  gap: 2rem;
  align-items: end;
}

.cta-band__text {
  min-width: 0;
}

.cta-band__text h2 {
  margin-bottom: 0.5rem;
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  min-width: 0;
}

/* ── Auth screens ─────────────────────────────────────────────────────────── */

.auth {
  padding: clamp(1.5rem, 1rem + 2vw, 3rem) 0 clamp(2.5rem, 1.5rem + 3vw, 4rem);
  background: var(--mf-lav-050);
  border-bottom: 1px solid var(--mf-lav-200);
}

.auth__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 2rem;
  align-items: start;
}

.auth__aside {
  position: sticky;
  top: 132px;
  overflow: hidden;
  background: linear-gradient(140deg, var(--mf-ink), var(--mf-navy) 95%);
  color: #fff;
  border-radius: var(--mf-radius-lg);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}

.auth__aside-title {
  color: #fff;
  font-family: var(--mf-font-display);
  font-weight: 700;
  line-height: 1.08;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.85rem);
  margin-bottom: 1.25rem;
}

.auth__list,
.auth__steps {
  margin: 0 0 1.5rem;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.65rem;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.78);
}

.auth__list li::marker {
  color: var(--mf-red-800);
}

.auth__steps b {
  color: #fff;
}

.auth__note {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.auth__note a {
  color: #fff;
  text-decoration: underline;
}

.auth__panel {
  background: #fff;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius-lg);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}

.auth__title {
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem);
  margin-bottom: 0.35rem;
}

.form-section-title {
  font-family: var(--mf-font-display);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mf-muted);
  margin: 1.75rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--mf-line);
}

/* ── Partner status page ──────────────────────────────────────────────────── */

.status-card {
  max-width: 780px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius-lg);
  padding: clamp(1.5rem, 1rem + 2vw, 2.75rem);
}

.status-steps {
  display: grid;
  gap: 1.25rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.status-step {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  opacity: 0.55;
}

.status-step--done,
.status-step--current {
  opacity: 1;
}

.status-step__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--mf-lav-300);
  margin-top: 0.45rem;
  flex-shrink: 0;
}

.status-step--done .status-step__dot {
  background: var(--mf-success);
}

.status-step--current .status-step__dot {
  background: var(--mf-red);
  box-shadow: 0 0 0 4px rgba(255, 55, 37, 0.15);
}

/* ── Price view switch ────────────────────────────────────────────────────── */

.price-mode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--mf-lav-300);
  border-radius: var(--mf-radius-md);
  background: var(--mf-lav-050);
}

.price-mode__title {
  font-family: var(--mf-font-display);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.price-mode__hint {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--mf-muted);
  max-width: 62ch;
}

.segmented {
  display: inline-flex;
  border: 2px solid var(--mf-navy);
  border-radius: var(--mf-radius);
  overflow: hidden;
  background: #fff;
  margin: 0;
}

.segmented__item {
  border: 0;
  background: transparent;
  min-height: 42px;
  padding: 0 1.2rem;
  font-family: var(--mf-font-text);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mf-navy);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.segmented__item + .segmented__item {
  border-left: 2px solid var(--mf-navy);
}

.segmented__item:hover {
  background: var(--mf-lav-100);
}

.segmented__item.is-active {
  background: var(--mf-navy);
  color: #fff;
}

/* ── Metrics ──────────────────────────────────────────────────────────────── */

.metric {
  font-family: var(--mf-font-display);
  font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem);
  font-weight: 800;
  color: var(--mf-navy);
  line-height: 1;
  margin: 0.25rem 0 0.75rem;
}

.metric small {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--mf-muted);
}

/* ── Header account block ─────────────────────────────────────────────────── */

.header__account {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  text-align: right;
}

.header__account-company {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--mf-ink);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header__account-level {
  font-size: 0.75rem;
  color: var(--mf-muted);
}

.header__logout {
  margin: 0;
}

/* ── Catalog layout ───────────────────────────────────────────────────────── */

.messages {
  padding-top: 1rem;
}

.catalog-teaser {
  align-items: center;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
  /* The results are swapped in place; the browser must not re-anchor scroll. */
  overflow-anchor: none;
}

/* Filter panel: no scroll of its own. The category list is fully expanded and
   the panel grows with its content, so the catalog has exactly one scrollbar —
   the page one. This holds on category pages too, where the subtype chips make
   the results column taller. */
.filters {
  position: static;
  max-height: none;
  overflow: visible;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius-md);
  padding: 1rem 1.1rem 0;
  background: var(--mf-lav-050);
}

.filters::-webkit-scrollbar {
  width: 6px;
}

.filters::-webkit-scrollbar-thumb {
  background: var(--mf-lav-300);
  border-radius: 3px;
}

.filters::-webkit-scrollbar-track,
.filters::-webkit-scrollbar-corner {
  background: transparent;
}

.filter-group {
  margin-bottom: 1rem;
  position: relative;
}

.search-suggest {
  position: absolute;
  z-index: 80;
  top: calc(100% - 0.35rem);
  left: 0;
  right: 0;
  max-height: 420px;
  overflow: auto;
  padding: 0.35rem;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius);
  background: var(--mf-white);
  box-shadow: var(--mf-shadow-lg, 0 18px 40px rgba(20, 33, 61, 0.18));
}

.search-suggest__item {
  display: block;
  padding: 0.55rem 0.6rem;
  border-radius: 6px;
  color: var(--mf-text);
  text-decoration: none;
}

.search-suggest__item:hover,
.search-suggest__item.is-active {
  background: var(--mf-lav-050);
  color: var(--mf-navy);
}

.search-suggest__name {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
}

.search-suggest__meta {
  display: block;
  margin-top: 2px;
  color: var(--mf-muted);
  font-size: 0.6875rem;
  line-height: 1.3;
}

.search-suggest__all {
  display: block;
  padding: 0.55rem 0.6rem;
  border-top: 1px solid var(--mf-line);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--mf-navy);
  text-decoration: none;
}

.search-suggest__all:hover {
  text-decoration: underline;
}

.filter-title {
  display: block;
  font-size: var(--mf-fs-micro);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mf-muted);
  margin-bottom: 0.45rem;
}

.filter-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.05rem;
}

.filter-list a {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.28rem 0.45rem;
  border-radius: 3px;
  font-size: 0.84375rem;
  line-height: 1.35;
  color: var(--mf-text);
}

.filter-list a:hover {
  background: var(--mf-lav-100);
  color: var(--mf-navy);
}

.filter-list a.is-active {
  background: var(--mf-navy);
  color: #fff;
}

.filter-count {
  font-size: 0.75rem;
  color: var(--mf-muted);
  flex: 0 0 auto;
}

.filter-list a.is-active .filter-count {
  color: rgba(255, 255, 255, 0.7);
}

.filter-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.filter-range .input {
  min-width: 0;
}

.checkbox--compact {
  margin-bottom: 0.25rem;
  color: var(--mf-text);
  font-size: 0.84375rem;
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 -1.1rem;
  padding: 0.75rem 1.1rem 1.1rem;
  background: linear-gradient(to top, var(--mf-lav-050) 62%, rgba(236, 239, 250, 0));
}

.filter-actions .btn {
  flex: 1;
}

.catalog-main {
  min-width: 0;
  transition: opacity 0.15s ease;
}

/* On catalog pages the header lives inside the results column, so the filter
   panel starts right under the site header and the panel's bottom edge stays
   on screen. */
.catalog-main > .page-head {
  padding-top: 0;
}

/* In-place refresh keeps the visitor's scroll position. */
.catalog-main.is-loading {
  opacity: 0.45;
  pointer-events: none;
}


/* Subtype ("Вид") chips above the results. */
.subtypes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.subtypes__label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mf-muted);
  margin-right: 0.25rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 32px;
  padding: 0 0.8rem;
  border: 1px solid var(--mf-line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.8125rem;
  color: var(--mf-text);
  white-space: nowrap;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.chip:hover {
  border-color: var(--mf-lav-400);
  background: var(--mf-lav-050);
  color: var(--mf-navy);
}

.chip.is-active {
  background: var(--mf-navy);
  border-color: var(--mf-navy);
  color: #fff;
}

.chip__count {
  font-size: 0.6875rem;
  color: var(--mf-muted);
}

.chip.is-active .chip__count {
  color: rgba(255, 255, 255, 0.7);
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--mf-line);
}

.catalog-toolbar__right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  min-width: 0;
}

.only-narrow {
  display: none;
}

.catalog-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.select--sm {
  min-height: 38px;
  font-size: 0.875rem;
  width: auto;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 1.25rem;
}

.product-grid--4 {
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
}

/* ── Product card ─────────────────────────────────────────────────────────── */

.pcard {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius-md);
  background: #fff;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pcard:hover {
  border-color: var(--mf-lav-400);
  box-shadow: var(--mf-shadow-md);
}

.pcard__media {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.25rem;
  height: 128px;
  padding: 0.7rem 0.85rem;
  background:
    radial-gradient(circle at 78% 10%, rgba(174, 187, 234, 0.5), transparent 62%),
    linear-gradient(150deg, var(--mf-lav-100), #f8f9fd 72%);
  border-bottom: 1px solid var(--mf-line-soft);
}

.pcard__badges {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 3;
  display: flex;
  gap: 0.25rem;
  pointer-events: none;
}

.pcard__sku {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.6875rem;
  color: var(--mf-navy-500);
  letter-spacing: 0.04em;
  max-width: 68%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pcard__category {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mf-navy-500);
  opacity: 0.55;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pcard__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0.8rem 0.85rem 0.85rem;
}

.pcard__name {
  font-family: var(--mf-font-text);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 0.3rem;
  min-height: 2.7em;
}

.pcard__name a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--mf-ink);
}

.pcard__name a:hover {
  color: var(--mf-navy-700);
}

.pcard__code {
  margin: -2px 0 6px;
  color: var(--mf-muted);
  font-size: 0.75rem;
}
.pcard__code .mono { color: var(--mf-text); font-weight: 600; }
.pcard__meta {
  font-size: 0.75rem;
  color: var(--mf-muted);
  margin: 0 0 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pcard__bottom {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.6rem;
}

.pcard__price {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.pcard__price-value {
  font-family: var(--mf-font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--mf-ink);
  line-height: 1.1;
  white-space: nowrap;
}

.pcard__price-old {
  font-size: 0.6875rem;
  color: var(--mf-red-800);
  text-decoration: line-through;
}

.pcard__price-missing {
  font-family: var(--mf-font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--mf-navy);
  white-space: nowrap;
}

.pcard__price-note {
  font-size: 0.6875rem;
  color: var(--mf-muted);
  white-space: nowrap;
}

.pcard__hint {
  font-size: 0.6875rem;
  color: var(--mf-muted);
  text-align: right;
  max-width: 84px;
  line-height: 1.2;
}

.pcard__form {
  margin: 0;
}

.pcard__order-info {
  font-size: 0.6875rem;
  color: var(--mf-warning);
  margin: 0.5rem 0 0;
}

/* ── Pagination ───────────────────────────────────────────────────────────── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--mf-line);
  font-size: 0.9375rem;
}

.pagination__link {
  font-weight: 600;
  color: var(--mf-navy);
}

.pagination__link.is-disabled {
  color: var(--mf-muted);
  opacity: 0.5;
}

.pagination__info {
  color: var(--mf-muted);
  font-size: 0.875rem;
}

.empty-state {
  border: 1px dashed var(--mf-line);
  border-radius: var(--mf-radius-md);
  padding: 3rem 1.5rem;
  text-align: center;
}

.empty-state__title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

/* ── Product page ─────────────────────────────────────────────────────────── */

.product-page {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 2rem;
}

.product-page > * {
  min-width: 0;
  max-width: 100%;
}

.product-media__frame {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  aspect-ratio: 4 / 3;
  max-height: 320px;
  padding: 1.4rem;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius-lg);
  background:
    radial-gradient(circle at 70% 20%, rgba(174, 187, 234, 0.4), transparent 62%),
    linear-gradient(150deg, var(--mf-lav-100), #f9fafe 70%);
}

.product-media__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mf-navy-500);
}

.product-media__code {
  font-family: var(--mf-font-display);
  font-size: clamp(1.05rem, 0.85rem + 0.7vw, 1.45rem);
  font-weight: 600;
  color: var(--mf-ink);
  line-height: 1.2;
  word-break: break-word;
}

.product-media__foot {
  font-size: 0.75rem;
  color: var(--mf-muted);
}

.product-info {
  min-width: 0;
}

.product-info__title {
  font-size: clamp(1.45rem, 1.05rem + 1.1vw, 2rem);
  margin-bottom: 0.5rem;
  overflow-wrap: anywhere;
}


.product-price {
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius-md);
  padding: 1.25rem 1.5rem;
  background: var(--mf-lav-050);
  margin-bottom: 1.25rem;
}

.product-price__row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.product-price__value {
  font-family: var(--mf-font-display);
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.4rem);
  font-weight: 800;
  color: var(--mf-ink);
  line-height: 1;
}

.product-price__old {
  font-size: 1rem;
  color: var(--mf-red-800);
  text-decoration: line-through;
}

.product-price__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mf-muted);
}

.product-price__missing {
  font-family: var(--mf-font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--mf-navy);
}

.product-price__note {
  margin: 0.6rem 0 0;
  font-size: 0.875rem;
  color: var(--mf-muted);
}

.product-order-info {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--mf-muted);
  margin-bottom: 1.25rem;
}

.product-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.product-cart {
  display: flex;
  gap: 0.75rem;
  margin: 0;
  flex-wrap: wrap;
}

.product-cart__qty {
  width: 110px;
  min-height: 48px;
}

.product-block__title {
  font-family: var(--mf-font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mf-muted);
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--mf-line);
}

.table--compact {
  font-size: 0.875rem;
}

.table--compact th,
.table--compact td {
  padding: 0.5rem 0.75rem;
}

.specs-table th {
  width: 45%;
  background: transparent;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--mf-muted);
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 2rem;
  margin: 0;
}

.specs-grid__item {
  display: grid;
  grid-template-columns: minmax(96px, 46%) minmax(0, 1fr);
  gap: 0.5rem;
  min-width: 0;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--mf-line);
}

.specs-grid__label {
  margin: 0;
  color: var(--mf-muted);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.specs-grid__value {
  margin: 0;
  min-width: 0;
  font-size: 0.875rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.product-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--mf-line);
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  font-size: 0.9375rem;
}

.check-list li {
  position: relative;
  padding-left: 1.5rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--mf-red);
}

@media (max-width: 1080px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }

  /* Products first on narrow screens; the filter panel is a drawer. */
  .catalog-main {
    order: 1;
  }

  .filters {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;
    order: 2;
    width: min(380px, 92vw);
    height: 100dvh;
    max-height: 100dvh;
    overflow: auto;
    padding: 0.75rem 1rem 1rem;
    border: 0;
    border-radius: 0 var(--mf-radius-md) var(--mf-radius-md) 0;
    box-shadow: 18px 0 50px rgba(20, 33, 61, 0.24);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }

  .filters.is-open {
    transform: translateX(0);
  }

  .filters__mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.15rem 0 0.65rem;
    border-bottom: 1px solid var(--mf-line);
    margin-bottom: 0.8rem;
    font-weight: 700;
    color: var(--mf-navy);
  }

  .filters-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(11, 21, 41, 0.45);
  }

  .filters-overlay[hidden] {
    display: none;
  }

  body.filters-open {
    overflow: hidden;
  }

  .filter-list {
    max-height: none;
    overflow: visible;
  }

  .filter-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 0 -1rem;
    padding: 0.75rem 1rem 1rem;
    background: var(--mf-lav-050);
  }

  .only-narrow {
    display: inline-flex;
  }

  .product-page,
  .product-details {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

@media (max-width: 720px) {
  .specs-grid {
    grid-template-columns: 1fr;
  }
}


.quick-formula { margin: 0.35rem 0 0.2rem; color: var(--mf-text); font-size: 0.86rem; line-height: 1.55; }
.quick-formula b { color: var(--mf-navy); }
.quick-formula span { color: var(--mf-muted); font-weight: 600; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; margin-top: 0.65rem; }
.quick-file { margin-top: 0.8rem; padding-top: 0.65rem; border-top: 1px solid var(--mf-line); }
.quick-file summary { cursor: pointer; color: var(--mf-navy); font-weight: 600; font-size: 0.8rem; }
.quick-file .field { margin-top: 0.55rem; }
.quick-result:empty { display: none; }
.quick-result { margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px solid var(--mf-line); }
.quick-result__error { padding: 0.75rem 0.8rem; border-radius: 8px; background: #fff5f3; border: 1px solid #f2c9bf; }
.quick-result__error .card__title { color: #9a2b1c; font-size: 0.9rem; }
.quick-result__ok { padding-top: 0.1rem; }
.quick-help { align-self: start; }
@media (max-width: 860px) {
  .quick-layout { grid-template-columns: 1fr; }
}

.quick-steps {
  margin: 0;
  padding-left: 1.3rem;
  color: var(--mf-muted);
  font-size: 0.9rem;
}

.quick-steps li {
  margin-bottom: 0.45rem;
}

.quick-errors {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--mf-danger, #b42318);
  font-size: 0.9rem;
}

.quick-errors li {
  margin-bottom: 0.35rem;
}

/* ── Utilities ────────────────────────────────────────────────────────────── */

.text-muted {
  color: var(--mf-muted);
}

.text-small {
  font-size: var(--mf-fs-small);
}

.text-micro {
  font-size: var(--mf-fs-micro);
}

.text-right {
  text-align: right;
}

.mono {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.w-100 { width: 100%; }

.divider {
  height: 1px;
  background: var(--mf-line);
  border: 0;
  margin: 1.5rem 0;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 1080px) {
  .header__phone {
    display: none;
  }

  .nav {
    gap: 1rem;
  }

  .footer__top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .header__inner {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem var(--mf-gutter);
  }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    /* The menu may scroll sideways on a narrow screen, but a scrollbar under
       the links looks like a layout bug — hide it, keep the scrolling. */
    scrollbar-width: none;
    margin-left: 0;
    padding-bottom: 0.25rem;
    gap: 1.25rem;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .grid--3,
  .grid--4,
  .form-grid,
  .form-grid--3 {
    grid-template-columns: 1fr 1fr;
  }

  .hero__stats {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }

  .cta-band {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .topbar__meta {
    display: none;
  }
}

@media (max-width: 600px) {
  .grid--2,
  .grid--3,
  .grid--4,
  .form-grid,
  .form-grid--3,
  .footer__top {
    grid-template-columns: 1fr;
  }

  .header__actions {
    display: none;
  }

  .header__toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .mobile-menu {
    display: block;
  }

  .table--responsive {
    min-width: 0;
  }

  .table--responsive thead {
    display: none;
  }

  .table--responsive,
  .table--responsive tbody,
  .table--responsive tr,
  .table--responsive td {
    display: block;
    width: 100%;
  }

  .table--responsive tr {
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--mf-line);
  }

  .table--responsive tr:last-child {
    border-bottom: 0;
  }

  .table--responsive td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.25rem 0;
    border: 0;
    text-align: right;
  }

  .table--responsive td::before {
    content: attr(data-label);
    color: var(--mf-muted);
    font-size: var(--mf-fs-micro);
    text-align: left;
  }

  .table--responsive td.num {
    text-align: right;
  }

  .table--responsive td:first-child {
    font-weight: 700;
  }

  .table--responsive td[data-label="Товар"] {
    display: block;
    text-align: left;
  }
  .table--responsive td[data-label="Товар"]::before {
    display: none;
  }

  .users-table { min-width: 0; width: 100%; }
  .users-table td:last-child { min-width: 0; }
  .users-table td:last-child .row { flex-wrap: wrap; }
}

/* ── Accessibility: bypass block (WCAG 2.4.1) ─────────────────────────────── */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 10px 18px;
  background: var(--mf-navy);
  color: #fff;
  border-radius: 0 0 var(--mf-radius) 0;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
  outline: 3px solid var(--mf-red-700);
  outline-offset: 2px;
}

#main {
  scroll-margin-top: 132px;
}

#main:focus {
  outline: none;
}

#main:focus-visible {
  outline: 3px solid var(--mf-red-700);
  outline-offset: -3px;
}

/* ── Partner account: news rail ───────────────────────────────────────────── */
.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 28px;
  align-items: start;
}
.account-layout__main { min-width: 0; }
.account-news { position: sticky; top: 132px; }
.account-news__card { max-height: calc(100vh - 152px); overflow-y: auto; }
.news-item { padding: 16px 0; border-top: 1px solid var(--line, #e7eaf0); }
.news-item:first-of-type { border-top: 0; padding-top: 14px; }
.news-item__date {
  display: block;
  color: var(--muted, #667085);
  font-size: 12px;
  line-height: 1.3;
}
.news-item__title {
  margin: 5px 0 7px;
  font-size: 15px;
  line-height: 1.35;
}
.news-item__body {
  color: var(--text, #344054);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.news-item__body br { line-height: 1.5; }
.news-item__until {
  margin: 8px 0 0;
  color: var(--muted, #667085);
  font-size: 11px;
}
@media (max-width: 1080px) {
  .account-layout { grid-template-columns: minmax(0, 1fr); }
  .account-news { position: static; }
  .account-news__card { max-height: none; }
}
@media (max-width: 600px) {
  .account-layout { gap: 18px; }
  .news-item { padding: 14px 0; }
}

/* Partner account uses a wider canvas than the public content pages. */
.page-head--account .container,
.account-layout.container {
  max-width: 1600px;
  padding-inline: clamp(20px, 4vw, 56px);
}
.account-layout {
  grid-template-columns: minmax(0, 1fr) 420px;
}
@media (max-width: 1080px) {
  .page-head--account .container,
  .account-layout.container { padding-inline: var(--mf-gutter); }
  .account-layout { grid-template-columns: minmax(0, 1fr); }
}

/* Mobile quick access to the cart, even when the header actions are hidden. */
@media (max-width: 1200px) {
  .nav { display: none; }
  .header__actions { display: none; }
  .header__toggle { display: inline-flex; margin-left: auto; }
  .mobile-menu { display: block; }
  .header__mobile-cart {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 44px;
    padding: 0 0.7rem;
    border: 1px solid var(--mf-line);
    border-radius: var(--mf-radius);
    background: var(--mf-white);
    color: var(--mf-text);
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
  }
  .header__mobile-cart b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.25rem;
    border-radius: 10px;
    background: var(--mf-red-700);
    color: #fff;
    font-size: 0.75rem;
  }
}

.header__mobile-cart { display: none; }
@media (max-width: 1200px) {
  .header__mobile-cart { display: inline-flex; }
}
@media (max-width: 600px) {
  .nav { display: none; }
  .logo__suffix { display: none; }
  .header__mobile-cart {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 44px;
    padding: 0 0.7rem;
    border: 1px solid var(--mf-line);
    border-radius: var(--mf-radius);
    background: var(--mf-white);
    color: var(--mf-navy);
    font-size: 0.8125rem;
    font-weight: 700;
    order: 2;
    margin-left: auto;
    white-space: nowrap;
  }
  .header__mobile-cart b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.25rem;
    border-radius: 10px;
    background: var(--mf-red-700);
    color: #fff;
    font-size: 0.6875rem;
  }
  .header__toggle { order: 3; margin-left: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 760px) {
  .auth__inner {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .auth__aside {
    display: none;
  }
  .auth__panel {
    min-width: 0;
    padding: 1.25rem;
  }
}

@media (max-width: 600px) {
  .footer a,
  .filter-list a,
  .mobile-menu__links a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding-top: 2px;
    padding-bottom: 2px;
  }
  .checkbox input {
    width: 18px;
    height: 18px;
  }
}
/* Mobile category filtering: the same categories that live in the drawer are
   also exposed as a horizontal strip above the products. */
.category-strip { display: none; }
@media (max-width: 1080px) {
  .category-strip {
    display: block;
    margin: 0 0 1rem;
    padding: 0.7rem 0 0.8rem;
    border-top: 1px solid var(--mf-line);
    border-bottom: 1px solid var(--mf-line);
  }
  .category-strip__label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mf-muted);
  }
  .category-strip__scroll {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    scrollbar-width: none;
  }
  .category-strip__scroll::-webkit-scrollbar { display: none; }
  .category-strip .chip { flex: 0 0 auto; }
}

@media (min-width: 1081px) and (max-width: 1280px) {
  .account-layout { grid-template-columns: minmax(0, 1fr) 360px; }
}

/* Cart: small product photos and a deliberately narrow quantity column. */
.cart-product {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 250px;
}
.cart-thumb {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  object-fit: contain;
  border: 1px solid var(--mf-line);
  border-radius: 4px;
  background: var(--mf-lav-050);
}
.cart-thumb--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  color: var(--mf-muted);
  font-size: 10px;
  line-height: 1.15;
  text-align: center;
}
.cart-product__text { min-width: 0; }
.cart-table th:nth-child(2),
.cart-table td:nth-child(2) { width: 118px; }
.cart-table th:nth-child(3),
.cart-table td:nth-child(3) { width: 110px; }
.cart-table th:nth-child(4),
.cart-table td:nth-child(4) { width: 118px; }
.cart-table .cart-table__remove-head,
.cart-table td:last-child { width: 48px; }
.cart-table__qty { text-align: center; }
.cart-table .input--qty {
  width: 72px;
  min-width: 0;
  margin: 0 auto;
  padding: 0.45rem 0.4rem;
  text-align: center;
}
.cart-table td.cart-table__qty .text-small {
  display: block;
  margin-top: 3px;
  white-space: nowrap;
}

.pcard__reason {
  display: inline-block;
  color: var(--mf-red, #c72416);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.pcard__similar {
  display: inline-flex;
  align-items: center;
  margin-top: 0.7rem;
  color: var(--mf-navy);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pcard__similar:hover { color: var(--mf-red); }

/* Product page: separate the document actions from warehouse availability. */
.product-stock {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--mf-line);
}
.product-stock .product-block__title {
  margin: 0 0 1rem;
}

/* Discreet wholesale/markup peek for a retail view. */
.pcard__price {
  position: relative;
  padding-right: 1.2rem;
}
.product-price {
  position: relative;
  padding-right: 2rem;
}
.price-peek {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 3;
}
.price-peek__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: var(--mf-muted);
  opacity: 0.3;
  padding: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 9px;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  user-select: none;
}
.price-peek__toggle:hover,
.price-peek__toggle:focus,
.price-peek__toggle:focus-visible {
  opacity: 0.9;
  color: var(--mf-navy);
}
.price-peek__panel {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  z-index: 5;
  padding: 0.3rem 0.45rem;
  border-radius: 4px;
  background: var(--mf-ink);
  color: #fff;
  box-shadow: 0 4px 14px rgba(18, 24, 47, 0.18);
  font-size: 0.65rem;
  line-height: 1.35;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-2px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
  pointer-events: none;
}
.price-peek__panel b {
  color: #fff;
  font-weight: 700;
}
.price-peek__toggle:hover + .price-peek__panel,
.price-peek__toggle:focus + .price-peek__panel,
.price-peek__toggle:focus-visible + .price-peek__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* In narrow catalog cards the tooltip must grow to the right of the icon,
   otherwise the card's rounded overflow clips its left part. */
.pcard__price .price-peek__panel {
  left: 0;
  right: auto;
  max-width: 210px;
}

/* On catalog cards keep the tiny "i" in the far bottom-right corner,
   away from the price and the order button. */
.pcard { position: relative; }
.pcard__price {
  position: static;
  padding-right: 0;
}
.pcard .price-peek {
  top: auto;
  right: 0.55rem;
  bottom: 0.55rem;
}
.pcard .price-peek__panel {
  top: auto;
  right: 0;
  bottom: calc(100% + 5px);
  left: auto;
}

.header__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  margin-left: 5px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--mf-red);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  vertical-align: 1px;
}

/* User management: keep the wide permission matrix scrollable, and make the
   action cell a compact wrapping group instead of a six-button column. */
.users-table { min-width: 980px; }
.users-table td:last-child { min-width: 260px; }
.users-table td:last-child .row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.users-table td:last-child .btn { white-space: nowrap; }
.users-table-wrap { -webkit-overflow-scrolling: touch; }

/* Category metadata on catalog cards needs AA contrast. */
.pcard__category { opacity: 1; color: #3f477d; }

/* The peek icon is a real small control, not a decorative dot. */
.price-peek__toggle {
  width: 24px;
  height: 24px;
  opacity: 0.65;
  color: #3f477d;
  font-size: 10px;
}
/* Keep the card tooltip beside the icon: above it is the "В заказ" button,
   below it the card edge / "Посмотреть похожие". */
.pcard .price-peek__panel {
  top: 0;
  right: calc(100% + 6px);
  bottom: auto;
  left: auto;
}
/* In the product price block the icon sits at the top-right corner, so the
   tooltip opens upward instead of covering the price and old price. */
.product-price .price-peek__panel {
  top: auto;
  right: 0;
  bottom: calc(100% + 10px);
  left: auto;
}

.table th.num { text-align: right; }

/* Order confirmation summary and per-line confirmation states. */
.order-confirmation {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--mf-line);
  border-left: 4px solid var(--mf-blue, #3f477d);
  border-radius: 8px;
  background: #f7f8ff;
}
.order-confirmation__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.order-confirmation__head b { font-size: 0.95rem; }
.order-confirmation__text {
  margin: 0.45rem 0 0;
  color: var(--mf-muted);
  font-size: 0.85rem;
}
.order-confirmation--partial { border-left-color: #d18b22; background: #fff9ef; }
.order-confirmation--confirmed { border-left-color: #2b8a55; background: #f1faf5; }
.order-confirmation--cancelled { border-left-color: #c33b32; background: #fff6f5; }
.order-line--rejected td { background: #fff9f8; }
.order-line--partial td { background: #fffdf7; }
.order-line-qty {
  display: inline-block;
  margin-left: 0.35rem;
  color: var(--mf-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}
.order-line-replace { margin-top: 0.4rem; }

.account-tabs { display:flex; gap:.25rem; border-bottom:1px solid var(--mf-line); margin:0 0 1rem; }
.account-tabs__item { display:inline-flex; align-items:center; gap:.4rem; padding:.65rem .9rem; border-bottom:2px solid transparent; color:var(--mf-muted); text-decoration:none; font-size:.85rem; font-weight:700; }
.account-tabs__item:hover { color:var(--mf-navy); }
.account-tabs__item.is-active { color:var(--mf-navy); border-bottom-color:var(--mf-navy); }
.account-tabs__item span { display:inline-grid; place-items:center; min-width:1.35rem; height:1.35rem; padding:0 .3rem; border-radius:999px; background:var(--mf-lav-100); color:var(--mf-muted); font-size:.7rem; }
.account-tabs__item.is-active span { background:var(--mf-navy); color:#fff; }

.catalog-toolbar__left { display:flex; align-items:center; gap:.7rem; flex-wrap:wrap; }
.view-switch { display:inline-flex; gap:.15rem; padding:.15rem; border-radius:6px; background:var(--mf-lav-100); }
.view-switch button { border:0; background:transparent; color:var(--mf-muted); width:26px; height:24px; border-radius:4px; cursor:pointer; font-size:.9rem; line-height:1; }
.view-switch button.is-active { background:#fff; color:var(--mf-navy); box-shadow:0 1px 3px rgba(6,5,36,.1); }
.catalog-view--list .product-grid { display:flex; flex-direction:column; gap:.55rem; }
.catalog-view--list .product-grid .pcard { display:grid; grid-template-columns:150px minmax(0,1fr); align-items:stretch; min-height:150px; }
.catalog-view--list .product-grid .pcard > * { min-width: 0; }
.catalog-view--list .pcard__media .pcard__sku,
.catalog-view--list .pcard__media .pcard__category { display: none; }
.catalog-view--list .pcard__media { justify-content: center; }
.catalog-view--list .product-grid .pcard__media { width:150px; max-width:150px; height:100%; min-height:148px; margin:0; border-radius:8px 0 0 8px; }
.catalog-view--list .product-grid .pcard__media img { height:100%; object-fit:contain; }
.catalog-view--list .product-grid .pcard__body { display:flex; flex-direction:column; justify-content:center; padding:.85rem 1rem; }
.catalog-view--list .product-grid .pcard__name { margin-top:.15rem; }
.catalog-view--list .product-grid .pcard__bottom { margin-top:.55rem; }
@media (max-width:700px) {
  .catalog-view--list .product-grid .pcard { grid-template-columns:110px minmax(0,1fr); min-height:120px; }
  .catalog-view--list .product-grid .pcard__media { width:110px; max-width:110px; min-height:118px; }
  .catalog-view--list .product-grid .pcard__body { padding:.65rem .7rem; }
}

.cart-identity { display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:.6rem 1rem; padding:.75rem .9rem; margin:0 0 1rem; border:1px solid var(--mf-line); border-radius:var(--mf-radius); background:var(--mf-lav-050); }
.cart-identity__form { display:flex; flex-wrap:wrap; align-items:flex-end; gap:.6rem; flex:1 1 520px; }
.cart-identity__form .field { flex:1 1 280px; margin:0; }
.cart-identity__form .btn { flex:0 0 auto; }

.catalog-quick-filters { display:flex; flex-wrap:wrap; align-items:center; gap:.35rem; margin:0 0 .35rem; }
.catalog-quick-filters__label { color:var(--mf-muted); font-size:.75rem; margin-right:.2rem; }

.price-kind { display:inline-block; margin-left:.55rem; padding:.16rem .4rem; border-radius:4px; font-size:.65rem; font-weight:700; letter-spacing:.06em; vertical-align:middle; }
.price-kind--retail { color:#6b5b00; background:#fff4c7; }
.price-kind--wholesale { color:#1d4b36; background:#e2f3e9; }

.price-peek-setting { background: #fff; }
.price-peek-setting .row--between { align-items: center; }
.price-peek-setting .checkbox { margin: 0; white-space: nowrap; }

.header__compact-login { display: none; }
@media (max-width: 1080px) {
  .header__compact-login { display: inline-flex; margin-left: auto; align-items: center; justify-content: center; min-height: 36px; }
}

@media (max-width: 900px) {
  table.users-table { min-width: 0 !important; width: 100% !important; }
  table.users-table td:last-child { min-width: 0 !important; }
  table.users-table td:last-child .row { flex-wrap: wrap; }
}

/* Partner account: sales-channel visibility */
.channel-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}

.channel-option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius-sm, 10px);
  background: var(--mf-lav-50, #f8f8fb);
  cursor: pointer;
}

.channel-option input {
  margin-top: 0.15rem;
  flex: 0 0 auto;
}

.channel-option span {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.channel-option b {
  font-size: var(--mf-fs-small);
  overflow-wrap: anywhere;
}

.channel-option small {
  color: var(--mf-muted);
  font-size: var(--mf-fs-micro);
}

/* ── Partner dashboard ───────────────────────────────────────────────────── */

.account-page {
  padding: 0 0 3rem;
}

.account-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 0 1.35rem;
  border-bottom: 1px solid var(--mf-line);
}

.account-hero__copy h1 {
  margin: 0.2rem 0 0.55rem;
  font-size: clamp(2rem, 3vw, 3.1rem);
  line-height: 1.02;
}

.account-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  color: var(--mf-muted);
  font-size: var(--mf-fs-small);
}

.account-hero__email {
  overflow-wrap: anywhere;
}

.account-hero__contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  flex: 0 0 auto;
  font-size: var(--mf-fs-small);
}

.account-hero__contact > span {
  color: var(--mf-muted);
  font-size: var(--mf-fs-micro);
}

.account-hero__contact a {
  color: var(--mf-ink);
  text-decoration: none;
}

.account-hero__contact a:hover {
  color: var(--mf-navy);
  text-decoration: underline;
}

.account-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 1.1rem 0;
}

.account-action {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius-lg);
  background: #fff;
  color: var(--mf-ink);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.account-action:hover {
  border-color: var(--mf-navy);
  box-shadow: 0 6px 18px rgba(6, 5, 36, 0.08);
  transform: translateY(-1px);
}

.account-action__icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--mf-lav-100);
  color: var(--mf-navy);
  font-size: 1.1rem;
}

.account-action span:nth-child(2) {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.1rem;
}

.account-action b {
  font-size: 0.95rem;
}

.account-action small {
  color: var(--mf-muted);
  font-size: var(--mf-fs-micro);
}

.account-action__arrow {
  margin-left: auto;
  color: var(--mf-muted);
}

.account-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  align-items: start;
  gap: 1.25rem;
}

.account-dashboard__main,
.account-dashboard__side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1.25rem;
}

.account-panel {
  min-width: 0;
  padding: 1.2rem 1.25rem;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius-lg);
  background: #fff;
}

.account-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.account-panel__head h2 {
  margin: 0.1rem 0 0;
  font-size: 1.25rem;
}

.account-panel__eyebrow {
  display: block;
  color: var(--mf-muted);
  font-size: var(--mf-fs-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-panel__head .link {
  white-space: nowrap;
  font-size: var(--mf-fs-small);
}

.account-panel__muted {
  margin: 0;
  color: var(--mf-muted);
  font-size: var(--mf-fs-small);
}

.account-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.account-stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius-md);
  background: var(--mf-lav-050);
  color: var(--mf-ink);
  text-decoration: none;
}

.account-stat:hover {
  border-color: var(--mf-navy);
}

.account-stat b {
  font-size: 1.35rem;
  line-height: 1;
}

.account-stat span {
  color: var(--mf-muted);
  font-size: var(--mf-fs-micro);
}

.account-table-wrap {
  overflow-x: auto;
}

.account-table {
  min-width: 0;
}

.account-table td,
.account-table th {
  white-space: nowrap;
}

.account-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem;
  border-radius: var(--mf-radius-md);
  background: var(--mf-lav-050);
  color: var(--mf-muted);
  font-size: var(--mf-fs-small);
}

.account-empty p {
  margin: 0;
}

.account-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.account-shortcuts a {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius-md);
  color: var(--mf-ink);
  text-decoration: none;
}

.account-shortcuts a:hover {
  border-color: var(--mf-navy);
  background: var(--mf-lav-050);
}

.account-shortcuts b {
  font-size: 0.9rem;
}

.account-shortcuts small {
  color: var(--mf-muted);
  font-size: var(--mf-fs-micro);
}

.account-manager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.account-manager h2 {
  margin: 0 0 0.15rem;
  font-size: 1rem;
}

.account-manager p {
  margin: 0;
  color: var(--mf-muted);
  font-size: var(--mf-fs-small);
}

.account-manager__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.account-settings {
  padding-bottom: 0.8rem;
}

.account-price-mode {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  padding-bottom: 0.8rem;
}

.account-setting__label {
  color: var(--mf-muted);
  font-size: var(--mf-fs-micro);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.segmented--compact .segmented__item {
  padding: 0.42rem 0.7rem;
  font-size: 0.78rem;
}

.account-setting__saved {
  flex-basis: 100%;
  color: var(--mf-muted);
  font-size: var(--mf-fs-micro);
}

.account-setting {
  border-top: 1px solid var(--mf-line);
}

.account-setting > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
  cursor: pointer;
  list-style: none;
  font-size: 0.9rem;
  font-weight: 650;
}

.account-setting > summary::-webkit-details-marker {
  display: none;
}

.account-setting > summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--mf-muted);
  font-size: 1rem;
  font-weight: 400;
}

.account-setting[open] > summary::after {
  content: "−";
}

.account-setting__value {
  margin-left: auto;
  max-width: 58%;
  overflow: hidden;
  color: var(--mf-muted);
  font-size: var(--mf-fs-micro);
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-setting__body {
  padding: 0 0 0.85rem;
  color: var(--mf-muted);
  font-size: var(--mf-fs-small);
}

.account-setting__body p {
  margin: 0 0 0.55rem;
}

.account-setting__strong {
  color: var(--mf-ink);
  font-weight: 700;
}

.account-setting__note {
  margin-top: 0.55rem !important;
  font-size: var(--mf-fs-micro);
}

.account-settings__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--mf-line);
  font-size: var(--mf-fs-small);
}

.account-settings__links a {
  color: var(--mf-navy);
  text-decoration: none;
}

.account-settings__links a:hover {
  text-decoration: underline;
}

.account-news-panel {
  padding: 0;
  overflow: hidden;
}

.account-news-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
}

.account-news-panel > summary::-webkit-details-marker {
  display: none;
}

.account-news-panel > summary b {
  display: block;
  margin-top: 0.1rem;
  font-size: 1.05rem;
}

.account-news-panel > summary .tag {
  flex: 0 0 auto;
}

.account-news-list {
  max-height: 430px;
  overflow-y: auto;
  padding: 0 1.25rem 1rem;
}

.account-news-panel .news-item {
  padding: 0.8rem 0;
}

.account-news-panel .news-item__body {
  color: var(--mf-muted);
  font-size: var(--mf-fs-small);
}

@media (max-width: 1100px) {
  .account-dashboard {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-dashboard__side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .account-settings {
    grid-row: span 2;
  }
}

@media (max-width: 760px) {
  .account-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }

  .account-hero__contact {
    align-items: flex-start;
  }

  .account-actions,
  .account-dashboard__side {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-shortcuts {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-manager {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-panel {
    padding: 1rem;
  }

  .account-table td,
  .account-table th {
    white-space: normal;
  }

  .account-empty {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ── Home banner slot ─────────────────────────────────────────────────────── */

.home-banner {
  padding: 0.85rem 0 1.35rem;
}

.home-banner__slot {
  position: relative;
  min-height: clamp(150px, 18vw, 240px);
  overflow: hidden;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius-lg);
  background:
    radial-gradient(circle at 12% 20%, rgba(140, 150, 255, 0.28), transparent 32%),
    linear-gradient(120deg, #101633 0%, #262e70 58%, #4854a8 100%);
}

.home-banner__slot .cms-plugin {
  position: relative;
  z-index: 1;
}

.home-banner__empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--mf-fs-small);
  text-align: center;
  pointer-events: none;
  letter-spacing: 0.02em;
}

.home-banner__label {
  color: #fff;
  font-size: var(--mf-fs-micro);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.home-banner__slot.is-filled .home-banner__empty {
  display: none;
}

@media (max-width: 760px) {
  .home-banner {
    padding: 0.65rem 0 1rem;
  }

  .home-banner__slot {
    min-height: 140px;
  }
}

/* Visible news card in the account sidebar */
.account-news-panel {
  padding: 1.2rem 1.25rem;
  overflow: visible;
}

.account-news-panel .account-panel__head {
  margin-bottom: 0.25rem;
}

.account-news-panel .account-news-list {
  max-height: none;
  overflow: visible;
  padding: 0;
}

.account-news-more {
  margin-top: 0.55rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--mf-line);
}

.account-news-more > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0;
  color: var(--mf-navy);
  cursor: pointer;
  font-size: var(--mf-fs-small);
  font-weight: 700;
  list-style: none;
}

.account-news-more > summary::-webkit-details-marker {
  display: none;
}

.account-news-more > summary::after {
  content: "+";
  color: var(--mf-muted);
  font-weight: 400;
}

.account-news-more[open] > summary::after {
  content: "−";
}

.account-news-more .account-news-list {
  padding-top: 0.15rem;
}

/* ── Account news ticker ──────────────────────────────────────────────────── */

.account-news-ticker {
  margin-top: 1.6rem;
  padding: 1.15rem 0 1.3rem;
  border-top: 1px solid var(--mf-line);
  background: var(--mf-lav-050);
}

.account-news-ticker__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.account-news-ticker__head h2 {
  margin: 0.1rem 0 0;
  font-size: 1.3rem;
}

.account-news-ticker__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  cursor: grab;
  touch-action: pan-y;
}

.account-news-ticker__viewport::-webkit-scrollbar {
  display: none;
}

.account-news-ticker__viewport.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.account-news-ticker__viewport:focus-visible {
  outline: 2px solid var(--mf-navy);
  outline-offset: 4px;
}

.account-news-ticker__rail {
  display: flex;
  width: max-content;
}

.account-news-ticker__track {
  display: flex;
  flex: 0 0 auto;
  gap: 0.7rem;
  padding: 0.1rem 0.7rem 0.1rem 0;
}

.account-news-ticker__item {
  display: flex;
  flex: 0 0 300px;
  flex-direction: column;
  gap: 0.25rem;
  width: 300px;
  min-height: 128px;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius-md);
  background: #fff;
}

.account-news-ticker__item time {
  color: var(--mf-muted);
  font-size: var(--mf-fs-micro);
}

.account-news-ticker__item h3 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.3;
}

.account-news-ticker__item p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--mf-muted);
  font-size: var(--mf-fs-small);
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (max-width: 760px) {
  .account-news-ticker {
    margin-top: 1rem;
    padding: 0.9rem 0 1rem;
  }

  .account-news-ticker__item {
    flex-basis: 260px;
    width: 260px;
    min-height: 120px;
  }
}

/* Compact news ribbon directly under the company title */
.account-hero {
  padding-top: 1.1rem;
  padding-bottom: 0.9rem;
}

.account-hero__copy h1 {
  margin-top: 0.15rem;
  margin-bottom: 0.4rem;
  font-size: clamp(1.65rem, 2.25vw, 2.55rem);
}

.account-news-ticker {
  margin: 0 0 1rem;
  padding: 0.8rem 0.9rem 0.9rem;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius-lg);
  background: var(--mf-lav-050);
}

.account-news-ticker__head {
  align-items: center;
  margin-bottom: 0.45rem;
}

.account-news-ticker__head h2 {
  font-size: 1.05rem;
}

.account-news-ticker__track {
  gap: 0.6rem;
  padding-right: 0.6rem;
}

.account-news-ticker__item {
  flex-basis: 250px;
  width: 250px;
  min-height: 100px;
  padding: 0.65rem 0.75rem;
}

.account-news-ticker__item h3 {
  font-size: 0.88rem;
}

.account-news-ticker__item p {
  font-size: 0.8rem;
  -webkit-line-clamp: 2;
}

@media (max-width: 760px) {
  .account-hero__copy h1 {
    font-size: clamp(1.55rem, 7vw, 2.1rem);
  }

  .account-news-ticker {
    padding: 0.7rem 0.7rem 0.8rem;
  }

  .account-news-ticker__item {
    flex-basis: 230px;
    width: 230px;
    min-height: 94px;
  }
}

/* Cart «i» reveal: wholesale and client profit, never enabled on entry. */
.topbar__peek.is-active {
  background: #fff;
  color: var(--mf-ink);
  border-color: #fff;
  text-decoration: none;
}

.topbar__peek {
  text-decoration: none;
}

.cart-peek-line {
  display: block;
  margin-top: 0.25rem;
  color: var(--mf-muted);
  font-size: var(--mf-fs-micro);
  line-height: 1.35;
  white-space: nowrap;
}

.cart-peek-line b {
  color: var(--mf-ink);
}

.cart-peek-line--profit,
.cart-peek-line--profit b {
  color: #146c3a;
}

.cart-peek-summary {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.8rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius-md);
  background: var(--mf-lav-050);
}

.cart-peek-summary > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: var(--mf-fs-small);
}

.cart-peek-summary span {
  color: var(--mf-muted);
}

.cart-peek-summary__profit b {
  color: #146c3a;
}

/* Cart calculation switch — deliberately separate from the catalogue «i». */
.cart-calc-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius-md);
  background: var(--mf-lav-050);
}

.cart-calc-toggle__copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.cart-calc-toggle__copy b {
  font-size: 0.9rem;
}

.cart-calc-toggle__copy small {
  color: var(--mf-muted);
  font-size: var(--mf-fs-micro);
}

.cart-peek-toggle {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--mf-navy);
  border-radius: 999px;
  color: var(--mf-navy);
  font-size: var(--mf-fs-small);
  font-weight: 700;
  text-decoration: none;
}

.cart-peek-toggle:hover,
.cart-peek-toggle.is-active {
  background: var(--mf-navy);
  color: #fff;
}

.cart-peek-toggle__i {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  font-style: italic;
  font-weight: 800;
}

@media (max-width: 600px) {
  .cart-calc-toggle {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Deliberately discreet cart calculation trigger. */
.cart-peek-mini {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-left: 0.2rem;
  border: 1px solid transparent;
  border-radius: 50%;
  color: #7b8294;
  font-size: 12px;
  font-style: italic;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  vertical-align: middle;
  opacity: 1;
  transition: opacity 0.15s ease, color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.cart-peek-mini:hover,
.cart-peek-mini:focus-visible {
  border-color: var(--mf-navy);
  color: var(--mf-navy);
  opacity: 1;
}

.cart-peek-mini.is-active {
  border-color: var(--mf-navy);
  background: var(--mf-navy);
  color: #fff;
  opacity: 0.9;
}

.cart-peek-mini:focus-visible {
  outline: 2px solid var(--mf-navy);
  outline-offset: 2px;
}

/* Keep price controls usable on phones while hiding the contact details. */
@media (max-width: 860px) {
  .topbar__meta {
    display: flex !important;
    margin-left: auto;
    gap: 0.4rem;
  }
  .topbar__meta > span,
  .topbar__meta > a {
    display: none;
  }
  .topbar__inner {
    gap: 0.5rem;
  }
  .topbar__tools {
    gap: 0.35rem;
  }
  .topbar__price-btn {
    min-width: 24px;
    height: 24px;
    padding: 0 5px;
  }
}

@media (max-width: 600px) {
  .topbar__inner > span:first-child {
    display: none;
  }
  .topbar__inner {
    justify-content: flex-end;
    min-height: 44px;
  }
  .logo__mark {
    width: 150px;
    height: auto;
  }
  .header__inner {
    flex-wrap: nowrap;
    gap: 0.35rem;
  }
  .header__mobile-cart {
    min-height: 40px;
    padding: 0 0.5rem;
  }
  .header__toggle > span:last-child {
    display: none;
  }
}

.account-news-ticker__actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.account-news-ticker__pause {
  border: 1px solid var(--mf-line);
  border-radius: 999px;
  background: #fff;
  color: var(--mf-muted);
  padding: 3px 8px;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.account-news-ticker__pause:hover,
.account-news-ticker__pause:focus-visible {
  border-color: var(--mf-navy);
  color: var(--mf-navy);
}

.account-news-ticker__more {
  margin-top: auto;
  font-size: 10px;
}

.account-news-ticker__more summary {
  color: var(--mf-navy);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.account-news-ticker__more summary::-webkit-details-marker {
  display: none;
}

.account-news-ticker__more p {
  margin: 5px 0 0;
  color: var(--mf-muted);
  font-size: 11px;
  line-height: 1.4;
  -webkit-line-clamp: unset;
  display: block;
}

@media (min-width: 1001px) and (max-width: 1200px) {
  .nav { display: flex; }
  .header__actions { display: flex; }
  .header__toggle { display: none; }
  .header__mobile-cart { display: none; }
}

/* Related/recommendation cards: no SKU on the photo and room for 3 name lines. */
.pcard--related .pcard__name {
  min-height: 4.05em;
}
.pcard--related .pcard__name a {
  -webkit-line-clamp: 3;
  overflow-wrap: anywhere;
}

/* Order totals above the cart: visible without opening the summary card. */
.cart-totals {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: .55rem;
  margin: 0 0 .85rem;
  padding: .65rem .8rem;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius);
  background: #fff;
}
.cart-totals__item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 7.5rem;
  padding: .15rem .7rem .15rem 0;
  border-right: 1px solid var(--mf-line);
}
.cart-totals__item:last-child { border-right: 0; padding-right: 0; }
.cart-totals__label { color: var(--mf-muted); font-size: .7rem; line-height: 1.2; }
.cart-totals__value { color: var(--mf-ink); font-size: 1rem; line-height: 1.25; }
.cart-totals__item--sum .cart-totals__value { color: var(--mf-navy-700); }
.cart-totals__item--peek { background: var(--mf-lav-050); border-radius: 6px; padding: .2rem .55rem; }
@media (max-width: 700px) {
  .cart-totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cart-totals__item { min-width: 0; border-right: 0; padding: .1rem 0; }
}

/* Inline autosave state for cart quantities. */
.cart-save-status { color: var(--mf-muted); font-size: .75rem; }
.cart-save-status.is-error { color: var(--mf-red-700); }

/* News banner: the same rail, but an image card instead of a text-only note. */
.account-news-ticker__item--banner {
  flex-basis: 360px;
  width: 360px;
  padding: 0;
  gap: 0;
  overflow: hidden;
}
.account-news-ticker__banner {
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: var(--mf-lav-100);
}
.account-news-ticker__banner a,
.account-news-ticker__banner img {
  display: block;
  width: 100%;
  height: 100%;
}
.account-news-ticker__banner img { object-fit: cover; }
.account-news-ticker__banner a:focus-visible { outline: 2px solid var(--mf-navy); outline-offset: 2px; }
.account-news-ticker__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.65rem 0.8rem 0.75rem;
}
.account-news-ticker__cta {
  align-self: flex-start;
  margin-top: 0.25rem;
  color: var(--mf-navy);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}
.account-news-ticker__cta:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .account-news-ticker__item--banner { flex-basis: 280px; width: 280px; }
}

/* LK full-width experiment: remove `account-page--wide` from the account
   template to return to the previous centred layout. */
.account-page--wide > .container {
  max-width: none;
  width: 100%;
  padding-inline: clamp(16px, 2.4vw, 44px);
}
.account-page--wide .account-dashboard {
  grid-template-columns: minmax(0, 1fr) minmax(330px, 480px);
}
@media (max-width: 1100px) {
  .account-page--wide .account-dashboard {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Keep the quick-filter row and the «Вид» row visibly separate. */
.catalog-quick-filters--attrs { margin-top: .55rem; }
.subtypes { margin-top: .45rem; }

/* The all-categories view has no sidebar: results use the full content width. */
.catalog-layout--all {
  grid-template-columns: minmax(0, 1fr);
}
.catalog-layout--all .catalog-main {
  width: 100%;
}

/* Audit fixes: header does not overlap on laptop widths. */
@media (max-width: 1210px) {
  .header__account { display: none; }
  .header__inner { gap: .75rem; }
}

/* The all-categories page keeps a useful category strip, but no side panel. */
.catalog-layout--all .category-strip { display: block; margin: 0 0 1rem; padding: .7rem 0 .8rem; border-top: 1px solid var(--mf-line); border-bottom: 1px solid var(--mf-line); }
.catalog-layout--all .category-strip__label { display: block; margin-bottom: .45rem; font-size: .6875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--mf-muted); }
.catalog-layout--all .category-strip__scroll { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .15rem; scrollbar-width: none; }
.catalog-layout--all .category-strip__scroll::-webkit-scrollbar { display: none; }
.catalog-layout--all .category-strip .chip { flex: 0 0 auto; }

/* Mobile cart: keep the quantity field readable and let peek lines wrap. */
.cart-table__qty .input--qty { width: 64px; min-width: 64px; }
.cart-peek-line { white-space: normal; overflow-wrap: anywhere; }

/* “Добавить в комплект” was styled as a red action but was plain text. */
.pcard__reason { color: var(--mf-muted); font-weight: 600; }

/* On the wide LK the global chrome follows the same full-width gutter. */
.account-wide .topbar > .container,
.account-wide .header > .container,
.account-wide .footer > .container {
  max-width: none;
  width: 100%;
  padding-inline: clamp(16px, 2.4vw, 44px);
}

@media (max-width: 1100px) {
  .account-wide .account-dashboard__side {
    display: flex;
    flex-direction: column;
  }
}

/* All categories: keep only the category list in the sidebar. */
.filters--categories-only {
  padding: 1rem 1.1rem;
}
.filters--categories-only .filter-group--categories {
  margin: 0;
}
@media (max-width: 1080px) {
  .filters--categories-only { display: none; }
}

/* News uses the full width of the cabinet. */
.account-news-ticker {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}
/* A banner is the whole news card: the image is the background, text sits on it. */
.account-news-ticker__item--banner {
  position: relative;
  flex-basis: 340px;
  width: 340px;
  min-height: 200px;
  overflow: hidden;
}
.account-news-ticker__item--banner .account-news-ticker__banner {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
}
.account-news-ticker__item--banner .account-news-ticker__banner a,
.account-news-ticker__item--banner .account-news-ticker__banner img {
  width: 100%;
  height: 100%;
}
.account-news-ticker__item--banner .account-news-ticker__content {
  position: relative;
  z-index: 1;
  min-height: 200px;
  padding: 0.9rem 1rem 0.8rem;
  justify-content: flex-end;
  background: linear-gradient(180deg, rgba(6, 5, 36, 0) 22%, rgba(6, 5, 36, 0.88) 100%);
}
.account-news-ticker__item--banner time { color: rgba(255, 255, 255, 0.78); }
.account-news-ticker__item--banner h3 { color: #fff; font-size: 1rem; }
.account-news-ticker__item--banner p { color: rgba(255, 255, 255, 0.86); }
.account-news-ticker__item--banner .account-news-ticker__cta { color: #fff; }
.account-news-ticker__item--banner .account-news-ticker__more summary,
.account-news-ticker__item--banner .account-news-ticker__more p { color: #fff; }
@media (max-width: 760px) {
  .account-news-ticker__item--banner { flex-basis: 300px; width: 300px; min-height: 190px; }
  .account-news-ticker__item--banner .account-news-ticker__content { min-height: 190px; padding: 0.7rem 0.8rem; }
}

/* Banner cards are image-only: the artwork already carries the message
   and the whole card is the clickable news surface. */
.account-news-ticker__item--banner {
  min-height: 0;
  padding: 0;
}
.account-news-ticker__item--banner .account-news-ticker__banner {
  position: relative;
  inset: auto;
  aspect-ratio: 1200 / 525;
}
.account-news-ticker__item--banner .account-news-ticker__banner a,
.account-news-ticker__item--banner .account-news-ticker__banner img {
  height: 100%;
}
.account-news-ticker__item--banner .account-news-ticker__content {
  display: none;
}
@media (max-width: 760px) {
  .account-news-ticker__item--banner { flex-basis: 280px; width: 280px; }
}
