/* Публичный оптовый сайт. Адаптивный, без внешних шрифтов и библиотек; поддерживает письмо справа налево. */
:root {
  --ink: #0b1220;
  --ink-2: #1c2740;
  --muted: #5b6575;
  --line: #e4e8ef;
  --bg: #f5f7fb;
  --card: #ffffff;
  --brand: #3b5bfd;
  --brand-2: #14b8a6;
  --brand-ink: #ffffff;
  --stock: #0b7a43;
  --stock-bg: #e3f6ec;
  --days: #92400e;
  --days-bg: #fdf0d8;
  --none: #6b7280;
  --none-bg: #eef0f4;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(11, 18, 32, .06), 0 8px 24px rgba(11, 18, 32, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); }

/* Верх */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .88); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.menu-toggle, .mobile-nav { display: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; font-weight: 800; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.nav { display: flex; gap: 4px; margin-inline-start: 12px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 8px 12px; border-radius: 10px; color: var(--ink-2); font-size: 15px; white-space: nowrap; }
.nav a:hover { background: var(--bg); text-decoration: none; }
.nav a[aria-current="page"] { font-weight: 600; }
.top-tools { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.lang select { max-width: 130px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; }
.cart-link { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; }
.cart-link:hover { text-decoration: none; background: var(--ink-2); }
.cart-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--brand-2); color: #04211d; font-size: 12px; font-weight: 800; }

/* Мобильное меню и связь с менеджером */
.mobile-nav { border-top: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.mobile-nav-links, .mobile-nav-auth { display: grid; }
.mobile-nav a, .mobile-nav button { width: 100%; padding: 13px 16px; border: 0; border-bottom: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; text-align: start; }
.mobile-nav a:hover, .mobile-nav button:hover { background: var(--bg); text-decoration: none; }
.mobile-nav-auth { border-top: 5px solid var(--bg); }
.contact-float { position: fixed; z-index: 18; inset-inline-end: 24px; bottom: 24px; display: grid; justify-items: end; gap: 8px; }
.contact-toggle, .contact-float-single a, .contact-float-single button { display: inline-grid; place-items: center; min-width: 52px; min-height: 52px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--brand); color: #fff; box-shadow: 0 10px 30px rgba(11, 18, 32, .28); font: inherit; font-weight: 700; cursor: pointer; }
.contact-toggle { font-size: 23px; }
.contact-float-single a:hover { text-decoration: none; }
.contact-popover { min-width: 230px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 12px 35px rgba(11, 18, 32, .2); }
.contact-popover { display: none; }
.contact-float.is-open .contact-popover { display: block; }
.contact-popover ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.contact-popover li { display: grid; grid-template-columns: 90px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px; }
.contact-popover a, .contact-popover button { overflow-wrap: anywhere; }

/* Первый экран */
.hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(1000px 420px at 85% -10%, rgba(59, 91, 253, .55), transparent 60%), radial-gradient(800px 380px at 0% 110%, rgba(20, 184, 166, .38), transparent 60%), linear-gradient(180deg, #0b1220, #101a30); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: clamp(48px, 9vw, 104px) 0 clamp(40px, 7vw, 80px); }
.hero-panel { padding: 22px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 22px; background: linear-gradient(160deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04)); backdrop-filter: blur(6px); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.hero-panel ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.hero-panel li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .07); color: #e8eefc; }
.hp-name { font-weight: 700; }
.hp-stock { color: #9fe8da; font-size: 14px; }
.hp-stock strong { color: #fff; font-size: 18px; }
.tag { padding: 2px 9px; border-radius: 999px; background: #eef2ff; color: #3b4fd6; font-weight: 700; font-size: 12px; }
.eyebrow { margin: 0 0 14px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #8fe9dc; }
.hero h1 { font-size: clamp(30px, 5.4vw, 58px); max-width: 18ch; font-weight: 800; }
.lead { margin: 18px 0 0; max-width: 62ch; font-size: clamp(16px, 2vw, 19px); color: #c9d3e6; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 32px 0 0; padding: 0; list-style: none; }
.chips li { padding: 7px 14px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; font-size: 14px; color: #e5ecfb; background: rgba(255, 255, 255, .06); }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 1px solid transparent; border-radius: 12px; font: inherit; font-weight: 650; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 18px rgba(59, 91, 253, .35); }
.btn-primary:hover { background: #2f4bea; }
.btn-light { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .3); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }

/* Разделы */
.sec { padding: clamp(40px, 6vw, 72px) 0; }
.sec-alt { background: #fff; border-block: 1px solid var(--line); }
.sec h2 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 22px; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 22px; }
.tools input, .tools select { min-height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; color: var(--ink); }
.tools input { flex: 1 1 260px; }
.tools select { flex: 0 1 240px; }
.found { margin-inline-start: auto; color: var(--muted); font-size: 14px; }

/* Каталог */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; gap: 12px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.card:hover { transform: translateY(-2px); border-color: #cfd8f5; box-shadow: 0 2px 4px rgba(11, 18, 32, .06), 0 16px 36px rgba(11, 18, 32, .1); }
.card-title { font-size: 18px; }
.card-title a { color: var(--ink); }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: 13px; }
.whs { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.wh { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 10px 12px; background: var(--bg); border-radius: 12px; }
.wh-name { font-weight: 600; font-size: 14px; }
.wh-price { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.badge-stock { background: var(--stock-bg); color: var(--stock); }
.badge-days { background: var(--days-bg); color: var(--days); }
.badge-none { background: var(--none-bg); color: var(--none); }
.price { font-weight: 800; font-size: 16px; }
.price-ask { font-weight: 600; font-size: 14px; color: var(--muted); }
.wholesale { color: var(--muted); font-size: 12.5px; }
.card .btn { margin-top: auto; }
.empty { color: var(--muted); }

/* Тексты */
.narrow p { color: #2b3547; font-size: 17px; }
.terms { margin: 0; padding-inline-start: 22px; display: grid; gap: 12px; color: #2b3547; font-size: 17px; }
.contacts { display: grid; gap: 14px; margin: 0; }
.contacts div { display: grid; grid-template-columns: 160px 1fr; gap: 12px; }
.contacts dt { color: var(--muted); }
.contacts dd { margin: 0; font-weight: 600; }

/* Товар */
.back { display: inline-block; margin-bottom: 14px; color: var(--muted); font-size: 14px; }
.p-title { font-size: clamp(26px, 4vw, 40px); margin-bottom: 6px; }
.sku { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.variant { margin-top: 22px; }
.variant-title { font-size: 18px; margin-bottom: 10px; }
.offer-group-title { margin: 18px 0 8px; font-size: 16px; color: var(--ink-2); }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.offers { width: 100%; border-collapse: collapse; }
.offers th { padding: 12px 16px; text-align: start; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: #fafbfd; border-bottom: 1px solid var(--line); }
.offers td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.offers tr:last-child td { border-bottom: 0; }
.qty-cell { display: flex; gap: 8px; align-items: center; }
.qty { width: 84px; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }

/* Заказ */
.cart-line { display: grid; grid-template-columns: 1fr auto auto; gap: 8px 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line small { display: block; color: var(--muted); }
.cart-line .qty { width: 80px; }
.link-btn { border: 0; background: none; color: var(--muted); cursor: pointer; text-decoration: underline; font: inherit; }
.note { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.order { margin-top: 26px; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: grid; gap: 14px; }
.order h2 { margin: 0; font-size: 22px; }
.field { display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.field input, .field textarea { min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; font: inherit; color: var(--ink); background: #fff; }
.hp { position: absolute; inset-inline-start: -9999px; opacity: 0; height: 0; width: 0; }
.msg { margin: 0; color: #b42318; font-weight: 600; min-height: 1.2em; }
.thanks { margin-top: 26px; padding: 28px; border-radius: var(--radius); background: var(--stock-bg); color: #064e2b; }
.soon { display: grid; place-items: center; min-height: 100vh; margin: 0; background: linear-gradient(180deg, #0b1220, #101a30); color: #fff; font-family: var(--font); text-align: center; }

.foot { padding: 28px 0 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); background: #fff; }

@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 768px) {
  .top-in { gap: 7px; min-height: 56px; }
  .menu-toggle { display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-size: 21px; }
  .top-in > .nav { display: none; }
  .mobile-nav { position: absolute; z-index: 19; top: 100%; inset-inline-start: 0; display: none; width: min(340px, 88vw); max-height: calc(100vh - 56px); max-height: calc(100dvh - 56px); overflow-y: auto; }
  .mobile-nav.is-open { display: block; }
  .brand { min-width: 0; flex: 1 1 auto; gap: 0; font-size: 15px; letter-spacing: -.02em; }
  .brand-mark { display: none; }
  .brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .top-tools { flex: none; gap: 5px; margin-inline-start: 0; }
  .top-tools > [data-customer-login], .top-tools > [data-customer-cabinet], .top-tools > [data-customer-logout] { display: none !important; }
  .lang select { max-width: 80px; padding-inline: 4px; }
  .top-tools .cart-link { padding: 8px 9px; }
  .contact-float { inset-inline-end: 14px; bottom: 84px; }
  .contacts div { grid-template-columns: 1fr; gap: 2px; }
  .offers thead { display: none; }
  .offers, .offers tbody, .offers tr, .offers td { display: block; width: 100%; }
  .offers tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .offers td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border: 0; }
  .offers td > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
  .offers td::before { flex: 0 1 46%; overflow-wrap: anywhere; }
  .offers td::before { content: attr(data-label); color: var(--muted); font-size: 13px; }
  .offers td.qty-cell { justify-content: flex-end; }
  .offers td.qty-cell::before { display: none; }
  .cart-line { grid-template-columns: 1fr auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card { transition: none; }
}

@media (max-width: 380px) {
  .wrap { width: calc(100% - 24px); }
  .top-in { gap: 8px; }
  .lang select { max-width: 92px; padding: 8px 6px; }
  .cart-link { padding: 9px 10px; }
}

/* Конфигуратор «Собери свой»: пошаговый мастер */
.cfg-lead { margin: 0 0 22px; max-width: 70ch; }
.cfg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.cfg-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); color: var(--ink); }
.cfg-card:hover { text-decoration: none; border-color: var(--brand); }
.cfg-card h3 { font-size: 20px; }
.cfg-card p { margin: 0; color: var(--muted); font-size: 15px; }
.cfg-card .btn { margin-top: auto; align-self: flex-start; }
.cfg { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.cfg[hidden], .cfg-form[hidden], .cfg-step[hidden] { display: none !important; }
.cfg-main { display: grid; gap: 16px; min-width: 0; }
.cfg-stepper { display: flex; gap: 8px; margin: 0; padding: 2px 2px 8px; list-style: none; overflow-x: auto; scrollbar-width: thin; }
.cfg-stepper li { flex: none; }
.cfg-step-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px 0 7px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.cfg-step-chip .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--none-bg); color: var(--none); font-size: 13px; font-weight: 700; }
.cfg-step-chip[data-state="done"] .n { background: var(--stock-bg); color: var(--stock); }
.cfg-step-chip[aria-current="step"] { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.cfg-step-chip[aria-current="step"] .n { background: var(--brand); color: #fff; }
.cfg-step-chip:disabled { opacity: .5; cursor: not-allowed; }
.cfg-panel { padding: 24px 24px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.cfg-head h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; font-size: clamp(24px, 3vw, 32px); }
.cfg-kicker { margin: 0 0 6px; color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.cfg-hint { margin: 8px 0 0; font-size: 15px; }
.cfg-badge { padding: 2px 10px; border-radius: 999px; background: var(--none-bg); color: var(--none); font-size: 12px; font-weight: 600; }
.cfg-wait { margin: 16px 0 0; padding: 12px 16px; border-radius: 12px; background: var(--days-bg); color: var(--days); font-size: 14px; }
.cfg-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 20px; }
.cfg-tile { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 96px; padding: 16px; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; transition: border-color .12s ease, box-shadow .12s ease, background .12s ease; }
.cfg-tile:hover { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.cfg-tile:focus-within { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
.cfg-tile input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cfg-tile[data-on] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.cfg-tile[data-on]::after { content: "✓"; position: absolute; top: 12px; inset-inline-end: 12px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 14px; font-weight: 700; }
.cfg-tile-plain { border-style: dashed; background: #fafbfd; }
.cfg-tile-name { padding-inline-end: 30px; font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.cfg-tile-desc { color: var(--muted); font-size: 13px; line-height: 1.4; }
.cfg-tile-price { margin-top: auto; color: var(--brand); font-size: 15px; font-weight: 700; }
.cfg-tile-plain .cfg-tile-price { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.cfg-specs { display: flex; flex-wrap: wrap; gap: 4px; }
.cfg-chip { padding: 1px 9px; border-radius: 999px; background: #eef2ff; color: #3b4fd6; font-size: 12px; font-weight: 600; }
.cfg-extra { display: grid; gap: 14px; margin-top: 18px; }
.cfg-note textarea { min-height: 88px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; font: inherit; }
.cfg-files { display: grid; gap: 8px; padding: 14px; border: 1px dashed var(--brand); border-radius: 14px; background: color-mix(in srgb, var(--brand) 4%, #fff); }
.cfg-files-title { font-weight: 650; }
.cfg-file-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cfg-file-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; overflow-wrap: anywhere; }
.cfg-nav { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 12px; margin: 22px -24px 0; padding: 14px 24px; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); }
.cfg-nav-total { margin-inline-start: auto; text-align: end; line-height: 1.15; }
.cfg-nav-total small { display: block; color: var(--muted); font-size: 12px; }
.cfg-nav-total strong { font-size: 20px; }
.cfg-nav .btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.cfg-review { display: grid; gap: 4px; margin: 18px 0 0; padding: 0; list-style: none; }
.cfg-review li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cfg-review-name { display: grid; gap: 2px; font-weight: 600; overflow-wrap: anywhere; }
.cfg-review-name small { color: var(--muted); font-size: 12px; font-weight: 500; }
.cfg-review-name em { color: var(--muted); font-size: 13px; font-style: normal; font-weight: 400; }
.cfg-review-price { font-weight: 700; white-space: nowrap; }
.cfg-summary { position: sticky; top: 80px; display: grid; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.cfg-summary h2 { margin: 0; font-size: 20px; }
.cfg-lines { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cfg-lines li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.cfg-line-name small { display: block; color: var(--muted); font-size: 12px; }
.cfg-line-price { white-space: nowrap; font-weight: 600; }
.cfg-unit, .cfg-total { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0; }
.cfg-total { padding-top: 10px; border-top: 1px solid var(--line); font-size: 18px; }
.cfg-total strong { font-size: 24px; }
.cfg-qty input { max-width: 160px; }
.cfg-form { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
@media (max-width: 900px) {
  .cfg { grid-template-columns: 1fr; }
  .cfg-summary { position: static; order: 2; }
  .cfg-tiles { grid-template-columns: 1fr; }
  .cfg-panel { padding: 18px 16px 0; }
  .cfg-nav { margin: 18px -16px 0; padding: 12px 16px; }
  .cfg-review li { grid-template-columns: minmax(0, 1fr) auto; }
  .cfg-review li .btn { grid-column: 1 / -1; justify-self: start; }
}
@media (min-width: 901px) { .cfg-stepper { flex-wrap: wrap; overflow: visible; } }

/* Каталог: карточки с фото, компактный вид (по образцу витрин розницы), страница товара с галереей */
.grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 248px), 1fr)); gap: 16px; }
.card { gap: 0; padding: 0; overflow: hidden; }
.card-photo { display: block; aspect-ratio: 1 / 1; background: #fff; border-bottom: 1px solid var(--line); overflow: hidden; }
.card-photo:hover { text-decoration: none; }
.ph-img { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.ph { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(135deg, #14b8a6, #0ea5e9); }
.ph svg { width: 42%; height: 42%; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .18)); }
.ph-apple { background: linear-gradient(135deg, #3b5bfd, #7c3aed); }
.ph-samsung { background: linear-gradient(135deg, #0ea5e9, #2563eb); }
.card-body { display: flex; flex-direction: column; flex: 1; gap: 10px; padding: 14px 16px 16px; }
.card-title { font-size: 16px; line-height: 1.3; }
.card .whs { display: flex; flex-wrap: wrap; gap: 6px; }
.card .wh { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; }
.card .wh-name { font-size: 12.5px; }
.card .badge { padding: 2px 8px; font-size: 11.5px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 4px; }
.card-price { font-size: 16px; font-weight: 800; }
.card .btn { margin-top: 0; }
.p-head { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 28px; align-items: start; margin-bottom: 24px; }
.gallery { display: grid; gap: 10px; }
.gal-main { aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.gal-main img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gal-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.gal-thumb { width: 64px; height: 64px; padding: 0; border: 2px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; cursor: pointer; }
.gal-thumb[aria-current] { border-color: var(--brand); }
.gal-thumb img { width: 100%; height: 100%; object-fit: contain; }
.p-info .sku { margin-bottom: 0; }
.p-specs { margin: 18px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line, #e5e7eb); }
.p-spec { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line, #e5e7eb); }
.p-spec dt { margin: 0; color: var(--muted); font-size: 14px; }
.p-spec dd { margin: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.cfg-tile-photo { display: block; width: 100%; aspect-ratio: 4 / 3; margin-bottom: 4px; border-radius: 10px; background: #fff; object-fit: contain; }
@media (max-width: 760px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-body { padding: 10px 10px 12px; }
  .card-title { font-size: 14px; }
  .card-foot { flex-direction: column; align-items: stretch; }
  .card-foot .btn { width: 100%; }
  .p-head { grid-template-columns: 1fr; }
}

/* Главная: «Собери свой» первым блоком под первым экраном */
.build-sec { padding-top: clamp(36px, 5vw, 60px); background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 100%); }
.build-head { max-width: 760px; margin-bottom: 26px; }
.build-badge { display: inline-block; margin-bottom: 10px; padding: 3px 12px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.build-head h2 { margin-bottom: 10px; font-size: clamp(28px, 4vw, 44px); }
.build-text { margin: 0 0 16px; color: var(--ink-2); font-size: 17px; }
.build-steps { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0; padding: 0; list-style: none; }
.build-steps li { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; }
.build-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 14px; }
.build-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.build-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); color: var(--ink); transition: transform .15s ease, box-shadow .15s ease; }
.build-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 4px 8px rgba(11, 18, 32, .08), 0 20px 40px rgba(11, 18, 32, .12); }
.build-photo { aspect-ratio: 4 / 3; overflow: hidden; background: #fff; }
.build-body { display: flex; flex-direction: column; flex: 1; gap: 8px; padding: 16px; }
.build-body h3 { font-size: 19px; }
.build-body p { margin: 0; color: var(--muted); font-size: 14px; }
.build-body .btn { margin-top: auto; align-self: flex-start; }
.build-note { margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.cfg-review-actions { display: grid; gap: 8px; margin-top: 20px; }
.cfg-added { margin-top: 0; }
.cfg-added-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.reg-note { color: var(--ink-2); }
.cart-cfg { display: grid; gap: 10px; padding: 16px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.cart-cfg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cart-cfg-head small { display: block; color: var(--muted); font-size: 12px; }
.cart-cfg-lines { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.cart-cfg-lines li { display: flex; justify-content: space-between; gap: 10px; }
.cart-cfg-lines small { display: block; color: var(--muted); font-size: 12px; }
.cart-cfg-price { white-space: nowrap; font-weight: 600; }
.cart-cfg-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding-top: 8px; border-top: 1px solid var(--line); }
.build-photo .ph-img { object-fit: cover; }

/* Доверие: факты о компании и стадии заказа с проверками */
.trust-sec { background: #fff; border-block: 1px solid var(--line); }
.trust-sec h2 { margin-bottom: 18px; }
.trust-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 0 0 30px; padding: 0; list-style: none; }
.trust-facts li { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.trust-facts strong { display: block; font-size: 17px; line-height: 1.3; }
.trust-sub { margin: 0 0 16px; font-size: 20px; }
.stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: stage; }
.stage { position: relative; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.stage h3 { margin: 10px 0 6px; font-size: 17px; }
.stage p { margin: 0; color: var(--muted); font-size: 14px; }
.stage-n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--none-bg); color: var(--ink-2); font-weight: 800; font-size: 14px; }
.stage-check { border-color: color-mix(in srgb, var(--brand-2) 55%, var(--line)); background: color-mix(in srgb, var(--brand-2) 7%, #fff); }
.stage-check .stage-n { background: var(--brand-2); color: #fff; }
.trust-cabinet { margin: 20px 0 0; padding: 14px 18px; border-radius: 14px; background: #eef2ff; color: #2b3a8f; font-weight: 600; }
.trust-strip { padding: 18px 0; border-block: 1px solid var(--line); background: #fff; }
.trust-strip .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.trust-strip-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0; padding: 0; list-style: none; flex: 1 1 320px; }
.trust-strip-facts li { padding: 6px 12px; border-radius: 999px; background: var(--bg); font-size: 14px; }
.trust-more { white-space: nowrap; font-weight: 700; }
.sec h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 18px; }
@media (min-width: 769px) and (max-width: 1400px) { .nav { gap: 0; } .nav a { padding: 8px 7px; font-size: 14px; } }
.build-claims { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.build-claims li { padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line)); color: #2b3a8f; font-size: 14px; font-weight: 700; }

/* Личный кабинет клиента */
.cab-nav { background: var(--stock-bg); color: var(--stock); border-color: transparent; }
.cab-order { margin: 22px 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.cab-order header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.cab-order h2 { font-size: 22px; margin: 0; }
.cab-order h3 { margin: 22px 0 10px; font-size: 17px; }
.cab-stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.cab-stages li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--none-bg); color: var(--none); font-size: 14px; font-weight: 600; }
.cab-stages li[data-state="done"] { background: var(--stock-bg); color: var(--stock); }
.cab-stages li[data-state="now"] { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(59, 91, 253, .35); }
.cab-stages em { margin-inline-start: auto; font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.cab-n { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, .55); font-size: 12px; }
.cab-group { margin-bottom: 14px; }
.cab-group h4 { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.cab-items { display: flex; flex-wrap: wrap; gap: 10px; }
.cab-video { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 650; }
.cab-video:hover { text-decoration: none; background: var(--ink-2); }
.cab-photo img { display: block; width: 140px; height: 140px; object-fit: cover; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.cab-note { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--days-bg); color: var(--days); }
.cab-lines { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cab-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; font-size: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.cab-qty, .cab-price { white-space: nowrap; font-weight: 600; }
.cab-total { margin: 14px 0 0; font-size: 18px; text-align: end; }
/* атрибут hidden сильнее любых display у компонентов */
[hidden] { display: none !important; }

.contacts a, .foot-links a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.contacts a:hover, .foot-links a:hover { color: var(--accent, #0b6bcb); }
.foot-links { margin-bottom: 8px; font-weight: 600; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 8px; }
.foot-nav a { color: inherit; }
button.copy { font: inherit; font-weight: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline dotted; text-underline-offset: 3px; }
button.copy.done::after { content: " \2713"; }

/* Строка склада в карточке: название · наличие · цена · MOQ. Пустая цена и пустой MOQ — прочерк, место на виду. */
.card .whs { display: grid; gap: 6px; }
.card .wh { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 4px 10px; border-radius: 12px; padding: 6px 10px; }
.wh-cost, .wh-moq { font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.wh-moq { color: var(--muted); }
.wh-cost.is-empty, .wh-moq.is-empty { color: var(--muted); font-weight: 500; opacity: .7; }
@media (max-width: 520px) { .card .wh { grid-template-columns: minmax(0, 1fr) auto; } .card .wh .wh-cost, .card .wh .wh-moq { justify-self: end; } }

/* Склад в карточке — две строки в ровной сетке: сверху название и наличие, снизу цена и MOQ (пусто — прочерк). */
.card .whs { display: grid; gap: 6px; }
.card .wh { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name badge" "meta meta"; gap: 2px 10px;
  align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--bg); }
.card .wh .wh-name { grid-area: name; font-size: 13px; line-height: 1.25; }
.card .wh .badge { grid-area: badge; justify-self: end; }
.card .wh .wh-meta { grid-area: meta; display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.card-meta { min-height: 28px; align-items: center; }

/* Склады в карточке: первый виден, остальные раскрываются */
.whs:not(.open) .wh-extra { display: none; }
.wh-toggle-row { list-style: none; }
.wh-toggle { font: inherit; font-size: 12.5px; font-weight: 600; color: var(--accent, #2f55ff); background: none; border: 0; padding: 4px 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.whs.filtered .wh-toggle-row, .whs.open .wh-toggle-row.hide-when-filtered { display: list-item; }
/* Итог конструктора и блок «что будет после заказа» */
.cfg-review-skipped { opacity: .72; }
.cfg-review-totals { margin: 14px 0 6px; display: grid; gap: 4px; }
.cfg-review-sum { display: flex; justify-content: space-between; margin: 0; color: var(--muted); }
.after { margin: 18px 0; padding: 16px 18px; background: var(--bg); border-radius: 14px; }
.after h3 { font-size: 16px; margin-bottom: 8px; }
.after ol { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; font-size: 14.5px; }
.warranty p { margin: 0 0 12px; }
.copy-hint { opacity: .6; }
/* Телефон: компактная главная и шкала шагов */
@media (max-width: 520px) {
  .hero h1 { font-size: 26px; max-width: none; }
  .lead { margin-top: 12px; font-size: 15px; }
  .hero { padding-top: 28px; padding-bottom: 28px; }
  .cfg-stepper { scroll-snap-type: x proximity; }
  .cfg-stepper li { scroll-snap-align: center; }
}

/* Фото компонента в итоге и панели «Ваша сборка» */
.cfg-line-photo { width: 44px; height: 44px; border-radius: 8px; object-fit: contain; background: #fff; border: 1px solid var(--line, #e3e8f2); flex: none; }
.cfg-review li, .cfg-lines li { align-items: center; }
.cfg-lines li { gap: 10px; }
.cfg-lines .cfg-line-name { flex: 1; }
/* Спецификация для поставщика */
.spec-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.spec-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 24px; margin: 16px 0 24px; }
.spec-head dt { color: var(--muted); font-size: 13px; }
.spec-head dd { margin: 0; font-weight: 700; }
.spec-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec-table th, .spec-table td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid #e3e8f2; }
.spec-photos { display: flex; gap: 6px; flex-wrap: wrap; min-width: 110px; }
.spec-photo { width: 96px; height: 96px; object-fit: contain; background: #fff; border: 1px solid #e3e8f2; border-radius: 8px; }
.spec-params { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.spec-note { margin: 6px 0 0; padding: 6px 8px; background: #fff7e0; border-radius: 6px; }
.spec-files { padding-inline-start: 18px; }
/* Спецификация на едином листе документа: столбцы по содержимому (фото, параметры), а не равной ширины. */
.aidb-document-sheet-lines.spec-table table { table-layout: auto; min-width: 0; }
.aidb-document-sheet-lines.spec-table th, .aidb-document-sheet-lines.spec-table td { padding: 8px; vertical-align: top; border-bottom: 1px solid #d1d5db; }
.aidb-document-sheet .spec-files { margin: 0; }
.spec-sec .aidb-document-sheet { margin: 0 auto; }
.aidb-document-sheet h2.aidb-document-sheet-subject { margin: 0; font-size: 17px; line-height: 1.3; }
@media screen and (min-width: 701px) { .spec-sec .aidb-document-sheet-titleblock { margin-top: 48px; } }
@media print {
  header.top, footer.foot, .no-print, .nav { display: none !important; }
  body { background: #fff; }
  .spec-sec { padding: 0; }
  .spec-table tr { break-inside: avoid; }
}

/* Количество — над шагами конструктора, чтобы задать его первым */
.cfg-qty-top { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 10px 14px; background: #fff; border: 1px solid var(--line, #e3e8f2); border-radius: 14px; }
.cfg-qty-top span { font-weight: 700; }
.cfg-qty-top input { width: 120px; }

/* Конструктор на телефоне: до первого выбора уходит не больше трети экрана */
@media (max-width: 700px) {
  .cfg-sec { padding-top: 10px; padding-bottom: 20px; }
  .cfg-sec .back { display: none; }
  .cfg-sec .p-title { font-size: 21px; margin: 2px 0 8px; }
  .cfg-lead { display: none; }
  .cfg-qty-top { margin: 0 0 8px; padding: 6px 12px; gap: 10px; border-radius: 12px; }
  .cfg-qty-top span { font-size: 14px; }
  .cfg-qty-top input { width: 96px; min-height: 36px; padding: 4px 10px; }
  .cfg-stepper { gap: 6px; padding: 0 2px 6px; }
  .cfg-step-chip { min-height: 34px; padding: 0 12px 0 5px; gap: 6px; font-size: 13px; }
  .cfg-step-chip .n { width: 24px; height: 24px; font-size: 12px; }
  .cfg-panel { padding: 12px 14px 0; }
  .cfg-kicker { margin-bottom: 2px; font-size: 11.5px; }
  .cfg-head h2 { font-size: 21px; }
  .cfg-head .cfg-hint { margin-top: 4px; }
}

.p-videos { display: grid; gap: 12px; margin-top: 12px; }
.p-video video { width: 100%; max-height: 420px; border-radius: 12px; background: #000; }
.p-video figcaption { font-size: 13px; color: var(--muted, #667); margin-top: 4px; }
.p-video-link { display: inline-block; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; font-weight: 600; }

.login-form { display: grid; gap: 16px; max-width: 520px; padding: 24px; background: #fff; border-radius: 20px; box-shadow: 0 8px 30px rgba(20, 30, 60, .08); }
.login-form .field input { width: 100%; box-sizing: border-box; font-size: 16px; }
.login-form .check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink-2); }
.login-form .check input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.login-form .btn { width: 100%; min-height: 50px; }
.login-form [hidden] { display: none; }
.login-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Валюта показа: настоящая и приблизительная цены остаются рядом и не рвутся в RTL. */
.currency select { min-width: 72px; }
.currency-mobile { display: none; padding: 10px 16px; }
.approx-price { display: inline-block; margin-inline-start: 6px; white-space: nowrap; direction: ltr; unicode-bidi: isolate; color: var(--muted); font-weight: 500; }
.currency-note { max-width: 1180px; margin: 0 auto 24px; padding: 0 20px; color: var(--muted); font-size: 13px; }
@media (max-width: 768px) {
  .top-tools > .currency { display: none; }
  .currency-mobile { display: block; }
}
