/* Страница-гайд «Конкурент ниже мин. цены» (/ru/below-min-price).
   Секции, контейнер, заголовки, кнопки и бейдж — из guide.css. Хедер и футер —
   из style.css языковой папки. Здесь только блоки этой страницы. */

.below-min{
  /* Цвета стратегий: «Бороться» — синий, «Минимальная» — фиолетовый */
  --bm-fight: var(--g-blue);
  --bm-min: var(--g-violet);
  --bm-axis: #d5d5dd;
}

/* Появление блоков при скролле — как на остальных гайдах */
@keyframes bmRise{
  from{ opacity: 0; transform: translateY(18px); }
  to{ opacity: 1; transform: none; }
}

@keyframes bmDraw{
  from{ transform: scaleX(0); }
  to{ transform: scaleX(1); }
}

@keyframes bmHop{
  0%{ transform: translateY(0) scale(1); }
  18%{ transform: translateY(-14px) scale(1.08); }
  62%{ transform: translateY(-8px) scale(1.04); }
  100%{ transform: translateY(0) scale(1); }
}

@keyframes bmRing{
  0%{ opacity: 0; transform: scale(.3); }
  25%{ opacity: .6; }
  100%{ opacity: 0; transform: scale(3); }
}

.below-min [data-reveal]{
  animation: bmRise .7s cubic-bezier(.2, .7, .2, 1) both;
}

@supports (animation-timeline: view()){
  .below-min [data-reveal]{
    animation: bmRise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 55%;
  }
}

/* Подзаголовок под h2 секции */
.below-min__lead{
  margin: 12px 0 0;
  max-width: 44em;
  font-size: 17px;
  line-height: 1.55;
  color: var(--g-muted);
  text-wrap: pretty;
}

.below-min__center{
  text-align: center;
}

.below-min__lead.below-min__center{
  margin-inline: auto;
}

/* Капсовые метки в цвете блока */
.below-min .below-min__label--ok{ color: var(--g-green-text); }
.below-min .below-min__label--alert{ color: var(--g-red-text); }
.below-min .below-min__label--fight{ color: var(--bm-fight); }
.below-min .below-min__label--min{ color: var(--bm-min); }

/* ---------------------------------------------------------------------------- */
/* 1. Первый экран */

.below-min-hero{
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: end;
}

