/* ===== Шрифт ===== */
/* Inter лежит на своём сервере: Google Fonts добавляли лишние 300-700 мс,
   из-за чего текст успевал отрисоваться системным шрифтом и прыгал.
   unicode-range оставлен — браузер качает только нужные наборы символов. */
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/fonts/inter-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/fonts/inter-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Запасной шрифт с подогнанными метриками: пока грузится Inter, текст
   занимает ровно столько же места, поэтому при подмене разметка не сдвигается. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
  size-adjust: 107.12%;
}

/* ===== Дизайн-токены ===== */
:root {
  --bg: #f4f6fa;
  --surface: #fff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --line: #e3e8ef;
  --line-2: #cfd7e3;
  --primary: #1d4ed8;
  --primary-h: #1e3a8a;
  --primary-50: #eef3ff;
  --primary-100: #dbe5ff;
  --order: #c2410c;
  --order-bg: #fff4ea;
  --order-line: #fed7aa;
  --ok: #15803d;
  --ok-bg: #ecfdf3;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --warn-bg: #fffbeb;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px -12px rgba(15, 23, 42, .18);
  --shadow-lg: 0 20px 50px -20px rgba(15, 23, 42, .35);
  --font: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --container: 1320px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.55 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-h); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid rgba(29, 78, 216, .35); outline-offset: 2px; border-radius: 6px; }
.hp { position: absolute; left: -9999px; }

