
/* ===== Шапка раздела подбора ===== */
body { margin: 0; background: #fff; font-family: 'Open Sans', Roboto, Arial, sans-serif; }

.shead {
  position: sticky;
  top: 0;
  background: #c9d6e4;
  color: #0c243b;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
}
.shead__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 104rem;
  margin: 0 auto;
  padding: 0 1.875rem;
  min-height: 4rem;
}

.shead__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 11rem;
  min-height: 2.5rem;
  flex: none;
  color: #0c243b;
  text-decoration: none;
}
.shead__logo img { display: block; width: 11rem; height: auto; max-height: 3.25rem; object-fit: contain; }

.shead__nav { display: flex; align-items: center; gap: 1.75rem; }
.shead__link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: #0c243b;
  text-decoration: none;
  font-size: .875rem;
  opacity: .92;
  transition: opacity .2s;
}
.shead__link:hover { opacity: 1; text-decoration: underline; }
.shead__ico { width: 1.25rem; height: 1.25rem; flex: none; }
.shead__return {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.75rem;
  padding: .65rem 1rem;
  border: 1px solid #00478f;
  background: #fff;
  color: #00478f;
  text-decoration: none;
  font-size: .875rem;
  font-weight: 700;
  transition: background .2s,color .2s;
}
.shead__return:hover { background: #00478f; color: #fff; }

/* контент раздела: своя шапка вместо общей — верхний отступ не нужен */
.sbody .srch { padding-top: 2rem; }

@media (width <= 620px) {
  .shead__in { padding: 0 1.25rem; min-height: 3.25rem; gap: .75rem; }
  .shead__logo { min-width: 0; min-height: 2rem; }
  .shead__logo img { width: 7rem; max-height: 2.6rem; }
  .shead__catalog { display: none; }
  .shead__cabinet span { display: none; }
  .shead__nav { gap: .5rem; }
  .shead__return { min-height: 2.35rem; padding: .45rem .65rem; }
  .shead__return span { display: none; }
  .shead__ico { width: 1.35rem; height: 1.35rem; }
  .sbody .srch { padding-top: 1.25rem; }
}

/* Подбор оборудования — шапка раздела и экраны подбора.
   Палитра: #00478F, #E6332A, #C9D6E4, #0C243B, #F5F5F5. */

.srch {
  --s-blue: #00478f;
  --s-red: #e6332a;
  --s-light: #c9d6e4;
  --s-dark: #0c243b;
  --s-grey: #f5f5f5;

  max-width: 104rem;
  margin: 0 auto;
  padding: 9rem 1.875rem 7rem;
  font-family: 'Open Sans', Roboto, Arial, sans-serif;
  color: rgba(0, 0, 0, .87);
}

/* ---- верхняя строка ---- */
.srch__bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--s-light);
}
.srch__h1 { margin: 0; font-size: 1.75rem; color: var(--s-dark); }
.srch__lk { color: var(--s-blue); text-decoration: none; font-size: .9rem; }
.srch__lk:hover { text-decoration: underline; }

/* ---- раскладка: шаги слева, контент справа ---- */
.srch__layout {
  display: grid;
  grid-template-columns: 15rem 1fr;
  gap: 2.25rem;
  margin-top: 1.75rem;
  align-items: start;
}
.srch__main { min-width: 0; }

.srch__steps { margin: 0; padding: 0; list-style: none; }
.srch__step {
  padding: .9rem 1rem;
  border-left: 3px solid transparent;
  color: #5a6b7d;
  cursor: pointer;
  font-size: .95rem;
  transition: background .2s, color .2s, border-color .2s;
}
.srch__step span { font-weight: 700; margin-right: .35rem; }
.srch__step:hover { background: var(--s-grey); }
.srch__step.is-done { color: var(--s-blue); }
.srch__step.is-active {
  background: var(--s-grey);
  border-left-color: var(--s-blue);
  color: var(--s-blue);
  font-weight: 600;
}

