/* durchdacht new-web: конфигуратор на странице товара (#konfigurator).
   Новый лаяут (макет 2026-08): герой = визуализация слева + белая панель
   шагов справа, табы «Krok 1 Specifikace / Krok 2 Technika / Krok 3 Souhrn»,
   тёмный ценовой блок внизу панели. Палитра сайта: акцент #A9633A,
   тёмный #101828, AKCE #D92D20. Общие секции страницы — в product.css.
   Грузится ПОСЛЕ inner.css и product.css. */

.nw-kfgx {
  --kx-brand: #A9633A;
  --kx-brand-dark: #8A4E28;
  --kx-ink: #101828;
  --kx-mut: #667085;
  --kx-line: #E4E7EC;
  --kx-cream: #FBF4EC;
  --kx-sale: #D92D20;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  margin: 18px 0 46px;
  font-family: Inter, system-ui, sans-serif;
}

/* ===== визуализация (левая колонка, разметка .nw-pp-media в product.css) ===== */
.nw-kfgx-viz { position: relative; background: var(--kx-ink); border-radius: 14px; overflow: hidden; }
.nw-kfgx-viz img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  display: block;
  opacity: 1;
  transition: opacity .28s ease;
}
.nw-kfgx-viz img.is-fading { opacity: .25; }
.nw-kfgx-caption {
  position: absolute;
  z-index: 2;
  bottom: 14px;
  right: 14px;
  background: rgba(16, 24, 40, .78);
  color: #fff;
  font: 700 12px Inter, sans-serif;
  padding: 9px 13px;
  border-radius: 8px;
}
.nw-kfgx-caption:empty { display: none; }

/* ===== панель шагов (правая колонка) ===== */
.nw-kfgx-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--kx-line);
  border-radius: 14px;
  box-shadow: 0 10px 44px rgba(16, 24, 40, .08);
  overflow: hidden;
}

/* табы кроков */
.nw-kfgx-ktabs { display: flex; background: #F4F6F8; border-bottom: 1px solid var(--kx-line); }
.nw-kfgx-ktab {
  flex: 1;
  border: 0;
  background: none;
  padding: 12px 10px 11px;
  font: 700 13px Inter, sans-serif;
  color: var(--kx-mut);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color .15s ease, background .15s ease;
}
.nw-kfgx-ktab span {
  display: block;
  font: 700 10px Inter, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #98A2B3;
  margin-bottom: 2px;
}
.nw-kfgx-ktab:hover { color: var(--kx-ink); }
.nw-kfgx-ktab.is-on { background: #fff; color: var(--kx-ink); border-bottom-color: var(--kx-brand); }
.nw-kfgx-ktab.is-on span { color: var(--kx-brand); }
.nw-kfgx-ktab.is-done span { color: #12805C; }

/* область шагов */
.nw-kfgx-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px 8px;
  padding: 20px 22px;
}
.nw-kfgx-group { grid-column: 1 / -1; min-width: 0; }
.nw-kfgx-group.is-off, .nw-kfgx-sidehdr.is-off, .nw-kfgx-incl.is-off { display: none !important; }
/* скрытие элементов прайс-бокса классом (атрибут hidden рантайм срезает) */
.nw-kfgx-off { display: none !important; }

/* заголовок шага: ЗАГЛАВНЫЕ + текущий выбор справа */
.nw-kfgx-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 9px;
}
.nw-kfgx-t { font: 700 11px Inter, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--kx-mut); }
.nw-kfgx-t small { font: 600 10px Inter, sans-serif; color: var(--kx-mut); letter-spacing: 0; }
.nw-kfgx-cur {
  font: 700 12px Inter, sans-serif;
  color: var(--kx-brand);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60%;
}