.below-min-hero__side{
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.below-min-hero__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------------------------------------------------------------------------- */
/* 2. Демо: ценовая линейка карточки */

.below-min-demo{
  border-block: 1px solid var(--g-line);
  overflow: hidden;
}

.below-min-demo__head{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.below-min-demo__modes{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.below-min-demo__modes-label{
  font-size: 13px;
  color: var(--g-faint);
}

.below-min-switch{
  display: flex;
  overflow: hidden;
  border: 1px solid var(--g-line-2);
  border-radius: var(--g-radius-button);
  background: #ffffff;
}

.below-min .below-min-switch__button{
  padding: 10px 16px;
  border: 0;
  background: #ffffff;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: var(--g-muted);
  white-space: nowrap;
  transition: background .25s, color .25s;
}

.below-min .below-min-switch__button + .below-min-switch__button{
  border-left: 1px solid var(--g-line-2);
}

.below-min .below-min-switch__button[data-mode="fight"][aria-pressed="true"]{
  background: var(--bm-fight);
  color: #ffffff;
}

.below-min .below-min-switch__button[data-mode="min"][aria-pressed="true"]{
  background: var(--bm-min);
  color: #ffffff;
}

.below-min-ruler{
  --min-x: 46.15%;
  position: relative;
  height: 220px;
  margin-top: 28px;
}

/* Зона ниже минимальной цены */
.below-min-ruler__danger{
  position: absolute;
  left: 0;
  top: 38px;
  bottom: 46px;
  width: var(--min-x);
  border-right: 1px dashed var(--g-red);
  background: repeating-linear-gradient(135deg, var(--g-red-soft) 0 7px, #fff5f4 7px 14px);
}

.below-min-ruler__axis{
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--bm-axis);
}

.below-min-ruler__edge{
  position: absolute;
  top: calc(50% + 12px);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--g-faint);
}

.below-min-ruler__edge--left{ left: 0; }
.below-min-ruler__edge--right{ right: 0; }

.below-min-ruler__min-line{
  position: absolute;
  left: var(--min-x);
  top: 8px;
  bottom: 34px;
  width: 2px;
  background: var(--g-ink);
}

.below-min-ruler__min-pill{
  position: absolute;
  left: var(--min-x);
  top: 0;
  transform: translateX(-50%);
  padding: 5px 11px;
  border-radius: var(--g-radius-pill);
  background: var(--g-ink);
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
}

/* Конкурент на линейке: подпись, ножка и точка над осью */
.below-min-mark{
  position: absolute;
  z-index: 2;
  left: var(--x);
  bottom: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-bottom: 2px;
  transform: translateX(-50%);
  transition: left .45s cubic-bezier(.22, 1, .36, 1);
}

.below-min-mark__pill{
  padding: 4px 11px;
  border: 1px solid var(--g-line-2);
  border-radius: var(--g-radius-pill);
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
  color: var(--g-muted);
  white-space: nowrap;
  transition: background .3s, color .3s, border-color .3s;
}

.below-min-mark__stem{
  width: 1px;
  height: 16px;
  background: var(--bm-axis);
}

.below-min-mark__dot{
  box-sizing: border-box;
  width: 11px;
  height: 11px;
  border: 2px solid var(--g-faint);
  border-radius: 50%;
  background: #ffffff;
  transition: background .3s, border-color .3s, box-shadow .4s, opacity .3s;
}

.below-min-mark--high .below-min-mark__stem{
  height: 44px;
}

/* Демпер двигается ползунком и при сближении с соседом остаётся сверху */
.below-min-mark--dump{
  z-index: 4;
}

.below-min-mark--blocked .below-min-mark__dot{
  opacity: .5;
}

/* Демпер — красный, тот, перед кем встаёт бот, — синий */
.below-min-mark--dump .below-min-mark__pill,
.below-min-mark--aimed .below-min-mark__pill{
  border-color: transparent;
  color: #ffffff;
}

.below-min-mark--dump .below-min-mark__pill{ background: var(--g-red); }
.below-min-mark--aimed .below-min-mark__pill{ background: var(--bm-fight); }
.below-min-mark--dump .below-min-mark__stem{ background: #f0443855; }
.below-min-mark--aimed .below-min-mark__stem{ background: #007aff55; }

.below-min-mark--dump .below-min-mark__dot{
  border: 0;
  background: var(--g-red);
  box-shadow: 0 0 0 5px #f0443822;
  opacity: 1;
}

.below-min-mark--aimed .below-min-mark__dot{
  border: 0;
  background: var(--bm-fight);
  box-shadow: 0 0 0 5px #007aff1f;
  opacity: 1;
}

/* Ваша цена — под осью */
.below-min-you{
  position: absolute;
  z-index: 3;
  left: var(--x);
  top: calc(50% + 6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transform: translateX(-50%);
  transition: left .6s cubic-bezier(.22, 1, .36, 1);
}

.below-min-you__hop{
  position: relative;
  display: block;
}

.below-min-you__hop.is-hopping{
  animation: bmHop 1.05s cubic-bezier(.22, 1, .36, 1) both;
}

.below-min-you__dot{
  display: block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bm-fight);
  box-shadow: 0 0 0 5px #007aff22;
}

.below-min-you__ring{
  position: absolute;
  inset: 0;
  border: 2px solid var(--bm-fight);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.below-min-you__hop.is-hopping .below-min-you__ring{
  animation: bmRing 1s .8s cubic-bezier(.22, 1, .36, 1) both;
}

.below-min-you__stem{
  width: 1px;
  height: 16px;
  background: #007aff55;
}

.below-min-you__pill{
  padding: 4px 11px;
  border-radius: var(--g-radius-pill);
  background: var(--bm-fight);
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
}

/* Ползунок цены конкурента А */
.below-min-control{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--g-line);
}

.below-min-control__label{
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--g-muted);
  white-space: nowrap;
}

.below-min-control__range{
  flex: 1 1 220px;
  min-width: 160px;
}

.below-min-control__value{
  flex: 0 0 auto;
  min-width: 7ch;
  font-family: var(--g-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--g-title);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.below-min-range{
  display: block;
  width: 100%;
  height: 26px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: ew-resize;
}

.below-min-range::-webkit-slider-runnable-track{
  height: 2px;
  background: var(--bm-axis);
}

.below-min-range::-webkit-slider-thumb{
  width: 22px;
  height: 22px;
  margin-top: -10px;
  border: 1px solid #c7c7cf;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(24, 24, 24, .2);
  -webkit-appearance: none;
}

.below-min-range::-moz-range-track{
  height: 2px;
  background: var(--bm-axis);
}

.below-min-range::-moz-range-thumb{
  width: 20px;
  height: 20px;
  border: 1px solid #c7c7cf;
  border-radius: 50%;
  background: #ffffff;
}

.below-min-range:focus-visible{
  outline: 2px solid var(--bm-fight);
  outline-offset: 4px;
}

/* Итог: работает стратегия или нет */
.below-min-verdict{
  margin-top: 14px;
  padding: 16px 20px;
  border-left: 3px solid var(--g-red-text);
  background: var(--g-red-soft);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--g-red-text);
  transition: background .3s, color .3s, border-color .3s;
}

.below-min-verdict[data-state="ok"]{
  border-left-color: var(--g-green-text);
  background: var(--g-green-soft);
  color: var(--g-green-text);
}

.below-min-verdict p{
  margin: 0;
}

.below-min-caption{
  max-width: 58em;
  margin: 18px 0 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--g-text);
}

.below-min-caption.is-changed{
  animation: bmRise .45s cubic-bezier(.22, 1, .36, 1) both;
}

.below-min-caption__title{
  font-weight: 700;
}

.below-min-caption__title--fight{ color: var(--bm-fight); }
.below-min-caption__title--min{ color: var(--bm-min); }

/* ---------------------------------------------------------------------------- */
/* 3. Когда срабатывает, 5. Чем отличаются: две колонки с разделителем */

.below-min-split{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 44px;
  border-top: 1px solid var(--g-line);
}

.below-min-split__item{
  position: relative;
  min-width: 0;
  padding: 34px 34px 34px 0;
}

.below-min-split__item + .below-min-split__item{
  padding: 34px 0 34px 34px;
  border-left: 1px solid var(--g-line);
}

/* Цветная полоса сверху рисуется слева направо */
.below-min-split__item--bar::before{
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 3px;
  background: var(--bar, var(--g-red));
  transform-origin: left;
  animation: bmDraw .8s .3s cubic-bezier(.65, 0, .35, 1) both;
}

.below-min-formula{
  margin: 16px 0 0;
  font-family: var(--g-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--g-title);
}

.below-min-formula__sign--ok{ color: var(--g-green-text); }
.below-min-formula__sign--alert{ color: var(--g-red-text); }

.below-min-split__text{
  max-width: 30em;
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--g-muted);
}

.below-min-strategy--fight{ --bar: var(--bm-fight); }
.below-min-strategy--min{ --bar: var(--bm-min); }

.below-min-strategy__title{
  margin: 14px 0 0;
  font-family: var(--g-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--g-title);
}

.below-min-strategy__text{
  max-width: 34em;
  margin: 14px 0 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--g-text);
}

