/* ==========================================================================
   tpl-info.css — Модульные стили информационных страниц (v1)
   Цены (price), Акции (aktsii) + общие блоки для будущих info-страниц
   (contacts / dostavka / otzyvy). Дополняемый модуль — новые секции
   дописывайте в конец файла, не изменяя уже определённые блоки.
   ========================================================================== */

/* ---------- 1. Текущее состояние в сквозной навигации ---------- */
/* На страницах price/aktsii tpl-service.css не подключается, поэтому
   «текущий» пункт в шапке подсвечиваем здесь, единообразно для всех info-страниц. */
.hdr__nav a.is-current-nav,
.hdr__nav a[aria-current="page"] {
  color: var(--emerald);
}

.hdr__top-links a[aria-current="page"] {
  color: var(--emerald);
  font-weight: 700;
}

/* Юнит цены в строках прайса (tpl-service.css здесь не подключается) */
.p-card__unit {
  font-style: normal;
  font-size: 0.82em;
  font-weight: 700;
  color: var(--muted);
  margin-left: 3px;
}

/* ---------- 2. Плавающая секционная навигация (price / длинные info-страницы) ---------- */
.info-nav {
  position: sticky;
  top: 110px;
  z-index: 90;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(10px);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.info-nav .container {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-block: 10px;
}

.info-nav .container::-webkit-scrollbar {
  display: none;
}

.info-nav a {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: #FFFFFF;
  color: var(--muted-2);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.16s var(--ease);
}

.info-nav a b {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--emerald);
}

.info-nav a:hover {
  border-color: var(--emerald);
  color: var(--ink);
}

.info-nav a.is-active {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #FFFFFF;
}

.info-nav a.is-active b {
  color: #FFFFFF;
}

/* ---------- 3. Живой фильтр прайс-листа ---------- */
.info-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  max-width: 760px;
  background: #FFFFFF;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 8px 10px 8px 18px;
  box-shadow: var(--shadow);
}

.info-filter > svg {
  color: var(--muted);
  flex-shrink: 0;
}

.info-filter input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

.info-filter input::placeholder {
  color: #9AA5B5;
}

.info-filter__count {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.info-filter__clear {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.info-filter-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px dashed var(--line);
  color: var(--muted-2);
  font-size: 14px;
}

.info-filter-empty svg {
  color: var(--muted);
  flex-shrink: 0;
}

/* ---------- 4. Кнопка «В расчёт» в строке прайса ---------- */
.price-add {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid var(--sage-border);
  background: var(--sage);
  color: var(--sage-ink);
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.price-add__ico {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(14, 124, 82, 0.14);
  color: var(--emerald);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}

.price-add:hover {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #FFFFFF;
}

.price-add:hover .price-add__ico {
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
}

.price-add.is-added {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #FFFFFF;
}

.price-add.is-added .price-add__ico {
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
}

/* ---------- 5. Плавающая нижняя панель сметы ---------- */
.estimate-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 20px;
  z-index: 250;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}

.estimate-bar__in {
  pointer-events: auto;
  width: min(820px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--graphite);
  color: #FFFFFF;
  border-radius: 20px;
  padding: 12px 14px 12px 20px;
  box-shadow: 0 18px 50px rgba(17, 19, 23, 0.32);
}

.estimate-bar__count {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #94A3B8;
}

.estimate-bar__total {
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
}

.estimate-bar__total strong {
  font-size: 21px;
  color: #6EE7B7;
  font-variant-numeric: tabular-nums;
}

.estimate-bar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.estimate-bar__clear {
  height: 42px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: #CBD5E1;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.estimate-bar__clear:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.estimate-bar__actions .btn {
  height: 42px;
}

/* ---------- 6. Панель «Собрать свой расчёт» (встроенная сводка) ---------- */
.estimate-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: stretch;
}

.estimate-panel__list {
  background: #FFFFFF;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 120px;
}

.estimate-empty {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  padding: 24px;
  text-align: center;
}

.estimate-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
}

.estimate-line__name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.estimate-line__name i {
  font-style: normal;
  color: var(--muted);
  font-weight: 600;
  font-size: 12.5px;
}