/* ---- контент ---- */
.srch__title { margin: 0 0 .4rem; font-size: 1.2rem; color: var(--s-dark); }
.srch__hint { margin: 0 0 1.4rem; color: #6b7a8a; font-size: .875rem; }
.srch__load { color: #6b7a8a; }
.srch__err { color: var(--s-red); }

/* ---- карточки категорий и оборудования ---- */
.srch__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
  gap: 1.25rem;
}
.srch__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: 1.25rem 1rem;
  border: 1px solid var(--s-light);
  border-radius: .25rem;
  background: #fff;
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
.srch__card:hover {
  border-color: var(--s-blue);
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .12);
  transform: translateY(-2px);
}
.srch__card.is-sel {
  border-color: var(--s-blue);
  box-shadow: inset 0 0 0 2px var(--s-blue);
}
.srch__card-pic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 8rem;
}
.srch__card-pic img { max-width: 100%; max-height: 100%; object-fit: contain; }
.srch__card-name { font-size: .95rem; color: var(--s-dark); }
.srch__card-code {
  font-size: .8rem;
  font-weight: 700;
  color: var(--s-blue);
  letter-spacing: .03em;
}
.srch__cards--purposes { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.srch__purpose-card {
  min-height: 10rem;
  justify-content: center;
  padding: 1.5rem 1.25rem;
}
.srch__purpose-card .srch__card-name { font-size: 1.05rem; font-weight: 700; }
.srch__purpose-desc { min-height: 2.4em; color: #6b7a8a; font-size: .85rem; line-height: 1.4; }
.srch__items-more { margin-top: 1.25rem; text-align: center; }
.srch__selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: -.5rem 0 1rem;
  padding: .65rem .85rem;
  border-radius: .25rem;
  background: var(--s-grey);
  color: var(--s-dark);
  font-size: .875rem;
}
.srch__clear { border: 0; background: transparent; color: var(--s-blue); font: inherit; cursor: pointer; }
.srch__clear:hover { text-decoration: underline; }

/* ---- параметры ---- */
.srch__params {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.25rem 1.5rem;
}
.srch__field { display: flex; flex-direction: column; gap: .4rem; }
.srch__label { font-size: .8rem; color: #5a6b7d; }
.srch__input,
.srch__select {
  padding: .7rem .9rem;
  border: 1px solid var(--s-light);
  border-radius: .25rem;
  font: inherit;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}
.srch__input:focus,
.srch__select:focus { outline: none; border-color: var(--s-blue); }
.srch__flow-entry { display: flex; gap: .4rem; align-items: stretch; }
.srch__flow-entry .srch__input { flex: 1 1 auto; min-width: 0; }
.srch__flow-unit {
  flex: 0 0 6.4rem;
  padding: .7rem .4rem;
  border: 1px solid var(--s-light);
  border-radius: .25rem;
  background: #fff;
  font: inherit;
  cursor: pointer;
}
.srch__flow-unit:focus { outline: none; border-color: var(--s-blue); }
.srch__presets { display: none; flex-wrap: wrap; gap: .3rem; }
.srch__preset {
  padding: .25rem .6rem;
  border: 1px solid var(--s-light);
  border-radius: 1rem;
  background: #fff;
  font: inherit;
  font-size: .8rem;
  cursor: pointer;
}
.srch__preset:hover { border-color: var(--s-blue); color: var(--s-blue); }

.srch__shevelev {
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--s-light);
  border-left: 4px solid var(--s-blue);
  border-radius: .25rem;
  background: #f8fbfe;
}
.srch__shevelev-title { margin: 0 0 .35rem; font-size: 1rem; color: #143350; }
.srch__shevelev-meta { margin: 0 0 .65rem; color: #526a7f; font-size: .85rem; }
.srch__shevelev-value { margin: 0 0 .45rem; color: #143350; }
.srch__shevelev-value strong { font-size: 1.15rem; }
.srch__shevelev-detail { margin: 0 0 .5rem; font-size: .85rem; }
.srch__shevelev-note { margin: 0; color: #61758a; font-size: .78rem; line-height: 1.45; }
.srch__shevelev-note a { color: var(--s-blue); }

/* ---- результаты ---- */
.srch__results { display: flex; flex-direction: column; gap: 1rem; }
.srch__res {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--s-light);
  border-radius: .25rem;
  background: #fff;
  flex-wrap: wrap;
}
.srch__res-main {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 1 1 20rem;
  text-decoration: none;
  color: inherit;
}
.srch__res-pic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 7rem;
  height: 7rem;
  flex: none;
  background: var(--s-grey);
}
.srch__res-pic img { max-width: 100%; max-height: 100%; object-fit: contain; }
.srch__res-body { display: flex; flex-direction: column; gap: .5rem; }
.srch__res-name { font-weight: 600; color: var(--s-dark); }
.srch__res-main:hover .srch__res-name { color: var(--s-blue); }
.srch__res-chars { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; }
.srch__ch { font-size: .85rem; }
.srch__ch i { display: block; font-style: normal; color: #6b7a8a; font-size: .78rem; }
.srch__pdf {
  padding: .5rem 1rem;
  border: 1px solid var(--s-blue);
  border-radius: 1.5rem;
  color: var(--s-blue);
  text-decoration: none;
  font-size: .85rem;
  white-space: nowrap;
}
.srch__pdf:hover { background: var(--s-blue); color: #fff; }
.srch__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* ---- нижняя панель ---- */
.srch__foot {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.25rem;
  padding: 1rem 0;
  background: #fff;
  border-top: 1px solid var(--s-light);
  z-index: 5;
}
.srch__foot-right { display: flex; gap: .75rem; }
.srch__found { color: var(--s-blue); font-weight: 600; font-size: .9rem; }

.srch__btn {
  display: inline-block;
  padding: .7rem 1.6rem;
  border: 1px solid var(--s-blue);
  border-radius: 1.75rem;
  background: var(--s-blue);
  color: #fff;
  text-decoration: none;
  font: inherit;
  font-size: .9rem;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.srch__btn:hover { background: var(--s-dark); border-color: var(--s-dark); }
.srch__btn--ghost { background: transparent; color: var(--s-blue); }
.srch__btn--ghost:hover { background: var(--s-light); color: var(--s-dark); }
.srch__btn:disabled { opacity: .4; cursor: default; }

/* ---- адаптив ---- */
@media (width <= 1440px) {
  .srch { padding-top: 7rem; }
}

@media (width <= 900px) {
  .srch__layout { grid-template-columns: 1fr; gap: 1.25rem; }

  /* шаги — горизонтальной лентой */
  .srch__steps {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    border-bottom: 1px solid var(--s-light);
  }
  .srch__step {
    border-left: 0;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    padding: .7rem .9rem;
  }
  .srch__step.is-active { border-left: 0; border-bottom-color: var(--s-blue); }
}

@media (width <= 620px) {
  .srch { padding: 6rem .75rem 5rem; }
  .srch__h1 { font-size: 1.4rem; }
  .srch__cards { grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .75rem; }
  .srch__card-pic { height: 6rem; }
  .srch__params { grid-template-columns: 1fr; }
  .srch__res-main { flex: 1 1 100%; }
  .srch__res-pic { width: 5rem; height: 5rem; }
  .srch__pdf { flex: 1 1 100%; text-align: center; }
  .srch__actions { flex-direction: column; }
  .srch__actions .srch__btn { text-align: center; }
  .srch__foot { flex-direction: column; align-items: stretch; }
  .srch__foot-right { justify-content: space-between; }
  .srch__foot-right .srch__btn { flex: 1 1 auto; text-align: center; }
  .srch__found { order: -1; text-align: center; }
}

/* ===== Финальный экран: список подобранных + карточка ===== */
.fin {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
}

/* список слева */
.fin__list {
  border: 1px solid var(--s-light);
  border-radius: .25rem;
  overflow: hidden;
  background: #fff;
}
.fin__filter {
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--s-light);
  background: #fff;
}
.fin__filter-label {
  display: block;
  margin-bottom: .4rem;
  color: var(--s-dark);
  font-size: .8rem;
  font-weight: 600;
}
.fin__filter-control { position: relative; }
.fin__filter-input {
  display: block;
  width: 100%;
  height: 2.5rem;
  padding: .55rem 2.3rem .55rem .75rem;
  border: 1px solid #cbd6e1;
  border-radius: .25rem;
  background: #fff;
  color: var(--s-dark);
  font: inherit;
  font-size: .875rem;
}
.fin__filter-input:focus {
  border-color: var(--s-blue);
  outline: 2px solid rgba(13, 95, 166, .18);
  outline-offset: 0;
}
.fin__filter-clear {
  position: absolute;
  top: 50%;
  right: .45rem;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #637689;
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.fin__filter-clear:hover { background: var(--s-grey); color: var(--s-dark); }
.fin__filter-empty {
  padding: 1rem;
  border-bottom: 1px solid var(--s-light);
  color: #637689;
  font-size: .85rem;
  text-align: center;
}
.fin__list-title {
  padding: .8rem 1rem;
  background: var(--s-grey);
  border-bottom: 1px solid var(--s-light);
  font-size: .85rem;
  font-weight: 600;
  color: var(--s-dark);
}
.fin__ol { margin: 0; padding: 0; list-style: none; max-height: 32rem; overflow-y: auto; }
.fin__list-group {
  padding: .55rem 1rem;
  background: #f5f8fb;
  border-bottom: 1px solid #e4ebf2;
  color: #53677a;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
}
.fin__more {
  display: block;
  width: 100%;
  padding: .75rem 1rem;
  border: 0;
  border-top: 1px solid var(--s-light);
  background: #fff;
  color: var(--s-blue);
  font: inherit;
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
}
.fin__more:hover { background: var(--s-grey); }
.fin__more:disabled { opacity: .55; cursor: default; }
.fin__li {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .7rem 1rem;
  border-bottom: 1px solid #eef2f6;
  cursor: pointer;
  font-size: .875rem;
  transition: background .15s, color .15s;
}
.fin__li:last-child { border-bottom: 0; }
.fin__li:hover { background: var(--s-grey); }
.fin__li.is-sel { background: var(--s-blue); color: #fff; }
.fin__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  border-radius: 50%;
  background: var(--s-light);
  color: var(--s-dark);
  font-size: .75rem;
  font-weight: 700;
}
.fin__li.is-sel .fin__num { background: #fff; color: var(--s-blue); }
.fin__li-name { line-height: 1.3; }
.fin__li[hidden], .fin__list-group[hidden], .fin__filter-empty[hidden], .fin__filter-clear[hidden] { display: none; }
.fin__rejected {
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid #f0c7c4;
  border-radius: .25rem;
  background: #fff8f7;
  color: #6b3c38;
  font-size: .85rem;
}
.fin__rejected-title { margin-bottom: .45rem; font-weight: 700; }
.fin__rejected ul { margin: 0; padding-left: 1.2rem; }
.fin__rejected li + li { margin-top: .35rem; }

/* карточка справа */
.fin__card {
  min-width: 0;
  border: 1px solid var(--s-light);
  border-radius: .25rem;
  background: #fff;
  padding: 1.5rem;
}
.fin__name { margin: 0 0 1rem; font-size: 1.25rem; color: var(--s-dark); }
.fin__pic {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 14rem;
  margin-bottom: 1.5rem;
  background: var(--s-grey);
}
.fin__pic img { max-width: 100%; max-height: 100%; object-fit: contain; }

.fin__curve {
  margin: 0 0 1.5rem;
  padding: 1rem;
  border: 1px solid #dce5ee;
  border-radius: .25rem;
  background: #fff;
}
.fin__curve--aux { margin-top: -.4rem; }
.fin__curve-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .65rem;
}
.fin__curve-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--s-dark);
}
.fin__curve-zoom { display: none; }
.fin__curve-scroll { min-width: 0; overflow-x: auto; overflow-y: hidden; }
.fin__curve img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
}
.fin__curve-note {
  margin-top: .45rem;
  color: #6b7a8a;
  font-size: .76rem;
}

.fin__groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;
}
.fin__group-title {
  margin-bottom: .6rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--s-blue);
  font-size: .85rem;
  font-weight: 700;
  color: var(--s-blue);
  text-transform: uppercase;
  letter-spacing: .02em;
}
.fin__rows { margin: 0; }
.fin__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .4rem 0;
  border-bottom: 1px dashed #e3e9ef;
  font-size: .875rem;
}
.fin__row:last-child { border-bottom: 0; }
.fin__row dt { color: #6b7a8a; margin: 0; }
.fin__row dd { margin: 0; font-weight: 600; color: var(--s-dark); text-align: right; }
.fin__row--collector dt { min-width: 0; }
.fin__row--collector dd { flex: 0 0 auto; white-space: nowrap; }

.fin__detail {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--s-blue);
  font-size: .875rem;
}

@media (width <= 900px) {
  .fin { grid-template-columns: 1fr; }
  .fin__ol { max-height: 14rem; }
}

@media (width <= 620px) {
  .fin__card { padding: .75rem; }
  .fin__name { font-size: 1.05rem; }
  .fin__pic { height: 10rem; }
  .fin__curve { margin-bottom: 1rem; padding: .4rem; }
  .fin__curve-zoom {
    display: inline-block;
    flex: none;
    padding: .3rem .45rem;
    border: 1px solid var(--s-blue);
    border-radius: .25rem;
    background: #fff;
    color: var(--s-blue);
    font: inherit;
    font-size: .72rem;
    cursor: pointer;
  }
  .fin__curve.is-zoomed .fin__curve-scroll img { width: 760px; max-width: none; }
  .fin__curve.is-zoomed .fin__curve-scroll { touch-action: pan-x; }
  .fin__groups { grid-template-columns: 1fr; gap: 1.25rem; }
  .fin__row { font-size: .82rem; }
}
