:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f6f7f9;
  --line: #dfe3e8;
  --line-strong: #c5ccd4;
  --text: #13202e;
  --muted: #5b6876;
  --navy: #0b2540;
  --accent: #e8561f;
  --accent-hover: #c9461a;
  --link: #1d4f91;
  --green: #1d6b3a;
  --teal: #0e6870;
  --amber: #8a5a00;
  --blue: #1d4f91;
  --grey: #5b6876;
  --danger: #b3261e;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

svg { display: inline-block; vertical-align: middle; max-width: 100%; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1, h2, h3 {
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 8px;
}

h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h2 { font-size: 1.35rem; font-weight: 700; }

h2::before {
  content: "";
  display: block;
  width: 24px;
  height: 3px;
  margin-bottom: 10px;
  background: var(--accent);
  border-radius: 0;
}

h3 { font-size: 1.1rem; font-weight: 700; }

p { margin: 0 0 10px; }

/* Шапка */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding-top: 10px;
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: var(--navy);
}
.brand-mark svg { width: 100%; height: 100%; }
.brand-mark .accent { color: var(--accent); }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  color: var(--navy);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 18px;
}

.brand-tagline { font-size: 12px; color: var(--muted); }

.site-nav { display: flex; gap: 20px; flex-wrap: wrap; }

.site-nav a {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--accent);
  text-decoration: none;
}

#app {
  min-height: calc(100vh - 140px);
  padding: 28px 16px 56px;
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  padding: 24px 0;
}
.site-footer a { color: var(--muted); }

.loading, .muted { color: var(--muted); }

.block { margin-top: 44px; }

/* Сетки и карточки */

.grid { display: grid; gap: 16px; }
.cat-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.product-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.dir-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 12px; }
.dir-art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  color: var(--navy);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 6px;
}
a.card:hover .dir-art { color: var(--accent); }
.dir-grid .category-tile { padding: 16px; gap: 8px; }
.dir-grid .category-tile h3 { font-size: 0.98rem; overflow-wrap: normal; hyphens: auto; }
.dir-grid .category-tile p { font-size: 0.85rem; line-height: 1.4; overflow-wrap: break-word; hyphens: auto; }
.dir-grid .category-tile .muted { font-size: 12px; }

/* Всегда 5 в ряд, 2 ряда; на узких экранах карточки компактнее */
@media (max-width: 1000px) {
  .dir-grid { gap: 8px; }
  .dir-grid .category-tile { padding: 12px; }
  .dir-grid .category-tile p { display: none; }
  .dir-grid .category-tile h3 { font-size: 0.9rem; }
  .dir-grid .cat-icon { width: 32px; height: 32px; }
}

/* Телефон: те же 2 ряда по 5, прокрутка вбок */
@media (max-width: 640px) {
  .dir-grid {
    grid-template-columns: none;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    grid-auto-columns: 150px;
    overflow-x: auto;
    padding-bottom: 6px;
  }
}