/* nápověda (ⓘ) */
.nw-kfgx-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  margin-left: 6px;
  border: 1px solid var(--kx-mut);
  border-radius: 50%;
  background: #fff;
  color: var(--kx-mut);
  font: italic 700 10px Georgia, serif;
  line-height: 1;
  cursor: pointer;
  vertical-align: 1px;
}
.nw-kfgx-help:hover { border-color: var(--kx-brand); color: var(--kx-brand); }
.nw-kfgx-helptext {
  display: none; /* открывается классом is-open: атрибут hidden рантайм срезает */
  background: var(--kx-cream);
  border: 1px solid #EAD9C6;
  border-radius: 10px;
  padding: 10px 12px;
  font: 400 12.5px/1.55 Inter, sans-serif;
  color: #4A4238;
  margin-bottom: 9px;
  max-height: 180px;
  overflow-y: auto;
}
.nw-kfgx-helptext.is-open { display: none; } /* инлайн-блок отключён: текст показывает .nw-kfgx-tip */
.nw-kfgx-helptext[hidden] { display: none; }

/* чипы-кнопки (размеры, монтаж и пр.): выбранный = тёмный */
.nw-kfgx-row { display: flex; gap: 6px; flex-wrap: wrap; }
.nw-kfgx-group[data-type="size"] .nw-kfgx-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
}
.nw-kfgx-btn {
  border: 1.5px solid var(--kx-line);
  background: #fff;
  border-radius: 9px;
  padding: 10px 12px;
  font: 700 13px Inter, sans-serif;
  color: var(--kx-ink);
  cursor: pointer;
  min-width: 52px;
  text-align: center;
  transition: border-color .15s, background .15s, color .15s;
}
.nw-kfgx-btn:hover { border-color: var(--kx-brand); }
.nw-kfgx-btn.is-on { background: var(--kx-ink); border-color: var(--kx-ink); color: #fff; }
.nw-kfgx-btn.is-dis { opacity: .35; cursor: default; }
.nw-kfgx-msur { font: 400 11.5px Inter, sans-serif; opacity: .85; margin-left: 4px; }
.nw-kfgx-msur:empty { display: none; }

/* цветовые свотчи-карточки с RAL (как в макете) */
.nw-kfgx-sw {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 40%;
  border: 1.5px solid var(--kx-line);
  background: #fff;
  border-radius: 11px;
  padding: 11px 14px;
  font: 700 13px Inter, sans-serif;
  color: var(--kx-ink);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s;
}
.nw-kfgx-sw:hover { border-color: var(--kx-brand); }
.nw-kfgx-sw.is-on { border-color: var(--kx-ink); box-shadow: 0 0 0 1px var(--kx-ink) inset; }
.nw-kfgx-chip { width: 24px; height: 24px; border-radius: 6px; border: 1px solid rgba(16, 24, 40, .18); flex: none; }
.nw-kfgx-swl small { display: block; font-weight: 500; font-size: 11px; color: var(--kx-mut); }

/* блок сторон: заголовок + строки «Название …… select» (как в макете) */
.nw-kfgx-sidehdr {
  grid-column: 1 / -1;
  border-top: 1px solid var(--kx-line);
  padding-top: 14px;
  margin-bottom: -8px;
}
.nw-kfgx-group--siderow { grid-column: 1 / -1; }
.nw-kfgx-siderow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1.5px solid var(--kx-line);
  border-radius: 10px;
  padding: 7px 8px 7px 13px;
  min-width: 0;
}
.nw-kfgx-sidename { font: 600 13px Inter, sans-serif; color: var(--kx-ink); white-space: nowrap; }
.nw-kfgx-sideprice { font: 600 11px Inter, sans-serif; color: var(--kx-brand); }
.nw-kfgx-sideprice:empty { display: none; }
.nw-kfgx-sel--side {
  width: auto;
  max-width: 55%;
  border: 0;
  padding: 6px 4px;
  font: 600 13px Inter, sans-serif;
  color: var(--kx-brand-dark);
  text-align: right;
  background: #fff;
  cursor: pointer;
}
.nw-kfgx-sel--side:focus { outline: none; }

/* длинные списки */
.nw-kfgx-sel {
  border: 1.5px solid var(--kx-line);
  border-radius: 9px;
  padding: 10px 12px;
  font: 500 13.5px Inter, sans-serif;
  color: var(--kx-ink);
  background: #fff;
  width: 100%;
  cursor: pointer;
}
.nw-kfgx-sel:focus { border-color: var(--kx-brand); outline: none; }
.nw-kfgx-sel--side { border: 0; width: auto; }

