/* =========================================================================
   Подбор автоэмалей — стили страницы услуги
   ========================================================================= */

.ap-pod {
  --ap-accent: #ec3013;
  --ap-accent-dark: #b3240e;
  --ap-ink: #201e1d;
  --ap-line: rgba(32, 30, 29, 0.14);
  --ap-line-strong: #201e1d;
  --ap-muted: rgba(32, 30, 29, 0.6);
  --ap-surface: #f6f4f1;
  --ap-skeleton: #dcd8d3;

  font-family: "Archivo", "Ubuntu", system-ui, sans-serif;
  color: var(--ap-ink);
  font-size: 15px;
  line-height: 1.55;
  max-width: 1000px;
  margin: 0 auto;
}

.ap-pod *,
.ap-pod *::before,
.ap-pod *::after { box-sizing: border-box; }

.ap-pod a { color: var(--ap-accent); text-decoration: none; }
.ap-pod a:hover { color: var(--ap-accent-dark); text-decoration: underline; }

.ap-pod img { max-width: 100%; display: block; }

.ap-pod details > summary { list-style: none; }
.ap-pod details > summary::-webkit-details-marker { display: none; }

/* сбрасываем оформление списков/таблиц сайта внутри .content */
.ap-pod ul,
.ap-pod ol { margin: 0; padding: 0; list-style: none; }
.ap-pod ul > li,
.ap-pod ol > li { margin: 0; padding: 0; }
.ap-pod ul > li::before,
.ap-pod ol > li::before { content: none !important; }
.ap-pod p { margin: 0; }
.ap-pod table { border-collapse: collapse; width: 100%; }
.ap-pod table td,
.ap-pod table th { padding: 0; background: transparent; }
.ap-pod table tr:nth-child(odd) { background: transparent; }

/* --- секции --- */
.ap-section {
  padding: 34px 0;
  border-bottom: 1px solid var(--ap-line);
}
.ap-section:first-child { padding-top: 0; }
.ap-section:last-child { border-bottom: none; }

.ap-section--divider-strong { border-bottom: 2px solid var(--ap-line-strong); }

.ap-h2 {
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 18px;
  color: var(--ap-ink);
}

.ap-crumbs {
  font: 500 11px/1.4 ui-monospace, Menlo, monospace;
  color: var(--ap-muted);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.ap-crumbs a { color: var(--ap-muted); text-decoration: none; }
.ap-crumbs a:hover { color: var(--ap-accent); }

/* --- хиро-блок --- */
.ap-hero h1 {
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 38px;
  line-height: 1.08;
  margin: 0 0 16px;
  color: var(--ap-ink);
}
.ap-hero p {
  max-width: 680px;
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.6;
}
.ap-hero p:last-of-type { margin-bottom: 0; }
.ap-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* --- кнопки --- */
.ap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: 13px;
  padding: 13px 24px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  line-height: 1.2;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.ap-btn-primary { background: var(--ap-accent); color: #fff; }
.ap-btn-primary:hover { background: var(--ap-accent-dark); color: #fff; }
.ap-btn-secondary { border-color: rgba(32, 30, 29, 0.3); color: var(--ap-ink); background: #fff; }
.ap-btn-secondary:hover { background: rgba(32, 30, 29, 0.06); color: var(--ap-ink); }
.ap-btn-block { width: 100%; }

/* --- шаги подбора --- */
.ap-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--ap-line);
  margin-bottom: 16px;
}
.ap-step {
  background: #fff;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ap-step-num {
  font: 700 22px ui-monospace, Menlo, monospace;
  color: var(--ap-accent);
}
.ap-step-title { font: 600 13px/1.3 "Archivo", sans-serif; }
.ap-step-text { font: 400 12px/1.5 "Archivo", sans-serif; color: rgba(32, 30, 29, 0.7); }

.ap-note {
  display: flex;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(32, 30, 29, 0.2);
  padding: 13px 16px;
  background: var(--ap-surface);
}
.ap-note-label {
  font: 600 10px ui-monospace, Menlo, monospace;
  letter-spacing: 0.1em;
  color: var(--ap-accent);
  flex: none;
}
.ap-note-text { font: 400 13px "Archivo", sans-serif; }

/* --- сравнение способов --- */
.ap-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--ap-line);
  margin-bottom: 1px;
}
.ap-compare-card {
  background: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.ap-compare-card--rec { border-top: 3px solid var(--ap-accent); }
.ap-compare-kicker {
  font: 600 10px ui-monospace, Menlo, monospace;
  letter-spacing: 0.1em;
  color: rgba(32, 30, 29, 0.45);
}
.ap-compare-card--rec .ap-compare-kicker { color: var(--ap-accent); }
.ap-compare-title { font: 700 17px "Archivo", sans-serif; }
.ap-compare-text { font: 400 13px/1.55 "Archivo", sans-serif; color: rgba(32, 30, 29, 0.75); }
.ap-compare-foot { font: 600 12px "Archivo", sans-serif; color: rgba(32, 30, 29, 0.55); margin-top: 2px; }

.ap-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--ap-line);
}
.ap-photo {
  background: var(--ap-surface);
  min-height: 180px;
  display: block;
  object-fit: cover;
  width: 100%;
}
.ap-photo-placeholder {
  background: var(--ap-surface);
  border: 1px dashed rgba(32, 30, 29, 0.3);
  min-height: 180px;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  font: 500 10px/1.4 ui-monospace, monospace;
  color: rgba(32, 30, 29, 0.4);
}