.three { grid-template-columns: repeat(3, 1fr); }
.two { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

a.card { color: inherit; }
a.card:hover { border-color: var(--navy); text-decoration: none; }

.cat-icon {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
}
.cat-icon svg { width: 22px; height: 22px; }

.category-tile h3 { font-size: 1.1rem; }
.category-tile p { color: var(--muted); font-size: 0.95rem; }
.category-tile .muted {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 13px;
}

.product-card h3 { font-size: 1.05rem; }
.product-card .pn {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 14px;
}
.product-card .card-meta { margin-top: auto; }
.product-card .price { font-size: 1.2rem; }
.product-card .button { margin-top: 4px; }

/* Первый экран */

.hero {
  background-color: var(--surface);
  background-image:
    linear-gradient(rgba(11, 37, 64, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 37, 64, 0.028) 1px, transparent 1px);
  background-size: 24px 24px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 36px 28px;
}

.subline { color: var(--muted); font-size: 1.08rem; }
.page .subline { margin-bottom: 18px; }

.search-form { margin: 18px 0 0; max-width: 760px; }

.search-form input {
  height: 52px;
  padding: 0 16px;
  font-size: 1.02rem;
}

.search-results { margin-top: 16px; }

/* Кнопки */

.button {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 0;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  font-family: inherit;
  text-align: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.button:hover { text-decoration: none; }

.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.button-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.button-secondary {
  background: var(--bg);
  border-color: var(--line-strong);
  color: var(--navy);
}
.button-secondary:hover,
a.card:hover .button-secondary {
  border-color: var(--navy);
  background: var(--surface);
}

.button[disabled] { opacity: 0.6; cursor: not-allowed; }

/* Метки состояния */

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  background: color-mix(in srgb, currentColor 8%, transparent);
}
.badge.new { color: var(--green); }
.badge.teal { color: var(--teal); }
.badge.amber { color: var(--amber); }
.badge.blue { color: var(--blue); }
.badge.grey { color: var(--grey); }

.notice {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0;
  padding: 14px 16px;
  margin: 16px 0;
}
.notice strong { color: var(--navy); }
.notice.error {
  background: color-mix(in srgb, var(--danger) 8%, var(--bg));
  border-left-color: var(--danger);
  color: var(--danger);
}

/* Шаги и призыв */

.step {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.step h3 { font-size: 1.05rem; }

.step-num {
  display: inline-flex;
  width: 28px;
  height: 28px;
  background: var(--navy);
  color: #fff;
  border-radius: 0;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--mono);
  font-size: 14px;
}

.cta {
  background: var(--navy);
  border-radius: 0;
  padding: 28px 24px;
}
.cta h2 { color: #fff; }
.cta .subline { color: #c9d4e0; }

/* Формы */

.form-row { margin-bottom: 12px; }

label {
  font-weight: 600;
  font-size: 14px;
  color: var(--navy);
  display: grid;
  gap: 6px;
}

input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-weight: 400;
}

input::placeholder, textarea::placeholder { color: var(--muted); }

input:focus, textarea:focus, select:focus {
  border-color: var(--navy);
  outline: 3px solid color-mix(in srgb, var(--accent) 25%, transparent);
  outline-offset: 0;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px;
  margin: 0 0 12px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

fieldset legend {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  padding: 0 4px;
}

fieldset input[type="radio"] { width: auto; }

fieldset label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.form-status .success,
.form-status .error {
  padding: 12px;
  border-radius: 0;
}
.form-status .success {
  background: color-mix(in srgb, var(--green) 8%, var(--bg));
  color: var(--green);
  border: 1px solid color-mix(in srgb, var(--green) 25%, transparent);
}
.form-status .error {
  background: color-mix(in srgb, var(--danger) 8%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent);
}

.error { color: var(--danger); }

.breadcrumb { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--link); }

.narrow { max-width: 720px; }

/* Направление: разделы слева, товары справа */

.catalog-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}
.catalog-layout > * { min-width: 0; }

.catalog-side {
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--bg);
}

.side-title {
  display: block;
  padding: 14px 16px;
  font-weight: 700;
  color: var(--navy);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.side-title:hover { text-decoration: none; }
.side-title[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); }

.branch-list { list-style: none; margin: 0; padding: 0; }
.branch-list li + li { border-top: 1px solid var(--line); }

.branch-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text);
}
.branch-list a:hover { background: var(--surface); text-decoration: none; }
.branch-list a[aria-current="page"] {
  background: var(--surface);
  box-shadow: inset 3px 0 0 var(--accent);
  font-weight: 600;
  color: var(--navy);
}

.branch-count {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  flex-shrink: 0;
}

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: 0;
  padding: 28px 24px;
  background: var(--surface);
}

@media (max-width: 800px) {
  .catalog-layout { grid-template-columns: 1fr; gap: 20px; }
}

.search-panel {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0;
  padding: 16px 20px;
  background: var(--surface);
}
.search-panel p { margin-bottom: 0; }

/* Поиск у поставщиков */

.lookup-form { display: flex; gap: 8px; }
.lookup-form input { flex: 1; min-width: 0; }
.lookup-form .button { height: 52px; padding: 0 28px; }

.lookup-wait {
  display: flex;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 20px;
  background: var(--surface);
}
.lookup-wait p { margin: 4px 0 0; }

