/* UniversalLeadFlow — оформление единой формы заявки.
   Палитра — та же, что у форм сайта (css/forms.css), чтобы новые и
   оставшиеся старые формы выглядели одинаково. */

:root {
  --lf-ink:    #1a1510;
  --lf-ink-2:  #4a423b;
  --lf-muted:  #736d68;
  --lf-line:   #ded8d1;
  --lf-line-2: #c9c2ba;
  --lf-bg:     #ffffff;
  --lf-soft:   #f6f3ef;
  --lf-accent: #c0392b;
  --lf-accent-d: #9d2f23;
  --lf-ok:     #1e7d4f;
  --lf-err:    #b3261e;
  --lf-radius: 14px;
  --lf-focus:  0 0 0 3px rgba(192, 57, 43, .28);
}

/* ── Окно ── */
html.lf-lock { overflow: hidden; }
/* Кнопка чата Битрикс24 не лезет поверх формы (так же для старых окон — footer.php). */
html.lf-lock .b24-widget-button-wrapper, html.lf-lock #bx-button-wrapper { display: none !important; }

.lf-overlay {
  position: fixed; inset: 0; z-index: 100050;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  background: rgba(26, 21, 16, .52);
  opacity: 0; transition: opacity .2s ease;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.lf-overlay.is-in { opacity: 1; }

.lf-dialog {
  position: relative; width: 100%; max-width: 480px; margin: auto;
  background: var(--lf-bg); color: var(--lf-ink);
  border-radius: 20px; box-shadow: 0 24px 64px rgba(0, 0, 0, .22);
  transform: translateY(12px) scale(.98); transition: transform .24s cubic-bezier(.2, .8, .2, 1), max-width .2s ease;
}
.lf-overlay.is-in .lf-dialog { transform: none; }

.lf-body { padding: 32px 32px 28px; }

.lf-close {
  position: absolute; top: 10px; right: 10px; z-index: 1;
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: transparent; color: var(--lf-muted);
  font-size: 28px; line-height: 1; cursor: pointer;
}
.lf-close:hover { background: var(--lf-soft); color: var(--lf-ink); }
.lf-close:focus-visible { outline: none; box-shadow: var(--lf-focus); }

/* Телефон: окно — лист снизу, во всю ширину, не вылезает за экран. */
@media (max-width: 599px) {
  .lf-overlay { align-items: flex-end; padding: 0; }
  .lf-dialog, .lf-dialog--quiz {
    max-width: none; margin: auto 0 0; border-radius: 20px 20px 0 0;
    max-height: calc(100dvh - 24px); overflow-y: auto;
    transform: translateY(40px);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .lf-body { padding: 26px 18px 22px; }
}

/* ── Текст ── */
.lf-title {
  margin: 0 40px 8px 0; font-size: clamp(21px, 1.2vw + 16px, 26px); line-height: 1.2;
  font-weight: 700; color: var(--lf-ink); letter-spacing: -.01em; text-transform: none;
}
.lf-title:focus { outline: none; }
.lf-lead { margin: 0 0 18px; font-size: 15px; line-height: 1.5; color: var(--lf-ink-2); }
.lf-eyebrow { margin: 14px 0 6px; font-size: 13px; color: var(--lf-muted); }
.lf-foot { margin: 16px 0 0; font-size: 13px; line-height: 1.45; color: var(--lf-muted); }
.lf-foot a { color: var(--lf-ink); font-weight: 600; white-space: nowrap; }

/* ── Поля ── */
.lf-form { display: block; margin: 0; }
.lf-field { margin: 0 0 14px; }
.lf-label { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--lf-ink); }
.lf-opt-mark { font-weight: 400; color: var(--lf-muted); }
.lf-opt-mark::before { content: '· '; }

.lf-input {
  display: block; width: 100%; box-sizing: border-box;
  min-height: 48px; padding: 12px 14px;
  font: inherit; font-size: 16px; /* 16px — iOS не увеличивает страницу при фокусе */
  color: var(--lf-ink); background: var(--lf-bg);
  border: 1.5px solid var(--lf-line-2); border-radius: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea.lf-input { min-height: 88px; resize: vertical; }
.lf-input:hover { border-color: #a9a097; }
.lf-input:focus { outline: none; border-color: var(--lf-accent); box-shadow: var(--lf-focus); }
.lf-input[aria-invalid="true"] { border-color: var(--lf-err); }
.lf-error { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: var(--lf-err); }
.lf-error:empty { display: none; }

.lf-file { display: block; width: 100%; font-size: 14px; }

/* Раскрывающиеся необязательные блоки */
.lf-more { margin: 0 0 12px; border-top: 1px solid var(--lf-line); }
.lf-more > summary {
  display: flex; align-items: center; gap: 8px; padding: 12px 0;
  font-size: 14px; font-weight: 600; color: var(--lf-ink-2); cursor: pointer; list-style: none;
}
.lf-more > summary::-webkit-details-marker { display: none; }
.lf-more > summary::before {
  content: ''; width: 8px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0;
  transform: rotate(-45deg); transition: transform .15s ease; margin-right: 2px;
}
.lf-more[open] > summary::before { transform: rotate(45deg); }
.lf-more > summary:focus-visible { outline: none; box-shadow: var(--lf-focus); border-radius: 6px; }

.lf-chips { border: 0; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lf-chips > legend { width: 100%; margin-bottom: 6px; }
.lf-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lf-chip label {
  display: inline-flex; align-items: center; min-height: 38px; padding: 6px 14px;
  border: 1.5px solid var(--lf-line-2); border-radius: 999px;
  font-size: 14px; color: var(--lf-ink-2); cursor: pointer; user-select: none;
}
.lf-chip input:checked + label { border-color: var(--lf-ink); background: var(--lf-ink); color: #fff; }
.lf-chip input:focus-visible + label { box-shadow: var(--lf-focus); }

.lf-consent { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 4px; }
.lf-consent input { flex: 0 0 auto; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--lf-accent); }
.lf-consent label { font-size: 13px; line-height: 1.45; color: var(--lf-ink-2); }
.lf-consent a { color: inherit; text-decoration: underline; }

/* Поле-ловушка для ботов: убрано с экрана, но не display:none —
   иначе часть ботов его пропускает. */
.lf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.lf-answers {
  margin: 0 0 16px; padding: 10px 12px; border-radius: 10px;
  background: var(--lf-soft); font-size: 14px; line-height: 1.45; color: var(--lf-ink-2);
}

.lf-alert {
  margin: 12px 0; padding: 12px 14px; border-radius: 12px;
  background: #fdecea; color: #6d1a14; font-size: 14px; line-height: 1.45;
}
.lf-alert p { margin: 0 0 10px; }
.lf-alert:focus { outline: none; }

/* ── Кнопки ── */
.lf-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: 12px; border: 1.5px solid transparent;
  font: inherit; font-size: 16px; font-weight: 600; line-height: 1.2; text-transform: none; letter-spacing: 0;
  cursor: pointer; transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.lf-btn:active { transform: translateY(1px); }
.lf-btn:focus-visible { outline: none; box-shadow: var(--lf-focus); }
.lf-btn[disabled] { cursor: default; opacity: .55; }
.lf-btn--primary { background: var(--lf-accent); color: #fff; }
.lf-btn--primary:hover:not([disabled]) { background: var(--lf-accent-d); }
.lf-btn--ghost { background: transparent; border-color: var(--lf-line-2); color: var(--lf-ink); }
.lf-btn--ghost:hover { border-color: var(--lf-ink); }
.lf-btn--wide { width: 100%; margin-top: 10px; }

.lf-btn__spin {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  animation: lf-spin .7s linear infinite;
}
.is-sending .lf-btn--wide .lf-btn__spin { display: inline-block; }
.is-sending .lf-btn--wide { opacity: .85; }
@keyframes lf-spin { to { transform: rotate(360deg); } }

.lf-link {
  display: inline; padding: 0; border: 0; background: none; font: inherit; font-size: 14px;
  color: var(--lf-ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.lf-link:hover { color: var(--lf-ink); }
.lf-link:focus-visible { outline: none; box-shadow: var(--lf-focus); border-radius: 4px; }
.lf-link--quiz, .lf-link--skip { display: block; margin: 14px auto 0; text-align: center; }

/* ── Квиз ──
   По образцу квизов конкурентов: крупный вопрос, фото-карточки или строки
   с отметкой, снизу прогресс «N% выполнено» и «Назад / Далее», справа
   на широком экране — что человек получит. */
.lf-dialog--quiz { max-width: 1040px; }
.lf-dialog--quiz .lf-body { padding: 0; }

.lf-quiz { display: grid; grid-template-columns: minmax(0, 1fr) 280px; min-height: min(620px, calc(100dvh - 48px)); }
.lf-quiz__main { display: flex; flex-direction: column; min-width: 0; padding: 36px 36px 28px; }
.lf-quiz__q {
  margin: 0 40px 10px 0; font-size: clamp(22px, 1.6vw + 14px, 32px); line-height: 1.18; font-weight: 700;
  letter-spacing: -.01em; color: var(--lf-ink); text-wrap: balance;
}
.lf-quiz__hint {
  align-self: flex-start; margin: 0 0 12px; padding: 4px 10px; border-radius: 8px;
  background: #fbe3df; color: #7a2419; font-size: 13px;
}

.lf-quiz__aside {
  display: flex; flex-direction: column; gap: 14px; padding: 64px 24px 28px;
  background: var(--lf-soft); border-radius: 0 20px 20px 0;
}
.lf-quiz__aside-title { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--lf-muted); }
.lf-quiz__gets { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.lf-quiz__gets li { position: relative; padding-left: 26px; font-size: 15px; line-height: 1.4; color: var(--lf-ink); }
.lf-quiz__gets li::before {
  content: ''; position: absolute; left: 0; top: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--lf-ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.3l2.2 2.2 4.8-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
}
.lf-quiz__aside .lf-link { margin-top: auto; align-self: flex-start; }
.lf-quiz__offer { display: grid; gap: 4px; padding: 14px 16px; border-radius: 12px; background: var(--lf-ink); color: #fff; }
.lf-quiz__offer b { font-size: 16px; color: #ffd9a8; }
.lf-quiz__offer span { font-size: 13px; line-height: 1.4; color: rgba(255, 255, 255, .8); }

/* Варианты */
.lf-opts { display: grid; gap: 12px; margin: 10px 0 20px; align-content: start; }
.lf-opts--rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lf-opts--img { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.lf-opt {
  display: flex; flex-direction: column; align-items: stretch; min-width: 0; padding: 0; overflow: hidden;
  border: 1.5px solid var(--lf-line-2); border-radius: 12px; background: var(--lf-bg);
  font: inherit; font-size: 15px; line-height: 1.3; color: var(--lf-ink); text-align: left; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.lf-opt:hover { border-color: var(--lf-ink-2); }
.lf-opt:focus-visible { outline: none; box-shadow: var(--lf-focus); }
.lf-opt.is-on { border-color: var(--lf-accent); box-shadow: inset 0 0 0 1px var(--lf-accent); }
.lf-opt__media { display: block; aspect-ratio: 3 / 2; max-width: 100%; background: var(--lf-soft); overflow: hidden; }
.lf-opt__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.lf-opt:hover .lf-opt__media img { transform: scale(1.04); }
.lf-opt__media--icon { display: grid; place-items: center; }
.lf-opt__ico { width: 72px; height: 72px; fill: none; stroke: var(--lf-ink-2); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lf-opt__row { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 12px 16px; }
.lf-opt__t { min-width: 0; }

/* Отметка: кружок для одного ответа, квадрат для нескольких */
.lf-opt__mark {
  flex: 0 0 auto; width: 18px; height: 18px; border: 1.5px solid var(--lf-line-2); background: var(--lf-bg);
  transition: border-color .15s ease, background-color .15s ease;
}
.lf-opt__mark--radio { border-radius: 50%; }
.lf-opt__mark--check { border-radius: 4px; }
.lf-opt.is-on .lf-opt__mark { border-color: var(--lf-accent); }
.lf-opt.is-on .lf-opt__mark--radio { background: radial-gradient(circle, var(--lf-accent) 0 4px, var(--lf-bg) 5px); }
.lf-opt.is-on .lf-opt__mark--check {
  background: var(--lf-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.8 8.4l2.6 2.6 5.8-6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
}
.lf-opt--own { cursor: text; }
.lf-opt__own {
  flex: 1; min-width: 0; border: 0; padding: 0; background: none; font: inherit; font-size: 15px; color: var(--lf-ink);
}
.lf-opt__own:focus { outline: none; }
.lf-opt--own:focus-within { border-color: var(--lf-accent); }

/* Низ шага */
.lf-quiz__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: auto; padding-top: 8px; }
.lf-quiz__progress { flex: 1 1 260px; max-width: 420px; }
.lf-progress { height: 8px; border-radius: 99px; background: #e6e0da; overflow: hidden; }
.lf-progress__bar { display: block; height: 100%; background: var(--lf-accent); border-radius: 99px; transition: width .35s ease; }
.lf-quiz__pct { margin: 8px 0 0; font-size: 13px; color: var(--lf-muted); font-variant-numeric: tabular-nums; }
.lf-quiz__pct b { color: var(--lf-ink); }
.lf-quiz__btns { display: flex; gap: 12px; }
.lf-quiz__btns .lf-btn { min-width: 120px; }
.lf-quiz__skip-mobile { display: none; }

@media (max-width: 880px) {
  .lf-dialog--quiz { max-width: 640px; }
  .lf-quiz { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .lf-quiz__aside { display: none; }
  .lf-quiz__skip-mobile { display: block; }
}
@media (max-width: 599px) {
  .lf-dialog--quiz { max-width: none; }
  .lf-quiz__main { padding: 26px 16px 20px; }
  .lf-opts--rows { grid-template-columns: minmax(0, 1fr); }
  .lf-opts--img { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .lf-opt__row { min-height: 48px; padding: 10px 12px; gap: 10px; font-size: 14px; }
  .lf-quiz__btns { width: 100%; }
  .lf-quiz__btns .lf-btn { flex: 1; min-width: 0; }
}

/* ── Успех ── */
.lf-done { text-align: center; padding: 8px 0 4px; }
.lf-done .lf-title { margin-right: 0; }
.lf-done__ico svg { width: 64px; height: 64px; margin: 0 auto 12px; display: block; }
.lf-done__ico circle { fill: #e7f4ec; stroke: var(--lf-ok); stroke-width: 2; }
.lf-done__ico path { fill: none; stroke: var(--lf-ok); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 40; stroke-dashoffset: 40; animation: lf-check .45s .1s ease forwards; }
@keyframes lf-check { to { stroke-dashoffset: 0; } }
.lf-done__num { margin: 0 0 10px; font-size: 16px; color: var(--lf-ink-2); }
.lf-done__num b { font-size: 18px; letter-spacing: .04em; color: var(--lf-ink); }
.lf-done .lf-btn { margin-top: 16px; }

/* ── Встроенный блок ── */
.lf-inline { box-sizing: border-box; }
.lf-inline__body {
  background: var(--lf-bg); border: 1px solid var(--lf-line); border-radius: 20px;
  padding: clamp(20px, 3vw, 32px); box-shadow: 0 8px 28px rgba(26, 21, 16, .06);
}
.lf-inline .lf-title { margin-right: 0; }
.lf-inline .lf-progress { margin-right: 0; }

/* ── Секция «заявка» на страницах категорий ── */
.lf-section { margin: clamp(32px, 5vw, 64px) 0; }
.lf-section__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: clamp(20px, 4vw, 56px); align-items: start; }
.lf-section__eyebrow { margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--lf-accent); }
.lf-section__title { margin: 0 0 12px; font-size: clamp(24px, 2vw + 14px, 36px); line-height: 1.15; color: var(--lf-ink); }
.lf-section__text { margin: 0 0 18px; font-size: 16px; line-height: 1.55; color: var(--lf-ink-2); max-width: 52ch; }
.lf-steps { margin: 0; padding: 0; list-style: none; counter-reset: lf; }
.lf-steps li { position: relative; padding: 0 0 14px 44px; font-size: 15px; line-height: 1.5; color: var(--lf-ink-2); counter-increment: lf; }
.lf-steps li::before {
  content: counter(lf); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--lf-soft); color: var(--lf-ink); font-weight: 700; font-size: 14px;
}
.lf-steps b { color: var(--lf-ink); }
@media (max-width: 900px) { .lf-section__grid { grid-template-columns: minmax(0, 1fr); } }

/* Кнопки первого экрана категории */
.lf-hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 16px 0 4px; }
.lf-hero-cta .lf-btn { min-height: 46px; }
.lf-hero-cta__note { font-size: 13px; color: var(--lf-muted); }

/* Баннер в списке товаров */
.lf-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  margin: 28px 0; padding: clamp(18px, 3vw, 28px); border-radius: 20px; background: var(--lf-soft);
}
.lf-banner__t { margin: 0 0 4px; font-size: clamp(18px, 1vw + 14px, 22px); font-weight: 700; color: var(--lf-ink); }
.lf-banner__s { margin: 0; font-size: 15px; color: var(--lf-ink-2); }
.lf-banner__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── Плавающая кнопка (каталог и карточка товара) ──
   Слева: справа — кнопка чата Битрикс24. Появляется с задержкой (lead-flow.js). */
.lf-sticky {
  position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 9990;
  display: flex; align-items: stretch; max-width: calc(100vw - 104px);
  border-radius: 16px; background: var(--lf-accent); color: #fff;
  box-shadow: 0 10px 28px rgba(157, 47, 35, .35);
  transform: translateY(calc(100% + 30px)); opacity: 0; pointer-events: none;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .25s ease;
}
.lf-sticky.is-shown { transform: none; opacity: 1; pointer-events: auto; }
.lf-sticky__open {
  display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 8px 8px 8px 8px; border: 0; background: none; color: inherit;
  font: inherit; text-align: left; cursor: pointer; border-radius: 16px 0 0 16px; min-width: 0;
}
.lf-sticky__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* Подарок: белый круг, красная коробка. При появлении — один «прыжок»
   и мягкое свечение; дальше кнопка спокойная, не дёргает внимание. */
.lf-sticky__ico {
  position: relative; flex: 0 0 auto; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%; background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04), 0 2px 6px rgba(0, 0, 0, .12);
}
.lf-sticky__ico svg {
  width: 26px; height: 26px; fill: #fbe3df; stroke: var(--lf-accent);
  stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round;
}
.lf-sticky__ico::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .7); opacity: 0;
}
.lf-sticky.is-shown .lf-sticky__ico { animation: lf-gift-hop .9s .35s cubic-bezier(.3, 1.6, .5, 1) 1 both; }
.lf-sticky.is-shown .lf-sticky__ico::after { animation: lf-gift-ring 1.4s .5s ease-out 2; }
@keyframes lf-gift-hop {
  0% { transform: scale(.6) rotate(-12deg); }
  45% { transform: scale(1.12) rotate(8deg); }
  70% { transform: scale(.96) rotate(-4deg); }
  100% { transform: none; }
}
@keyframes lf-gift-ring {
  0% { transform: scale(.9); opacity: .9; }
  100% { transform: scale(1.35); opacity: 0; }
}
.lf-sticky--offer .lf-sticky__ico svg { fill: #ffe7c7; stroke: #b4541a; }
.lf-sticky__main { font-size: 16px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.lf-sticky__sub { font-size: 12.5px; line-height: 1.25; opacity: .88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.lf-sticky__close {
  flex: 0 0 auto; width: 40px; border: 0; background: none; color: rgba(255, 255, 255, .8);
  font-size: 22px; line-height: 1; cursor: pointer; border-radius: 0 16px 16px 0;
}
.lf-sticky__open:hover { background: rgba(0, 0, 0, .08); }
.lf-sticky__close:hover { color: #fff; background: rgba(0, 0, 0, .08); }
.lf-sticky__open:focus-visible, .lf-sticky__close:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
/* Акция: тёмная плашка с акцентом суммы — отличается от обычной кнопки. */
.lf-sticky--offer { background: var(--lf-ink); box-shadow: 0 10px 28px rgba(26, 21, 16, .35); }
.lf-sticky--offer .lf-sticky__main { color: #ffd9a8; }
@media (min-width: 768px) {
  .lf-sticky { left: 24px; bottom: 24px; max-width: 380px; }
  .lf-sticky__open { padding: 10px 10px 10px 10px; }
}
/* Телефон: только круглая кнопка с подарком — плашка с текстом закрывала
   пол-экрана. Текст остаётся для экранных чтилок (визуально скрыт),
   крестик — маленький кружок в углу. */
@media (max-width: 767px) {
  .lf-sticky { left: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); max-width: none; border-radius: 50%; }
  .lf-sticky__open { width: 56px; height: 56px; min-height: 0; padding: 0; justify-content: center; border-radius: 50%; }
  .lf-sticky__ico { width: 40px; height: 40px; }
  .lf-sticky__ico svg { width: 24px; height: 24px; }
  .lf-sticky__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lf-sticky__close {
    position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; padding: 0;
    border-radius: 50%; background: #fff; color: #6f6461; font-size: 15px; line-height: 22px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
  }
  .lf-sticky__close:hover { color: #1c1414; background: #fff; }
  .lf-sticky__close::before { content: ''; position: absolute; inset: -10px; }  /* палец не промахнётся */
}

/* Периодический «прыжок» подарка — на всех экранах */
.lf-sticky.is-nudge .lf-sticky__ico { animation: lf-gift-hop .9s cubic-bezier(.3, 1.6, .5, 1) 1 both; }
.lf-sticky.is-nudge .lf-sticky__ico::after { animation: lf-gift-ring 1.2s .15s ease-out 1; }
@media (max-width: 767px) {
  /* На телефоне круг ещё и мягко «дышит» кольцом — его видно боковым зрением */
  .lf-sticky.is-shown::before {
    content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
    box-shadow: 0 0 0 0 rgba(200, 25, 44, .45); animation: lf-breathe 2.8s 1.5s ease-out infinite;
  }
}
@keyframes lf-breathe {
  0% { box-shadow: 0 0 0 0 rgba(200, 25, 44, .45); }
  70%, 100% { box-shadow: 0 0 0 16px rgba(200, 25, 44, 0); }
}

/* Подсказка над подарком */
.lf-tip {
  position: absolute; left: 0; bottom: calc(100% + 16px); z-index: 1;
  display: grid; gap: 6px; width: min(310px, calc(100vw - 28px)); padding: 18px 18px 16px;
  background: #fff; color: var(--lf-ink); border-radius: 18px; text-align: left;
  box-shadow: 0 22px 50px rgba(26, 21, 16, .28), 0 0 0 1px rgba(26, 21, 16, .05);
  transform-origin: 28px calc(100% + 16px); transform: translateY(10px) scale(.6); opacity: 0; visibility: hidden;
  transition: transform .45s cubic-bezier(.2, 1.4, .4, 1), opacity .25s ease, visibility 0s .45s;
}
.lf-tip::after {
  content: ''; position: absolute; left: 22px; bottom: -7px; width: 16px; height: 16px;
  background: #fff; transform: rotate(45deg); border-radius: 0 0 4px 0;
  box-shadow: 3px 3px 6px rgba(26, 21, 16, .06);
}
.lf-sticky.has-tip .lf-tip { transform: none; opacity: 1; visibility: visible; transition: transform .45s cubic-bezier(.2, 1.4, .4, 1), opacity .25s ease; }
.lf-tip__badge {
  justify-self: start; padding: 4px 10px; border-radius: 99px; background: #fdecea; color: var(--lf-accent);
  font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.lf-tip__title { font-size: 18px; font-weight: 800; line-height: 1.22; padding-right: 22px; }
.lf-tip__text { font-size: 14px; line-height: 1.45; color: #6f6461; }
.lf-tip__go {
  margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: 48px; padding: 12px 16px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--lf-accent); color: #fff; font: inherit; font-size: 15.5px; font-weight: 700;
  box-shadow: 0 10px 22px rgba(200, 25, 44, .3); transition: transform .2s ease, box-shadow .2s ease;
}
.lf-tip__go:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(200, 25, 44, .38); }
.lf-tip__arrow { display: inline-block; transition: transform .2s ease; }
.lf-tip__go:hover .lf-tip__arrow { transform: translateX(3px); }
.lf-sticky.has-tip .lf-tip__arrow { animation: lf-tip-arrow 1.6s 1s ease-in-out infinite; }
@keyframes lf-tip-arrow { 0%, 60%, 100% { transform: none; } 30% { transform: translateX(4px); } }
.lf-tip__x {
  position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: #f4f1ee; color: #6f6461; font-size: 18px; line-height: 28px; cursor: pointer;
}
.lf-tip__x:hover { color: var(--lf-ink); }
@media (max-width: 767px) {
  .lf-tip { bottom: calc(100% + 14px); }
  .lf-tip__title { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .lf-sticky.is-nudge .lf-sticky__ico, .lf-sticky.is-nudge .lf-sticky__ico::after,
  .lf-sticky.is-shown::before, .lf-sticky.has-tip .lf-tip__arrow { animation: none; }
  .lf-tip { transition: none; }
}

/* Условия акции в форме */
.lf-offer {
  display: grid; gap: 2px; margin: -6px 0 16px; padding: 10px 12px; border-radius: 10px;
  background: #fff4e5; border: 1px solid #f3d6ac; font-size: 13px; line-height: 1.45; color: var(--lf-ink-2);
}
.lf-offer b { font-size: 15px; color: var(--lf-ink); }

@media (prefers-reduced-motion: reduce) {
  .lf-overlay, .lf-dialog, .lf-sticky, .lf-progress__bar, .lf-opt { transition: none; }
  .lf-sticky.is-shown .lf-sticky__ico, .lf-sticky.is-shown .lf-sticky__ico::after { animation: none; }
  .lf-done__ico path { animation: none; stroke-dashoffset: 0; }
  .lf-btn__spin { animation-duration: 1.6s; }
}

/* ── Встраивание в существующие шаблоны ── */
.mpk-catalog .results .lf-banner--list { grid-column: 1 / -1; margin: 4px 0; }
.mpk-catalog .results.view-table .lf-banner--list { display: none; }

.pc-gal__cta {
  display: block; margin: 12px 0 0; padding: 0; border: 0; background: none;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--lf-accent);
  text-decoration: underline; text-underline-offset: 4px; cursor: pointer; text-align: left;
}
.pc-gal__cta:hover { color: var(--lf-accent-d); }
.pc-gal__cta:focus-visible { outline: none; box-shadow: var(--lf-focus); border-radius: 4px; }
[data-lead][role="button"]:focus-visible { outline: none; box-shadow: var(--lf-focus); }
