/* ===================================================================
   AvitoBuy — общие стили (Агент-2, вёрстка из Figma)
   Десктоп-веб v1. Дизайн-токены взяты из макета AvitoBuy.fig

   СЛОТЫ ДАННЫХ (заполняет Агент-1 через render.js):
     data-field="path"     — одиночное значение из модели
     data-format="..."     — money | date | rating | score
     data-attr="src|href"  — куда писать значение (атрибут)
     data-template="..."   — образец для клонирования (списки)
     data-list="path"      — список значений (напр. profitability.reasons)
     data-gallery="photos" — контейнер для фото
     data-action="..."     — обработчик (favorite | not-interested | …)
     data-state="..."      — loading | empty | error
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');

:root {
  --bg:          #141415; /* rgb(20,20,21)   фон страницы            */
  --card:        #1d1d1e; /* rgb(29,29,30)   карточки / панели       */
  --inset:       #141415; /* вложенные поля внутри карточек          */
  --img-bg:      #424244; /* rgb(66,66,68)   плейсхолдер картинки    */
  --red:         #ff4053; /* rgb(255,64,83)  акцент / бренд          */
  --green:       #04e061; /* rgb(4,224,97)   позитив / CTA           */
  --blue:        #00aaff; /* rgb(0,170,255)  инфо                    */
  --purple:      #8a38f5;
  --white:       #ffffff;
  --muted:       #787879; /* rgb(120,120,121) вторичный текст        */
  --dim:         #555556; /* rgb(85,85,86)   приглушённый            */
  --disabled-bg: #555556;
  --maxw: 1380px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* Страховка: ни один элемент не должен провоцировать горизонтальный скролл —
   иначе мобильный браузер уменьшает масштаб всей страницы, чтобы вписать её. */
