/* Лендинг «Дефибриллятор для стоматологии» (local/landings/aed-stomatologiya/index.php).
 * На токенах ui-kit (tokens.css): --brand, --accent, --ink, --muted, --line, --surface-*, --r-*, --fs-*.
 * Сетка товаров — штатная catalog_v2, здесь только обвязка лендинга. */

.aed { --aed-gap: clamp(16px, 2.4vw, 28px); color: var(--ink); }
.aed [hidden], .aed-grid article[data-pid][hidden] { display: none !important; }

.aed .heading { padding-bottom: 0; }

/* ---------- первый экран ---------- */
.aed-hero { padding-block: 8px clamp(28px, 4vw, 48px); }
.aed-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: var(--aed-gap);
  align-items: start;
}
.aed-eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  padding: 6px 12px;
  border-radius: var(--r-full);
  background: var(--brand-50);
  color: var(--brand);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.35;
}
.aed-hero__title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
}
.aed-hero__lead { margin: 0 0 18px; max-width: 62ch; font-size: var(--fs-md); line-height: var(--lh-body); color: var(--ink-600); }
.aed-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 22px; }
.aed-hero__price { font-size: var(--fs-md); color: var(--muted); }
.aed-hero__price b { color: var(--ink); font-size: var(--fs-lg); }

.aed-hero__card {
  padding: clamp(18px, 2vw, 26px);
  border-radius: var(--r-xl);
  background: var(--brand);
  color: #fff;
}
.aed-hero__card-title { margin: 0 0 12px; font-weight: 700; font-size: var(--fs-md); }
.aed-hero__card-list { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 10px; }
.aed-hero__card-list li { position: relative; padding-left: 26px; line-height: var(--lh-snug); }
.aed-hero__card-list li::before {
  content: ""; position: absolute; left: 0; top: .35em;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent);
}
.aed-hero__card .aed-link { color: var(--accent); }

.aed-checks { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
.aed-checks li { position: relative; padding-left: 24px; line-height: var(--lh-snug); }
.aed-checks li::before {
  content: ""; position: absolute; left: 2px; top: .3em;
  width: 12px; height: 7px;
  border-left: 2px solid var(--green); border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}

.aed-link { font-weight: 600; text-decoration: none; color: var(--brand); }
.aed-link:hover { text-decoration: underline; }

/* ---------- секции ---------- */
.aed-section { padding-block: clamp(32px, 5vw, 64px); }
.aed-section--tint { background: var(--surface-2); }
.aed-section__head { margin-bottom: 22px; max-width: 80ch; }
.aed-h2 { margin: 0 0 10px; font-family: var(--font-display); font-size: clamp(22px, 2.8vw, 32px); line-height: var(--lh-tight); }
.aed-section__sub { margin: 0; color: var(--ink-600); line-height: var(--lh-body); }

/* ---------- фильтры подборки ---------- */
.aed-filters { display: grid; gap: 10px; margin-bottom: 20px; }
.aed-filters__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.aed-filters__label { min-width: 64px; font-size: var(--fs-sm); color: var(--muted); }
.aed-filters__count { margin-left: auto; font-size: var(--fs-sm); color: var(--muted); }
.aed-chip {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.aed-chip:hover { border-color: var(--brand); }
.aed-chip:focus-visible { outline: none; box-shadow: var(--ring); }
.aed-chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.aed-empty { margin: 0 0 16px; color: var(--muted); }

/* ---------- карточки требований / критериев ---------- */
.aed-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--aed-gap); }
.aed-card {
  padding: 20px;
  border-radius: var(--r-lg);
  background: #fff;
  border: 1px solid var(--line);
}
.aed-card__title { margin: 0 0 8px; font-size: var(--fs-base); line-height: var(--lh-snug); }
.aed-card p { margin: 0; color: var(--ink-600); line-height: var(--lh-body); font-size: var(--fs-sm); }
.aed-note { margin: 20px 0 0; max-width: 80ch; color: var(--ink-600); line-height: var(--lh-body); }