.spinner {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.part-head {
  border: 1px solid var(--line);
  border-left: 3px solid var(--navy);
  border-radius: 0;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.part-head h2::before { display: none; }
.part-head p { margin: 0; color: var(--muted); }

.offer-card .card-meta { display: flex; gap: 6px; flex-wrap: wrap; }

/* Карточки найденного — компактные: ~20% меньше обычных */
.product-grid { grid-template-columns: repeat(auto-fill, minmax(min(208px, 100%), 1fr)); grid-auto-rows: 1fr; gap: 12px; }

/* Одинаковые карточки: фото есть всегда, текст обрезается по строкам */
.offer-card h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  min-height: calc(3 * 1.25em);
}
.offer-card .pn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.offer-card .offer-note { display: block; overflow: visible; }
.offer-photo.no-photo {
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c5ccd4' stroke-width='1.5'%3E%3Crect x='3' y='5' width='18' height='14' rx='1'/%3E%3Ccircle cx='9' cy='10' r='2'/%3E%3Cpath d='M21 16l-5-5-8 8'/%3E%3C/svg%3E") center / 40px no-repeat;
}
.offer-card { padding: 16px; gap: 8px; }
.offer-card h3 { font-size: 0.9rem; line-height: 1.25; }
.offer-card .badge { font-size: 10px; padding: 3px 6px; }
.offer-card .button { padding: 9px 14px; font-size: 0.9rem; }

/* «Недавно найдено»: 4 в ряд, 5 рядов на странице, страницы снизу */
.product-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.product-grid.four .offer-card { padding: 12px; gap: 6px; }
@media (max-width: 900px) { .product-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .product-grid.four { grid-template-columns: 1fr; } }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.pager button {
  min-width: 36px; height: 36px; padding: 0 10px;
  border: 1px solid var(--line-strong); border-radius: 0;
  background: var(--bg); color: var(--navy); font: inherit; font-weight: 600; cursor: pointer;
}
.pager button[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.pager button:disabled { opacity: 0.4; cursor: default; }

/* Фото найденного товара — чёрно-белое, «примерное» */
.offer-photo {
  position: relative;
  margin: -4px 0 2px;
  height: 128px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  overflow: hidden;
}
.offer-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(1) contrast(1.05);
  opacity: 0.9;
}
.offer-photo figcaption {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  font-size: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 0;
}
.offer-card .pn { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 0; }
.offer-note { font-size: 12px; line-height: 1.4; color: var(--muted); margin: 0; }
.offer-origin { font-size: 12px; color: var(--navy); margin: auto 0 0; }
.offer-card .price { font-size: 1.1rem; }

/* Корзина */

.price-usd {
  font-size: 0.6em;
  font-weight: 600;
  color: var(--muted);
  font-family: var(--mono);
  margin-left: 6px;
}

.cart-count {
  display: inline-block;
  min-width: 20px;
  padding: 1px 6px;
  margin-left: 4px;
  border-radius: 0;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  font-family: var(--mono);
}
.cart-count[hidden] { display: none; }

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}
.cart-layout > * { min-width: 0; }

.cart-lines { display: grid; gap: 12px; }

.cart-line {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 16px 20px;
}
.cart-line.unavailable { background: var(--surface); border-style: dashed; }

/* Фото в корзине — такое же чёрно-белое, как в карточках */
.cart-photo {
  width: 96px;
  height: 96px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c5ccd4' stroke-width='1.5'%3E%3Crect x='3' y='5' width='18' height='14' rx='1'/%3E%3Ccircle cx='9' cy='10' r='2'/%3E%3Cpath d='M21 16l-5-5-8 8'/%3E%3C/svg%3E") center / 32px no-repeat;
  overflow: hidden;
}
.cart-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  filter: grayscale(1) contrast(1.05);
}
.cart-line h3 { font-size: 1.02rem; margin-bottom: 4px; }
.cart-line .pn { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.cart-unit { margin: 8px 0 0; font-size: 14px; }
.cart-weight { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

.cart-line-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 0;
}
.qty-btn {
  width: 32px;
  height: 32px;
  border: 0;
  background: var(--bg);
  color: var(--navy);
  font-size: 18px;
  cursor: pointer;
}
.qty-btn:hover { background: var(--surface); }
.qty { min-width: 28px; text-align: center; font-family: var(--mono); font-weight: 600; }

.cart-line-total {
  font-weight: 700;
  color: var(--navy);
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}

.cart-remove {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}
.cart-remove:hover { color: var(--danger); }

.cart-summary { position: sticky; top: 16px; gap: 8px; }
.sum-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-variant-numeric: tabular-nums;
}
.sum-sub { margin: -4px 0 4px; font-size: 13px; color: var(--muted); }
.sum-row > span:last-child { white-space: nowrap; }
.sum-minor { font-size: 12px; color: var(--muted); }
.sum-total {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 4px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
}
.cart-checkout { display: grid; gap: 10px; margin-top: 12px; }
.ship-country { margin: 0; font-size: 14px; color: var(--muted); }