.estimate-line__price {
  font-size: 14px;
  font-weight: 800;
  color: var(--sage-ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.estimate-line__del {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
  background: #FFFFFF;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.estimate-line__del:hover {
  background: #FEE2E2;
  color: #DC2626;
  border-color: #FECACA;
}

.estimate-panel__side {
  background: #FFFFFF;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.estimate-panel__side .pill {
  align-self: flex-start;
}

.estimate-panel__total {
  font-size: 15px;
  font-weight: 700;
  color: var(--muted-2);
}

.estimate-panel__total strong {
  display: block;
  margin-top: 2px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.estimate-panel__side small {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}

.estimate-panel__side .btn {
  margin-top: auto;
}

/* ---------- 7. Витрина акций: сетка 3 колонки + широкая карточка ---------- */
@media (min-width: 768px) {
  .promo-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .promo--wide {
    grid-column: 1 / -1;
    min-height: 0;
  }
}

.info-lead {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted-2);
  max-width: 700px;
}

.info-meta {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- 8. Прозрачные правила акций ---------- */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.rule-card {
  background: #FFFFFF;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rule-card__num {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--sage);
  border: 1px solid var(--sage-border);
  color: var(--emerald);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.rule-card h3,
.rule-card h4 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.28;
  color: var(--ink);
}

.rule-card p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted-2);
}

/* ---------- 9. Как зафиксировать скидку (шаги) ---------- */
.fix-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.fix-step {
  background: #FFFFFF;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fix-step b {
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
  color: var(--emerald);
  font-variant-numeric: tabular-nums;
}

.fix-step h3,
.fix-step h4 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.28;
  color: var(--ink);
}

.fix-step p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted-2);
}

/* ==========================================================================
   АДАПТИВНОСТЬ ИНФОРМАЦИОННЫХ СТРАНИЦ
   ========================================================================== */
@media (max-width: 1100px) {
  .info-nav {
    top: 62px;
  }

  .estimate-panel {
    grid-template-columns: 1fr;
  }

  .estimate-panel__side .btn {
    margin-top: 0;
  }

  .rules-grid,
  .fix-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .estimate-bar {
    bottom: calc(70px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 767px) {
  .info-filter {
    padding-left: 14px;
  }

  .info-filter__count {
    display: none;
  }

  .estimate-bar {
    padding: 0 10px;
  }

  .estimate-bar__in {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
  }

  .estimate-bar__actions {
    width: 100%;
    justify-content: space-between;
  }

  .estimate-bar__actions .btn {
    flex: 1;
  }

  .estimate-panel__list {
    padding: 12px;
  }

  .estimate-panel__side {
    padding: 18px 16px;
  }

  .rules-grid,
  .fix-steps {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   ДОПОЛНЕНИЕ: Контакты / Доставка / Отзывы (Шаблон №7)
   ========================================================================== */
/* ---------- 10. Панель фильтра отзывов и счётчик ---------- */
.reviews-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.reviews-toolbar .tabs {
  margin-bottom: 0;
}

.reviews-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 767px) {
  .reviews-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ---------- Jobs (Вакансии) ---------- */
.jobs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.job-card { background: #fff; border: 1px solid var(--line-soft); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.job-card__head { display: flex; align-items: flex-start; gap: 12px; }
.job-card__head h3 { font-size: 17px; font-weight: 800; margin: 0 0 4px; color: var(--ink); }
.job-card__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.job-card__cols b { font-size: 13px; font-weight: 700; color: var(--ink); display: block; margin-bottom: 6px; }
.job-card ul { margin: 0; padding: 0 0 0 16px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.45; color: var(--muted-2); }
.job-card__foot { margin-top: auto; }
@media (max-width: 820px) { .jobs-grid, .job-card__cols { grid-template-columns: 1fr; } }

/* ---------- Reviews pagination ---------- */
.reviews-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: 24px; }
.reviews-pager__btn { min-width: 40px; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-soft); background: #fff; color: var(--ink); font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer; transition: border-color .18s ease, color .18s ease, background .18s ease; }
.reviews-pager__btn:hover:not(:disabled) { border-color: var(--emerald); color: var(--emerald); }
.reviews-pager__btn.is-active { background: var(--emerald); border-color: var(--emerald); color: #fff; }
.reviews-pager__btn:disabled { opacity: .4; cursor: default; }
.reviews-pager__dots { padding: 0 4px; color: var(--muted); }


/* Смета: подсветка выбранных кнопок и строк */
.price-add.is-added {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #FFFFFF;
}

.price-add.is-added .price-add__ico {
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
}

.estimate-line {
  animation: estimateIn 0.18s ease;
}

@keyframes estimateIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* Смета: мобильная подстройка строк */
@media (max-width: 600px) {
  .estimate-line {
    gap: 8px;
    padding: 10px 12px;
  }
  .estimate-line__name { font-size: 13px; }
  .estimate-line__price { font-size: 13px; white-space: normal; text-align: right; }
  .estimate-panel__total strong { font-size: 26px; }
}

@media (min-width: 768px) {
  .rule-card--wide {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 18px;
  }
  .rule-card--wide .rule-card__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
}

.measure-diagram {
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.measure-diagram svg { width: 100%; max-width: 220px; height: auto; display: block; }
.measure-diagram__caption b { display: block; font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.measure-diagram__caption p { font-size: 13.5px; line-height: 1.5; color: var(--muted-2); }
@media (max-width: 767px) { .measure-diagram { grid-template-columns: 1fr; } }