/* ---------- калькулятор ---------- */
.aed-calc {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(0, .9fr);
  gap: var(--aed-gap);
  align-items: end;
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
}
.aed-calc__text p { margin: 0; color: var(--ink-600); }
.aed-calc__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.aed-calc__result { display: grid; gap: 10px; justify-items: start; }
.aed-calc__num { margin: 0; font-size: var(--fs-lg); font-weight: 700; }
.aed-calc__num span:first-child { font-size: var(--fs-3xl); color: var(--brand); }

/* ---------- поля ---------- */
.aed-field { display: grid; gap: 6px; font-size: var(--fs-sm); line-height: 1.35; color: var(--muted); }
.aed-field small { font-size: inherit; opacity: .8; }
.aed-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-base);
}
.aed-field input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.aed-field input[aria-invalid="true"] { border-color: var(--danger); }

/* ---------- условия ---------- */
.aed-terms { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--aed-gap); }
.aed-terms li { display: grid; gap: 6px; padding-top: 14px; border-top: 2px solid var(--brand); }
.aed-terms span { color: var(--ink-600); font-size: var(--fs-sm); line-height: var(--lh-body); }
.aed-terms a { color: var(--brand); }

/* ---------- FAQ ---------- */
.aed-faq { display: grid; gap: 10px; max-width: 900px; }
.aed-faq__item { border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); }
.aed-faq__item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 48px 16px 20px;
  position: relative;
  font-weight: 600;
  line-height: var(--lh-snug);
}
.aed-faq__item summary::-webkit-details-marker { display: none; }
.aed-faq__item summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%;
  transform: translateY(-50%);
  font-size: 22px; color: var(--brand);
}
.aed-faq__item[open] summary::after { content: "−"; }
.aed-faq__item p { margin: 0; padding: 0 20px 18px; color: var(--ink-600); line-height: var(--lh-body); }

/* ---------- форма ---------- */
.aed-form-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--aed-gap);
  padding: clamp(20px, 3vw, 40px);
  border-radius: var(--r-2xl);
  background: var(--brand);
  color: #fff;
}
.aed-form-card .aed-h2 { color: #fff; }
.aed-form-card__info > p { margin: 0 0 18px; opacity: .9; line-height: var(--lh-body); }
.aed-form-card .aed-checks { grid-template-columns: 1fr; }
.aed-form {
  display: block;
  padding: clamp(18px, 2vw, 26px);
  border-radius: var(--r-xl);
  background: #fff;
  color: var(--ink);
}
.aed-form [data-aed-form-body] { display: grid; gap: 14px; }
.aed-form__row { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 12px; }
.aed-form__submit { width: 100%; justify-content: center; }
.aed-consent { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-xs); color: var(--muted); line-height: var(--lh-snug); }
.aed-consent input { margin-top: 2px; flex: none; }
.aed-consent a { color: var(--brand); }
.aed-form__error { margin: 0; color: var(--danger); font-size: var(--fs-sm); }
.aed-form__done b { display: block; font-size: var(--fs-lg); margin-bottom: 6px; }
.aed-form__done p { margin: 0; color: var(--ink-600); }

/* ---------- источник ---------- */
.aed-sources { padding-block: 8px 40px; }
.aed-sources p { margin: 0; max-width: 110ch; font-size: var(--fs-xs); line-height: var(--lh-body); color: var(--muted); }
.aed-sources a { color: inherit; }

/* ---------- плавающая кнопка (мобильный) ---------- */
.aed-sticky { display: none; }

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
  .aed-cards, .aed-terms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aed-calc { grid-template-columns: 1fr 1fr; }
  .aed-calc__text { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .aed-hero__grid, .aed-form-card { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .aed-checks, .aed-cards, .aed-terms, .aed-calc, .aed-calc__fields, .aed-form__row { grid-template-columns: 1fr; }
  .aed-filters__label { min-width: 100%; }
  .aed-filters__count { margin-left: 0; width: 100%; }
  .aed-hero__actions .mg-btn { flex: 1 1 100%; justify-content: center; }
  .aed-sticky {
    display: flex;
    justify-content: center;
    position: fixed;
    left: 16px; right: 16px;
    /* над кнопкой «Онлайн-чат» (виджет сайта в правом нижнем углу) */
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    z-index: var(--z-sticky, 50);
    box-shadow: var(--sh-lg);
  }
}