/* --- ассортимент + текст --- */
.ap-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.ap-list-plain {
  border-top: 2px solid var(--ap-line-strong);
  border-bottom: 1px solid var(--ap-line);
}
.ap-list-plain li {
  background: #fff;
  padding: 12px 0;
  font: 600 14px "Archivo", sans-serif;
  border-bottom: 1px solid var(--ap-line);
}
.ap-list-plain li:last-child { border-bottom: none; }
.ap-text-block { padding-top: 44px; display: flex; flex-direction: column; gap: 12px; }
.ap-text-block p { font: 400 14px/1.6 "Archivo", sans-serif; color: rgba(32, 30, 29, 0.8); }

/* --- цены --- */
.ap-price-table { margin-bottom: 16px; }
.ap-price-head,
.ap-price-row {
  display: flex;
  align-items: center;
}
.ap-price-head {
  border-bottom: 2px solid var(--ap-line-strong);
  padding: 9px 0;
  font: 600 10px ui-monospace, Menlo, monospace;
  letter-spacing: 0.08em;
  color: rgba(32, 30, 29, 0.5);
}
.ap-price-row {
  border-bottom: 1px solid var(--ap-line);
  padding: 14px 0;
}
.ap-price-name { flex: 1; font: 400 14px "Archivo", sans-serif; }
.ap-price-value { width: 150px; font: 700 15px "Archivo", sans-serif; flex: none; }
.ap-price-value--accent { color: var(--ap-accent); }

.ap-promo {
  border: 2px solid var(--ap-accent);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.ap-promo-kicker {
  font: 600 10px ui-monospace, Menlo, monospace;
  letter-spacing: 0.1em;
  color: var(--ap-accent);
}
.ap-promo-text { font: 600 15px "Archivo", sans-serif; }

.ap-fineprint { font: 400 12.5px/1.5 "Archivo", sans-serif; color: rgba(32, 30, 29, 0.6); margin-bottom: 6px; }
.ap-fineprint:last-child { margin-bottom: 0; }

/* --- гарантии --- */
.ap-guarantees {
  border-top: 2px solid var(--ap-line-strong);
  border-bottom: 1px solid var(--ap-line);
}
.ap-guarantees li {
  background: #fff;
  padding: 14px 0;
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--ap-line);
}
.ap-guarantees li:last-child { border-bottom: none; }
.ap-guarantees li::marker { content: none; }
.ap-dot {
  width: 6px;
  height: 6px;
  background: var(--ap-accent);
  flex: none;
  margin-top: 7px;
  border-radius: 50%;
}
.ap-guarantees-text { font: 400 13.5px/1.55 "Archivo", sans-serif; flex: 1; }