.below-min-strategy__list{
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.below-min-strategy__list li{
  padding: 14px 0;
  border-top: 1px solid var(--g-line);
  font-size: 15px;
  line-height: 1.55;
  color: var(--g-muted);
}

.below-min-callout{
  margin-top: 48px;
  padding: 18px 20px;
  border-left: 3px solid var(--g-red);
  background: var(--g-red-soft);
}

.below-min-callout p{
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--g-ink);
}

.below-min-callout strong{
  font-weight: 700;
}

/* ---------------------------------------------------------------------------- */
/* 4. Что делает бот на каждой проверке */

.below-min-steps{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.below-min-step{
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.below-min-step__marker{
  position: relative;
  display: flex;
  align-items: center;
  height: 31px;
}

.below-min-step__line{
  position: absolute;
  left: 31px;
  right: -32px;
  height: 1px;
  background: var(--g-line-2);
  transition: background 1.2s ease;
}

.below-min-step:last-child .below-min-step__line{
  display: none;
}

.below-min-step__num{
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid var(--g-line-2);
  border-radius: 50%;
  background: #ffffff;
  font-family: var(--g-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--g-muted);
  transition: background 1s ease, color 1s ease, border-color 1s ease, transform 1s cubic-bezier(.22, 1, .36, 1), box-shadow 1s ease;
}

.below-min-step__title{
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--g-ink);
  transition: color 1s ease;
}

.below-min-step__text{
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--g-muted);
  transition: opacity 1s ease;
}