/* Доставка видна только после ввода адреса */
.cart-summary .ship-known { display: none; }
.cart-summary.has-address .ship-known { display: flex; }
.cart-summary.has-address p.ship-known { display: block; }
.cart-summary.has-address .ship-unknown { display: none; }
.ship-unknown.sum-sub { color: var(--accent); font-weight: 600; }

.sum-insurance {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  cursor: pointer;
}
.sum-insurance input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
/* Обязательная строка: галочка серая, снять нельзя */
.sum-fixed { cursor: default; }
.sum-fixed input { accent-color: var(--grey); opacity: 0.7; cursor: not-allowed; }
.sum-ins-value { font-variant-numeric: tabular-nums; white-space: nowrap; }

.tl-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  background: var(--navy);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
}
.tl-toast-show { opacity: 1; transform: none; }

@media (max-width: 800px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .cart-line { grid-template-columns: 72px 1fr; }
  .cart-photo { width: 72px; height: 72px; }
  .cart-line-side { grid-column: 1 / -1; }
  .cart-line-side { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
}

/* Счёт и раздел менеджера */

.invoice-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.invoice-head h1 { margin-bottom: 4px; }

.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.status-pending { color: var(--amber); background: color-mix(in srgb, var(--amber) 8%, transparent); }
.status-approved { color: var(--green); background: color-mix(in srgb, var(--green) 8%, transparent); }
.status-rejected { color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); }

.notice-ok { border-left-color: var(--green); }

.invoice-buyer dl {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 6px 16px;
  margin: 0;
}
.invoice-buyer dt { color: var(--muted); }
.invoice-buyer dd { margin: 0; }
.pre-line { white-space: pre-line; }
.small { font-size: 12px; }

