/* NDLUX Dealer Catalog — фирменный стиль */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; background: #F5F7FA; color: #0F1419; }
a { color: #174FBC; text-decoration: none; }

.v6dc-shell { display: flex; flex-direction: column; min-height: 100vh; }

/* Header */
.v6dc-header { background: #fff; border-bottom: 1px solid #E6E9EE; position: sticky; top: 0; z-index: 100; }
.v6dc-header__inner { max-width: 1280px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 22px; }
.v6dc-logo { display: flex; flex-direction: column; line-height: 1.1; text-decoration: none; }
.v6dc-logo__mark { font-size: 18px; font-weight: 900; letter-spacing: .14em; color: #174FBC; }
.v6dc-logo__sub { font-size: 10px; color: rgba(15,20,25,.55); text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }
.v6dc-nav { display: flex; gap: 18px; flex: 1 1 auto; }
.v6dc-nav__link { font-size: 13px; font-weight: 600; color: #2A3138; }
.v6dc-nav__link:hover { color: #174FBC; }
.v6dc-header__actions { display: flex; align-items: center; gap: 14px; }
.v6dc-header__actions .v6h__cart {
  position: relative; width: 38px; height: 38px;
  background: transparent; border: 1px solid #E6E9EE; border-radius: 10px;
  color: #2A3138; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.v6dc-header__actions .v6h__cart svg { width: 18px; height: 18px; }
.v6dc-header__actions .v6h__cart:hover { color: #174FBC; border-color: #174FBC; }
.v6h__cart-count {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: #174FBC; color: #fff;
  font-size: 10px; font-weight: 800;
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
}

/* Main — отступ под фиксированной Tilda-шапкой ~73px */
.v6dc-main { flex: 1 1 auto; max-width: 1280px; margin: 0 auto; width: 100%; padding: 100px 20px 40px; }

/* Toolbar */
.v6dc-toolbar {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  background: #fff; padding: 12px 14px; border-radius: 12px;
  border: 1px solid #E6E9EE; margin-bottom: 16px;
}
.v6dc-toolbar__search { flex: 1 1 280px; position: relative; }
.v6dc-toolbar__search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: rgba(15,20,25,.5); }
.v6dc-toolbar__search input {
  width: 100%; padding: 9px 12px 9px 34px;
  border: 1px solid #E6E9EE; border-radius: 8px;
  font-size: 13px; background: #FAFBFC;
}
.v6dc-toolbar__search input:focus { outline: none; border-color: #174FBC; background: #fff; }
.v6dc-toolbar__right { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.v6dc-toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12px; color: #2A3138; }
.v6dc-toggle input { accent-color: #174FBC; }
.v6dc-select {
  background: #FAFBFC; border: 1px solid #E6E9EE; border-radius: 8px;
  padding: 8px 10px; font-size: 12px; color: #2A3138; cursor: pointer;
}

/* Body grid: sidebar + content */
.v6dc-body { display: grid; grid-template-columns: 240px 1fr; gap: 18px; }
@media (max-width: 900px) {
  .v6dc-body { grid-template-columns: 1fr; display: contents; }
  /* Мобильная раскладка: фильтр-чипсы наверху, затем поиск/сортировка, подсказка и товары.
     display:contents на .v6dc-body поднимает sidebar/content на уровень main,
     чтобы order работал вместе с .v6dc-toolbar/.v6dc-mixhint (они на разных уровнях DOM). */
  .v6dc-main { display: flex; flex-direction: column; gap: 16px; }
  .v6dc-sidebar { order: 1; position: static; top: auto; max-height: none; overflow: visible; }
  .v6dc-toolbar { order: 2; margin-bottom: 0; }
  .v6dc-mixhint { order: 3; margin: 0 !important; }
  .v6dc-content { order: 4; }
}

.v6dc-sidebar {
  background: #fff; border: 1px solid #E6E9EE; border-radius: 12px; padding: 14px;
  position: sticky; top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(15,20,25,.2) transparent;
}
.v6dc-sidebar::-webkit-scrollbar { width: 6px; }
.v6dc-sidebar::-webkit-scrollbar-thumb { background: rgba(15,20,25,.2); border-radius: 3px; }
.v6dc-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(15,20,25,.35); }
.v6dc-filter { margin-bottom: 14px; }
.v6dc-filter-hint {
  font-size: 11px; color: rgba(15,20,25,.45);
  background: #FAFBFC; border: 1px dashed #E6E9EE; border-radius: 8px;
  padding: 10px 12px; margin-bottom: 14px; line-height: 1.4;
}
.v6dc-filter__title { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(15,20,25,.55); margin-bottom: 8px; }
.v6dc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.v6dc-chip {
  background: #F5F7FA; border: 1px solid transparent;
  padding: 5px 10px; border-radius: 14px;
  font-size: 11px; font-weight: 600; color: #2A3138;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.v6dc-chip:hover { background: #EEF4FF; color: #174FBC; }
.v6dc-chip--active { background: #174FBC; color: #fff; }
.v6dc-chip--active:hover { background: #0F3D9C; color: #fff; }
.v6dc-chip__count { opacity: .65; margin-left: 4px; font-weight: 500; }
.v6dc-chip--otrez {
  background: #fff !important;
  border: 1px dashed #174FBC !important;
  color: #174FBC !important;
}
.v6dc-chip--otrez:hover { background: #EEF4FF !important; }
.v6dc-chip--otrez.v6dc-chip--active {
  background: #174FBC !important;
  border-style: solid !important;
  color: #fff !important;
}
.v6dc-chip--sale {
  background: #F5FBE8 !important;
  border: 1px solid rgba(101,163,13,.3) !important;
  color: #4D7C0F !important;
  font-weight: 700 !important;
}
.v6dc-chip--sale:hover { background: #ECF8D4 !important; }
.v6dc-chip--sale.v6dc-chip--active {
  background: #65A30D !important;
  color: #fff !important;
  border-color: #65A30D !important;
}
.v6dc-chip--sale.v6dc-chip--active:hover { background: #4D7C0F !important; }
.v6dc-chip--zero { opacity: .35; cursor: not-allowed; }
.v6dc-chip--zero:hover { background: #F5F7FA; color: #2A3138; }
.v6dc-chip__empty { font-size: 11px; color: rgba(15,20,25,.4); }

.v6dc-reset {
  width: 100%; margin-top: 6px;
  background: transparent; border: 1px solid #E6E9EE; border-radius: 8px;
  padding: 8px; cursor: pointer; font-size: 12px; color: #707880;
}
.v6dc-reset:hover { color: #174FBC; border-color: #174FBC; }

/* Content */
.v6dc-content { min-width: 0; }
.v6dc-summary { font-size: 12px; color: rgba(15,20,25,.6); margin-bottom: 10px; padding: 0 4px; }
.v6dc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

/* Product card */
.v6dc-card {
  background: #fff; border: 1px solid #E6E9EE; border-radius: 12px;
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
  position: relative; transition: box-shadow .15s, border-color .15s;
}
.v6dc-card:hover { border-color: #174FBC; box-shadow: 0 6px 22px -8px rgba(23,79,188,.2); }
.v6dc-card--oos { opacity: .55; }
.v6dc-card__fav {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px;
  background: rgba(255,255,255,.96);
  border: 1px solid #E6E9EE; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px; line-height: 1;
  color: rgba(15,20,25,.4); transition: color .15s, transform .15s;
  z-index: 2;
}
.v6dc-card__fav:hover { color: #F59E0B; transform: scale(1.1); }
.v6dc-card__fav--on { color: #F59E0B; }
.v6dc-card__hit {
  position: absolute; top: 18px; left: 50%;
  transform: translateX(-50%);
  background: #A3E635; color: #1A2E05;
  font-size: 8px; font-weight: 800; padding: 2px 6px; border-radius: 4px;
  letter-spacing: .05em; line-height: 1.3;
  text-transform: uppercase; text-align: center;
  white-space: normal; width: min-content;
  box-shadow: 0 2px 6px rgba(132,204,22,.35);
  pointer-events: none; z-index: 2;
}
.v6dc-card__img {
  width: 100%; aspect-ratio: 4/3; object-fit: contain;
  background: #FAFBFC; border-radius: 8px;
}
.v6dc-card__img--placeholder {
  display: flex; align-items: center; justify-content: center;
  color: rgba(15,20,25,.25); font-size: 32px;
}
.v6dc-card__title {
  font-size: 13px; font-weight: 600; color: #0F1419;
  line-height: 1.35; min-height: 35px;
  display: block; text-align: left;
  word-break: break-word; hyphens: auto;
}
.v6dc-card__sku { font-size: 10px; color: rgba(15,20,25,.45); font-family: ui-monospace, Menlo, monospace; }
.v6dc-card__prices { display: flex; flex-direction: column; gap: 2px; margin-top: auto; }
.v6dc-card__price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.v6dc-card__price-label {
  font-size: 9px; font-weight: 700; letter-spacing: .06em;
  padding: 2px 6px; border-radius: 3px;
}
.v6dc-card__price-label--bn { background: rgba(23,79,188,.1); color: #174FBC; }
.v6dc-card__price-label--nal { background: rgba(34,197,94,.1); color: #16A34A; }
.v6dc-card__price-val { font-size: 14px; font-weight: 800; color: #0F1419; font-variant-numeric: tabular-nums; }
.v6dc-card__actions { display: flex; gap: 6px; }
.v6dc-card__btn {
  flex: 1; padding: 8px; border-radius: 8px; border: 1px solid #174FBC;
  background: #174FBC; color: #fff; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: background .15s;
}
.v6dc-card__btn:hover { background: #0F3D9C; }
.v6dc-card__btn--ghost { background: #fff; color: #174FBC; }
.v6dc-card__btn--ghost:hover { background: #EEF4FF; color: #174FBC; }
.v6dc-card__stock {
  font-size: 10px; color: #DC2626; font-weight: 600;
}

/* Степпер: − qty + */
.v6dc-card__stepper {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  background: #EEF4FF;
  border: 1px solid #174FBC;
  border-radius: 8px;
  overflow: hidden;
  user-select: none;
}
.v6dc-card__step {
  flex: 0 0 36px; height: 36px;
  background: transparent; border: none;
  color: #174FBC;
  font-size: 18px; font-weight: 700; line-height: 1;
  cursor: pointer;
  transition: background .12s;
}
.v6dc-card__step:hover { background: #DCE7FF; }
.v6dc-card__step:active { background: #174FBC; color: #fff; }
.v6dc-card__step-val {
  flex: 1 1 auto;
  text-align: center;
  font-size: 14px; font-weight: 800;
  color: #0F1419;
  font-variant-numeric: tabular-nums;
}

/* No-results / Auth gate */
.v6dc-notice {
  background: #fff; border: 1px solid #E6E9EE; border-radius: 12px;
  padding: 40px 24px; text-align: center; color: #2A3138;
  font-size: 14px; line-height: 1.5;
}
.v6dc-notice strong { color: #174FBC; }
.v6dc-notice__cta {
  display: inline-block; margin-top: 14px;
  background: #174FBC; color: #fff; text-decoration: none;
  padding: 10px 22px; border-radius: 8px; font-weight: 700; font-size: 13px;
}

/* Footer */
.v6dc-footer {
  padding: 22px 20px; text-align: center;
  font-size: 11px; color: rgba(15,20,25,.5);
  border-top: 1px solid #E6E9EE; background: #fff;
}

/* На дилерской странице скрываем пункты розничной навигации */
aside.v6h__m,
.v6h__m,
.v6h__burger,
.v6h__cat-trigger,
.v6h__m-cat-trigger,
.v6h__cat-panel,
.v6h__m-cat,
.v6h__m-cat-body,
.v6h__nav,
.v6h__m-nav,
.v6h__sale,
.js-ndlux-dealers-info {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}


/* === Всплывающее описание (tooltip desktop / bottom-sheet mobile) — портировано из catalog.css === */
/* Floating tooltip с описанием товара (показывается при hover на карточку).
   pointer-events: auto + hover-handlers на самом tooltip — чтобы пользователь
   мог навести мышку и проскроллить длинное описание. */
.v6dc-tooltip {
  position: absolute;
  display: none;
  width: 340px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  border: 1px solid #E6E9EE;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 16px 48px rgba(15,20,25,.18);
  font-size: 13px;
  line-height: 1.55;
  color: #2D3540;
  z-index: 99999;
}
.v6dc-tooltip.is-open { display: block; }
.v6dc-tooltip p { margin: 0 0 8px; }
.v6dc-tooltip p:last-child { margin-bottom: 0; }
.v6dc-tooltip ul, .v6dc-tooltip ol { margin: 0 0 8px; padding-left: 18px; }
.v6dc-tooltip li { margin-bottom: 3px; }
.v6dc-tooltip strong, .v6dc-tooltip b { color: #0F1419; }
.v6dc-tooltip h2, .v6dc-tooltip h3, .v6dc-tooltip h4 {
  font-size: 13px; font-weight: 700; color: #0F1419; margin: 0 0 6px;
}
.v6dc-tooltip a { color: #174FBC; pointer-events: none; }
.v6dc-tooltip img { max-width: 100%; height: auto; border-radius: 6px; margin: 4px 0; }
/* Кастомный slim scrollbar чтобы не уродовал popover */
.v6dc-tooltip::-webkit-scrollbar { width: 8px; }
.v6dc-tooltip::-webkit-scrollbar-thumb {
  background: rgba(15,20,25,.22); border-radius: 4px;
}
.v6dc-tooltip::-webkit-scrollbar-thumb:hover { background: rgba(15,20,25,.35); }
/* На тач-устройствах hover-тултип не показываем (там bottom-sheet). На десктопе
   .is-open должен показывать поповер — поэтому force-hide только под touch-медиа,
   иначе безусловный display:none!important глушит и десктопный hover (баг H7). */
@media (hover: none) and (pointer: coarse) {
  .v6dc-tooltip { display: none !important; }
}
/* === Mobile bottom-sheet с описанием товара === */
.v6dc-sheet {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
}
.v6dc-sheet.is-open { display: block; }
.v6dc-sheet__backdrop {
  position: absolute; inset: 0;
  background: rgba(15,20,25,.55);
  animation: v6dc-fade-in .18s ease-out;
}
.v6dc-sheet__panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 28px rgba(0,0,0,.25);
  animation: v6dc-slide-up .22s ease-out;
}
.v6dc-sheet__head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #EEF1F4;
  position: relative;
}
.v6dc-sheet__head::before {
  content: '';
  position: absolute;
  top: 6px; left: 50%; transform: translateX(-50%);
  width: 36px; height: 4px; border-radius: 2px;
  background: rgba(15,20,25,.18);
}
.v6dc-sheet__title {
  flex: 1; padding-top: 6px;
  font-size: 14px; font-weight: 700; color: #0F1419;
  line-height: 1.35;
  word-break: break-word;
}
.v6dc-sheet__close {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border: 0; background: rgba(15,20,25,.06);
  border-radius: 50%;
  font-size: 20px; line-height: 1;
  color: #2D3540;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  margin-top: 4px;
}
.v6dc-sheet__close:active { background: rgba(15,20,25,.12); }
.v6dc-sheet__body {
  padding: 14px 16px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  font-size: 14px;
  line-height: 1.55;
  color: #2D3540;
  flex: 1;
}
.v6dc-sheet__body p { margin: 0 0 10px; }
.v6dc-sheet__body p:last-child { margin-bottom: 0; }
.v6dc-sheet__body ul, .v6dc-sheet__body ol { margin: 0 0 10px; padding-left: 20px; }
.v6dc-sheet__body li { margin-bottom: 4px; }
.v6dc-sheet__body strong, .v6dc-sheet__body b { color: #0F1419; }
.v6dc-sheet__body h2, .v6dc-sheet__body h3, .v6dc-sheet__body h4 {
  font-size: 14px; font-weight: 700; color: #0F1419; margin: 12px 0 6px;
}
.v6dc-sheet__body img { max-width: 100%; height: auto; border-radius: 8px; margin: 6px 0; }
.v6dc-sheet__loading { color: #909CAA; text-align: center; padding: 24px 0; }
/* Когда sheet открыт — блокируем скролл body чтобы не дёргалось */
body.v6dc-sheet-open { overflow: hidden; }

/* Индикатор наличия на карточке (зелёный кружок + текст) */
.v6dc-card__stk {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; line-height: 1.2; margin-top: -2px;
}
.v6dc-card__stk--in  { color: #1e874b; }
.v6dc-card__stk--oos { color: #8A929B; }
.v6dc-card__stk-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto;
  background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.15);
}
.v6dc-card__stk--oos .v6dc-card__stk-dot { background: #C2C8CF; box-shadow: none; }