/* «V ceně zahrnuto»: компактные строки (виден на кроке Souhrn) */
.nw-kfgx-incl { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--kx-line); padding-top: 12px; }
.nw-kfgx-incl-t { font: 700 11px Inter, sans-serif; letter-spacing: .1em; color: var(--kx-mut); text-transform: uppercase; margin-bottom: 6px; }
.nw-kfgx-incl-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed #F0F2F4;
  font: 500 13px Inter, sans-serif;
  color: var(--kx-ink);
}
.nw-kfgx-incl-row:last-child { border-bottom: 0; }
.nw-kfgx-incl-row b { font: 600 12.5px Inter, sans-serif; color: #12805C; white-space: nowrap; }

/* навигация мастера */
.nw-kfgx-wiznav { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; }
.nw-kfgx-wizback { border: 1.5px solid var(--kx-line); background: #fff; border-radius: 10px; padding: 11px 20px; font: 600 13.5px Inter, sans-serif; color: var(--kx-ink); cursor: pointer; transition: border-color .15s ease; }
.nw-kfgx-wizback:hover { border-color: var(--kx-brand); }
.nw-kfgx-wizback:disabled { opacity: .35; cursor: default; }
.nw-kfgx-wizback:disabled:hover { border-color: var(--kx-line); }
.nw-kfgx-wiznext { border: 0; background: var(--kx-ink); color: #fff; border-radius: 10px; padding: 11px 28px; font: 700 13.5px Inter, sans-serif; cursor: pointer; transition: background .15s ease; }
.nw-kfgx-wiznext:hover { background: #26303f; }

/* тёмный ценовой блок: визуальные стили общие с обычным товаром — в product.css;
   здесь только позиция внутри флекс-панели */
.nw-kfgx-pricebox { margin-top: auto; }

/* панель: внутренняя прокрутка, ценовой блок прилипает к низу */
@media (min-width: 1001px) {
  .nw-kfgx-panel { position: sticky; top: 86px; max-height: calc(100vh - 110px); }
  .nw-kfgx-steps { overflow-y: auto; flex: 1; min-height: 0; scrollbar-width: thin; scrollbar-color: #CDD5DF transparent; }
  .nw-kfgx-steps::-webkit-scrollbar { width: 6px; }
  .nw-kfgx-steps::-webkit-scrollbar-thumb { background: #CDD5DF; border-radius: 99px; }
}

/* ===== мобильная версия ===== */
@media (max-width: 1000px) {
  .nw-kfgx { grid-template-columns: 1fr; gap: 16px; }
  .nw-kfgx-steps { padding: 16px 14px; }
  .nwhk-pick { padding: 10px 14px 0; }
  .nw-kfgx-pricebox { padding: 13px 14px 15px; position: sticky; bottom: 0; z-index: 6; }
  .nw-kfgx-price { font-size: 23px; }
}
@media (max-width: 560px) {
  .nw-kfgx-sw { flex-basis: 100%; }
  .nw-kfgx-actions { flex-direction: column; }
  .nw-kfgx-ktab { padding: 10px 6px 9px; font-size: 12px; }
  .nw-kfgx-siderow { flex-wrap: wrap; }
  .nw-kfgx-sel--side { max-width: 100%; }
}

/* всплывающее окошко подсказки шага (крепится к body, поверх прокрутки панели) */
.nw-kfgx-tip {
  position: fixed;
  z-index: 9999;
  display: none;
  background: #101828;
  color: #fff;
  border-radius: 10px;
  padding: 11px 13px;
  font: 400 12.5px/1.55 Inter, system-ui, sans-serif;
  box-shadow: 0 16px 44px rgba(16, 24, 40, .3);
  max-height: 46vh;
  overflow-y: auto;
  pointer-events: none;
}
.nw-kfgx-tip.is-on { display: block; }
/* треугольник-указатель на иконку ⓘ (позиция по --tip-arrow ставится из kfg.js) */
.nw-kfgx-tip::after {
  content: "";
  position: absolute;
  left: var(--tip-arrow, 20px);
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  bottom: 100%;
  border-width: 0 8px 8px 8px;
  border-color: transparent transparent #101828 transparent;
}
.nw-kfgx-tip.is-up::after {
  bottom: auto;
  top: 100%;
  border-width: 8px 8px 0 8px;
  border-color: #101828 transparent transparent transparent;
}

/* ===== виджет главной (наш конфигуратор в тёмной карте) ===== */
.nwhk { margin: 0; grid-template-columns: minmax(0, 1fr) 440px; gap: 0; background: #101828;
  border-radius: 14px; overflow: hidden; align-items: stretch; }
.nwhk .nwhk-viz { border-radius: 0; min-height: 560px; }
.nwhk .nwhk-viz img { height: 100%; aspect-ratio: auto; object-fit: cover; }
.nwhk .nw-kfg-tag { position: absolute; z-index: 2; top: 18px; left: 18px; display: inline-flex;
  align-items: center; gap: 8px; background: rgba(16,24,40,.55); border: 1px solid rgba(255,255,255,.28);
  border-radius: 6px; padding: 7px 12px; font: 700 11px Inter, sans-serif; letter-spacing: .08em;
  text-transform: uppercase; color: #fff; }
.nwhk-panel { border: 0; border-radius: 0; box-shadow: none; max-height: none; position: static; }
.nwhk-head { padding: 22px 24px 4px; }
.nwhk-head-t { font: 800 20px/1.25 Inter, sans-serif; letter-spacing: -0.02em; color: #101828; }
/* переключатель исполнения (volně stojící / na zeď) в виджете главной (_home-kfg.php).
   Ссылки, а не кнопки: переключение серверное через ?kfg=, kfg.js их не трогает. */
.nwhk-pick { padding: 10px 24px 0; }   /* те же 24px, что у .nwhk-head и .nwhk-steps */
.nwhk-pick-a { cursor: pointer; }
#konfigurator.is-swapping { opacity: .55; pointer-events: none; transition: opacity .12s ease; }
.nwhk-pick-t { display: block; margin-bottom: 7px; font: 700 11px/1 Inter, sans-serif;
               letter-spacing: .08em; color: #667085; }
.nwhk-pick-row { display: flex; flex-wrap: wrap; gap: 7px; }
.nwhk-pick-a { padding: 8px 13px; font-family: inherit; border: 1px solid #E4E7EC; border-radius: 9px; background: #fff;
               font: 600 13px/1.2 Inter, sans-serif; color: #344054; transition: border-color .15s ease, color .15s ease; }
.nwhk-pick-a:hover { border-color: #A9633A; color: #A9633A; text-decoration: none; }
.nwhk-pick-a.is-on { border-color: #101828; background: #101828; color: #fff; }

.nwhk-head-n { margin: 6px 0 14px; font: 400 13px/1.55 Inter, sans-serif; color: #667085; }
.nwhk-prod { display: flex; align-items: center; gap: 11px; padding: 10px; border: 1px solid #E4E7EC;
  border-radius: 11px; background: #F8F9FB; text-decoration: none; transition: border-color .15s ease; }
.nwhk-prod:hover { border-color: #A9633A; text-decoration: none; }
.nwhk-prod img { width: 54px; height: 42px; object-fit: cover; border-radius: 7px; flex: none; background: #fff; }
.nwhk-prod b { display: block; font: 700 13px/1.35 Inter, sans-serif; color: #101828; }
.nwhk-prod small { display: block; font: 600 11.5px Inter, sans-serif; color: #A9633A; margin-top: 2px; }
.nwhk-steps { padding: 16px 24px 20px; grid-template-columns: 1fr; }
@media (max-width: 1000px) {
  .nwhk { grid-template-columns: 1fr; }
  .nwhk .nwhk-viz { min-height: 280px; }
  .nwhk-head { padding: 18px 16px 4px; }
  .nwhk-steps { padding: 14px 16px 18px; }
}

/* подсказка под кнопками прайс-бокса (бриф CTA-1, раздел 06) */
.nw-kfgx-ctanote { margin: 10px 0 0; font: 500 12px/1.45 Inter, sans-serif; color: #98A2B3; }