/* Пока JS не запустил подсветку, все шаги видны полностью */
.below-min-steps.is-running .below-min-step__title{ color: #3d3d42; }
.below-min-steps.is-running .below-min-step__text{ opacity: .62; }

.below-min-step[data-state="done"] .below-min-step__num{
  border-color: var(--g-green);
  color: var(--g-green-text);
}

.below-min-step[data-state="done"] .below-min-step__line{
  background: var(--g-green);
}

.below-min-step[data-state="active"] .below-min-step__num{
  border-color: var(--g-green);
  background: var(--g-green);
  color: #ffffff;
  transform: scale(1.12);
  box-shadow: 0 0 0 6px rgba(52, 199, 89, .16);
}

.below-min-steps.is-running .below-min-step[data-state="active"] .below-min-step__title{ color: var(--g-ink); }
.below-min-steps.is-running .below-min-step[data-state="active"] .below-min-step__text{ opacity: 1; }

/* ---------------------------------------------------------------------------- */
/* 6. Какую стратегию выбрать */

.below-min-choose{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
  margin-top: 48px;
}

.below-min-choose__col{
  min-width: 0;
}

.below-min-choose__col::before{
  content: '';
  display: block;
  height: 3px;
  background: var(--bar);
  transform-origin: left;
  animation: bmDraw .7s .2s cubic-bezier(.65, 0, .35, 1) both;
}

.below-min-choose__label{
  margin: 0;
  padding-top: 14px;
}

.below-min-choose__list{
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.below-min-choose__item{
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--g-line-2);
}

.below-min-choose__item::before{
  content: '';
  justify-self: center;
  width: 6px;
  height: 6px;
  margin-top: 10px;
  border-radius: 50%;
  background: var(--bar);
}

.below-min-choose__title{
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--g-ink);
}

.below-min-choose__text{
  margin: 5px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--g-muted);
}

/* ---------------------------------------------------------------------------- */
/* 7. Где включить */

.below-min-setup{
  max-width: 760px;
}

.below-min-setup__list{
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--g-ink);
}

.below-min-setup__item{
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--g-line);
}

.below-min-setup__num{
  font-family: var(--g-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
  color: #c7c7cf;
}

.below-min-setup__text{
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--g-text);
}

.below-min-setup__text strong,
.below-min-setup__note strong{
  font-weight: 600;
  color: var(--g-ink);
}

.below-min-code{
  padding: 1px 6px;
  border-radius: var(--g-radius-button);
  background: var(--g-pill);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
}

.below-min-setup__note{
  margin: 30px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--g-muted);
}

/* ---------------------------------------------------------------------------- */
/* 8. FAQ — стили общие, в guide.css (.guide-faq) */

/* ---------------------------------------------------------------------------- */
/* 9. Финальный блок */

.below-min-final-section{
  border-top: 1px solid var(--g-line);
}

.below-min-final{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.below-min-final__title{
  flex: 1 1 420px;
  max-width: 22em;
  text-wrap: balance;
}

/* ---------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce){
  .below-min *,
  .below-min *::before,
  .below-min *::after{
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media screen and (max-width: 1280px){
  .below-min-formula{
    font-size: 21px;
  }
  .below-min-strategy__title{
    font-size: 22px;
  }
}

@media screen and (max-width: 1024px){
  .below-min-hero{
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .below-min-steps{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
  }
  /* В две колонки линия между шагами ведёт в никуда */
  .below-min-step__line{
    display: none;
  }
}

@media screen and (max-width: 900px){
  .below-min-split,
  .below-min-choose{
    grid-template-columns: minmax(0, 1fr);
  }
  .below-min-split__item,
  .below-min-split__item + .below-min-split__item{
    padding: 28px 0;
    border-left: 0;
  }
  .below-min-split__item + .below-min-split__item{
    border-top: 1px solid var(--g-line);
  }
  .below-min-choose{
    gap: 40px;
  }
  .below-min-callout{
    margin-top: 32px;
  }
}

@media screen and (max-width: 600px){
  .below-min-hero__actions .guide__cta{
    width: 100%;
  }
  .below-min-demo__modes,
  .below-min-switch{
    width: 100%;
  }
  .below-min .below-min-switch__button{
    flex: 1 1 0;
    padding: 10px 8px;
    font-size: 13px;
    white-space: normal;
  }
  .below-min-ruler{
    height: 200px;
  }
  /* Подпись и цена конкурента А — в одну строку, ползунок под ними на всю ширину */
  .below-min-control{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 14px;
  }
  .below-min-control__range{
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
  }
  /* На узком экране подпись конкурента сокращается до буквы и цены */
  .below-min-mark__word{
    display: none;
  }
  .below-min-mark__pill,
  .below-min-you__pill{
    padding: 3px 8px;
    font-size: 12px;
  }
  .below-min-ruler__min-pill{
    font-size: 11px;
  }
  .below-min-steps{
    grid-template-columns: minmax(0, 1fr);
  }

  .below-min-final .guide__cta{
    width: 100%;
  }
}