/* --- форма заявки --- */
.ap-form-block {
  background: var(--ap-surface);
  border: 2px solid var(--ap-line-strong);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ap-form-title { font: 700 26px "Archivo", sans-serif; margin: 0 0 8px; }
.ap-form-sub { font: 400 13.5px/1.5 "Archivo", sans-serif; color: rgba(32, 30, 29, 0.7); max-width: 520px; }

.ap-seg {
  display: flex;
  gap: 1px;
  background: rgba(32, 30, 29, 0.2);
}
.ap-seg-opt {
  flex: 1;
  background: #fff;
  padding: 11px 14px;
  font: 600 12px "Archivo", sans-serif;
  color: rgba(32, 30, 29, 0.5);
  text-align: center;
  cursor: pointer;
  border: none;
  display: block;
  position: relative;
}
/* переключатели без JS: скрытый radio + подсветка активного label через :has() */
.ap-seg-opt input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.ap-seg-opt:has(input:checked) { background: var(--ap-ink); color: #fff; }
.ap-seg-opt:has(input:focus-visible) { outline: 2px solid var(--ap-accent); outline-offset: -2px; }
/* фолбэк для браузеров без :has() — переключатель просто не подсвечивается,
   функциональность формы (radio-группа) при этом сохраняется полностью */

.ap-field-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.ap-field { display: flex; flex-direction: column; gap: 6px; }
.ap-field-label {
  font: 500 10px ui-monospace, Menlo, monospace;
  color: rgba(32, 30, 29, 0.5);
  letter-spacing: 0.03em;
}
.ap-input,
.ap-textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  font: 400 14px "Archivo", sans-serif;
  color: var(--ap-ink);
  background: #fff;
  border: 1px solid rgba(32, 30, 29, 0.3);
}
.ap-input:focus,
.ap-textarea:focus {
  outline: none;
  border-color: var(--ap-accent);
}
.ap-textarea { min-height: 70px; padding: 10px 12px; resize: vertical; }

.ap-seg-inline {
  display: flex;
  gap: 1px;
  background: rgba(32, 30, 29, 0.2);
}
.ap-seg-inline .ap-seg-opt { padding: 13px 8px; font-size: 11px; }

.ap-file-input {
  min-height: 42px;
  border: 1px dashed rgba(32, 30, 29, 0.35);
  display: flex;
  align-items: center;
  padding: 0 12px;
  font: 500 10px ui-monospace, Menlo, monospace;
  color: rgba(32, 30, 29, 0.4);
  cursor: pointer;
  background: #fff;
}

.ap-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font: 400 12px "Archivo", sans-serif;
  color: rgba(32, 30, 29, 0.65);
}
.ap-checkbox-row input[type="checkbox"] {
  width: 15px;
  height: 15px;
  flex: none;
  margin: 2px 0 0;
  accent-color: var(--ap-accent);
}

.ap-form-submit-row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.ap-form-submit-note { font: 400 12px "Archivo", sans-serif; color: rgba(32, 30, 29, 0.55); }

/* --- магазины --- */
.ap-stores-head,
.ap-stores-row {
  display: flex;
  gap: 16px;
  align-items: center;
}
.ap-stores-head {
  border-bottom: 2px solid var(--ap-line-strong);
  padding: 9px 0;
  font: 600 10px ui-monospace, Menlo, monospace;
  letter-spacing: 0.08em;
  color: rgba(32, 30, 29, 0.5);
}
.ap-stores-row {
  border-bottom: 1px solid var(--ap-line);
  padding: 13px 0;
}
.ap-stores-col-name { flex: 1.4; font: 400 13px/1.4 "Archivo", sans-serif; }
.ap-stores-col-name strong { font-weight: 700; }
.ap-stores-col-phone { flex: 0.9; font: 400 13px "Archivo", sans-serif; }
.ap-stores-col-phone a { color: var(--ap-ink); }
.ap-stores-col-hours { flex: 1; font: 600 12px "Archivo", sans-serif; }
.ap-stores-details { border: none; }
.ap-stores-more {
  padding: 13px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 600 12px "Archivo", sans-serif;
  cursor: pointer;
  list-style: none;
}
.ap-stores-more::-webkit-details-marker { display: none; }
.ap-stores-more-label { color: var(--ap-accent); }
.ap-stores-more-label::after { content: " \2192"; }
.ap-stores-details[open] .ap-stores-more-label::after { content: " \2191"; }
.ap-schema-hint { font: 500 9px ui-monospace, monospace; color: rgba(32, 30, 29, 0.35); }

