/* ============================================================
   Центрроссснаб — дизайн-система для витрины
   Стиль: современный сдержанный B2B
   ============================================================ */

:root {
  /* Цвета */
  --c-bg:        #ffffff;
  --c-bg-soft:   #f7f9fc;
  --c-bg-strong: #eef2f8;
  --c-fg:        #15181d;
  --c-muted:     #5a6573;
  --c-border:    #e2e7ee;
  --c-accent:    #003D78;
  --c-accent-d:  #002a55;
  --c-accent-l:  #e6eef7;
  --c-success:   #1f8a4c;

  /* Типографика */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --fs-xs: 0.85rem;
  --fs-sm: 0.95rem;
  --fs-md: 1rem;
  --fs-lg: 1.15rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.75rem;

  /* Размеры */
  --container: 1200px;
  --pad: 1.25rem;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(20, 30, 50, 0.05);
  --shadow:    0 4px 14px rgba(20, 30, 50, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--c-bg);
  color: var(--c-fg);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ============ Header ============ */
.site-header {
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 64px;
}
.primary-nav {
  display: flex;
  gap: 1.5rem;
  flex: 1;
}
.primary-nav a {
  color: var(--c-fg);
  font-size: var(--fs-sm);
  text-decoration: none;
  white-space: nowrap;
}
.primary-nav a:hover { color: var(--c-accent); }
.header-actions { flex-shrink: 0; display: flex; align-items: center; gap: 0.5rem; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  font-family: inherit;
}
.btn-primary {
  background: var(--c-accent);
  color: white;
}
.btn-primary:hover {
  background: var(--c-accent-d);
  text-decoration: none;
}
.btn-outline {
  background: transparent;
  color: var(--c-accent);
  border-color: var(--c-accent);
}
.btn-outline:hover { background: var(--c-accent-l); text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--c-fg);
  border-color: var(--c-border);
}
.btn-ghost:hover { background: var(--c-bg-soft); text-decoration: none; }
.btn-danger {
  background: transparent;
  color: #dc3545;
  border-color: #dc3545;
}
.btn-danger:hover { background: #dc3545; color: white; text-decoration: none; }
.btn-lg { padding: 0.85rem 1.5rem; font-size: var(--fs-md); }

/* ============ Hero ============ */
.hero {
  padding: 4rem 0 3.5rem;
  background: linear-gradient(180deg, var(--c-bg-soft) 0%, var(--c-bg) 100%);
}
.hero-content { max-width: 820px; margin: 0 auto; text-align: center; }
.hero-title {
  font-size: var(--fs-3xl);
  font-weight: 700;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}
.hero-lead {
  font-size: var(--fs-lg);
  color: var(--c-muted);
  margin: 0 0 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.hero-search {
  display: flex;
  max-width: 640px;
  margin: 0 auto 1.5rem;
  gap: 0.5rem;
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 0.4rem;
  box-shadow: var(--shadow);
}
.hero-search input {
  flex: 1;
  padding: 0.7rem 0.9rem;
  border: 0;
  font-size: var(--fs-md);
  font-family: inherit;
  background: transparent;
  outline: none;
}
.hero-meta {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  color: var(--c-muted);
  font-size: var(--fs-sm);
}
.hero-meta-item strong {
  color: var(--c-fg);
  font-size: var(--fs-lg);
  margin-right: 0.3rem;
}

/* ============ Blocks ============ */
.block { padding: 4rem 0; }
.block-muted { background: var(--c-bg-soft); }
.block-title {
  font-size: var(--fs-2xl);
  font-weight: 700;
  margin: 0 0 0.5rem;
  text-align: center;
}
.block-subtitle {
  font-size: var(--fs-md);
  color: var(--c-muted);
  text-align: center;
  margin: 0 0 2.5rem;
}
.block-actions { text-align: center; margin-top: 2rem; }

/* ============ Category grid ============ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.category-card {
  display: block;
  padding: 1.25rem;
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--c-fg);
  transition: all 0.15s;
}
.category-card:hover {
  border-color: var(--c-accent);
  box-shadow: var(--shadow);
  text-decoration: none;
  transform: translateY(-2px);
}
.category-icon { font-size: 2rem; margin-bottom: 0.6rem; }
.category-name { font-weight: 600; margin-bottom: 0.3rem; }
.category-count { font-size: var(--fs-xs); color: var(--c-muted); }

/* ============ Steps ============ */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  counter-reset: step;
}
.step {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--c-accent-l);
  color: var(--c-accent);
  font-weight: 700;
  border-radius: 50%;
  margin-bottom: 0.8rem;
}
.step-title { font-size: var(--fs-lg); margin: 0 0 0.5rem; }
.step p { color: var(--c-muted); font-size: var(--fs-sm); }

/* ============ Features ============ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.feature { text-align: center; padding: 1rem; }
.feature-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.feature-title { font-size: var(--fs-lg); margin-bottom: 0.5rem; }
.feature p { color: var(--c-muted); font-size: var(--fs-sm); }

/* ============ CTA ============ */
.block-cta { background: var(--c-bg-strong); padding: 3rem 0; }
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-title { font-size: var(--fs-xl); margin: 0 0 0.5rem; }
.cta-text { color: var(--c-muted); max-width: 700px; margin: 0; }