.table-wrap { overflow-x: auto; margin: 16px 0 8px; }
.invoice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.invoice-table th,
.invoice-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.invoice-table th {
  background: var(--surface);
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}
.invoice-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.invoice-table .pn { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.invoice-table tfoot td { font-weight: 600; }
.invoice-total td {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  border-bottom: 2px solid var(--navy);
}

.invoice-payment, .invoice-buyer { margin-top: 16px; }
.invoice-actions, .admin-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.admin-form { margin-top: 20px; }
.history { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; }

.button-danger {
  background: var(--bg);
  border-color: color-mix(in srgb, var(--danger) 50%, transparent);
  color: var(--danger);
}
.button-danger:hover { background: color-mix(in srgb, var(--danger) 8%, var(--bg)); }

@media (max-width: 560px) {
  .invoice-buyer dl { grid-template-columns: 1fr; }
}

@media print {
  .site-header, .site-footer, .invoice-actions, .tl-toast { display: none !important; }
  #app { padding: 0; }
  .card { border: 0; padding: 0; }
  .notice { border: 1px solid #999; }
}


/* Компактный счёт */
.invoice .invoice-head { align-items: center; margin-bottom: 12px; }
.invoice .invoice-head h1 { font-size: 1.7rem; margin: 0; }
.invoice-date { font-size: 1rem; font-weight: 500; color: var(--muted); margin-left: 8px; }
.invoice .notice { margin: 8px 0 12px; padding: 10px 14px; font-size: 14px; }
.invoice-buyer.compact { margin: 0 0 4px; }
.invoice-buyer.compact dl { grid-template-columns: max-content 1fr max-content 1fr; gap: 4px 14px; font-size: 14px; }
.invoice .invoice-table th, .invoice .invoice-table td { padding: 7px 10px; }
.invoice .invoice-table tfoot td { padding: 5px 10px; }
.invoice .invoice-actions { margin-top: 12px; }
@media (max-width: 700px) { .invoice-buyer.compact dl { grid-template-columns: max-content 1fr; } }

/* Оптовикам */
.wholesale-strip {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 18px; border: 1px solid var(--line); border-left: 3px solid var(--navy);
  border-radius: 0; background: var(--surface); color: var(--text);
}
.wholesale-strip:hover { border-color: var(--navy); text-decoration: none; }
.wholesale-strip-go { color: var(--accent); font-weight: 600; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 0; font-size: 14px; background: var(--bg); }
.wh-benefits { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wh-benefits h3 { font-size: 1rem; }
@media (max-width: 900px) { .wh-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .wh-benefits { grid-template-columns: 1fr; } }
.bulk-form { display: grid; gap: 10px; margin-top: 8px; }
.bulk-form textarea { font-family: var(--mono); font-size: 14px; }
.bulk-form .button { justify-self: start; }
.bulk-progress p { margin: 16px 0 6px; font-weight: 600; }
.progress { height: 6px; background: var(--line); border-radius: 0; overflow: hidden; }
.progress-bar { height: 100%; background: var(--accent); transition: width .4s; }
.spinner-sm { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; vertical-align: -2px; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.bulk-total { margin: 12px 0 0; font-size: 1.1rem; }
.cart-hint { display: block; margin-top: 8px; font-size: 13px; }
.duty-free { margin: 0; font-size: 13px; color: var(--green); font-weight: 600; }

/* Страница товара */

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.product-detail > * { min-width: 0; }

.product-main { display: grid; gap: 10px; }
.product-main .card-meta { justify-self: start; }
.product-main .note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px;
}
.product-main .pn {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
}
.product-main .pn strong { font-size: 1.2rem; color: var(--text); }

.price-block { margin-top: 8px; }

.price {
  color: var(--navy);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 1.6rem;
}

.price-note { color: var(--muted); font-size: 13px; }

.form-card { padding: 20px; }

@media (max-width: 800px) {
  .three, .two, .product-detail { grid-template-columns: 1fr; }
  .page h1 { font-size: 1.6rem; }
  .hero { padding: 24px 16px; }
}

@media (max-width: 560px) {
  .cat-grid, .product-grid { grid-template-columns: 1fr; }
}

/* Форма заказа слева под позициями, итог справа короткий */
.cart-main { display: grid; gap: 16px; }
.cart-checkout { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.cart-checkout .checkout-title { grid-column: 1 / -1; font-size: 1.1rem; margin: 0; }
.cart-checkout .form-status { grid-column: 1 / -1; }
.cart-checkout button[type="submit"] { grid-column: 1 / -1; justify-self: start; min-width: 240px; }
@media (max-width: 600px) { .cart-checkout { grid-template-columns: 1fr; } }
.cart-summary .sum-total.ship-unknown > span:first-child { font-size: 0.8em; white-space: nowrap; align-self: center; }

/* Карточка детали: один размер на всём сайте.
   Высота рассчитана на название до 3 строк, номер до 2 строк и описание до 5 строк;
   фото около 30% высоты. Текст никогда не обрезается: если не влез, карточка растёт. */
.product-grid, .product-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 10px; }
.offer-card, .product-grid.four .offer-card {
  min-height: 480px; padding: 12px; gap: 6px;
  display: flex; flex-direction: column;
}
.offer-card .offer-photo, .product-grid.four .offer-photo { height: 144px; flex: none; margin: 0 0 4px; }
.offer-card h3, .product-grid.four .offer-card h3 {
  display: block; -webkit-line-clamp: unset; overflow: visible; min-height: calc(3 * 1.25em);
  font-size: 0.9rem; line-height: 1.25; margin: 0; overflow-wrap: anywhere;
}
.offer-card .pn { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.35; }
.offer-card .offer-note { display: block; overflow: visible; flex: 1 0 auto; min-height: calc(5 * 1.4em); line-height: 1.4; overflow-wrap: anywhere; }
.offer-card .offer-origin { margin: 0; }
.offer-card .price { font-size: 1.05rem; }
.offer-card .button { padding: 8px 12px; font-size: 0.9rem; flex: none; }
@media (max-width: 900px) { .product-grid, .product-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) {
  .product-grid, .product-grid.four { grid-template-columns: 1fr; }
  .offer-card, .product-grid.four .offer-card { min-height: 0; }
  .offer-card h3, .offer-card .offer-note { min-height: 0; }
}

/* Фото перед отправкой */
.order-photos { margin: 16px 0; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.photo-grid figure { margin: 0; display: grid; gap: 4px; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); display: block; background: #fff; }
.photo-del { border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; padding: 0; justify-self: start; }
.photo-upload { justify-self: start; cursor: pointer; }
@media print { .order-photos { break-inside: avoid; } }

/* Подтверждение заказа покупателем */
.status-draft { color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.notice-confirm { border-left-color: var(--accent); font-weight: 600; }
.button-confirm { min-width: 260px; font-size: 1.05rem; }

.cart-summary .delivery-time { font-size: 13px; color: var(--navy); margin: 0; }

/* Мои заказы: удаление и восстановление */
.order-act { border: 1px solid var(--line-strong); background: var(--bg); color: var(--navy); font: inherit; font-size: 13px; padding: 6px 12px; cursor: pointer; border-radius: 0; }
.order-act:hover { border-color: var(--navy); }
.order-del { color: var(--muted); }
.order-del:hover { color: #b42318; border-color: #b42318; }
.deleted-title { margin-top: 32px; }
.my-orders.deleted td { color: var(--muted); }
.my-orders.deleted a { color: var(--muted); }

/* «Мои заказы»: вход по почте */
.account-box { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; margin: 0 0 16px; border: 1px solid var(--line); background: #f5f7f9; }
.account-login > div:first-child { flex: 1 1 260px; }
.account-login input { flex: 1 1 220px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 0; font: inherit; }
.account-login .account-status { flex: 1 1 100%; }
.account-in .order-act { margin-left: auto; }

/* Оптовикам: для кого */
.audience-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.audience-card { padding: 18px 20px; border: 1px solid var(--line); border-top: 3px solid var(--navy); background: var(--bg); }
.audience-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.audience-card p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
@media (max-width: 900px) { .audience-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .audience-grid { grid-template-columns: 1fr; } }

/* Этапы заказа после согласования */
.order-flow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; list-style: none; padding: 0; margin: 12px 0 16px; }
.order-flow li { display: flex; flex-direction: column; gap: 4px; padding: 10px 8px; border-top: 3px solid var(--line); font-size: 12px; color: var(--muted); }
.order-flow li.done { border-top-color: var(--green); color: var(--navy); }
.order-flow li.current { border-top-color: var(--accent); color: var(--navy); font-weight: 700; }
.flow-mark { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: 1px solid currentColor; font-size: 12px; }
.order-flow li.done .flow-mark { background: var(--green); border-color: var(--green); color: #fff; }
.order-flow li.current .flow-mark { background: var(--accent); border-color: var(--accent); color: #fff; }
.flow-date { font-weight: 400; color: var(--muted); }
@media (max-width: 700px) { .order-flow { grid-template-columns: 1fr; } .order-flow li { flex-direction: row; align-items: center; border-top: 0; border-left: 3px solid var(--line); } .order-flow li.done { border-left-color: var(--green); } .order-flow li.current { border-left-color: var(--accent); } }
.paid-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.paid-box h3, .paid-box p { flex: 1 1 100%; margin: 0; }
.paid-file { cursor: pointer; }
.paid-status { flex: 1 1 100%; }
.stage-panel label { display: grid; gap: 4px; margin: 8px 0; }
.stage-panel input { padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 0; font: inherit; }
.status-payment_check { color: var(--amber); background: color-mix(in srgb, var(--amber) 8%, transparent); }
.status-paid, .status-ordered, .status-warehouse, .status-shipped, .status-delivered { color: var(--green); background: color-mix(in srgb, var(--green) 8%, transparent); }

/* Колокольчик менеджера */
.admin-bell { position: relative; display: flex; align-items: center; }
.admin-bell[hidden] { display: none; }
.bell-btn { position: relative; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--line-strong); border-radius: 0; background: #fff; color: var(--navy); cursor: pointer; }
.admin-bell.has-new .bell-btn { background: #c62828; border-color: #c62828; color: #fff; }
.admin-bell.ring .bell-btn svg { animation: bell-ring 0.6s ease-in-out 2; }
@keyframes bell-ring { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-18deg); } 75% { transform: rotate(18deg); } }
.bell-count { position: absolute; top: -8px; right: -8px; min-width: 20px; height: 20px; padding: 0 5px; background: #fff; color: #c62828; border: 2px solid #c62828; font-size: 11px; font-weight: 700; line-height: 16px; text-align: center; }
.bell-count[hidden] { display: none; }
.bell-panel { position: absolute; top: 46px; right: 0; z-index: 1100; width: 360px; max-height: 70vh; overflow-y: auto; background: #fff; border: 1px solid var(--line-strong); box-shadow: 0 8px 28px rgba(11, 37, 64, 0.2); }
.bell-panel[hidden] { display: none; }
.bell-head, .bell-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.bell-foot { border-bottom: 0; border-top: 1px solid var(--line); font-size: 13px; }
.bell-clear { border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; padding: 0; }
.bell-item { display: grid; gap: 2px; padding: 10px 14px; border-bottom: 1px solid var(--line); border-left: 3px solid #c62828; color: var(--navy); font-size: 14px; text-decoration: none; }
.bell-item:hover { background: #f5f7f9; text-decoration: none; }
.bell-item time { font-size: 12px; color: var(--muted); }
.bell-chat { border-left-color: var(--accent); }
.bell-empty { padding: 16px 14px; color: var(--muted); font-size: 14px; }
@media (max-width: 480px) { .bell-panel { position: fixed; top: 64px; left: 8px; right: 8px; width: auto; } }

/* Готовые комментарии менеджера и скрытие формы после оплаты */
.admin-form[hidden] { display: none !important; }
.quick-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; }
.quick-chip { padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 0; background: #f5f7f9; color: var(--navy); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.quick-chip:hover, .quick-chip:active { border-color: var(--navy); background: #eaf0f6; }
.stage-panel textarea { padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 0; font: inherit; resize: vertical; }
@media (max-width: 600px) { .quick-chip { flex: 1 1 100%; padding: 10px 12px; } }

/* Планшет: направления по 3 в ряд с описанием */
@media (max-width: 1000px) and (min-width: 641px) {
  .dir-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dir-grid .category-tile p { display: block; }
  .site-nav { gap: 14px; }
}
/* Телефон: направления по 2 в ряд, без прокрутки вбок */
@media (max-width: 640px) {
  .dir-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; }
  .dir-grid .category-tile h3 { font-size: 0.85rem; }
  .dir-art { max-height: 90px; }
  /* Меню одной строкой с прокруткой */
  .site-nav { flex-wrap: nowrap; overflow-x: auto; gap: 16px; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; font-size: 15px; }
  /* Счёт: без колонок № и Цена, количество под названием */
  .invoice-items thead th:nth-child(1), .invoice-items tbody td:nth-child(1), .invoice-items thead th:nth-child(3), .invoice-items tbody td:nth-child(3), .invoice-items thead th:nth-child(4), .invoice-items tbody td:nth-child(4) { display: none; }
  .invoice-items tfoot td[colspan] { white-space: normal; }
  .invoice-items tfoot td[colspan] { padding-left: 8px; }
  /* Кнопка чата компактнее */
  .tl-chat-btn { padding: 10px 12px; min-width: 0; font-size: 13px; }
  .tl-chat-btn-status { display: none; }
}
.line-mobile { display: none; }
@media (max-width: 640px) { .line-mobile { display: block; } }

/* Фирменная шапка счёта (видна и при печати) */
.invoice-brand { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; padding: 0 0 16px; margin-bottom: 20px; border-bottom: 3px solid var(--navy); }
.invoice-logo { display: flex; align-items: center; gap: 12px; }
.invoice-logo-name { font-size: 1.5rem; font-weight: 800; letter-spacing: 2px; color: var(--navy); line-height: 1.1; }
.invoice-logo-tag { font-size: 13px; color: var(--muted); }
.invoice-brand-info { font-size: 13px; line-height: 1.6; color: var(--muted); text-align: right; }
@media (max-width: 560px) { .invoice-brand-info { text-align: left; } }
@media print { .invoice-brand { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* Менеджер: поделиться корзиной */
.share-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; margin: 0 0 16px; border: 1px dashed var(--accent); background: #fff7f3; }
.share-box > div:first-child { flex: 1 1 280px; }
.share-box input[name=shareNote] { flex: 1 1 240px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 0; font: inherit; }
.share-result { flex: 1 1 100%; display: flex; gap: 8px; }
.share-result:empty { display: none; }
.share-link { flex: 1 1 auto; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 0; font: inherit; background: #fff; }

/* Пункт «Админка» в шапке для менеджера */
.nav-admin { padding: 8px 12px; border: 1px solid var(--navy); background: var(--navy); color: #fff !important; font-weight: 600; text-decoration: none; white-space: nowrap; }
.nav-admin:hover { background: #12355a; text-decoration: none; }
.nav-admin[hidden] { display: none; }
.share-result { flex-wrap: wrap; }

/* Подсказка «Хотите собрать заказ быстрее?» */
.chat-promo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; margin: 16px 0; border: 1px solid var(--line); border-left: 4px solid #1f9d55; background: #f3faf6; font-size: 15px; }
.chat-promo > div { flex: 1 1 320px; }
.chat-promo .button { white-space: nowrap; }
.tl-chat-empty strong { color: var(--navy); }

.chat-promo[hidden] { display: none; }

/* Проверка цен ботом */
.price-check .pc-wait { display: flex; align-items: center; gap: 10px; }
.price-check tr.pc-changed td { background: #fff7e6; }
.price-check tr.pc-other td { background: #eef5ff; }
.price-check tr.pc-bad td { background: #fff1f0; }

/* --- Живость сайта --- */
.live-stats { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; font-size: 15px; color: var(--muted); }
.live-stats strong { color: var(--navy); font-variant-numeric: tabular-nums; }
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #1f9d55; vertical-align: middle; animation: live-pulse 2s ease-out infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(31, 157, 85, 0.5); } 70% { box-shadow: 0 0 0 8px rgba(31, 157, 85, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 157, 85, 0); } }
.live-feed { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.live-feed-label { flex: none; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.live-feed-track { flex: 1 1 auto; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.live-feed-items { display: flex; gap: 32px; width: max-content; animation: live-scroll 90s linear infinite; }
.live-feed:hover .live-feed-items { animation-play-state: paused; }
@keyframes live-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.live-item { display: inline-flex; gap: 6px; align-items: baseline; white-space: nowrap; font-size: 14px; color: var(--navy); text-decoration: none; }
.live-item:hover { color: var(--accent); text-decoration: none; }
.live-item strong { font-family: var(--mono); font-size: 13px; }
.live-item time { font-size: 12px; color: var(--muted); }
/* Плавное появление */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
/* Плитки и карточки при наведении */
.category-tile { transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
a.category-tile:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(11, 37, 64, 0.1); }
.offer-card { transition: box-shadow 0.2s ease, border-color 0.2s ease; }
.offer-card:hover { box-shadow: 0 6px 18px rgba(11, 37, 64, 0.08); border-color: var(--line-strong); }
.button-primary { transition: background-color 0.15s ease, transform 0.1s ease; }
.button-primary:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) {
  .live-feed-items, .live-dot, .tl-chat-dot.on { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  a.category-tile:hover { transform: none; }
}

/* Шапка главной: чертёжные инструменты на сетке */
.hero-home { position: relative; overflow: hidden; }
.hero-home > :not(.hero-art) { position: relative; z-index: 1; }
.hero-art { position: absolute; right: 24px; bottom: 12px; width: 340px; color: var(--navy); opacity: 0.55; pointer-events: none; }
.hero-art svg { display: block; width: 100%; height: auto; }
@media (min-width: 1100px) { .hero-home .subline, .hero-home .search-form, .hero-home .live-stats { max-width: calc(100% - 360px); } }
@media (max-width: 1099px) { .hero-art { display: none; } }

/* Шапка главной: фото штангенциркуля и карандаша вместо рисунка */
.hero-art { right: 8px; bottom: auto; top: 50%; width: 420px; opacity: 1; transform: translateY(-50%) rotate(-4deg); }
.hero-art img { display: block; width: 100%; height: auto; filter: drop-shadow(0 14px 18px rgba(11, 37, 64, 0.18)); }
@media (min-width: 1100px) { .hero-home .subline, .hero-home .search-form, .hero-home .live-stats { max-width: calc(100% - 430px); } }
/* Инструменты в шапке приглушены, чтобы не спорить с сайтом */
.hero-art { opacity: 0.5; transform: translateY(-50%); }
.hero-art img { filter: saturate(0.45) contrast(0.9) brightness(1.05) drop-shadow(0 8px 10px rgba(11, 37, 64, 0.08)); }
/* Середина между ярким фото и приглушённым */
.hero-art { opacity: 0.78; }
.hero-art img { filter: saturate(0.75) contrast(0.95) drop-shadow(0 10px 14px rgba(11, 37, 64, 0.13)); }

.hero-delivery { margin: 10px 0 0; font-size: 15px; font-weight: 600; color: var(--navy); }
@media (min-width: 1100px) { .hero-home .hero-delivery { max-width: calc(100% - 430px); } }
/* Чёткие края у инструментов: без прозрачности и размытой тени */
.hero-art { opacity: 1; }
.hero-art img { filter: saturate(0.8) contrast(0.97) drop-shadow(0 3px 3px rgba(11, 37, 64, 0.12)); }

/* Админка: посетители */
.visits-box { margin-bottom: 16px; }
.visits-box h2 { margin: 0 0 12px; font-size: 1.1rem; }
.visits-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.visits-cell { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); background: #f8fafb; }
.visits-cell strong { font-size: 1.5rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.visits-bars { display: flex; align-items: flex-end; gap: 3px; height: 70px; margin: 14px 0 6px; border-bottom: 1px solid var(--line); }
.visits-bar { flex: 1 1 0; background: var(--navy); opacity: 0.75; min-height: 2px; }
.visits-bar:last-child { background: var(--accent); opacity: 1; }
.visits-bar:hover { opacity: 1; }
@media (max-width: 600px) { .visits-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