/* --- отзывы --- */
.ap-reviews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--ap-line);
  border: 1px solid var(--ap-line);
}
.ap-review { background: #fff; padding: 18px; display: flex; flex-direction: column; gap: 11px; }
.ap-review-stars { display: flex; gap: 3px; }
.ap-star { width: 9px; height: 9px; background: var(--ap-accent); }
.ap-star.is-empty { background: var(--ap-skeleton); }
.ap-review-text { font: 400 12.5px/1.55 "Archivo", sans-serif; color: rgba(32, 30, 29, 0.78); }
.ap-review-meta { font: 600 11px "Archivo", sans-serif; color: rgba(32, 30, 29, 0.5); }

/* --- FAQ --- */
.ap-faq-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}
.ap-faq {
  border-top: 2px solid var(--ap-line-strong);
  border-bottom: 1px solid var(--ap-line);
}
/* .ap-faq-item — это <details>, .ap-faq-q — <summary>: раскрытие нативное, без JS */
.ap-faq-item { border-bottom: 1px solid var(--ap-line); background: #fff; }
.ap-faq-item:last-child { border-bottom: none; }
.ap-faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
  font: 600 14px "Archivo", sans-serif;
  color: var(--ap-ink);
}
.ap-faq-q::-webkit-details-marker { display: none; }
.ap-faq-icon {
  font: 600 16px ui-monospace, monospace;
  color: var(--ap-accent);
  flex: none;
}
.ap-faq-icon::before { content: "+"; }
.ap-faq-item[open] .ap-faq-icon::before { content: "\2212"; }
.ap-faq-a {
  max-width: 700px;
  font: 400 13px/1.6 "Archivo", sans-serif;
  color: rgba(32, 30, 29, 0.75);
  padding: 0 0 16px;
}

/* --- нижний блок TDS / смежные --- */
.ap-bottom-grid {
  border-top: 2px solid var(--ap-line-strong);
  padding-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.ap-bottom-title { font: 700 17px "Archivo", sans-serif; margin: 0 0 12px; }
.ap-tds-list { display: flex; flex-direction: column; gap: 9px; }
.ap-tds-link {
  border: 1px solid rgba(32, 30, 29, 0.3);
  padding: 11px 14px;
  font: 600 12px "Archivo", sans-serif;
  color: var(--ap-ink) !important;
  text-decoration: none !important;
  display: block;
}
.ap-tds-link:hover { border-color: var(--ap-accent); color: var(--ap-accent) !important; }
.ap-related-text { font: 400 13px/1.6 "Archivo", sans-serif; color: rgba(32, 30, 29, 0.75); }

/* --- мобильная липкая CTA-панель --- */
.ap-sticky-cta {
  display: none;
}

/* =========================================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ (≤ 767px) — по мотивам варианта 3b
   ========================================================================= */
@media (max-width: 767px) {
  .ap-pod { font-size: 14px; padding-bottom: 76px; }

  .ap-hero h1 { font-size: 25px; }
  .ap-hero p { font-size: 13.5px; }
  .ap-hero-actions .ap-btn { width: 100%; }

  .ap-h2 { font-size: 18px; }

  .ap-steps { grid-template-columns: 1fr; }
  .ap-step { flex-direction: row; align-items: flex-start; gap: 12px; padding: 13px 0; background: #fff; }
  .ap-step-num { font-size: 16px; }

  .ap-compare { grid-template-columns: 1fr; }
  .ap-photos { grid-template-columns: 1fr; }
  .ap-photo-placeholder { min-height: 140px; }

  .ap-two-col { grid-template-columns: 1fr; gap: 24px; }
  .ap-text-block { padding-top: 0; }

  .ap-price-value { width: auto; text-align: right; }

  .ap-field-grid { grid-template-columns: 1fr; }

  .ap-reviews { grid-template-columns: 1fr; }

  .ap-bottom-grid { grid-template-columns: 1fr; gap: 24px; }

  .ap-form-block { padding: 18px; }
  .ap-form-title { font-size: 20px; }

  /* Необязательный приём без JS: чтобы свернуть произвольную секцию
     в аккордеон на мобильном, оберните её как
     <details class="ap-section ap-mobile-accordion"><summary class="ap-h2">Заголовок</summary>...</details>
     — раскрытие будет работать нативно на любой ширине экрана. */
  summary.ap-h2 { cursor: pointer; list-style: none; }
  summary.ap-h2::-webkit-details-marker { display: none; }
  summary.ap-h2::after {
    content: "+";
    float: right;
    font: 600 16px ui-monospace, monospace;
    color: var(--ap-accent);
  }
  .ap-mobile-accordion[open] > summary.ap-h2::after { content: "\2212"; }

  /* липкая CTA-панель снизу экрана */
  .ap-sticky-cta {
    display: flex;
    gap: 10px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding: 11px 16px;
    background: #fff;
    border-top: 2px solid var(--ap-line-strong);
  }
  .ap-sticky-cta .ap-btn { flex: 1; padding: 12px; font-size: 11px; }
  .ap-sticky-cta .ap-btn-primary { flex: 1.4; }
}