/* ============ Footer ============ */
.site-footer {
  background: #0f1622;
  color: #b7c0d0;
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}
.site-footer a { color: #b7c0d0; }
.site-footer a:hover { color: white; }
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #2a3245;
}
.footer-col { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-tagline { font-size: var(--fs-sm); }
.footer-heading {
  color: white;
  font-weight: 600;
  margin-bottom: 0.3rem;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer-col a { font-size: var(--fs-sm); text-decoration: none; }
.footer-bottom {
  padding-top: 1.5rem;
  font-size: var(--fs-xs);
  color: #6b7689;
}

/* ============ Адаптив ============ */
@media (max-width: 900px) {
  .header-inner { gap: 1rem; }
  .primary-nav { display: none; }
  .hero { padding: 2.5rem 0; }
  .hero-title { font-size: var(--fs-2xl); }
  .hero-lead { font-size: var(--fs-md); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 540px) {
  .hero-search { flex-direction: column; }
  .hero-meta { gap: 1rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .block { padding: 2.5rem 0; }
}

/* ============================================================
   Каталог / карточка / корзина / чекаут
   ============================================================ */

/* Иконки избранного / сравнения в хедере */
.header-icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 8px; color: #495057;
  text-decoration: none; transition: background 0.15s, color 0.15s;
}
.header-icon-btn:hover { background: #f1f3f5; color: var(--c-accent); }
.header-icon-btn svg { display: block; }
.header-icon-count {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; background: var(--c-accent); color: white;
  border-radius: 999px; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
  line-height: 1;
}
.cart-button { position: relative; }
.cart-badge {
  display: inline-block;
  background: var(--c-accent);
  color: white;
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
  font-size: var(--fs-xs);
  margin-left: 0.4rem;
  min-width: 1.4rem;
  text-align: center;
}

.messages { padding: 1rem 0; }
.message {
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  font-size: var(--fs-sm);
}
.message-success { background: #e7f4ec; color: #1f6b3b; border: 1px solid #c6e6d2; }
.message-warning { background: #fdf4e3; color: #8a5a06; border: 1px solid #f0d8a7; }

.page-head {
  background: var(--c-bg-soft);
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--c-border);
}
.page-head h1 { margin: 0 0 1rem; font-size: var(--fs-2xl); }
.catalog-search {
  display: flex;
  gap: 0.5rem;
  max-width: 640px;
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 0.35rem;
}
.catalog-search input {
  flex: 1;
  padding: 0.6rem 0.8rem;
  border: 0;
  font-size: var(--fs-md);
  font-family: inherit;
  background: transparent;
  outline: none;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
}
.catalog-sidebar {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1rem;
  height: fit-content;
  position: sticky;
  top: 80px;
}
.sidebar-heading {
  font-weight: 700;
  text-transform: uppercase;
  font-size: var(--fs-xs);
  color: var(--c-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}
.sidebar-list { list-style: none; padding: 0; margin: 0; }
.sidebar-list li a {
  display: block;
  padding: 0.45rem 0.6rem;
  color: var(--c-fg);
  text-decoration: none;
  border-radius: 4px;
  font-size: var(--fs-sm);
}
.sidebar-list li a:hover { background: var(--c-bg-soft); }
.sidebar-list li a.active { background: var(--c-accent-l); color: var(--c-accent); font-weight: 600; }

.catalog-count { color: var(--c-muted); margin-bottom: 1rem; font-size: var(--fs-sm); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.product-card {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  transition: all 0.15s;
  overflow: hidden;
}
.product-card:hover {
  border-color: var(--c-accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.product-card-link {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  color: var(--c-fg);
  text-decoration: none;
  flex: 1;
}
.product-card-link:hover { text-decoration: none; }
.product-image {
  background: var(--c-bg-soft);
  border-radius: 6px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
}
.product-name { font-weight: 600; line-height: 1.3; min-height: 2.4em; margin-bottom: 0.3rem; }
.product-brand { font-size: var(--fs-xs); color: var(--c-muted); margin-bottom: 0.5rem; }
.product-price { margin-top: auto; }
.price-amount { font-size: var(--fs-lg); font-weight: 700; color: var(--c-accent); }
.price-unit { font-size: var(--fs-sm); color: var(--c-muted); margin-left: 0.2rem; }
.product-card-add { padding: 0 1rem 1rem; }
.product-card-add .btn { width: 100%; }

.breadcrumb { font-size: var(--fs-sm); color: var(--c-muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--c-muted); }

.product-detail {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
}
.product-image-big {
  background: var(--c-bg-soft);
  border-radius: 8px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
}
.product-detail-info h1 { font-size: var(--fs-2xl); margin-bottom: 0.5rem; }
.product-brand-big { color: var(--c-muted); margin-bottom: 0.3rem; }
.product-sku { color: var(--c-muted); font-size: var(--fs-sm); margin-bottom: 1.5rem; }
.product-specs {
  background: var(--c-bg-soft);
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.product-specs > div { padding: 0.3rem 0; font-size: var(--fs-sm); }
.spec-key { color: var(--c-muted); margin-right: 0.4rem; }

.product-best-price {
  background: var(--c-accent-l);
  border-left: 4px solid var(--c-accent);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}
.price-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-accent);
}
.price-big {
  font-size: var(--fs-3xl);
  font-weight: 700;
  color: var(--c-accent);
  line-height: 1.1;
  margin: 0.3rem 0;
}
.price-unit-big { font-size: var(--fs-md); color: var(--c-muted); font-weight: 400; }
.price-wholesale { color: var(--c-muted); font-size: var(--fs-sm); }

.product-detail-add {
  display: flex;
  gap: 0.5rem;
  align-items: end;
  margin-bottom: 1.5rem;
}
.product-detail-add label { display: flex; flex-direction: column; font-size: var(--fs-sm); color: var(--c-muted); }
.product-detail-add input {
  width: 100px;
  padding: 0.6rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-size: var(--fs-md);
  font-family: inherit;
}

.suppliers-block { margin-top: 1rem; }
.suppliers-block h2 { font-size: var(--fs-xl); margin-bottom: 1rem; }
.suppliers-table {
  width: 100%;
  background: white;
  border-collapse: collapse;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.suppliers-table th, .suppliers-table td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
}
.suppliers-table th {
  background: var(--c-bg-soft);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-muted);
}
.suppliers-table tbody tr:hover { background: var(--c-bg-soft); }

/* Корзина */
.cart-table {
  width: 100%;
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}
.cart-table th, .cart-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--c-border);
  text-align: left;
  vertical-align: middle;
}
.cart-table thead th { background: var(--c-bg-soft); font-size: var(--fs-xs); text-transform: uppercase; color: var(--c-muted); }
.cart-table tfoot th { background: var(--c-bg-soft); font-size: var(--fs-md); }
.cart-product-link { color: var(--c-fg); font-weight: 600; }
.cart-update-form { display: flex; gap: 0.4rem; align-items: center; }
.cart-update-form input {
  width: 80px;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
}
.btn-sm { padding: 0.4rem 0.8rem; font-size: var(--fs-xs); }
.cart-actions { display: flex; gap: 0.75rem; justify-content: flex-end; }
.small { font-size: var(--fs-xs); }

/* Чекаут */
.checkout-form {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}
.checkout-section {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  grid-column: 1;
}
.checkout-section h2 { font-size: var(--fs-lg); margin-bottom: 1rem; }
.checkout-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.checkout-tab {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
}
.checkout-tab input { margin-right: 0.4rem; }
.checkout-tab:has(input:checked) { border-color: var(--c-accent); background: var(--c-accent-l); }
.checkout-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
.checkout-fields label {
  display: flex;
  flex-direction: column;
  font-size: var(--fs-sm);
  color: var(--c-muted);
}
.checkout-fields input, .checkout-fields textarea {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-size: var(--fs-md);
  font-family: inherit;
  margin-top: 0.3rem;
  background: white;
  color: var(--c-fg);
}
.checkout-fields .full-width { grid-column: 1 / -1; }
.field-error { color: #c0392b; font-size: var(--fs-xs); margin-top: 0.3rem; }
.radio-group { display: flex; flex-direction: column; gap: 0.5rem; }
.radio-option {
  padding: 0.7rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  cursor: pointer;
}
.radio-option input { margin-right: 0.5rem; }
.radio-option:has(input:checked) { border-color: var(--c-accent); background: var(--c-accent-l); }
.checkout-form textarea {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: var(--fs-md);
}
.checkout-sidebar {
  grid-column: 2;
  grid-row: 1 / span 10;
  background: var(--c-bg-soft);
  border-radius: var(--radius);
  padding: 1.5rem;
  align-self: start;
  position: sticky;
  top: 80px;
}
.checkout-sidebar h2 { font-size: var(--fs-lg); margin-bottom: 1rem; }
.checkout-summary { list-style: none; padding: 0; margin: 0 0 1rem; }
.checkout-summary li {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px dashed var(--c-border);
  font-size: var(--fs-sm);
}
.checkout-total { font-size: var(--fs-lg); padding-top: 0.5rem; }
.checkout-submit { grid-column: 1; }
.checkout-submit .btn { width: 100%; }

/* Success */
.success-page h1 { font-size: var(--fs-2xl); margin-bottom: 0.5rem; }
.success-page .lead { font-size: var(--fs-lg); color: var(--c-muted); margin-bottom: 2rem; }
.success-card {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.success-dl { display: grid; grid-template-columns: 200px 1fr; gap: 0.5rem 1rem; }
.success-dl dt { color: var(--c-muted); }
.success-items { padding-left: 1.25rem; }
.success-items li { padding: 0.3rem 0; }

/* Адаптив для чекаута и каталога */
@media (max-width: 900px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .catalog-sidebar { position: static; }
  .product-detail { grid-template-columns: 1fr; }
  .checkout-form { grid-template-columns: 1fr; }
  .checkout-sidebar { grid-column: 1; grid-row: auto; position: static; }
  .checkout-fields { grid-template-columns: 1fr; }
  .checkout-tabs { flex-direction: column; }
}

@media (max-width: 540px) {
  .logo-mark-img { width: 36px; height: 36px; }
  .logo-title { font-size: 0.95rem; }
  .logo-subtitle { font-size: 0.6rem; }
}

/* ============================================================
   Логотип — точный спек владельца (Manrope, BEM, #003D78)
   Этот блок переопределяет более ранние .logo-* правила.
   ============================================================ */

@media (max-width: 540px) {
  .logo img { width: 44px !important; }
  }

/* ============================================================
   Фикс горизонтального overflow на главной и других страницах
   ============================================================ */

html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

.container {
  box-sizing: border-box;
  width: 100%;
}

/* Уменьшу minmax чтобы карточки точно помещались на разных viewport'ах */
.category-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.product-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.steps {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.features-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Hero-title не должен ломать viewport */
.hero-title {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Цена в карточке товара — переносить если длинная */
.product-price {
  flex-wrap: wrap;
}

/* Inline SVG logo */
@media (max-width: 540px) { }

/* === Фикс overflow для длинных русских заголовков === */
.hero-title,
.block-title,
h1, h2, h3 {
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.hero { padding-left: var(--pad); padding-right: var(--pad); }
.hero .container { padding: 0; }
.hero-content { max-width: 100%; }

@media (max-width: 1100px) { .hero-title { font-size: 2.4rem !important; } }
@media (max-width: 900px)  { .hero-title { font-size: 2rem !important; } }
@media (max-width: 700px)  { .hero-title { font-size: 1.6rem !important; } }
@media (max-width: 500px)  { .hero-title { font-size: 1.35rem !important; } }

@media (max-width: 540px) { }

@media (max-width: 540px) { }


/* Логотип: знак + текст справа */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
  font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.logo-img {
  height: 60px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
.logo__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1;
}
.logo__ru {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1A4480;
}
.logo__en {
  font-size: 11px;
  font-weight: 500;
  color: #9E9E9E;
  letter-spacing: 0.04em;
}
@media (max-width: 740px) {
  .logo__text { display: none; }
  .logo-img { height: 48px; }
}

/* ============================================================
   Каталог: карточки разделов с подкатегориями + иерархический сайдбар
   ============================================================ */

/* Карточки разделов на главной */
.catalog-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.catalog-section {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 0;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.catalog-section:hover {
  border-color: var(--c-accent);
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  transform: translateY(-3px);
}
.catalog-section-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--c-fg);
  padding: 1.1rem 1.25rem 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-bottom: 1px solid var(--c-border);
}
.catalog-section-head:hover { text-decoration: none; color: var(--c-accent); }
.catalog-section-icon {
  font-size: 1.7rem;
  width: 2.6rem;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
  border: 1px solid rgba(0,0,0,.06);
}
.catalog-section-title {
  font-weight: 700;
  flex: 1;
  line-height: 1.25;
  font-size: 0.97rem;
}
.catalog-section-count {
  font-size: 0.72rem;
  color: white;
  background: var(--c-accent);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.catalog-section-subs {
  list-style: none;
  margin: 0;
  padding: 0.65rem 1.25rem 1.15rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.4rem;
}
.catalog-section-subs li { min-width: 0; }
.catalog-section-subs li a {
  display: block;
  padding: 0.34rem 0;
  color: #4b5563;
  text-decoration: none;
  font-size: 0.84rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid #f1f3f5;
  transition: color 0.12s;
}
.catalog-section-subs li:nth-last-child(-n+2) a { border-bottom: none; }
.catalog-section-subs li a:hover { color: var(--c-accent); text-decoration: none; }
.catalog-section-subs li.more a {
  color: var(--c-accent);
  font-weight: 600;
  border-bottom: none;
}

/* Чипсы подкатегорий (legacy) */
.subcat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.65rem;
  background: #f1f3f5;
  color: #495057;
  border-radius: 6px;
  font-size: 0.78rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.12s;
  line-height: 1.3;
  font-weight: 500;
}
.subcat-chip:hover {
  background: var(--c-accent-l);
  border-color: var(--c-accent);
  color: var(--c-accent);
  text-decoration: none;
}
.subcat-chip.active {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #fff;
  font-weight: 600;
}
.subcat-chip.active:hover {
  background: var(--c-accent);
  color: #fff;
}
.subcat-chip-icon { font-size: 0.9rem; }
.subcat-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Иерархический сайдбар каталога */
.sidebar-tree { list-style: none; padding: 0; margin: 0; }
.sidebar-tree > li { margin-bottom: 0.5rem; }
.sidebar-tree > li > a {
  display: block;
  padding: 0.5rem 0.7rem;
  color: var(--c-fg);
  text-decoration: none;
  border-radius: 4px;
  font-size: var(--fs-sm);
}
.sidebar-tree > li > a:hover,
.sidebar-tree > li > a.active { background: var(--c-bg-soft); color: var(--c-accent); }
.sidebar-section { padding-top: 0.25rem; }
.sidebar-parent {
  display: flex !important;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--c-fg) !important;
}
.sidebar-icon { flex-shrink: 0; }
.sidebar-subs {
  list-style: none;
  padding: 0;
  margin: 0.2rem 0 0.5rem 0;
  border-left: 2px solid var(--c-border);
  margin-left: 0.7rem;
}
.sidebar-subs li a {
  display: block;
  padding: 0.3rem 0.7rem;
  margin-left: 0.5rem;
  font-size: var(--fs-xs);
  color: var(--c-muted);
  text-decoration: none;
  border-radius: 4px;
}
.sidebar-subs li a:hover {
  color: var(--c-accent);
  background: var(--c-bg-soft);
}
.sidebar-subs li a.active {
  color: var(--c-accent);
  font-weight: 600;
  background: var(--c-accent-l);
}

/* Хлебные крошки */
.breadcrumb { font-size: var(--fs-sm); color: var(--c-muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--c-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--c-accent); }
.breadcrumb span { color: var(--c-fg); font-weight: 600; }

@media (max-width: 900px) {
  .catalog-section-grid { grid-template-columns: 1fr; }
  .sidebar-subs { display: none; }  /* На мобиле прячем подкатегории, остаются только разделы */
}

/* ============================================================
   Hero V2 — современный B2B-маркетплейс
   ============================================================ */

.hero-v2 {
  position: relative;
  background: linear-gradient(135deg, #f4f7fb 0%, #e9eff7 50%, #ffffff 100%);
  padding: 4rem 0 3rem;
  overflow: hidden;
}
.hero-bg-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-bg-pattern svg { width: 100%; height: 100%; }

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #e6eef9;
  color: #1A4480;
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 600;
  width: fit-content;
  border: 1px solid #c9dcef;
}
.hero-badge-icon { font-size: 1rem; }

.hero-title-v2 {
  font-family: Manrope, -apple-system, sans-serif;
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #15181d;
  margin: 0;
}
.hero-accent {
  color: #1A4480;
  background: linear-gradient(90deg, #1A4480 0%, #2a5fa8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead-v2 {
  font-size: 1.15rem;
  color: var(--c-muted);
  max-width: 540px;
  line-height: 1.55;
  margin: 0;
}

.hero-search-v2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  border: 2px solid #1A4480;
  border-radius: 12px;
  padding: 0.5rem 0.5rem 0.5rem 1.2rem;
  box-shadow: 0 10px 30px -10px rgba(26, 68, 128, 0.25);
  max-width: 600px;
}
.hero-search-icon { font-size: 1.2rem; color: var(--c-muted); flex-shrink: 0; }
.hero-search-v2 input {
  flex: 1;
  padding: 0.7rem 0.4rem;
  border: 0;
  outline: 0;
  font-size: 1rem;
  font-family: inherit;
  background: transparent;
  color: var(--c-fg);
  min-width: 0;
}
.hero-search-v2 input::placeholder { color: #a8b0bd; }

.hero-quick-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--fs-sm);
}
.hero-quick-label {
  color: var(--c-muted);
  font-weight: 600;
}
.hero-quick-links a {
  padding: 0.3rem 0.75rem;
  background: white;
  color: #1A4480;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--c-border);
  font-weight: 500;
  transition: all 0.1s;
}
.hero-quick-links a:hover {
  border-color: #1A4480;
  background: #e6eef9;
  text-decoration: none;
}

/* Карточки статистики справа */
.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}
.hero-stat-card {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: 14px;
  padding: 1.2rem;
  text-align: left;
  transition: all 0.15s;
}
.hero-stat-card:hover {
  border-color: #1A4480;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px rgba(26, 68, 128, 0.18);
}
.hero-stat-card-accent {
  background: linear-gradient(135deg, #1A4480 0%, #2a5fa8 100%);
  color: white;
  border: none;
}
.hero-stat-card-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -8px rgba(26, 68, 128, 0.45);
}
.hero-stat-icon { font-size: 1.6rem; margin-bottom: 0.5rem; }
.hero-stat-num {
  font-family: Manrope, sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: inherit;
}
.hero-stat-card .hero-stat-num { color: #1A4480; }
.hero-stat-card-accent .hero-stat-num { color: white; }
.hero-stat-label {
  font-size: var(--fs-xs);
  color: var(--c-muted);
  margin-top: 0.3rem;
  line-height: 1.2;
}
.hero-stat-card-accent .hero-stat-label { color: rgba(255, 255, 255, 0.85); }

/* Доверительная плашка снизу hero */
.hero-trust {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(26, 68, 128, 0.1);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-sm);
  color: var(--c-muted);
  font-weight: 500;
}
.trust-icon { font-size: 1.15rem; }

@media (max-width: 1024px) {
  .hero-title-v2 { font-size: 2.6rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .hero-v2 { padding: 2rem 0 1.5rem; }
  .hero-title-v2 { font-size: 1.9rem; }
  .hero-lead-v2 { font-size: 1rem; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .hero-stat-card { padding: 0.8rem; }
  .hero-stat-num { font-size: 1.3rem; }
  .hero-trust { gap: 0.8rem 1.2rem; }
  .hero-search-v2 { padding: 0.4rem; }
  .hero-search-v2 .btn-lg { padding: 0.7rem 1rem; }
}

/* ============================================================
   Авторизация, личный кабинет, заявки
   ============================================================ */

.header-auth-link { font-size: var(--fs-sm); padding: 0.45rem 0.9rem; }

.auth-form { background: white; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 2rem; margin-top: 1.5rem; }
.auth-form label { display: block; font-size: var(--fs-sm); color: var(--c-muted); margin-bottom: 0.8rem; }
.auth-form input[type="text"], .auth-form input[type="email"], .auth-form input[type="password"], .auth-form input[type="tel"], .auth-form textarea {
  width: 100%; padding: 0.6rem 0.8rem; border: 1px solid var(--c-border); border-radius: var(--radius); font-size: var(--fs-md); font-family: inherit; background: white; color: var(--c-fg);
  margin-top: 0.25rem;
}
.form-section { border: none; padding: 0; margin: 0 0 1.5rem; }
.form-section legend { font-weight: 700; font-size: var(--fs-lg); margin-bottom: 0.8rem; padding: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.form-grid .full-width { grid-column: 1 / -1; }
.field-error { display: block; color: #c0392b; font-size: var(--fs-xs); margin-top: 0.3rem; }

.kind-tabs { display: flex; gap: 0.5rem; }
.kind-tab { flex: 1; padding: 0.75rem 1rem; border: 1px solid var(--c-border); border-radius: var(--radius); cursor: pointer; font-size: var(--fs-sm); color: var(--c-fg); margin: 0; display: flex; align-items: center; gap: 0.5rem; }
.kind-tab:has(input:checked) { border-color: var(--c-accent); background: var(--c-accent-l); }

/* Личный кабинет */
.account-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.account-card { background: white; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1.5rem; text-decoration: none; color: var(--c-fg); display: block; transition: all 0.15s; }
.account-card:hover { border-color: var(--c-accent); transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; color: var(--c-fg); }
.account-card-feature { background: linear-gradient(135deg, #f4f7fb 0%, #ffffff 100%); border-color: var(--c-accent); }
.account-card-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.account-card h3 { margin: 0 0 0.5rem; }

.account-table { width: 100%; background: white; border: 1px solid var(--c-border); border-radius: var(--radius); border-collapse: collapse; margin-top: 0.5rem; }
.account-table th, .account-table td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--c-border); text-align: left; font-size: var(--fs-sm); }
.account-table thead th { background: var(--c-bg-soft); text-transform: uppercase; font-size: var(--fs-xs); color: var(--c-muted); }

.status-pill { display: inline-block; padding: 0.15rem 0.7rem; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; }
.status-draft, .status-new { background: #f0f0f0; color: #555; }
.status-matched, .status-confirmed { background: #e6f4ea; color: #1f7a3a; }
.status-ordered, .status-paid, .status-shipped, .status-delivered { background: #e6eef9; color: #1A4480; }
.status-cancelled { background: #fdecea; color: #b3261e; }

/* Загрузка заявки */
.upload-help { background: var(--c-bg-soft); padding: 1rem 1.25rem; border-radius: var(--radius); margin: 1.5rem 0; }
.upload-help h3 { margin: 0 0 0.5rem; font-size: var(--fs-md); }
.upload-help-table { width: 100%; font-size: var(--fs-sm); margin-top: 0.5rem; border-collapse: collapse; }
.upload-help-table th, .upload-help-table td { padding: 0.4rem 0.7rem; border-bottom: 1px solid var(--c-border); text-align: left; }
.upload-help-table thead th { color: var(--c-muted); font-size: var(--fs-xs); text-transform: uppercase; }

.upload-form { background: white; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1.5rem; margin-top: 1rem; }
.upload-field { display: block; margin-bottom: 1rem; }
.upload-field span { display: block; color: var(--c-muted); font-size: var(--fs-sm); margin-bottom: 0.3rem; }
.upload-field input[type="file"], .upload-field input[type="text"], .upload-field textarea { width: 100%; padding: 0.6rem; border: 1px solid var(--c-border); border-radius: var(--radius); font-size: var(--fs-md); font-family: inherit; }

/* Результаты заявки */
.request-items { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.request-item { background: white; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1.25rem; }
.request-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 0.75rem; }
.request-item-name { font-weight: 600; font-size: var(--fs-md); }
.request-item-product { padding: 0.6rem 0.9rem; background: var(--c-bg-soft); border-radius: 4px; margin-bottom: 0.75rem; font-size: var(--fs-sm); }
.match-badge { display: inline-block; padding: 0.2rem 0.7rem; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.match-badge-good { background: #e6f4ea; color: #1f7a3a; }
.match-badge-mid { background: #fff4e0; color: #8a5a06; }
.match-badge-low { background: #fdecea; color: #b3261e; }
.match-badge-none { background: #f0f0f0; color: #777; }

.offers-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.offers-table th, .offers-table td { padding: 0.5rem 0.8rem; border-bottom: 1px solid var(--c-border); text-align: left; }
.offers-table thead th { background: var(--c-bg-soft); text-transform: uppercase; font-size: var(--fs-xs); color: var(--c-muted); }
.offers-table tbody tr:hover { background: var(--c-bg-soft); }

/* Чекбокс согласия на обработку данных */
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: var(--fs-sm);
  color: var(--c-fg);
  cursor: pointer;
  margin: 0;
}
.consent-label input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #1A4480;
}
.consent-label a { color: #1A4480; font-weight: 600; }

/* Страница "Стать поставщиком" */
.hero-supplier { background: linear-gradient(180deg, #f4f7fb 0%, #ffffff 100%); padding: 3rem 0; }
.supplier-intro h1 { font-family: Manrope, sans-serif; font-size: 2.4rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.8rem; }
.supplier-lead { font-size: 1.1rem; color: var(--c-muted); max-width: 720px; margin: 0 0 2rem; line-height: 1.55; }
.supplier-benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.benefit { background: white; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1.2rem; display: flex; gap: 0.8rem; align-items: flex-start; }
.benefit-icon { font-size: 2rem; flex-shrink: 0; }
.supplier-form .form-grid input, .supplier-form .form-grid select, .supplier-form .form-grid textarea {
  width: 100%; padding: 0.6rem 0.8rem; border: 1px solid var(--c-border); border-radius: var(--radius); font-size: var(--fs-md); font-family: inherit; background: white;
}
.success-card-large { text-align: center; background: white; border: 2px solid #1f7a3a; border-radius: var(--radius); padding: 3rem 2rem; margin-top: 2rem; }
.success-card-large h2 { color: #1f7a3a; margin-bottom: 0.5rem; }
.message-card { padding: 1.5rem; border-radius: var(--radius); }

/* ============================================================
   Карточка товара v2 — лучшая цена + раскрывающиеся секции
   ============================================================ */

.product-page-head {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 2.5rem;
  margin: 1.5rem 0 2rem;
}
.product-photo-big {
  background: var(--c-bg-soft);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 7rem;
  margin-bottom: 0.75rem;
}
.product-photo-thumbs { display: flex; gap: 0.5rem; }
.thumb {
  width: 70px; height: 70px;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  background: var(--c-bg-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
}
.thumb-active { border-color: #1A4480; border-width: 2px; }

.product-brand-line { color: var(--c-muted); font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.05em; }
.product-page-title { font-size: 1.8rem; margin: 0.3rem 0 0.6rem; line-height: 1.2; }
.product-meta-row { display: flex; flex-wrap: wrap; gap: 1.5rem; font-size: var(--fs-sm); color: var(--c-muted); margin-bottom: 1.5rem; }
.meta-item strong { color: var(--c-fg); }

/* Блок лучшей цены */
.best-price-block {
  background: linear-gradient(135deg, #1A4480 0%, #2a5fa8 100%);
  color: white;
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 8px 24px -8px rgba(26, 68, 128, 0.4);
}
.best-price-label { font-size: var(--fs-sm); opacity: 0.9; margin-bottom: 0.5rem; font-weight: 500; }
.best-price-main { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 0.5rem; }
.best-price-amount {
  font-family: Manrope, sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.best-price-unit { opacity: 0.85; font-size: var(--fs-md); }
.best-price-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: var(--fs-sm);
  opacity: 0.92;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(255,255,255,0.2);
  border-bottom: 1px solid rgba(255,255,255,0.2);
  margin: 0.75rem 0;
}
.best-price-extra strong { color: white; }
.best-price-add { display: flex; align-items: end; gap: 0.6rem; margin-bottom: 0.75rem; }
.qty-input { display: flex; flex-direction: column; color: rgba(255,255,255,0.85); font-size: var(--fs-xs); }
.qty-input input {
  width: 90px;
  padding: 0.7rem 0.6rem;
  border: 0;
  border-radius: 6px;
  font-size: 1rem;
  margin-top: 0.25rem;
  font-family: inherit;
}
.best-price-block .btn-primary {
  background: white;
  color: #1A4480;
  font-weight: 700;
}
.best-price-block .btn-primary:hover { background: #f0f4f9; }
.best-price-block .small { color: rgba(255,255,255,0.78); font-size: var(--fs-xs); }

/* Вкладки на карточке товара */
.product-tabs { margin: 2rem 0 1rem; }
.product-tab-nav {
  display: flex;
  border-bottom: 2px solid var(--c-border);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.product-tab-nav::-webkit-scrollbar { display: none; }
.product-tab-btn {
  flex-shrink: 0;
  padding: 0.8rem 1.25rem;
  border: none;
  background: none;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: #6b7689;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.product-tab-btn:hover { color: var(--c-accent); }
.product-tab-btn.active { color: var(--c-accent); border-bottom-color: var(--c-accent); }
.product-tab-panel { display: none; padding: 1.5rem 0; }
.product-tab-panel.active { display: block; }
/* Секция поставщиков (ниже вкладок) */
.suppliers-section {
  background: white; border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 1.5rem; margin-bottom: 2rem;
}
.suppliers-section-title {
  font-size: 1.1rem; font-weight: 700; margin: 0 0 0.75rem;
  display: flex; align-items: center; gap: 0.5rem;
}

/* Таблица характеристик */
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table th {
  text-align: left;
  font-weight: 500;
  color: var(--c-muted);
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--c-border);
  font-size: var(--fs-sm);
  width: 40%;
}
.specs-table td {
  text-align: left;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--c-border);
  font-size: var(--fs-sm);
  color: var(--c-fg);
  font-weight: 500;
}

/* Большая таблица поставщиков */
.suppliers-table-big { width: 100%; border-collapse: collapse; }
.suppliers-table-big thead th {
  background: var(--c-bg-soft);
  padding: 0.6rem 0.7rem;
  text-align: left;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-muted);
  border-bottom: 1px solid var(--c-border);
}
.suppliers-table-big tbody td {
  padding: 0.8rem 0.7rem;
  border-bottom: 1px solid var(--c-border);
  vertical-align: middle;
  font-size: var(--fs-sm);
}
.suppliers-table-big tbody tr:hover { background: var(--c-bg-soft); }
.suppliers-table-big .best-row {
  background: #fff8e6;
  border-left: 3px solid #f5b30a;
}
.suppliers-table-big .best-row:hover { background: #fff3d4; }
.best-tag {
  display: inline-block;
  background: #f5b30a;
  color: white;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 600;
  margin-left: 0.4rem;
}
.price-cell { color: #1A4480; font-size: 1.05rem; }
.product-description-text { line-height: 1.6; color: var(--c-fg); }

@media (max-width: 900px) {
  .product-page-head { grid-template-columns: 1fr; }
  .product-photo-big { font-size: 5rem; }
  .best-price-amount { font-size: 2.2rem; }
  .suppliers-table-big thead { display: none; }
  .suppliers-table-big tbody tr { display: block; padding: 1rem 0.5rem; border-bottom: 2px solid var(--c-border); }
  .suppliers-table-big tbody td { display: flex; justify-content: space-between; border: 0; padding: 0.3rem 0; }
  .suppliers-table-big tbody td::before { content: attr(data-label); color: var(--c-muted); }
}


/* === Цена по запросу (без офферов) === */
.price-on-request {
  font-weight: 600;
  color: var(--c-muted);
  font-size: 0.95rem;
  font-style: italic;
}
.product-sku {
  font-size: 0.78rem;
  color: var(--c-muted);
  margin-top: 0.15rem;
  letter-spacing: 0.01em;
}
.request-price-block {
  background: linear-gradient(135deg, #f4f7fb 0%, #e8eef7 100%);
  border: 1px solid var(--c-border);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  margin: 1.25rem 0 1.75rem;
}
.request-price-label {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--c-accent);
  margin-bottom: 0.5rem;
}
.request-price-text {
  color: var(--c-muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}


/* === Фото товаров === */
.product-image {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f9fc;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}
.product-image img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}
.product-image-placeholder {
  font-size: 3rem;
  color: var(--c-muted);
}
.product-photo-big {
  width: 100%;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f9fc;
  border-radius: 16px;
  padding: 1rem;
}
.product-photo-big img {
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
}
.product-photo-placeholder {
  font-size: 5rem;
  color: var(--c-muted);
}


/* === Страница брендов === */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.brand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1rem;
  background: white;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--c-fg);
  transition: all 0.15s;
  text-align: center;
}
.brand-card:hover {
  border-color: var(--c-accent);
  box-shadow: 0 8px 24px rgba(20,30,50,0.08);
  transform: translateY(-3px);
  text-decoration: none;
}
.brand-card-image {
  width: 100%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f9fc;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.brand-card-image img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}
.brand-card-name {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}
.brand-card-count {
  font-size: 0.85rem;
  color: var(--c-muted);
}


.brand-logo-img {
  max-width: 75%;
  max-height: 75%;
  filter: none;
}


/* === Лента брендов на главной === */
.brands-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.brands-strip-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1rem;
  background: white;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--c-fg);
  transition: all 0.15s;
}
.brands-strip-card:hover {
  border-color: var(--c-accent);
  box-shadow: 0 6px 18px rgba(20,30,50,0.08);
  transform: translateY(-2px);
  text-decoration: none;
}
.brands-strip-card img {
  width: 80px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}
.brands-strip-name {
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
}
.brands-strip-count {
  font-size: 0.78rem;
  color: var(--c-muted);
}


/* === Пагинация === */
.pagination-block {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  margin: 2rem 0 1rem; align-items: center;
}
.page-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 0.6rem;
  background: white; border: 1px solid var(--c-border);
  border-radius: 8px; color: var(--c-fg); text-decoration: none;
  font-size: 0.93rem; transition: all 0.15s;
}
.page-link:hover { border-color: var(--c-accent); color: var(--c-accent); text-decoration: none; }
.page-current { background: var(--c-accent); color: white; border-color: var(--c-accent); font-weight: 700; }
.page-dots { padding: 0 0.4rem; color: var(--c-muted); }

/* === Карточка товара v2: галерея + thumbs === */
.product-gallery { display: flex; flex-direction: column; gap: 0.75rem; }
.product-photo-big { position: relative; cursor: zoom-in; overflow: hidden; }
.zoom-hint {
  position: absolute; top: 0.75rem; right: 0.75rem;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.85); border: 1px solid var(--c-border);
  font-size: 1rem; cursor: pointer; transition: all 0.15s; z-index: 2;
}
.zoom-hint:hover { background: white; border-color: var(--c-accent); }

/* Стрелки на главном фото */
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 52px; background: rgba(255,255,255,0.82);
  border: 1px solid var(--c-border); border-radius: 6px;
  font-size: 1.6rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 2; transition: background 0.15s, opacity 0.15s;
  opacity: 0; color: #333;
}
.product-photo-big:hover .gallery-arrow { opacity: 1; }
.gallery-prev { left: 0.4rem; }
.gallery-next { right: 0.4rem; }
.gallery-arrow:hover { background: white; }

.product-thumbs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; }
.thumb {
  width: 64px; height: 64px; padding: 4px;
  background: white; border: 2px solid var(--c-border); border-radius: 8px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0; transition: border-color 0.15s;
}
.thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.thumb-active { border-color: var(--c-accent); }
.thumb:hover:not(.thumb-active) { border-color: #adb5bd; }

/* === Lightbox === */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.lightbox[hidden] { display: none; }
.lightbox-img { max-width: 88vw; max-height: 90vh; object-fit: contain; cursor: default; border-radius: 4px; }
.lightbox-close {
  position: absolute; top: 1rem; right: 1rem;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3);
  color: white; font-size: 1.2rem; cursor: pointer; transition: background 0.15s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }
.lightbox-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 64px; background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2); border-radius: 6px;
  color: white; font-size: 2rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.lightbox-arrow:hover { background: rgba(255,255,255,0.25); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* === Бренд с логотипом === */
.brand-mini-logo { width: 24px; height: 24px; object-fit: contain; margin-right: 0.5rem; vertical-align: middle; }

/* === Действия (избранное/сравнить) === */
.product-actions-row { display: flex; gap: 0.5rem; margin: 0.5rem 0 1rem; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.88rem; }
.btn-active { background: var(--c-accent-l); border-color: var(--c-accent); color: var(--c-accent); }

/* === НДС переключатель === */
.vat-toggle {
  display: flex; gap: 1.2rem; margin: 0.75rem 0;
  font-size: 0.92rem; color: var(--c-muted);
}
.vat-toggle label { cursor: pointer; }
.vat-toggle input[type=radio] { margin-right: 0.3rem; }

/* === Лучшая цена: диапазон + кнопки === */
.best-price-from { color: var(--c-muted); font-weight: 500; font-size: 0.9em; }
.best-price-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: stretch; }

/* === Характеристики в 2 колонки === */
.specs-search { margin-bottom: 1rem; }
.specs-search input {
  width: 100%; padding: 0.6rem 0.9rem;
  border: 1px solid var(--c-border); border-radius: 8px;
  font-size: 0.93rem;
}
.specs-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0;
}
.spec-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem;
  padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--c-border);
}
.spec-row:nth-child(odd) { background: #fafbfd; }
.spec-key { color: var(--c-muted); font-size: 0.92rem; }
.spec-val { font-weight: 500; font-size: 0.93rem; }

.section-count {
  display: inline-block; padding: 1px 8px;
  background: var(--c-accent-l); color: var(--c-accent);
  font-size: 0.78rem; border-radius: 10px;
  font-weight: 600; margin-left: 0.4rem;
}

/* === Поставщики (новый вид) === */
.suppliers-list { display: flex; flex-direction: column; gap: 0.5rem; }
.supplier-row {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.4fr 1fr 1fr auto;
  gap: 1rem; padding: 0.85rem 1rem;
  background: white; border: 1px solid var(--c-border); border-radius: 10px;
  align-items: center;
}
.supplier-best { border-color: var(--c-accent); background: var(--c-accent-l); }
.supplier-cell { font-size: 0.93rem; }
.best-tag {
  display: inline-block; padding: 1px 8px; margin-left: 0.4rem;
  background: var(--c-success); color: white; font-size: 0.72rem;
  border-radius: 10px; font-weight: 700;
}
.price-cell { font-size: 1.05rem; color: var(--c-fg); }

/* === Похожие товары === */
.similar-products { margin-top: 3rem; }
.similar-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.25rem; }
.similar-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.similar-card {
  display: flex; flex-direction: column;
  background: white; border: 1px solid var(--c-border); border-radius: 10px;
  text-decoration: none; color: var(--c-fg); overflow: hidden;
  transition: all 0.15s;
}
.similar-card:hover { border-color: var(--c-accent); box-shadow: 0 6px 18px rgba(20,30,50,0.08); text-decoration: none; }
.similar-image { height: 140px; display: flex; align-items: center; justify-content: center; background: #f7f9fc; }
.similar-image img { max-width: 85%; max-height: 85%; object-fit: contain; }
.similar-name { padding: 0.6rem 0.75rem 0.25rem; font-size: 0.88rem; line-height: 1.35; }
.similar-brand { padding: 0 0.75rem 0.75rem; font-size: 0.75rem; color: var(--c-muted); text-transform: uppercase; letter-spacing: 0.02em; }

/* === Sticky mobile CTA === */
.sticky-mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: white; border-top: 1px solid var(--c-border);
  padding: 0.75rem 1rem; z-index: 100;
  display: none; align-items: center; justify-content: space-between; gap: 1rem;
  box-shadow: 0 -4px 12px rgba(20,30,50,0.06);
}
.sticky-price { font-size: 1.05rem; }
.sticky-cta-form { margin: 0; }

@media (max-width: 768px) {
  .sticky-mobile-cta { display: flex; }
  .specs-grid { grid-template-columns: 1fr; }
  .supplier-row { grid-template-columns: 1fr 1fr; gap: 0.4rem 1rem; }
  .product-page { padding-bottom: 5rem; }
}


/* === Умный фильтр === */
.smart-filter form { display: flex; flex-direction: column; gap: 1.2rem; }
.filter-section { padding-bottom: 1rem; border-bottom: 1px solid var(--c-border); }
.filter-section:last-of-type { border: 0; }
.filter-heading { font-weight: 700; margin-bottom: 0.6rem; font-size: 0.95rem; color: var(--c-fg); }
.filter-price { display: flex; align-items: center; gap: 0.4rem; }
.filter-price input { flex: 1; width: 100%; padding: 0.45rem 0.6rem; border: 1px solid var(--c-border); border-radius: 6px; font-size: 0.92rem; }
.filter-price span { color: var(--c-muted); }
.filter-hint { font-size: 0.78rem; color: var(--c-muted); margin-top: 0.3rem; }
.filter-checkbox { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.93rem; }
.filter-checkbox input { width: 16px; height: 16px; }
.filter-brand-search input { width: 100%; padding: 0.45rem 0.6rem; border: 1px solid var(--c-border); border-radius: 6px; font-size: 0.86rem; margin-bottom: 0.5rem; }
.filter-brand-list { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 0.25rem; }
.filter-brand-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0.4rem; border-radius: 4px; cursor: pointer; font-size: 0.88rem; }
.filter-brand-item:hover { background: #f4f7fb; }
.filter-brand-item input { width: 14px; height: 14px; }
.filter-brand-name { flex: 1; line-height: 1.25; }
.filter-brand-count { color: var(--c-muted); font-size: 0.78rem; }
.filter-sort { width: 100%; padding: 0.45rem 0.6rem; border: 1px solid var(--c-border); border-radius: 6px; font-size: 0.92rem; background: white; }
.filter-actions { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; }
.btn-block { width: 100%; }

/* ─── Универсальные поля форм ─── */
.form-control {
  width: 100%;
  padding: .55rem .85rem;
  font-size: .9rem;
  font-family: inherit;
  color: var(--c-fg);
  background: #fff;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}
.form-control:hover { border-color: #adb5bd; }
.form-control:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(230,57,70,.12);
}
.form-control::placeholder { color: #adb5bd; }
.form-control.is-invalid { border-color: #dc3545; }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220,53,69,.12); }
textarea.form-control { resize: vertical; min-height: 80px; line-height: 1.5; }
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236c757d' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.2rem;
  cursor: pointer;
}
input[type="date"].form-control { cursor: pointer; }
input[type="number"].form-control::-webkit-inner-spin-button,
input[type="number"].form-control::-webkit-outer-spin-button { opacity: .5; }

/* ── Кабинет — выпадающее меню ── */
.cab-dropdown { position: relative; }
.cab-dropdown__btn { gap: .35rem; }
.cab-dropdown__menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.13);
  z-index: 9999;
  overflow: hidden;
  animation: cabFadeIn .15s ease;
}
.cab-dropdown__menu.open { display: block; }
@keyframes cabFadeIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
.cab-dropdown__head {
  padding: .9rem 1rem .75rem;
  background: linear-gradient(135deg,#1a1a2e,#16213e);
}
.cab-dropdown__company { font-weight: 700; color: #fff; font-size: .88rem; line-height: 1.3; }
.cab-dropdown__inn { font-size: .72rem; color: rgba(255,255,255,.5); margin-top: .15rem; }
.cab-dropdown__menu a {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem 1rem;
  font-size: .88rem;
  color: #343a40;
  text-decoration: none;
  transition: background .12s;
}
.cab-dropdown__menu a:hover { background: #f8f9fa; color: var(--c-accent); }
.cab-dropdown__divider { height: 1px; background: #f1f3f5; margin: .25rem 0; }
.cab-dropdown__logout { color: #868e96 !important; }
.cab-dropdown__logout:hover { color: var(--c-accent) !important; }

/* ── Двойные цены: розница + опт ── */
.price-row-retail { display:flex; align-items:baseline; gap:.3rem; }
.price-row-wholesale { display:flex; align-items:center; gap:.35rem; margin-top:.2rem; font-size:.8rem; }
.price-label-wholesale { color:#868e96; }
.price-amount-wholesale { font-weight:700; color:var(--c-accent); }
.wholesale-badge { display:inline-flex; align-items:center; gap:.35rem; font-size:.88rem; color:#343a40; }
.discount-badge { display:inline-block; background:var(--c-accent); color:#fff; border-radius:4px; font-size:.72rem; font-style:normal; padding:.1rem .4rem; font-weight:700; }

/* ── Мобильный каталог — карточки ── */
@media(max-width:600px){
  .product-grid { grid-template-columns: repeat(2, 1fr) !important; gap:.6rem !important; }
  .product-card { padding:.7rem .6rem; }
  .product-name { font-size:.8rem; -webkit-line-clamp:3; }
  .price-amount { font-size:.95rem; }
  .product-card-add { font-size:.75rem; padding:.4rem .6rem; }
  .price-row-wholesale { flex-wrap:wrap; }
}
@media(max-width:380px){
  .product-grid { grid-template-columns: 1fr !important; }
}

/* ── Мобильный детальная страница ── */
@media(max-width:700px){
  .best-price-block { padding:1rem; }
  .best-price-amount { font-size:1.6rem; }
  .best-price-extra { flex-wrap:wrap; gap:.5rem; font-size:.8rem; }
  .supplier-table { font-size:.8rem; }
  .supplier-cell { padding:.5rem .4rem; }
  .sticky-price-bar { padding:.6rem 1rem; }
  .sticky-price { font-size:1rem; }
  .detail-layout { grid-template-columns: 1fr !important; }
  .detail-gallery { max-width:100% !important; }
}