.ic { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.ic--lg { width: 32px; height: 32px; }
.ic--xl { width: 48px; height: 48px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: 20px; }
.container--narrow { max-width: 880px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ===== Кнопки ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .05s; white-space: nowrap; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-h); color: #fff; }
.btn--order { background: var(--order-bg); color: var(--order); border-color: var(--order-line); }
.btn--order:hover { background: #ffe8d4; color: #9a3412; }
.btn--ghost { border-color: var(--line-2); background: var(--surface); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--danger { background: var(--danger-bg); color: var(--danger); border-color: #fecaca; }
.btn--link { background: none; color: var(--muted); padding: 0; height: auto; font-weight: 500; }
.btn--link:hover { color: var(--danger); }
.btn--lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn--block { width: 100%; }
.btn--block + .btn--block { margin-top: 10px; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.iconbtn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.iconbtn:hover { background: var(--danger-bg); color: var(--danger); }

/* ===== Шапка ===== */
.topbar { background: #0f1f4d; color: #c7d2fe; font-size: 13px; }
.topbar__in { display: flex; justify-content: space-between; align-items: center; min-height: 36px; gap: 16px; }
.topbar a { color: #e0e7ff; }
.topbar a:hover { color: #fff; }
.topbar__links { display: flex; gap: 18px; flex-wrap: wrap; }
.topbar__contacts { display: flex; gap: 18px; align-items: center; }
.topbar__contacts .ic { width: 15px; height: 15px; margin-right: 6px; opacity: .8; }
.topbar__contacts a { font-weight: 600; }

.header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.header__in { display: flex; align-items: center; gap: 18px; min-height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); flex: none; }
.logo__mark { color: var(--primary-h); display: flex; }
.logo__mark .ic { width: 40px; height: 40px; }
.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.logo__text b { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.logo__text small { color: var(--muted); font-size: 12px; }
.logo--light, .logo--light .logo__text small { color: #fff; }
.logo--light .logo__mark { color: #3b5bdb; }
.catalog-btn { height: 46px; padding: 0 18px; }
.search { position: relative; flex: 1; display: flex; }
.search input { width: 100%; height: 46px; padding: 0 52px 0 16px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--surface-2); outline: none; transition: border-color .15s, background .15s; }
.search input:focus { border-color: var(--primary); background: #fff; }
.search button { position: absolute; right: 4px; top: 4px; width: 38px; height: 38px; border: 0; border-radius: 9px; background: var(--primary); color: #fff; cursor: pointer; display: grid; place-items: center; }
.search--inline { max-width: 420px; margin: 20px auto; }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; z-index: 50; }
.suggest a { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 8px 12px; color: var(--text); }
.suggest a:hover, .suggest a.is-active { background: var(--primary-50); }
.suggest img { width: 44px; height: 44px; object-fit: contain; border-radius: 6px; background: var(--surface-2); }
.suggest small { color: var(--muted); display: block; font-size: 12px; }
.suggest .s-price { font-weight: 700; white-space: nowrap; }
.suggest__all { display: block !important; text-align: center; padding: 10px !important; font-weight: 600; border-top: 1px solid var(--line); color: var(--primary) !important; }
.header__actions { display: flex; gap: 4px; }
.hact { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 12px; color: var(--text-2); font-size: 12px; font-weight: 500; border-radius: 10px; }
.hact:hover { background: var(--surface-2); color: var(--primary); }
.hact .ic { width: 24px; height: 24px; }
.badge { position: absolute; top: 0; right: 6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--order); color: #fff; font-size: 11px; line-height: 20px; text-align: center; }

.megamenu { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); max-height: 75vh; overflow: auto; }
.megamenu__in { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px 32px; padding-top: 24px; padding-bottom: 28px; }
.megamenu__col { display: flex; flex-direction: column; gap: 6px; }
.megamenu__col a { color: var(--text-2); font-size: 14px; }
.megamenu__col a:hover { color: var(--primary); }
.megamenu__root { font-weight: 700; font-size: 15px !important; color: var(--text) !important; margin-bottom: 4px; }
.megamenu__root small { color: var(--muted); font-weight: 500; }

.catnav { background: var(--surface); border-bottom: 1px solid var(--line); }
.catnav__in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.catnav__in::-webkit-scrollbar { display: none; }
.catnav a { padding: 11px 12px; white-space: nowrap; color: var(--text-2); font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; }
.catnav a:hover, .catnav a.is-active { color: var(--primary); border-bottom-color: var(--primary); }

.main { min-height: 60vh; padding-bottom: 56px; }

/* ===== Общие блоки ===== */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; margin: 16px 0 0; font-weight: 500; }
.alert--success { background: var(--ok-bg); color: var(--ok); }
.alert--error { background: var(--danger-bg); color: var(--danger); }
.alert--info { background: var(--primary-50); color: var(--primary-h); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 18px 0 10px; font-size: 13px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-2); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.page-title { font-size: 28px; font-weight: 800; margin: 6px 0 16px; }
.page-title small { font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 8px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.panel h2 { font-size: 20px; }
.section { margin-top: 44px; }
.section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 18px; }
.section__head h2 { font-size: 26px; font-weight: 800; margin: 0; }
.link-more { font-weight: 600; font-size: 14px; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty .ic { color: var(--line-2); margin: 0 auto 10px; }
.prose { line-height: 1.7; }
.prose h2 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose img { border-radius: 10px; }
.table-scroll, .ptable-wrap { overflow-x: auto; }

/* ===== Главная ===== */
.hero { background: radial-gradient(1200px 400px at 85% -10%, #3b82f6 0, transparent 60%), linear-gradient(135deg, #0f1f4d 0%, #1e3a8a 55%, #1d4ed8 100%); color: #fff; }
.hero__in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; padding-top: 52px; padding-bottom: 52px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: #fcd34d; background: rgba(255, 255, 255, .08); padding: 5px 12px; border-radius: 99px; margin: 0 0 16px; }
.hero h1 { font-size: 42px; font-weight: 800; letter-spacing: -.025em; margin-bottom: 14px; }
.hero__lead { color: #c7d2fe; font-size: 17px; max-width: 620px; margin: 0 0 26px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: inherit; }
.hero .btn--ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .25); }
.hero .btn--primary { background: #fbbf24; color: #1f2937; }
.hero .btn--primary:hover { background: #f59e0b; }
.hero__stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero__stats li { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 18px; }
.hero__stats b { display: block; font-size: 28px; font-weight: 800; }
.hero__stats span { color: #c7d2fe; font-size: 13px; }

.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.catcard { display: flex; gap: 16px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); transition: box-shadow .2s, border-color .2s, transform .2s; }
.catcard:hover { border-color: var(--primary-100); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--text); }
.catcard__img { width: 96px; height: 96px; flex: none; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; color: var(--primary); }
.catcard__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.catcard__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.catcard__title { font-weight: 700; font-size: 16px; }
.catcard__count { color: var(--primary); font-size: 13px; font-weight: 600; }
.catcard__subs { color: var(--muted); font-size: 12.5px; line-height: 1.4; }

.benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.benefit { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.benefit .ic { color: var(--primary); margin-bottom: 12px; }
.benefit h3 { font-size: 16px; margin-bottom: 6px; }
.benefit p { margin: 0; color: var(--muted); font-size: 14px; }

/* ===== Каталог ===== */
.cattree { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.cattree__item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.cattree__head { display: flex; gap: 14px; align-items: center; color: var(--text); margin-bottom: 10px; }
.cattree__head h2 { font-size: 17px; margin: 0; }
.cattree__head small { color: var(--muted); }
.cattree__img { width: 72px; height: 72px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; flex: none; color: var(--primary); }
.cattree__img img { object-fit: contain; width: 100%; height: 100%; mix-blend-mode: multiply; }
.cattree ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cattree li a { display: flex; justify-content: space-between; padding: 5px 8px; border-radius: 8px; color: var(--text-2); font-size: 14px; }
.cattree li a:hover { background: var(--primary-50); color: var(--primary); }
.cattree li small { color: var(--muted); }

.cat-desc { color: var(--text-2); margin-bottom: 16px; max-width: 900px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-weight: 500; font-size: 14px; }
.chip small { color: var(--muted); font-weight: 600; }
.chip:hover { border-color: var(--primary); color: var(--primary); }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; }
.toolbar .page-title { margin: 0; font-size: 22px; }
.toolbar__filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.field--inline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.field--inline select { height: 36px; border: 1px solid var(--line-2); border-radius: 9px; padding: 0 10px; background: #fff; color: var(--text); }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.viewswitch { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.viewswitch a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.viewswitch a.is-active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.viewswitch .ic { width: 16px; height: 16px; }

/* Плитка */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.pgrid__divider { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; margin: 10px 0 0; color: var(--order); font-weight: 700; }
.pgrid__divider::after { content: ""; flex: 1; height: 1px; background: var(--order-line); }
.pgrid__divider span { display: inline-flex; align-items: center; gap: 8px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.card:hover { box-shadow: var(--shadow); border-color: var(--primary-100); }
.card__img { position: relative; aspect-ratio: 1; background: #fff; display: grid; place-items: center; padding: 14px; border-bottom: 1px solid var(--line); }
.card__img img { width: 100%; height: 100%; object-fit: contain; }
.card--order .card__img img { opacity: .92; }
.tag { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; text-transform: uppercase; letter-spacing: .04em; }
.tag--new { background: #16a34a; color: #fff; }
.card__body { display: flex; flex-direction: column; gap: 8px; padding: 14px; flex: 1; }
.card__meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.card__meta .line { background: var(--primary-50); color: var(--primary-h); padding: 1px 8px; border-radius: 99px; font-weight: 600; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sku { font-variant-numeric: tabular-nums; }
.card__title { font-size: 14.5px; font-weight: 600; line-height: 1.35; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__title a { color: var(--text); }
.card__title a:hover { color: var(--primary); }
.card__foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.card__pack { font-size: 12px; color: var(--muted); }

.stock { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.stock i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stock--in { color: var(--ok); }
.stock--order { color: var(--order); }
.price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price__val { font-size: 20px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.price--hidden { font-size: 13px; color: var(--muted); }

.buy { display: flex; gap: 8px; }
.buy__btn { flex: 1; padding: 0 12px; }
.buy.is-in-cart .btn--primary { background: var(--ok); }
.buy.is-in-cart .btn--primary:hover { background: #166534; }
.buy.is-in-cart .btn--order { border-color: var(--order); font-weight: 700; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; height: 40px; overflow: hidden; }
.qty__btn { width: 30px; height: 100%; border: 0; background: transparent; cursor: pointer; font-size: 18px; color: var(--muted); }
.qty__btn:hover { background: var(--surface-2); color: var(--primary); }
.qty__input { width: 46px; height: 100%; border: 0; text-align: center; font-weight: 600; -moz-appearance: textfield; outline: none; }
.qty__input::-webkit-outer-spin-button, .qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy--compact .qty { height: 34px; }
.buy--compact .btn { height: 34px; font-size: 13px; }
.buy--compact .qty__input { width: 40px; }

/* Таблица */
.ptable { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 14px; }
.ptable th { background: var(--surface-2); text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.ptable .th-sort a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.ptable .th-sort a:hover, .ptable .th-sort.is-sorted a { color: var(--primary); }
.ptable .th-sort i { font-style: normal; font-size: 9px; }
.ptable td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ptable tr:last-child td { border-bottom: 0; }
.ptable tbody tr:hover td { background: #fafbff; }
.ptable .num { text-align: right; white-space: nowrap; }
.ptable__img { width: 64px; }
.ptable__img img { width: 48px; height: 48px; object-fit: contain; }
.ptable__name a { color: var(--text); font-weight: 500; }
.ptable__name a:hover { color: var(--primary); }
.ptable__name small { display: block; color: var(--muted); font-size: 12px; }
.ptable__buy { width: 250px; }
.ptable .price__val { font-size: 16px; }
.ptable__divider td { background: var(--order-bg) !important; color: var(--order); font-weight: 700; }
.ptable__divider .ic { margin-right: 8px; }
.ptable td.sku { color: var(--muted); white-space: nowrap; }

.pager { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 28px 0 0; }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-weight: 600; }
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager .is-current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager__gap { border: 0 !important; background: none !important; }

/* ===== Карточка товара ===== */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.product__main { position: relative; aspect-ratio: 1; display: grid; place-items: center; background: #fff; border-radius: 12px; }
.product__main img { width: 100%; height: 100%; object-fit: contain; }
.product__thumbs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.product__thumbs button { width: 72px; height: 72px; padding: 4px; border: 2px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.product__thumbs button.is-active { border-color: var(--primary); }
.product__thumbs img { width: 100%; height: 100%; object-fit: contain; }
.product__title { font-size: 26px; font-weight: 800; }
.product__ids { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 20px; font-size: 14px; }
.product__ids dt { color: var(--muted); font-size: 12px; }
.product__ids dd { margin: 0; font-weight: 600; }
.buybox { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.buybox--order { background: var(--order-bg); border-color: var(--order-line); }
.buybox .price__val { font-size: 32px; }
.buybox__facts { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; color: var(--text-2); font-size: 14px; }
.buybox .buy { max-width: 420px; }
.buybox .qty, .buybox .btn { height: 48px; }
.buybox .qty__input { width: 64px; }
.product__details { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.product__details .panel:only-child { grid-column: 1 / -1; }
.specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs th, .specs td { padding: 9px 0; border-bottom: 1px dashed var(--line); text-align: left; vertical-align: top; }
.specs th { color: var(--muted); font-weight: 500; width: 50%; padding-right: 16px; }

/* ===== Корзина ===== */
.cart { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.cart__blocks { display: grid; gap: 16px; }
.cart__block { padding: 0; overflow: hidden; }
.cart__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cart__head h2 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cart__head h2 small { font-size: 13px; color: var(--muted); font-weight: 500; }
.cart__head > b { font-size: 18px; white-space: nowrap; }
.cart__block--order .cart__head { background: var(--order-bg); }
.cart__eta { margin: 0; padding: 10px 20px; font-size: 14px; color: var(--order); border-bottom: 1px solid var(--order-line); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot--in { background: var(--ok); }
.dot--order { background: var(--order); }
.cart__table { width: 100%; border-collapse: collapse; }
.cart__table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart__table tr:last-child td { border-bottom: 0; }
.cart__table .num { text-align: right; white-space: nowrap; }
.cart__img { width: 72px; padding-left: 20px !important; }
.cart__img img { width: 56px; height: 56px; object-fit: contain; }
.cart__name a { color: var(--text); font-weight: 600; }
.cart__name small { display: block; color: var(--muted); font-size: 12px; }
.cart__name .cart__split { color: var(--order); }
.cart__qty { white-space: nowrap; }
.cart__aside { position: sticky; top: 90px; }
.summary dl { margin: 0 0 16px; }
.summary dl div { display: flex; justify-content: space-between; padding: 6px 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; }
.summary__total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px !important; font-size: 18px; }
.summary__total dd { font-weight: 800; }
.summary__vat { font-size: 13px; padding-top: 0 !important; }
.summary__vat dd { font-weight: 500; color: var(--muted); }

/* ===== Формы ===== */
.form { display: grid; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.field input, .field select, .field textarea { height: 42px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; font-weight: 400; font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field textarea { height: auto; padding: 10px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29, 78, 216, .12); }
.field small { color: var(--muted); font-weight: 400; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field--full { grid-column: 1 / -1; }

.auth { display: grid; place-items: center; padding-top: 48px; }
.auth__box { width: 100%; max-width: 440px; padding: 32px; }
.auth__box--wide { max-width: 680px; }
.auth__box h1 { font-size: 26px; font-weight: 800; }
.auth__links { display: flex; justify-content: space-between; margin-top: 18px; font-size: 14px; gap: 12px; flex-wrap: wrap; }

.success { text-align: center; margin-top: 40px; padding: 40px 28px; }
.success__icon { width: 84px; height: 84px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; margin: 0 auto 16px; }
.success__sum { display: flex; justify-content: center; gap: 28px; margin: 20px 0; flex-wrap: wrap; }
.success__sum dt { color: var(--muted); font-size: 13px; }
.success__sum dd { margin: 0; font-size: 18px; }
.success .hero__cta { justify-content: center; }
.error-code { font-size: 88px; font-weight: 800; color: var(--primary-100); line-height: 1; }

/* ===== Подвал ===== */
.footer { background: #0f1f4d; color: #a5b4fc; font-size: 14px; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 32px; padding-top: 44px; padding-bottom: 32px; }
.footer a { color: #e0e7ff; }
.footer a:hover { color: #fff; }
.footer nav { display: flex; flex-direction: column; gap: 8px; }
.footer__h { color: #fff; font-size: 15px; margin-bottom: 8px; }
.footer__about p { margin-top: 14px; }
.footer__req p { margin: 0 0 8px; }
.footer__req b { color: #fff; }
.footer__bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 18px; padding-bottom: 24px; font-size: 13px; }

/* ===== Тосты ===== */
.toast-wrap { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast { display: flex; gap: 10px; align-items: center; background: #0f172a; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 500; animation: toast-in .25s ease; max-width: 360px; }
.toast a { color: #fcd34d; font-weight: 700; margin-left: auto; }
.toast--error { background: var(--danger); }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }

/* ===== Адаптив ===== */
@media (max-width: 1100px) {
  .benefits { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .cart { grid-template-columns: 1fr; }
  .cart__aside { position: static; }
}
@media (max-width: 900px) {
  .hero__in { grid-template-columns: 1fr; padding-top: 36px; padding-bottom: 36px; }
  .hero h1 { font-size: 32px; }
  .product { grid-template-columns: 1fr; padding: 18px; }
  .product__details { grid-template-columns: 1fr; }
  .header__in { flex-wrap: wrap; gap: 10px; padding-block: 10px; }
  .search { order: 5; flex-basis: 100%; }
  .header__actions { margin-left: auto; }
  .topbar__links { display: none; }
  .logo__text small { display: none; }
}
@media (max-width: 640px) {
  .container { padding-inline: 14px; }
  .page-title { font-size: 22px; }
  .catalog-btn span, .hact span { display: none; }
  .pgrid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card__body { padding: 10px; }
  .buy { flex-direction: column; }
  .buy .qty { width: 100%; justify-content: space-between; }
  .price__val { font-size: 17px; }
  .benefits, .grid2, .footer__grid { grid-template-columns: 1fr; }
  .ptable__img, .ptable th:nth-child(5), .ptable td:nth-child(5) { display: none; }
  .ptable__buy { width: 180px; }
  .hero__stats b { font-size: 22px; }
  .section__head h2 { font-size: 21px; }
  .cart__img { display: none; }
}

@media print {
  .topbar, .header, .catnav, .footer, .toast-wrap { display: none !important; }
}

/* ===== Личный кабинет ===== */
.account { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; padding-top: 24px; }
.acc-nav { position: sticky; top: 96px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; }
.acc-nav__who { display: flex; gap: 10px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); min-width: 0; }
.acc-nav__who div { min-width: 0; }
.acc-nav__who b { display: block; font-size: 14px; line-height: 1.3; }
.acc-nav__who small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-weight: 800; }
.acc-nav nav { display: grid; gap: 2px; }
.acc-nav nav a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 500; }
.acc-nav nav a:hover { background: var(--surface-2); }
.acc-nav nav a.is-active { background: var(--primary-50); color: var(--primary); font-weight: 600; }
.acc-main { min-width: 0; display: grid; gap: 16px; align-content: start; }
.acc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.acc-head .page-title { margin: 0; }
.back { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; color: var(--muted); }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg a { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.seg a.is-active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.toolbar input[type=date] { height: 34px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 8px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.stat b { font-size: 20px; font-weight: 800; }
.stat--accent { background: var(--primary-h); border-color: var(--primary-h); color: #fff; }
.stat--accent small { color: #c7d2fe; }
.status { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.status--new { background: var(--primary-50); color: var(--primary); }
.status--in_work { background: var(--warn-bg); color: #b45309; }
.status--done, .status--paid, .status--ok { background: var(--ok-bg); color: var(--ok); }
.status--overdue { background: var(--danger-bg); color: var(--danger); }
.status--soon { background: var(--warn-bg); color: #b45309; }
.kv { display: grid; gap: 10px; margin: 0; }
.kv div { display: grid; grid-template-columns: 220px 1fr; gap: 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.fset { border: 0; padding: 0; margin: 0 0 8px; }
.fset legend { font-weight: 700; font-size: 16px; margin-bottom: 10px; }

/* Аналитика */
.an-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 240px; padding: 8px 0 26px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0, transparent 52px, var(--line) 52px, var(--line) 53px); }
.bars__col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; outline: none; }
.bars__bar { width: 100%; max-width: 34px; background: var(--primary); border-radius: 4px 4px 0 0; transition: background .15s; min-height: 0; }
.bars__col:hover .bars__bar, .bars__col:focus .bars__bar { background: var(--primary-h); }
.bars__lbl { position: absolute; bottom: -22px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hbars__top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.hbars__track { height: 8px; background: var(--surface-2); border-radius: 4px; margin: 4px 0 2px; overflow: hidden; }
.hbars__fill { height: 100%; background: var(--primary); border-radius: 4px; }
.attention { border-color: var(--order-line); }
.attention h2 { display: flex; gap: 8px; align-items: center; }
.chart-tip { position: fixed; z-index: 300; background: #0f172a; color: #fff; font-size: 13px; padding: 6px 10px; border-radius: 8px; pointer-events: none; white-space: nowrap; box-shadow: var(--shadow); }
[data-sortable] th[data-sort] { cursor: pointer; user-select: none; }
[data-sortable] th[data-sort]::after { content: " ↕"; opacity: .35; }
[data-sortable] th.is-asc::after { content: " ↑"; opacity: 1; }
[data-sortable] th.is-desc::after { content: " ↓"; opacity: 1; }

@media (max-width: 900px) {
  .account { grid-template-columns: 1fr; }
  .acc-nav { position: static; }
  .acc-nav nav { grid-template-columns: repeat(2, 1fr); }
  .an-grid { grid-template-columns: 1fr; }
  .kv div { grid-template-columns: 1fr; gap: 2px; }
  .bars__lbl { display: none; }
}

/* Покупка в карточке-плитке: количество и кнопка в две строки, чтобы ничего не обрезалось */
.card .buy { flex-direction: column; }
.card .buy .qty { width: 100%; justify-content: space-between; }
.card .buy .qty__input { flex: 1; }
.card .buy__btn { width: 100%; }
/* В колонке кнопка не должна сжиматься (flex:1 с нулевой базой схлопывал её по высоте) */
.card .buy__btn { flex: none; }
@media (max-width: 640px) { .buy__btn { flex: none; } .buy { gap: 10px; } }
.field.field--inline { flex-direction: row; font-weight: 500; }
.ptable .stock { align-items: flex-start; }
.ptable .stock i { margin-top: 6px; flex: none; }

/* ===== Мобильная ширина: ничто не должно распирать страницу ===== */
.card, .catcard, .cattree__item, .panel { min-width: 0; }
.card__img img { width: 100%; height: 100%; }
.field--inline select { max-width: 100%; min-width: 0; }
@media (max-width: 640px) {
  html, body { overflow-x: clip; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catgrid, .cattree { grid-template-columns: minmax(0, 1fr); }
  .header__in { flex-wrap: wrap; }
  .logo { flex: 1; min-width: 0; }
  .catalog-btn { padding: 0 12px; }
  .header__actions { margin-left: 0; }
  .hact { padding: 6px 8px; }
  .toolbar__filters { width: 100%; }
  .toolbar__filters .field--inline { flex: 1 1 100%; justify-content: space-between; }
  .toolbar__filters .field--inline select { flex: 1; }
  .card__meta .line { display: none; }
  .buy__btn span { font-size: 13px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -14px; padding-inline: 14px; scrollbar-width: none; }
  .chip { white-space: nowrap; }
}

/* ===== Виджет «Сообщить об ошибке» ===== */
.bugw { position: fixed; left: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 150; display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 10px; }
.bugw__btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 99px; background: rgba(255, 255, 255, .96); color: var(--text-2); font: 600 13px var(--font); box-shadow: var(--shadow); cursor: pointer; }
.bugw__btn:hover, .bugw.is-open .bugw__btn { color: var(--danger); border-color: #fca5a5; }
.bugw__btn .ic { width: 18px; height: 18px; }
.bugw__panel { width: min(340px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 14px; display: grid; gap: 10px; }
.bugw__head { display: flex; justify-content: space-between; align-items: center; }
.bugw__panel textarea { width: 100%; min-height: 110px; resize: vertical; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; font: inherit; }
.bugw__panel textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29, 78, 216, .12); }
@media (max-width: 640px) {
  .bugw { left: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .bugw__btn { width: 42px; height: 42px; padding: 0; justify-content: center; }
  .bugw__btn span { display: none; }
}
@media print { .bugw { display: none !important; } }

/* ===== Окно подтверждения ===== */
.cdlg { border: 0; padding: 0; border-radius: 16px; box-shadow: var(--shadow-lg); width: min(400px, calc(100vw - 32px)); background: var(--surface); color: var(--text); }
.cdlg::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); }
.cdlg[open] { animation: cdlg-in .16s ease-out; }
@keyframes cdlg-in { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.cdlg__box { margin: 0; padding: 22px 22px 18px; display: grid; gap: 18px; }
.cdlg__msg { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 500; white-space: pre-line; }
.cdlg__btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.cdlg__btns .btn { min-width: 110px; }
.cdlg .btn--danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.cdlg .btn--danger:hover { background: #b91c1c; color: #fff; }
@media (max-width: 480px) { .cdlg__btns .btn { flex: 1; } }

/* ===== Кабинет: заказ скорректирован менеджером ===== */
.odiff-tag { display: block; color: #b45309 !important; font-weight: 600; }
.odiff-removed td { color: var(--muted); }
.odiff-note { margin: 0; }

/* ===== Блок подписки на рассылку (кабинет и карточка клиента) ===== */
.subbox__list { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.subbox__list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.subbox__list li:last-child { border-bottom: 0; }
.subbox__list li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.subbox__list small { display: block; font-size: 12px; }

/* ===== Кабинет: условия оплаты и документы ===== */
.payinfo { display: flex; flex-wrap: wrap; gap: 14px 32px; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.payinfo > div { display: grid; gap: 3px; min-width: 0; max-width: 460px; }
.payinfo > div b { font-size: 18px; }
.payinfo__docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.payinfo__docs a { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.payinfo__docs small { display: block; margin-left: 24px; }

/* ===== Новости и статьи ===== */
.news-head { margin: 4px 0 20px; }
.news-head h1 { font-size: 32px; font-weight: 800; }
.news-head h1 small { font-size: 18px; color: var(--muted); font-weight: 600; }
.news-head__lead { max-width: 760px; color: var(--text-2); margin: 0 0 16px; }
.chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip--rss { color: var(--order); }
.chip--rss .ic { width: 16px; height: 16px; }

.ngrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.ncard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s, transform .15s; }
.ncard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.ncard__img { display: block; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.ncard__img img { width: 100%; height: 100%; object-fit: cover; }
.ncard__ph { display: grid; place-items: center; height: 100%; color: var(--line-2); }
.ncard__body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 20px; }
.ncard__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; color: var(--muted); }
.ncard__sec { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--primary); }
.ncard__title { font-size: 18px; font-weight: 700; margin: 0; line-height: 1.3; }
.ncard__title a { color: var(--text); }
.ncard__title a:hover { color: var(--primary); }
.ncard__text { margin: 0; color: var(--text-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

.article-wrap { max-width: 880px; }
.article { padding: 32px 40px 36px; }
.article__head h1 { font-size: 34px; font-weight: 800; margin: 8px 0 12px; }
.article__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.article__lead { font-size: 18px; color: var(--text-2); line-height: 1.6; margin: 0 0 20px; }
.article__cover { margin: 0 0 24px; }
.article__cover img { width: 100%; border-radius: var(--radius-sm); aspect-ratio: 1200 / 630; object-fit: cover; background: var(--surface-2); }
.article__cover figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.article__body { font-size: 16px; }
.article__body img { border-radius: var(--radius-sm); margin: 16px 0; }
.article__body h2, .article__body h3 { scroll-margin-top: 20px; }
.article__body blockquote { margin: 1.2em 0; padding: 12px 18px; border-left: 4px solid var(--primary); background: var(--primary-50); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.article__body table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.article__body th, .article__body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.article__source { margin: 24px 0 0; }
.toc { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 18px; margin: 0 0 24px; }
.toc ol { margin: 8px 0 0; padding-left: 1.3em; }
.toc li { margin: 3px 0; }
.toc .toc__l3 { margin-left: 1em; list-style: circle; font-size: 14px; }
.article__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.article__nav a { display: flex; flex-direction: column; gap: 4px; font-weight: 600; color: var(--text); }
.article__nav a small { color: var(--muted); font-weight: 500; }
.article__nav a:hover { color: var(--primary); }
.article__nav .is-next { text-align: right; }
.topbar__links a.is-active { color: #fff; font-weight: 600; }
@media (max-width: 640px) {
  .news-head h1 { font-size: 26px; }
  .article { padding: 20px 18px 24px; }
  .article__head h1 { font-size: 26px; }
  .article__nav { grid-template-columns: 1fr; }
  .article__nav .is-next { text-align: left; }
}

/* ===== Индивидуальная скидка клиента ===== */
.price--disc .price__val { color: var(--ok); }
.price__old { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.price__badge { display: inline-block; padding: 1px 7px; border-radius: 99px; background: var(--ok-bg); color: var(--ok); font-size: 12px; font-weight: 700; }
.disc-note { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: var(--ok-bg); color: var(--ok); font-size: 13px; font-weight: 600; }
.cart__old { display: block; font-size: 12px; color: var(--muted); }
.summary__disc dt, .summary__disc dd { color: var(--ok); font-weight: 600; }
