@charset "UTF-8";
/* Proteticflo, новый дизайн витрины (предпросмотр: /next.html).
   Подключается после storefront.css: токены ниже перекрашивают и страницы, чьё содержимое не менялось
   (корзина, оформление, кабинет, информационные страницы). Каталог, шапка и карточка изделия переписаны. */

/* ---------- Токены ---------- */
:root {
  color-scheme: light;
  --ink: #0f2438;
  --ink-2: #3a4e62;
  --muted: #56687a;
  --blue: #0d5fd8;              /* акцент: ссылки, рамки, кольца фокуса */
  --primary: #0d5fd8;           /* заливка кнопок и выбранных элементов, текст на ней белый */
  --primary-hover: #0a49a8;
  --accent-text: #0a49a8;       /* акцентный текст на светлых и тонированных фонах */
  --sky: #eaf2fd;
  --sky-line: #cfe0f7;
  --sky-hover: #dbe9fc;
  --line: #dbe3ec;
  --line-strong: #c2cfdc;
  --field-border: #7d91a5;      /* границы полей ввода, не менее 3:1 */
  --canvas: #f3f6fa;
  --surface: #fff;
  --surface-2: #f6f8fb;
  --surface-3: #eef2f6;
  --white: var(--surface);
  --inverse: #0f2438;           /* заливка текущего шага */
  --on-inverse: #fff;
  --deep: #0f2438;              /* подвал и акцентный блок: тёмные в обеих темах */
  --placeholder: #5f7080;
  --disabled-text: #5d6e82;
  --warn-bg: #fff7e0;
  --warn-line: #f0dca5;
  --warn-ink: #6b4700;
  --danger: #a4262c;
  --danger-bg: #fdecec;
  --success: #14663f;
  --success-bg: #e6f6ee;
  --mark-bg: #ffe9a3;
  --photo-ring: rgb(15 36 56 / .08);
  --ring-glow: rgb(13 95 216 / .18);
  --backdrop: rgb(15 36 56 / .55);
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgb(15 36 56 / .06), 0 12px 32px rgb(15 36 56 / .09);
  --banner-h: 34px;
  --header-h: 72px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

/* Тёмная тема: переключатель в шапке, выбор хранится в proteticflo.theme, без выбора используется системная настройка. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e9eff6;
  --ink-2: #bccbda;
  --muted: #94a8bb;
  --blue: #6aa8ff;
  --primary: #2a6ade;
  --primary-hover: #2260c8;
  --accent-text: #9cc4ff;
  --sky: #15304d;
  --sky-line: #254a73;
  --sky-hover: #1b3d63;
  --line: #263a4d;
  --line-strong: #3a536b;
  --field-border: #6283a3;
  --canvas: #0b1622;
  --surface: #121f2e;
  --surface-2: #172636;
  --surface-3: #1e3045;
  --inverse: #e9eff6;
  --on-inverse: #0b1622;
  --deep: #07111b;
  --placeholder: #8497aa;
  --disabled-text: #7d91a5;
  --warn-bg: #2b2412;
  --warn-line: #5a4a1c;
  --warn-ink: #f2d98d;
  --danger: #ff8a8f;
  --danger-bg: #3a1d22;
  --success: #7fd6a4;
  --success-bg: #12301f;
  --mark-bg: rgb(255 214 102 / .3);
  --photo-ring: rgb(255 255 255 / .1);
  --ring-glow: rgb(106 168 255 / .28);
  --backdrop: rgb(2 8 14 / .72);
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 12px 32px rgb(0 0 0 / .45);
}

/* ---------- Основа ---------- */
html { scroll-padding-top: calc(var(--banner-h) + var(--header-h) + 24px); }
body { font: 16px/1.55 var(--font); background: var(--canvas); font-variant-numeric: lining-nums; }
button, input, select, textarea { font-family: inherit; }
h1, h2, h3 { letter-spacing: -.02em; }
h1 { font-size: clamp(26px, 2.4vw, 34px); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.heading-dot { display: none; }
#main:focus { outline: none; }
.container { width: min(1360px, calc(100% - 64px)); }
.sku { font-size: 13px; font-weight: 600; color: var(--accent-text); }
.eyebrow { font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.breadcrumb { font-size: 13px; color: var(--muted); }
.page-view { padding-bottom: 72px; }

/* ---------- Кнопки и общие элементы ---------- */
.button { min-height: 44px; padding: 10px 18px; border-radius: 10px; font-size: 14px; gap: 8px; }
.button .icon { width: 18px; height: 18px; }
.button-primary { background: var(--primary); }
.button-primary:hover { background: var(--primary-hover); }
.button-secondary { background: var(--sky); color: var(--accent-text); border-color: var(--sky-line); }
.button-secondary:hover { background: var(--sky-hover); color: var(--accent-text); }
.text-button { font-size: 14px; }
.small-note, .order-summary > .small-note { font-size: 13px; }
.notice { font-size: 13px; border-radius: 10px; }
.badge { font-size: 12px; }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; font-size: 22px; }
.icon-button .icon { width: 20px; height: 20px; }
.quantity-control { background: var(--surface); border-color: var(--field-border); border-radius: 10px; }
.quantity-control button { width: 38px; height: 44px; font-size: 18px; }
.quantity-control input { width: 52px; height: 44px; font-size: 15px; }
.cart-count {
  position: static; min-width: 22px; height: 22px; margin-left: 2px; border: 0; border-radius: 11px;
  font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; background: var(--primary); color: #fff; padding: 0 6px;
}
.empty-state { border-radius: var(--radius-lg); }
.empty-symbol .icon { width: 28px; height: 28px; }

/* Страницы со старой разметкой: ничего мельче 12 px. */
.totals > div, .sample-data dl { font-size: 14px; }
.choice strong { font-size: 15px; }
.choice small, .checkout-item small, .cart-item-unit, .tariff-note, .demo-ref, .cart-remove, .summary-foot, .filter-note { font-size: 12px; }
.checkout-item .sku, .cart-item .sku { font-size: 12px; }
.checkout-item strong { font-size: 14px; }
.cart-item h3 { font-size: 15px; }
.cart-item .selection-label { font-size: 13px; }
.account-tabs button, .account-status { font-size: 14px; }
.carrier-panel .field-label { font-size: 12px; }
.quick-result { font-size: 13px; }
.quick-result strong { font-size: 14px; }
.quick-result p, .quick-result .text-button { font-size: 13px; }

/* ---------- Плашка и шапка ---------- */
.demo-banner {
  height: var(--banner-h); min-height: 0; padding: 0 16px; font-size: 13px; background: #12304a; color: #e6f1fb;
  white-space: nowrap; overflow: hidden;
}
.demo-banner > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.nx-header {
  position: sticky; top: var(--banner-h); z-index: 29; background: var(--white); border-bottom: 1px solid var(--line);
}
.nx-header-row { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.nx-header .brand { font-size: 26px; }
.nx-header .brand-mark { font-size: 33px; height: 40px; }
.nx-header .brand-caption { font-size: 12px; margin-top: 6px; letter-spacing: .02em; }

.nx-search {
  position: relative; flex: 1 1 auto; min-width: 0; max-width: 720px; height: 48px; padding: 0 14px;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1.5px solid var(--field-border); border-radius: 12px;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.nx-search:hover { border-color: var(--muted); }
.nx-search:focus-within { background: var(--surface); border-color: var(--blue); box-shadow: 0 0 0 4px var(--ring-glow); }
.nx-search .icon { color: var(--muted); }
.nx-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; font-size: 16px; }
.nx-search input::placeholder { color: var(--placeholder); }
.nx-search kbd { width: 24px; height: 24px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--muted); font: 13px/22px var(--font); text-align: center; }
.nx-search:focus-within kbd { display: none; }

.nx-suggest {
  position: absolute; z-index: 5; left: -1.5px; right: -1.5px; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none;
  max-height: min(70vh, 480px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.nx-suggest-item {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 8px 10px; border-radius: 10px; cursor: pointer;
}
.nx-suggest-item:hover { background: var(--sky); }
.nx-suggest-item[aria-selected="true"] { background: var(--sky); outline: 2px solid var(--blue); outline-offset: -2px; }
.nx-suggest-item img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.nx-suggest-text { min-width: 0; }
.nx-suggest-sku { display: block; font: 600 13px/1.4 var(--mono); color: var(--accent-text); }
.nx-suggest-name { display: block; overflow: hidden; font-size: 13px; color: var(--ink-2); text-overflow: ellipsis; white-space: nowrap; }
.nx-suggest-price { font-size: 14px; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nx-suggest mark { background: var(--mark-bg); color: var(--ink); border-radius: 3px; padding: 0 1px; }
.nx-suggest-all { display: block; text-align: center; font-size: 14px; font-weight: 600; color: var(--accent-text); }

.nx-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nx-action {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px;
  background: none; font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap;
}
.nx-action:hover { background: var(--sky); color: var(--accent-text); }
.nx-action .icon { width: 22px; height: 22px; }

.nx-subnav { background: var(--surface); border-bottom: 1px solid var(--line); }
.nx-subnav-row { display: flex; align-items: center; gap: 28px; min-height: 48px; }
.nx-subnav .nav-link { height: 48px; font-size: 14px; font-weight: 500; color: var(--ink-2); flex-shrink: 0; }
.nx-subnav .nav-link:hover { color: var(--accent-text); }
.nx-subnav .nav-link.active { color: var(--accent-text); font-weight: 650; }
.nx-subnav .nav-link.active:after { bottom: 0; height: 3px; border-radius: 3px 3px 0 0; }
.nx-phone { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.nx-phone strong { color: var(--ink); font-weight: 650; }
.nx-phone .icon { width: 18px; height: 18px; }
.nx-mobile-only { display: none; }

/* ---------- Каталог ---------- */
.nx-catalog-head { padding: 28px 0 24px; }
.nx-catalog-head .page-description { max-width: 760px; margin-top: 8px; font-size: 16px; color: var(--ink-2); }
.nx-catalog-head strong { font-weight: 650; color: var(--ink); }
.nx-layout { display: grid; grid-template-columns: 296px minmax(0, 1fr); gap: 32px; align-items: start; }
.catalog-results { min-width: 0; }

.nx-filters {
  position: sticky; top: calc(var(--banner-h) + var(--header-h) + 16px);
  max-height: calc(100dvh - var(--banner-h) - var(--header-h) - 32px); overflow: auto;
  padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.nx-filters-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; margin-bottom: 18px; }
.nx-filters-head h2 { font-size: 18px; }
.nx-reset { white-space: nowrap; font-weight: 600; }
.filter-fields { display: block; }
.nx-facet { min-width: 0; margin: 0 0 18px; padding: 0; border: 0; }
.nx-facet legend { margin: 0 0 10px; padding: 0; font-size: 13px; font-weight: 650; color: var(--ink-2); }
.nx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nx-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 8px 0 14px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink); font-size: 14px; font-weight: 500;
  transition: background-color .15s, border-color .15s, color .15s;
}
.nx-chip:hover:not(:disabled) { border-color: var(--blue); background: var(--sky); }
.nx-chip-count {
  min-width: 24px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--muted);
  font-size: 12px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums;
}
.nx-chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.nx-chip[aria-pressed="true"] .nx-chip-count { background: rgb(255 255 255 / .22); color: #fff; }
.nx-chip:disabled { background: var(--surface-2); border-style: dashed; color: var(--disabled-text); cursor: not-allowed; opacity: 1; }
.filter-note { padding-top: 16px; font-size: 12px; color: var(--muted); line-height: 1.6; }

.nx-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 14px; }
.nx-result-info strong { font-size: 18px; font-weight: 650; }
.toolbar-note { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.nx-toolbar-controls { display: flex; align-items: center; gap: 12px; }
.nx-sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.nx-sort select {
  height: 44px; padding: 0 12px; background: var(--surface); border: 1px solid var(--field-border); border-radius: 10px; color: var(--ink); font-size: 14px;
}
.nx-filter-button {
  display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  background: var(--sky); border: 1px solid var(--sky-line); border-radius: 10px; color: var(--accent-text); font-size: 14px; font-weight: 600;
}
.view-switch { padding: 3px; border-color: var(--line-strong); border-radius: 10px; }
.view-switch button { width: 40px; height: 38px; border-radius: 7px; background: transparent; color: var(--muted); }
.view-switch button[aria-pressed="true"] { background: var(--sky); color: var(--accent-text); }

.active-filters { gap: 8px; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 8px 0 12px;
  background: var(--sky); border: 1px solid var(--sky-line); border-radius: 999px; color: var(--accent-text); font-size: 13px; font-weight: 500; text-align: left;
}
.filter-chip:hover { background: var(--sky-hover); }
.filter-chip .icon { width: 16px; height: 16px; }

.nx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 16px; }
.nx-card {
  display: grid; grid-template-columns: 116px minmax(0, 1fr); grid-template-areas: "media body" "foot foot"; gap: 14px 16px;
  min-width: 0; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: border-color .15s, box-shadow .15s;
}
.nx-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.nx-card-media {
  grid-area: media; align-self: start; width: 116px; height: 116px; padding: 0; overflow: hidden;
  background: var(--surface-3); border: 0; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--photo-ring);
}
.nx-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nx-card-body { grid-area: body; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.nx-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.nx-tag { padding: 2px 8px; background: var(--surface-3); border-radius: 6px; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.nx-card-title { margin: 0; font-size: 15px; line-height: 1.4; font-weight: 600; letter-spacing: -.005em; }
.nx-card-title button {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
  padding: 0; background: none; border: 0; color: var(--ink); font: inherit; letter-spacing: inherit; text-align: left;
}
.nx-card-title button:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.nx-specs { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 4px 0 0; }
.nx-specs > div { min-width: 0; }
.nx-specs dt { font-size: 12px; color: var(--muted); }
.nx-specs dd { margin: 0; font-size: 14px; font-weight: 600; }
.nx-card-foot { grid-area: foot; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.price { font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price small { font-size: 13px; font-weight: 500; color: var(--muted); }
.price-note { margin-top: 2px; font-size: 12px; color: var(--muted); }
.nx-card-action { white-space: nowrap; }

.product-table-wrap { border-color: var(--line); border-radius: var(--radius-lg); }
.product-table { min-width: 860px; font-size: 14px; }
.product-table th { padding: 12px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.product-table td { padding: 12px; }
.product-table .price-note { max-width: 120px; white-space: normal; }
.product-table tbody tr:hover { background: var(--surface-2); }
.product-table .sr-only-cell { width: 1px; padding: 0; overflow: hidden; white-space: nowrap; font-size: 0; }
.table-product { max-width: none; min-width: 300px; }
.table-product button { margin: 2px 0 0; font-size: 14px; line-height: 1.45; }
.product-table td:nth-child(n+2):nth-child(-n+5) { white-space: nowrap; }
.table-product img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.nx-empty-cell { color: var(--muted); }
.card-open {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  background: var(--sky); border: 1px solid var(--sky-line); border-radius: 10px; color: var(--accent-text); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.card-open .icon { width: 16px; height: 16px; }
.card-open:hover { background: var(--sky-hover); }

.nx-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.nx-empty p { max-width: 460px; margin-inline: auto; }
.catalog-footnote { max-width: 700px; margin-top: 24px; font-size: 13px; color: var(--muted); }

/* ---------- Диалоги ---------- */
dialog { border: 0; border-radius: 20px; padding: 24px; box-shadow: 0 32px 100px rgb(15 36 56 / .35); }
dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(3px); }
.dialog-header .eyebrow { margin: 0; }

.nx-product-dialog { width: min(980px, calc(100vw - 32px)); padding: 0; }
.nx-product-dialog .dialog-header {
  position: sticky; top: 0; z-index: 2; margin: 0; padding: 14px 24px; background: var(--surface); border-bottom: 1px solid var(--line);
}
#product-detail { padding: 24px; }
.nx-detail { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 24px 36px; align-items: start; }
.nx-detail-side, .nx-detail-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.nx-detail-photo img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--photo-ring); }
.nx-detail-photo p { margin-top: 10px; font-size: 13px; color: var(--muted); }
.nx-detail-photo a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.nx-detail-title { margin: 0; font-size: 26px; line-height: 1.3; }
.nx-attrs { display: grid; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.nx-attrs > div { display: grid; gap: 2px; padding: 8px 14px; }
.nx-attrs > div:nth-child(odd) { background: var(--surface-2); }
.nx-attrs dt { font-size: 12px; color: var(--muted); }
.nx-attrs dd { margin: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.nx-detail-main .small-note { margin: 0; }
.nx-detail-purchase { min-width: 0; padding: 20px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.nx-detail-price .price { font-size: 32px; }
.nx-detail-price p { margin-top: 4px; font-size: 13px; color: var(--muted); }
.nx-form { display: grid; gap: 12px; margin-top: 18px; }
.nx-variants { display: flex; flex-wrap: wrap; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.nx-variants legend { margin-bottom: 8px; padding: 0; font-size: 13px; font-weight: 650; }
.nx-variant {
  flex: 1 1 150px; display: flex; align-items: flex-start; gap: 10px; min-height: 56px; padding: 12px 14px;
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--radius); cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.nx-variant:hover { border-color: var(--blue); }
.nx-variant:has(input:checked) { background: var(--sky); border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.nx-variant:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
.nx-variant input:focus-visible { outline: none; }
.nx-variant input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--blue); flex-shrink: 0; }
.nx-variant strong { display: block; font-size: 14px; line-height: 1.35; }
.nx-variant small { display: block; margin-top: 2px; font: 12px var(--mono); color: var(--muted); }
.nx-form .small-note { margin: 0; }
.nx-add-row { display: flex; align-items: flex-end; gap: 12px; }
.nx-add-row .button { flex: 1; min-height: 48px; }
.nx-qty .field-label { margin-bottom: 6px; font-size: 13px; }
.nx-detail-error { margin: 0; font-size: 14px; color: var(--danger); }
.nx-detail-error:empty { display: none; }

.nx-sheet { width: min(560px, 100vw); max-width: 100vw; margin: auto auto 0; padding: 0; border-radius: 20px 20px 0 0; max-height: 90dvh; }
.nx-sheet[open] { display: flex; flex-direction: column; }
.nx-sheet .dialog-header { margin: 0; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.nx-sheet .dialog-header h2 { font-size: 20px; }
.nx-sheet #mobile-filter-slot { flex: 1; min-height: 0; overflow: auto; padding: 20px; }
.nx-sheet .nx-filters { position: static; max-height: none; overflow: visible; padding: 0; border: 0; }
.nx-sheet .nx-filters-head h2 { display: none; }
.nx-sheet .nx-filters-head { justify-content: flex-end; min-height: 0; margin-bottom: 8px; }
.nx-sheet .nx-chip { min-height: 44px; }
.nx-sheet-foot { padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.nx-sheet-foot .button { min-height: 48px; }

.toast { font-size: 14px; }

/* ---------- Старые правила на токенах (обе темы) ---------- */
::selection { background: var(--sky-hover); color: var(--ink); }
.skip-link { background: var(--surface); color: var(--ink); }
.breadcrumb { color: var(--muted); }
.breadcrumb span { color: var(--muted); }
.button-quiet { color: var(--ink-2); }
.view-switch, .product-table-wrap { background: var(--surface); }
.icon-button { background: var(--surface); border-color: var(--line); color: var(--ink); }
.icon-button:hover { background: var(--sky); }
.summary-foot, .catalog-footnote { color: var(--muted); }
.empty-state { background: var(--surface); border-color: var(--line-strong); }
.empty-symbol { background: var(--sky); color: var(--accent-text); }
.quantity-control button { background: var(--surface-3); color: var(--ink); }
.quantity-control button:hover { background: var(--sky-hover); }
.quantity-control input { background: var(--surface); color: var(--ink); border-inline-color: var(--line); }
.notice { background: var(--sky); border-color: var(--sky-line); color: var(--ink-2); }
.notice.error { background: var(--danger-bg); border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.badge { background: var(--surface-3); border-color: var(--line); color: var(--ink-2); }
.account-card, .info-card, .why-card, .faq details, .project-card, .project-next { background: var(--surface); }
.faq-body p, .faq-body ul, .info-docs ul { color: var(--ink-2); }
.quick-line-number { background: var(--surface-3); color: var(--muted); }
.quick-dialog textarea { background: var(--surface-2); color: var(--ink); }
.carrier-panel input[type=search], .carrier-panel select, .carrier-suggest { background: var(--surface); color: var(--ink); }
.carrier-suggest button { color: var(--ink); }
.carrier-suggest button:hover, .carrier-suggest button:focus-visible { background: var(--sky); }
.project-intro { background: var(--sky); border-color: var(--sky-line); }
.project-intro p { color: var(--ink-2); }
.project-status { background: var(--surface-3); color: var(--ink-2); }
.project-status.ready { background: var(--success-bg); color: var(--success); }
.payment-brand { color: var(--accent-text); }
.payment-return { background: var(--surface); }
.payment-state { background: var(--sky); color: var(--accent-text); }
dialog { background: var(--surface); color: var(--ink); }
.global-notice { margin-top: 20px; }

/* ---------- Переключатель темы ---------- */
.nx-theme .icon { width: 22px; height: 22px; }
:root[data-theme="dark"] .nx-theme-moon, :root:not([data-theme="dark"]) .nx-theme-sun { display: none; }
.nx-theme-subnav { display: none; }

/* ---------- Подвал ---------- */
.site-footer { padding: 40px 0; }
.footer-content { font-size: 14px; color: var(--muted); }
.footer-content strong { color: var(--ink-2); }
.footer-content p { line-height: 1.7; }
.footer-content > a { font-size: 14px; color: var(--accent-text); }
.footer-info { font-size: 14px; color: var(--ink-2); }
.footer-info h3 { font-size: 12px; color: var(--muted); }
.footer-info a { color: var(--accent-text); }
.footer-legal { font-size: 12px; color: var(--muted); }

/* ---------- Адаптивность ---------- */
@media (max-width: 1100px) {
  .nx-action-label {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
  .nx-action { position: relative; padding: 0 10px; }
  .nx-action-cart .cart-count { position: absolute; top: 2px; right: 0; }
  .nx-header .brand-caption { display: none; }
}

@media (max-width: 900px) {
  :root { --banner-h: 30px; --header-h: 64px; }
  .container { width: calc(100% - 40px); }
  .demo-banner { font-size: 12px; padding: 0 12px; }
  .nx-wide-only { display: none; }
  .nx-header-row { gap: 12px; }
  .nx-actions { margin-left: 0; }
  .nx-action-quick, .nx-action-account { display: none; }
  .nx-mobile-only { display: flex; }
  .nx-subnav-row { gap: 24px; overflow-x: auto; scrollbar-width: none; }
  .nx-subnav-row::-webkit-scrollbar { display: none; }
  .nx-phone { display: none; }
  .nx-catalog-head { padding: 20px 0 16px; }
  .nx-catalog-head .page-description { font-size: 15px; }
  .nx-layout { grid-template-columns: minmax(0, 1fr); }
  #filter-dock { display: none; }
  .nx-filter-button { display: inline-flex; }
  .nx-toolbar-controls { flex: 1 1 100%; }
  .nx-sort { flex: 1; min-width: 0; }
  .nx-sort-caption { display: none; }
  .nx-sort select { width: 100%; min-width: 0; }
  .nx-filters { position: static; max-height: none; }
  .nx-product-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .nx-product-dialog[open] { display: flex; flex-direction: column; }
  .nx-product-dialog .dialog-header { flex-shrink: 0; padding: 10px 16px; }
  #product-detail { flex: 1; min-height: 0; overflow: auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
  .nx-detail { display: flex; flex-direction: column; gap: 14px; }
  .nx-detail-side, .nx-detail-main { display: contents; }
  .nx-detail-photo { order: 0; display: flex; align-items: center; gap: 14px; }
  .nx-detail-photo img { width: 112px; flex-shrink: 0; }
  .nx-detail-photo p { margin: 0; }
  .nx-detail-main > .sku { order: 1; margin-bottom: -8px; }
  .nx-detail-title { order: 2; font-size: 21px; }
  .nx-detail-main > .notice { order: 3; }
  .nx-detail-purchase { order: 4; padding: 16px; }
  .nx-attrs { order: 5; }
  .nx-detail-main > .small-note { order: 6; }
}

@media (max-width: 640px) {
  .container { width: calc(100% - 32px); }
  .nx-theme-header { display: none; }
  .nx-theme-subnav {
    display: flex; order: -1; align-items: center; justify-content: center; align-self: center; width: 44px; height: 40px; margin-right: -8px; padding: 0;
    border: 1px solid var(--line-strong); border-radius: 10px;
  }
  .nx-theme-subnav .nx-theme-text { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .nx-header .brand-text { display: none; }
  .nx-header .brand-mark { padding-right: 4px; }
  .nx-search { height: 46px; padding: 0 12px; }
  .nx-search kbd { display: none; }
  .nx-subnav .nav-link { font-size: 14px; }
  .nx-card { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .nx-card-media { width: 84px; height: 84px; border-radius: 10px; }
  .nx-tag { display: none; }
  .nx-card-foot { flex-wrap: nowrap; padding-top: 12px; }
  .nx-card-action { padding: 0 14px; min-width: 0; }
  .nx-card-action .icon { display: none; }
  .price { font-size: 20px; }
  .nx-add-row { flex-wrap: wrap; }
  .nx-add-row .nx-qty { flex: 1 1 100%; }
  .nx-detail-price .price { font-size: 28px; }
}