html, body { max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 20px;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---- общий контейнер: центрированная колонка 1380px ---- */
.page {
  max-width: calc(var(--maxw) + 40px);
  margin: 0 auto;
  padding: 13px 20px 80px;
}

/* ===================== ШАПКА ===================== */
.header {
  height: 60px;
  border-radius: 20px;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
}
.header__logo { font-weight: 700; font-size: 20px; color: var(--white); flex-shrink: 0; }
.header__nav { display: flex; align-items: center; gap: 37px; min-width: 0; }
.header__nav a { font-weight: 400; font-size: 20px; color: var(--muted); transition: color .15s; }
.header__nav a:hover { color: var(--white); }

.btn-account {
  height: 44px;
  border-radius: 12px;
  background: var(--red);
  color: var(--white);
  font-weight: 700;
  font-size: 20px;
  padding: 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: filter .15s;
}
.btn-account:hover { filter: brightness(1.08); }

/* ===================== КНОПКИ ===================== */
.btn {
  height: 44px;
  border-radius: 12px;
  padding: 0 30px;
  font-weight: 700;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: filter .15s, background .15s;
}
.btn--green { background: var(--green); color: var(--card); }
.btn--green:hover { filter: brightness(1.05); }
.btn--red   { background: var(--red);   color: var(--white); }
.btn--ghost { background: var(--inset); color: var(--muted); }
.btn--ghost:hover { color: var(--white); }
.btn--white { background: var(--white); color: #000; font-weight: 400; }

/* ===================== ТЕГИ (бейджи выгодности) ===================== */
.tag {
  height: 39px;
  border-radius: 12px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 400;
  white-space: nowrap;
}
.tag svg { width: 20px; height: 20px; flex-shrink: 0; }
.tag--red   { color: var(--red);   background: rgba(255,64,83,.10); box-shadow: inset 0 0 0 1px var(--red); }
.tag--blue  { color: var(--blue);  background: rgba(0,170,255,.10); box-shadow: inset 0 0 0 1px var(--blue); }
.tag--green { color: var(--green); background: rgba(4,224,97,.10);  box-shadow: inset 0 0 0 1px var(--green); }

/* плашка локация/время — белая */
.pill-loc {
  height: 39px;
  border-radius: 12px;
  background: var(--white);
  color: #000;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 20px;
  white-space: nowrap;
}
.pill-loc svg { width: 17px; height: 21px; flex-shrink: 0; }

/* ===================== ИНДЕКС ВЫГОДНОСТИ ===================== */
.index { width: 100%; }
.index__row { display: flex; justify-content: space-between; align-items: center; padding: 0 7px; }
.index__label { font-size: 14px; color: var(--muted); }
.index__score { font-size: 14px; font-weight: 700; color: var(--red); }
.index__track {
  margin: 19px 7px 0;
  height: 9px;
  border-radius: 11px;
  background: rgba(255,64,83,.10);
  overflow: hidden;
}
.index__fill { height: 9px; border-radius: 11px; background: var(--red); width: 78%; }

/* ===================== КАРТОЧКА ОБЪЯВЛЕНИЯ (лента/избранное) ===================== */
.deal-card {
  border-radius: 20px;
  padding: 11px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.deal-card__top { display: flex; gap: 30px; }
.deal-card__img {
  width: 344px;
  height: 345px;
  border-radius: 8px;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--img-bg);
}
.deal-card__body { display: flex; flex-direction: column; min-width: 0; padding-top: 6px; flex: 1; }
.deal-card__title { font-weight: 700; font-size: 24px; color: var(--white); }
.deal-card__price-row { display: flex; align-items: center; gap: 22px; margin-top: 14px; }
.deal-card__price { font-weight: 700; font-size: 48px; color: var(--white); white-space: nowrap; }
.deal-card__tags { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 22px; }
.deal-card__desc {
  margin-top: 22px;
  font-size: 20px;
  line-height: 1.25;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.deal-card__bottom { display: flex; align-items: center; gap: 14px; padding: 0 0 4px; }

/* белые квадратные кнопки save / dislike */
.icon-btn {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: var(--white);
  color: #1d1d1e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: filter .15s;
}
.icon-btn:hover { filter: brightness(.92); }
.icon-btn svg { width: 26px; height: 26px; }
.icon-btn--active { background: var(--red); color: var(--white); }

/* ===================== СОСТОЯНИЯ (loading / empty / error) ===================== */
[data-state] { display: none; }
.state-block {
  padding: 80px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 24px;
}

/* ===================== ПАНЕЛЬ ПОДПИСКИ (лента, шапка фильтра) ===================== */
.sub-bar {
  margin-top: 23px;
  border-radius: 20px;
  background: var(--card);
  padding: 11px;
}
.sub-bar__title { font-weight: 700; font-size: 24px; color: var(--white); margin: 15px 0 0 76px; }
.sub-bar__title-row { display: flex; align-items: center; gap: 16px; }
.sub-bar__controls { display: flex; gap: 13px; margin-top: 21px; flex-wrap: wrap; }

.field {
  height: 60px;
  border-radius: 12px;
  background: var(--inset);
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 9px 0 8px;
  color: var(--muted);
  font-size: 20px;
}
.field__ic {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: var(--white);
  color: var(--inset);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.field__ic svg { width: 22px; height: 22px; }
.field input {
  border: none; background: none; outline: none;
  color: var(--white); font-size: 20px; font-family: inherit;
  width: 100%;
}
.field input::placeholder { color: var(--muted); }
.field--price { width: 279px; }
.field--search { flex: 1; min-width: 280px; }
.field__chev { margin-left: auto; color: var(--white); flex-shrink: 0; }

.btn-back {
  width: 60px; height: 60px;
  border-radius: 12px;
  background: var(--inset);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: filter .15s;
}
.btn-back:hover { filter: brightness(1.4); }
.btn-back svg { width: 31px; height: 34px; color: var(--white); }

.btn-delete {
  height: 60px;
  border-radius: 12px;
  background: var(--inset);
  color: var(--white);
  font-size: 20px;
  padding: 0 32px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.btn-delete:hover { background: #2a2a2c; }

.sub-bar__tags { display: flex; gap: 16px; margin: 18px 0 4px 11px; flex-wrap: wrap; }
.chip {
  height: 39px; border-radius: 12px; padding: 0 22px;
  display: inline-flex; align-items: center;
  font-size: 20px; color: var(--red);
  background: rgba(255,64,83,.07);
  box-shadow: inset 0 0 0 1px rgba(255,64,83,.48);
}

/* ===================== ЛЕНТА ===================== */
.feed { margin-top: 23px; display: flex; flex-direction: column; gap: 19px; }
.page-h1 { font-weight: 700; font-size: 48px; color: var(--white); }

/* ===================== СТРАНИЦА ПОДПИСОК (профиль) ===================== */
.profile-grid { display: flex; gap: 20px; margin-top: 23px; }
.profile-card { flex: 1; border-radius: 20px; background: var(--card); padding: 15px; min-height: 154px; }
.profile-card__name { font-size: 20px; color: var(--muted); margin-top: 33px; }
.profile-card__divider { height: 1px; background: var(--muted); opacity: .6; margin: 24px 0; }
.profile-card__id { display: flex; justify-content: space-between; font-size: 20px; color: var(--muted); }
.profile-card__tariff-title { font-weight: 700; font-size: 20px; color: var(--white); }
.profile-card__tariff-meta { display: flex; gap: 32px; color: var(--muted); font-size: 20px; margin-top: 18px; }
.profile-card__tariff-btns { display: flex; gap: 10px; margin-top: 22px; }
.profile-card__tariff-btns .btn { flex: 1; }

.subs-head { display: flex; align-items: center; gap: 30px; margin-top: 36px; }
.subs-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.sub-card { border-radius: 20px; background: var(--card); padding: 17px; }
.sub-card__img {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 12px;
  object-fit: cover; background: var(--img-bg);
}
.sub-card__name { font-weight: 700; font-size: 20px; color: var(--white); margin-top: 14px; }
.sub-card__notif { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.sub-card__notif span { font-size: 20px; color: var(--dim); }
.sub-card__btn { width: 100%; margin-top: 18px; height: 50px; }
.sub-card__del {
  display: block; width: 100%; text-align: center;
  margin-top: 16px; color: var(--muted); font-size: 20px;
  background: none; transition: color .15s;
}
.sub-card__del:hover { color: var(--red); }

/* переключатель уведомлений */
.switch { width: 64px; height: 34px; border-radius: 17px; background: var(--dim); position: relative; flex-shrink: 0; transition: background .15s; padding: 0; }
.switch::after { content: ''; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: var(--white); transition: left .15s; }
.switch[aria-checked="true"] { background: var(--green); }
.switch[aria-checked="true"]::after { left: 34px; }

/* ===================== СТРАНИЦА ДЕТАЛЕЙ ОБЪЯВЛЕНИЯ ===================== */
.listing { display: grid; grid-template-columns: 457px 1fr; gap: 74px; margin-top: 23px; align-items: start; }
.listing__title { font-weight: 700; font-size: 32px; color: var(--white); line-height: 1.05; }
.listing__actions { display: flex; align-items: center; gap: 14px; margin-top: 26px; }
.listing__cta { height: 60px; border-radius: 12px; background: var(--green); color: var(--card); font-weight: 700; font-size: 20px; padding: 0 38px; flex: 1; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn--lg { width: 60px; height: 60px; border-radius: 12px; }
.icon-btn--dark { background: var(--card); color: var(--white); }

.gallery { margin-top: 26px; }
.gallery__main { width: 100%; aspect-ratio: 1 / 1; border-radius: 20px; object-fit: cover; background: var(--img-bg); }
.gallery__thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.gallery__thumbs img { width: 100%; aspect-ratio: 1 / 1; border-radius: 16px; object-fit: cover; background: var(--img-bg); }

.listing__price { font-weight: 700; font-size: 48px; color: var(--red); }
.listing__badges { display: flex; gap: 13px; flex-wrap: wrap; margin-top: 24px; }
.section-h { font-weight: 700; font-size: 20px; color: var(--white); margin: 36px 0 12px; }

.seller {
  border-radius: 20px; background: var(--card);
  padding: 10px; display: flex; align-items: center; gap: 12px;
}
.seller__ava { width: 60px; height: 60px; border-radius: 15px; object-fit: cover; background: var(--img-bg); flex-shrink: 0; }
.seller__main { display: flex; flex-direction: column; gap: 7px; }
.seller__name { font-weight: 700; font-size: 20px; color: var(--white); }
.seller__rate { display: flex; align-items: center; gap: 9px; font-size: 20px; }
.seller__rate .stars { display: flex; gap: 5px; }
.seller__rate .stars svg { width: 22px; height: 22px; }
.seller__reviews { color: var(--muted); }
.seller__meta { margin-left: auto; text-align: right; font-size: 20px; color: var(--white); line-height: 1.2; }

.info-box { border-radius: 20px; background: var(--card); padding: 16px 20px; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.specs__col { font-size: 20px; line-height: 1.5; white-space: pre-line; }
.specs__col--muted { color: var(--muted); }
.listing__desc { font-size: 20px; line-height: 1.45; white-space: pre-line; color: var(--white); }
.index--listing .index__track { background: rgba(255,64,83,.10); }
.index--listing { margin-top: 24px; }

/* ===================== ФОРМА СОЗДАНИЯ ПОДПИСКИ (фильтр) ===================== */
.warn {
  display: flex; gap: 18px; align-items: flex-start;
  margin-top: 20px;
}
.warn__ic {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  box-shadow: inset 0 0 0 2px var(--red);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--red);
}
.warn__ic svg { width: 24px; height: 24px; }
.warn__text { color: var(--red); font-size: 20px; line-height: 1.3; }

.filters {
  margin-top: 20px;
  border-radius: 20px;
  background: var(--card);
  padding: 19px;
}
.filters__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 26px 22px;
}
.ff { display: flex; flex-direction: column; gap: 8px; }
.ff--span2 { grid-column: span 2; }
.ff__label { font-size: 14px; color: var(--muted); }
.ff__inputs { display: flex; gap: 0; }
.ff__inputs .control:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.ff__inputs .control:last-child  { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }

.control {
  position: relative;
  height: 42px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--muted);
  background: transparent;
  display: flex; align-items: center;
  padding: 0 11px;
  width: 100%;
}
.control input {
  border: none; background: none; outline: none;
  color: var(--white); font-size: 20px; font-family: inherit; width: 100%;
}
.control input::placeholder { color: var(--muted); }
.control__val { font-size: 20px; color: var(--white); }
.control__val--muted { color: var(--muted); }
.control__suffix { color: var(--muted); font-size: 20px; margin-left: auto; padding-left: 8px; }
.control__chev { margin-left: auto; color: var(--blue); flex-shrink: 0; }
.control__chev svg { display: block; width: 15px; height: 10px; }
.control__x { margin-left: auto; color: var(--blue); display: inline-flex; align-items: center; }
.control__x svg { width: 16px; height: 16px; }
.control--active { box-shadow: inset 0 0 0 1px var(--muted); }
.control--disabled { background: var(--disabled-bg); }

/* ряд переключателей + кнопки под фильтром */
.filters__switches { display: flex; gap: 56px; margin-top: 32px; }
.sw-row { display: flex; align-items: center; gap: 18px; font-size: 20px; color: var(--white); }
.filters__actions { display: flex; align-items: center; gap: 22px; margin-top: 26px; }
.btn--green-outline {
  background: transparent; color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}
.btn--white-outline {
  background: transparent; color: var(--white);
  box-shadow: inset 0 0 0 1px var(--white);
}
.filters__total { color: var(--muted); font-size: 20px; }

/* ===================== АДАПТИВ ===================== */
@media (max-width: 1200px) {
  .filters__grid { grid-template-columns: repeat(4, 1fr); }
  .subs-grid { grid-template-columns: repeat(2, 1fr); }
  .listing { grid-template-columns: 1fr; gap: 36px; }
  .profile-grid { flex-direction: column; }
}
@media (max-width: 1000px) {
  .deal-card__top { flex-direction: column; }
  .deal-card__img { width: 100%; height: 260px; }
  .deal-card__price { font-size: 38px; }
  .filters__grid { grid-template-columns: repeat(2, 1fr); }
  .subs-grid { grid-template-columns: 1fr; }
  .specs { grid-template-columns: 1fr; gap: 16px; }
}

/* ---- Телефоны: вся дизайн-система рассчитана на 20px-текст и крупные
   отступы/кнопки под десктоп. На реальном экране телефона (≤640px, что
   покрывает все смартфоны) это выглядит как «слишком крупный масштаб»,
   поэтому здесь системно уменьшаем шрифты/высоты/паддинги, а не только
   заголовки. Заодно чинили и переполнение хедера (см. ниже). ---- */
@media (max-width: 640px) {
  .page { padding: 12px 14px 50px; }

  /* хедер: лого+2 ссылки+кнопка физически не помещались в строку —
     прячем текстовые ссылки, оставляем лого и кнопку аккаунта */
  .header { padding: 0 16px; }
  .header__nav { gap: 14px; }
  .header__nav a:not(.btn-account) { display: none; }
  .btn-account { height: 38px; padding: 0 18px; font-size: 15px; }
  .header__logo { font-size: 17px; }

  /* базовые кнопки/бейджи/пилюли — используются на каждой странице */
  .btn { height: 40px; padding: 0 18px; font-size: 15px; }
  .tag { height: 30px; padding: 0 12px; gap: 8px; font-size: 13px; }
  .tag svg { width: 15px; height: 15px; }
  .pill-loc { height: 30px; padding: 0 12px; gap: 6px; font-size: 13px; }
  .pill-loc svg { width: 13px; height: 16px; }
  .icon-btn { width: 44px; height: 44px; }
  .icon-btn svg { width: 20px; height: 20px; }

  /* карточка объявления (лента/избранное) */
  .deal-card__title { font-size: 18px; }
  .deal-card__price { font-size: 28px; }
  .deal-card__price-row { gap: 12px; margin-top: 10px; }
  .deal-card__tags { gap: 8px; margin-top: 14px; }
  .deal-card__desc { font-size: 14px; margin-top: 14px; }
  .page-h1 { font-size: 26px; }

  /* панель подписки / фильтра ленты */
  .sub-bar__title { font-size: 18px; margin: 12px 0 0 16px; }
  .field { height: 48px; font-size: 15px; gap: 10px; }
  .field input { font-size: 15px; }
  .field__ic { width: 36px; height: 36px; }
  .field__ic svg { width: 18px; height: 18px; }
  .btn-back { width: 48px; height: 48px; }
  .btn-back svg { width: 24px; height: 26px; }
  .btn-delete { height: 48px; font-size: 14px; padding: 0 20px; }
  .chip { height: 30px; padding: 0 14px; font-size: 13px; }

  /* профиль / подписки */
  .profile-card__name { font-size: 15px; margin-top: 22px; }
  .profile-card__id { font-size: 14px; }
  .profile-card__tariff-title { font-size: 16px; }
  .profile-card__tariff-meta { flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
  .subs-head { gap: 14px; margin-top: 22px; }
  .sub-card { padding: 12px; }
  .sub-card__name { font-size: 16px; }
  .sub-card__notif span { font-size: 14px; }
  .sub-card__del { font-size: 14px; }

  /* страница объявления */
  .listing__title { font-size: 22px; }
  .listing__price { font-size: 30px; }
  .listing__actions { flex-wrap: wrap; gap: 10px; }
  .listing__cta { height: 48px; font-size: 15px; padding: 0 22px; }
  .icon-btn--lg { width: 48px; height: 48px; }
  .listing__badges { gap: 8px; }
  .section-h { font-size: 15px; margin: 24px 0 10px; }
  .seller { padding: 10px; gap: 10px; }
  .seller__ava { width: 48px; height: 48px; }
  .seller__name { font-size: 15px; }
  .seller__rate { font-size: 13px; gap: 6px; }
  .seller__meta { font-size: 13px; }
  .info-box { padding: 12px 14px; }
  .specs__col { font-size: 14px; }
  .listing__desc { font-size: 14px; }
  .gallery__thumbs { gap: 8px; }

  /* форма создания подписки (фильтр) */
  .warn__text { font-size: 14px; }
  .filters { padding: 14px; }
  .filters__grid { gap: 16px 12px; }
  .control { height: 40px; }
  .control input, .control__val, .control__suffix { font-size: 15px; }
  .filters__switches { gap: 24px; margin-top: 22px; }
  .sw-row { font-size: 14px; gap: 12px; }
  .filters__actions { gap: 12px; margin-top: 18px; flex-wrap: wrap; }
  .filters__total { font-size: 13px; }

  /* лендинг */
  .lp-badge { height: 30px; padding: 0 12px; gap: 8px; font-size: 13px; }
  .lp-badge svg { width: 14px; height: 14px; }
  .lp-hero { padding: 24px 0 12px; }
  .lp-h1 { font-size: 30px; }
  .lp-sub { font-size: 15px; margin-top: 14px; }
  .lp-hero-btns { gap: 10px; margin-top: 20px; }
  .btn-hero { height: 46px; padding: 0 20px; font-size: 15px; }
  .lp-panel { padding: 16px; margin-top: 20px; }
  .lp-carousel { gap: 12px; margin-top: 16px; }
  .wcard { flex-basis: 210px; width: 210px; padding: 10px; }
  .wcard__title { font-size: 14px; margin-top: 10px; }
  .wcard__price { font-size: 17px; margin-top: 6px; }
  .lp-feat { padding: 14px; }
  .lp-feat h3 { font-size: 26px; }
  .lp-feat p { font-size: 14px; margin-top: 12px; }
  .lp-steps { padding: 18px; margin-top: 40px; }
  .lp-h2 { font-size: 26px; }
  .lp-steps-grid { gap: 12px; margin-top: 20px; }
  .lp-step { padding: 12px; min-height: 0; }
  .lp-step__num { width: 38px; height: 38px; font-size: 20px; }
  .lp-step__title { font-size: 17px; margin: 16px 0 8px; }
  .lp-step__desc { font-size: 14px; }
  .lp-poss { margin-top: 40px; gap: 16px; }
  .lp-poss__list { gap: 18px; margin-top: 18px; }
  .lp-pf__ic { width: 38px; height: 38px; }
  .lp-pf__ic svg { width: 18px; height: 18px; }
  .lp-pf__title { font-size: 17px; }
  .lp-pf__desc { font-size: 14px; margin-top: 4px; }
  .lp-demo { padding: 12px; gap: 14px; }
  .lp-demo__title { font-size: 17px; }
  .lp-demo__price-row { gap: 10px; margin-top: 8px; }
  .lp-demo__price { font-size: 17px; }
  .lp-demo__cond { font-size: 13px; margin-top: 8px; }
  .lp-demo-caption { font-size: 16px; margin-top: 16px; }
  .lp-pricing-head { margin-top: 30px; gap: 10px; }
  .lp-pricing { padding: 14px; gap: 12px; margin-top: 18px; }
  .lp-price-card { padding: 16px 14px; min-height: 0; }
  .lp-price-card__term { font-size: 16px; }
  .lp-price-card__price { font-size: 24px; }
  .lp-footer { padding: 18px 20px; margin-top: 24px; gap: 14px; }
  .lp-footer__brand { font-size: 28px; }
  .lp-footer__tag { font-size: 13px; }
  .lp-footer__links { font-size: 13px; gap: 8px; }
  .lp-footer__copy { font-size: 13px; }

  /* вход / регистрация */
  .auth-page { margin: 20px auto 50px; }
  .auth-card__title { font-size: 26px; margin-bottom: 22px; }
  .auth-field input { height: 48px; font-size: 15px; }
  .auth-btn { height: 52px; font-size: 16px; }
}

/* ===================================================================
   ЛЕНДИНГ (Main_page)
   =================================================================== */
.lp-badge {
  display: inline-flex; align-items: center; gap: 12px;
  height: 39px; padding: 0 22px; border-radius: 12px;
  font-size: 20px; white-space: nowrap;
}
.lp-badge svg { width: 18px; height: 18px; flex-shrink: 0; }
.lp-badge--red  { color: var(--red);  background: rgba(255,64,83,.10); box-shadow: inset 0 0 0 1px var(--red); }
.lp-badge--blue { color: var(--blue); background: rgba(0,170,255,.10); box-shadow: inset 0 0 0 1px var(--blue); }

/* hero */
.lp-hero { position: relative; padding: 60px 0 40px; min-height: 620px; }
.lp-hero__content { position: relative; z-index: 2; }
.lp-h1 {
  font-weight: 700; font-size: 48px; line-height: 1.06;
  text-transform: uppercase; color: var(--white);
  max-width: 654px; margin: 22px 0 0;
}
.lp-h1 .accent { color: var(--red); }
.lp-sub { max-width: 654px; margin: 22px 0 0; font-size: 20px; line-height: 1.2; color: var(--muted); }
.lp-hero-btns { display: flex; gap: 19px; margin-top: 28px; flex-wrap: wrap; }
.btn-hero {
  height: 60px; border-radius: 12px; padding: 0 42px;
  font-weight: 700; font-size: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: filter .15s;
}
.btn-hero--white { background: var(--white); color: var(--card); }
.btn-hero--dark  { background: var(--card);  color: var(--white); }
.btn-hero:hover { filter: brightness(1.08); }
.lp-phone {
  position: absolute; right: -60px; top: 80px; width: 56%; max-width: 860px;
  max-height: 520px;
  pointer-events: none; z-index: 1;
}
.lp-phone img { width: 100%; height: 100%; max-height: 520px; object-fit: contain; object-position: top right; display: block; }
.pill-float { position: absolute; box-shadow: 0 12px 40px rgba(0,0,0,.45); z-index: 2; }
.pill-float--blue  { top: 4%;  left: 30%; }
.pill-float--red   { top: 26%; left: 2%; }
.pill-float--green { bottom: 16%; left: 34%; }

/* большая тёмная панель (карусель + фичи) */
.lp-panel { margin-top: 30px; border-radius: 20px; background: var(--card); padding: 36px; }
.lp-section-gap { margin-top: 36px; }

/* карусель найденных товаров */
.lp-carousel { display: flex; gap: 19px; overflow-x: auto; margin-top: 22px; padding-bottom: 8px; scrollbar-width: thin; }
.wcard { flex: 0 0 271px; width: 271px; border-radius: 15px; box-shadow: inset 0 0 0 1px var(--muted); padding: 12px; }
.wcard__img { width: 100%; aspect-ratio: 1/1; border-radius: 15px; object-fit: cover; background: var(--img-bg); }
.wcard__title { font-size: 20px; color: var(--white); margin-top: 12px; }
.wcard__price { font-size: 24px; font-weight: 700; color: var(--red); margin-top: 8px; }
.wcard .index { margin-top: 12px; }

/* фичи «зачем это нужно» */
.lp-feat-grid {
  display: grid; gap: 19px; margin-top: 22px;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-areas: "a b c" "d d c";
}
.lp-feat { position: relative; overflow: hidden; border-radius: 20px; padding: 16px; color: var(--white); }
.lp-feat h3 { position: relative; z-index: 2; margin: 0; font-weight: 700; font-size: 48px; line-height: 1; text-transform: uppercase; }
.lp-feat p { position: relative; z-index: 2; margin: 18px 0 0; font-weight: 500; font-size: 20px; line-height: 1.15; max-width: 404px; }
.lp-feat img { position: absolute; z-index: 0; pointer-events: none; }
.lp-feat--a { grid-area: a; background: #965eeb; min-height: 636px; }
.lp-feat--b { grid-area: b; background: var(--blue); min-height: 636px; }
.lp-feat--c { grid-area: c; background: #965eeb; min-height: 863px; }
.lp-feat--d { grid-area: d; background: var(--red); min-height: 208px; }
.lp-feat--a img { left: -170px; top: 256px; width: 624px; }
.lp-feat--b img { left: -189px; top: 190px; width: 721px; transform: rotate(1.6deg); }
.lp-feat--c img { left: -7px; top: 362px; width: 483px; }

/* 4 шага */
.lp-steps {
  margin-top: 70px; border-radius: 20px; padding: 40px; position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255,64,83,.30), transparent 55%),
    radial-gradient(120% 90% at 100% 100%, rgba(255,64,83,.22), transparent 55%),
    var(--card);
}
.lp-steps__head { display: flex; flex-direction: column; gap: 18px; }
.lp-h2 { font-weight: 700; font-size: 48px; line-height: 1.05; text-transform: uppercase; color: var(--white); margin: 0; }
.lp-steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 19px; margin-top: 34px; }
.lp-step { background: var(--card); border-radius: 20px; padding: 12px; min-height: 250px; }
.lp-step__num { width: 50px; height: 50px; border-radius: 12px; background: var(--red); color: var(--card); font-weight: 700; font-size: 32px; display: flex; align-items: center; justify-content: center; }
.lp-step__title { font-weight: 700; font-size: 24px; color: var(--white); margin: 24px 0 12px; }
.lp-step__desc { font-size: 20px; line-height: 1.2; color: var(--muted); }

/* возможности */
.lp-poss { display: grid; grid-template-columns: 680px 1fr; gap: 50px; margin-top: 70px; align-items: start; }
.lp-poss__list { display: flex; flex-direction: column; gap: 26px; margin-top: 30px; }
.lp-pf { display: flex; gap: 16px; }
.lp-pf__ic { width: 50px; height: 50px; flex-shrink: 0; border-radius: 12px; background: rgba(0,170,255,.10); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; }
.lp-pf__ic svg { width: 24px; height: 24px; }
.lp-pf__title { font-weight: 700; font-size: 24px; color: var(--white); }
.lp-pf__desc { font-size: 20px; line-height: 1.2; color: var(--muted); margin-top: 6px; }

.lp-demo { border-radius: 32px; background: var(--card); padding: 15px; display: flex; gap: 22px; box-shadow: -20px 21px 62px rgba(0,0,0,.25); }
.lp-demo__img { width: 210px; height: 210px; border-radius: 21px; object-fit: cover; background: var(--img-bg); flex-shrink: 0; }
.lp-demo__body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lp-demo__title { font-weight: 700; font-size: 25px; color: var(--white); }
.lp-demo__price-row { display: flex; align-items: center; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.lp-demo__price { font-weight: 700; font-size: 25px; color: var(--red); }
.lp-demo__cond { font-size: 22px; color: var(--muted); margin-top: 14px; }
.lp-demo__bottom { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.lp-demo__buttons { display: flex; gap: 12px; }
.lp-demo-caption { font-weight: 700; font-size: 24px; line-height: 1.2; color: var(--white); margin-top: 26px; max-width: 614px; }

/* подвал */
.lp-footer { margin-top: 40px; border-radius: 20px; background: var(--red); color: var(--white); padding: 18px 28px; display: grid; grid-template-columns: 1fr auto auto; gap: 40px; align-items: center; }
.lp-footer__brand { font-weight: 700; font-size: 48px; }
.lp-footer__tag { font-size: 20px; line-height: 1.2; margin-top: 6px; }
.lp-footer__links { display: flex; flex-direction: column; gap: 12px; font-size: 20px; }
.lp-footer__copy { font-size: 20px; line-height: 1.2; max-width: 235px; text-align: right; }

@media (max-width: 1200px) {
  .lp-feat-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "a b" "c c" "d d"; }
  .lp-feat--c { min-height: 520px; }
  .lp-feat--c img { position: relative; width: 60%; left: 0; bottom: 0; margin-top: 20px; }
  .lp-poss { grid-template-columns: 1fr; gap: 30px; }
  .lp-steps-grid { grid-template-columns: 1fr 1fr; }
  .lp-hero { min-height: 0; }
  .lp-phone { position: relative; right: auto; top: auto; width: 100%; max-width: 560px; max-height: none; margin: 30px auto 0; }
  .lp-phone img { height: auto; max-height: none; object-fit: initial; }
  .pill-float { display: none; }
  .lp-h1, .lp-sub { max-width: none; }
  .lp-footer { grid-template-columns: 1fr; }
  .lp-footer__copy { text-align: left; max-width: none; }
}
@media (max-width: 1000px) {
  .lp-feat-grid { grid-template-columns: 1fr; grid-template-areas: "a" "b" "c" "d"; }
  .lp-feat--a, .lp-feat--b, .lp-feat--c { min-height: 480px; }
  .lp-steps-grid { grid-template-columns: 1fr; }
  .lp-demo { flex-direction: column; }
  .lp-demo__img { width: 100%; height: 220px; }
}

/* ============================ ТАРИФЫ (лендинг) ============================ */
.lp-pricing-head { display: flex; flex-direction: column; gap: 18px; margin-top: 46px; }
.lp-pricing {
  margin-top: 28px; border-radius: 22px; padding: 26px;
  background:
    radial-gradient(150% 120% at 50% 135%, rgba(255,64,83,.18), transparent 55%),
    var(--card);
  border: 1px solid rgba(255,64,83,.40);
  display: grid; grid-template-columns: 1.15fr 1fr 1fr 1fr; gap: 18px;
}
.lp-price-feats { padding: 6px 8px; }
.lp-feat-item { display: flex; align-items: flex-start; gap: 11px; color: var(--muted);
  font-size: 16px; line-height: 1.3; margin-bottom: 17px; }
.lp-feat-item:last-child { margin-bottom: 0; }
.lp-feat-item svg { width: 18px; height: 18px; color: var(--green); flex-shrink: 0; margin-top: 1px; }

.lp-price-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  min-height: 300px; padding: 22px 20px; border-radius: 16px;
  background: rgba(0,0,0,.35); border: 1px solid #2a2a2c;
}
.lp-price-card--hl { border-color: rgba(255,64,83,.55); box-shadow: inset 0 0 0 1px rgba(255,64,83,.25); }
.lp-price-card__term { color: var(--white); font-weight: 700; font-size: 20px; }
.lp-price-card__price { color: var(--red); font-weight: 800; font-size: 33px; margin-top: 6px; line-height: 1.1; }
.lp-price-card__save { color: var(--muted); font-size: 16px; margin-top: 6px; }
.lp-price-card__graph { position: absolute; left: 0; right: 0; bottom: 84px; height: 90px;
  width: 100%; opacity: .55; pointer-events: none; }
.lp-price-card__graph path { fill: none; stroke: var(--red); stroke-width: 2.5; }
.lp-price-card__btn {
  position: relative; z-index: 1; margin-top: auto; height: 56px; border: none; border-radius: 12px;
  background: var(--white); color: #000; cursor: pointer;
  font: 700 18px/1 Inter, system-ui, sans-serif; transition: filter .15s;
}
.lp-price-card__btn:hover { filter: brightness(.92); }

@media (max-width: 1000px) {
  .lp-pricing { grid-template-columns: 1fr; }
  .lp-price-card { min-height: 220px; }
}

/* ===================== ВХОД / РЕГИСТРАЦИЯ (отдельные страницы) ============= */
.auth-page { max-width: 480px; margin: 48px auto 90px; padding: 0 20px; }
.auth-card {
  border-radius: 22px; padding: 36px 34px;
  background:
    radial-gradient(130% 100% at 50% 130%, rgba(255,64,83,.16), transparent 60%),
    var(--card);
  border: 1px solid rgba(255,255,255,.06);
}
.auth-card__title { font-weight: 700; font-size: 38px; color: var(--white); margin-bottom: 28px; }
.auth-field { margin-bottom: 20px; }
.auth-field label { display: block; color: var(--muted); font-size: 16px; margin-bottom: 8px; }
.auth-field input {
  width: 100%; box-sizing: border-box; height: 58px; padding: 0 18px; border-radius: 14px;
  border: 1px solid #3a3a3d; background: transparent; color: var(--white);
  font: 400 18px/1 Inter, system-ui, sans-serif; outline: none; transition: border-color .15s;
}
.auth-field input::placeholder { color: #6a6a6c; }
.auth-field input:focus { border-color: var(--muted); }
.auth-recover { margin: -4px 0 10px; }
.auth-recover a { color: var(--red); font-size: 16px; cursor: pointer; }
.auth-recover a:hover { filter: brightness(1.15); }
.auth-consent { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 8px 0 22px; }
.auth-consent a { color: var(--red); text-decoration: underline; }
.auth-btn {
  width: 100%; height: 64px; border: none; border-radius: 14px; cursor: pointer;
  background: var(--red); color: var(--white);
  font: 700 21px/1 Inter, system-ui, sans-serif; transition: filter .15s;
}
.auth-btn:hover { filter: brightness(1.06); }
.auth-err { color: var(--red); font-size: 15px; min-height: 20px; margin-top: 12px; }
.auth-captcha { margin: 4px 0 18px; min-height: 78px; }
.auth-alt { text-align: center; color: var(--muted); font-size: 16px; margin-top: 22px; }
.auth-alt a { color: var(--red); }
.auth-alt a:hover { filter: brightness(1.15); }

@media (max-width: 640px) {
  .auth-card { padding: 24px 18px; }
}
