/* sell.css — слой продаж и правок аудита 02.09.2026. Подключается после main.css. */

/* Страховка: абзац вне секции не идёт от края до края */
main > p{ max-width:800px; margin:var(--s3) auto; padding-inline:var(--s3); color:var(--ink-2); }

/* Таблицы на мобильном: не резать колонки */
@media (max-width:640px){
  .prose table{ min-width:0; }
  .prose th, .prose td{ padding:10px; }
  .prose th{ white-space:normal; color:var(--ink-2); }
  .prose td:first-child{ color:var(--ink); font-weight:600; }
}
/* Прайс «объект / цена / что входит» → карточки на телефоне */
@media (max-width:639px){
  .prose .table-wrap.table-cards{ border:0; overflow:visible; }
  .prose .table-cards table{ min-width:0; display:block; background:transparent; font-size:15px; }
  .prose .table-cards thead{ display:none; }
  .prose .table-cards tbody, .prose .table-cards tr, .prose .table-cards td{ display:block; }
  .prose .table-cards tr{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r-m); padding:12px 14px; margin-bottom:10px; }
  .prose .table-cards td{ padding:0; border:0; }
  .prose .table-cards td:nth-child(1){ font-weight:700; color:var(--ink); margin-bottom:2px; }
  .prose .table-cards td:nth-child(2){ color:var(--hot); font-weight:800; font-size:18px; margin-bottom:6px; }
  .prose .table-cards td:nth-child(3){ font-size:14px; color:var(--ink-3); }
}

/* Первый экран внутренних страниц на мобильном: кнопка выше лида, без дыр */
@media (max-width:639px){
  .page-hero .container{ display:flex; flex-direction:column; }
  .page-hero .hero-kicker{ order:1; }
  .page-hero h1{ order:2; }
  .page-hero .hero-badges{ order:3; margin-bottom:var(--s2); }
  .page-hero .hero-phone, .page-hero .hero-phone-note{ order:4; }
  .page-hero .hero-cta{ order:5; margin-bottom:0; }
  .page-hero-sub{ order:6; margin-bottom:0; margin-top:var(--s2); }
  .hero-cta{ flex-direction:column; align-items:stretch; }
  .hero-cta-col{ width:100%; max-width:420px; }
  .hero .hero-cta .btn-hot, .page-hero .hero-cta .btn-hot{ width:100%; }
}
@media (max-width:767px){
  .page-hero{ padding-bottom:var(--s3); }
  .section{ padding-block:var(--s5); }
}

/* Главная на мобильном короче: блог 3 карточки, работы 2 */
@media (max-width:480px){
  #blog .cases > figure:nth-child(n+4){ display:none; }
  #works .cases > figure:nth-child(n+3){ display:none; }
}

/* Десктоп: кнопки hero в одну строку; «5 шагов» в пять колонок; финальная кнопка без разрыва */
@media (min-width:1024px){
  .hero-cta .btn-hot{ white-space:nowrap; }
  .hero-cta .btn-ghost{ max-width:none; }
  .steps:has(> :nth-child(5)){ grid-template-columns:repeat(5,1fr); }
}
.final-cta .btn{ display:inline-flex; justify-content:center; align-items:center; text-align:center; }

/* Десктоп ≥1200: внутренние страницы = колонка 800px у левого края сетки + закреплённая карточка справа */
@media (min-width:1200px){
  body.has-sidecard main .container > *{ max-width:800px; }
  body.has-sidecard main .container.prose{ max-width:var(--container); margin-inline:auto; }
  body.has-sidecard main .container.prose > *{ max-width:800px; }
  .sidecard{ display:block; position:fixed; z-index:40; top:104px; width:320px;
    right:max(24px, calc((100vw - var(--container)) / 2));
    background:var(--surface); border:1px solid var(--line); border-radius:var(--r-l); padding:22px 22px 18px;
    box-shadow:0 18px 50px rgba(0,0,0,.45); }
  .sidecard-kicker{ font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--ink-3); margin:0 0 6px; }
  .sidecard-phone{ display:block; font-size:24px; font-weight:800; color:var(--ink); text-decoration:none; letter-spacing:-.01em; margin:0 0 2px; }
  .sidecard-note{ font-size:13px; color:var(--ink-3); margin:0 0 14px; }
  .sidecard-ladder{ list-style:none; margin:0 0 14px; padding:0; border-top:1px solid var(--line); }
  .sidecard-ladder li{ display:flex; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid var(--line); font-size:14px; color:var(--ink-2); }
  .sidecard-ladder b{ color:var(--ink); white-space:nowrap; }
  .sidecard .btn{ width:100%; justify-content:center; margin-bottom:8px; }
  .sidecard-trust{ font-size:12.5px; color:var(--ink-3); margin:10px 0 0; line-height:1.5; }
  .sidecard-trust a{ color:var(--ink-2); }
}
@media (max-width:1199px){ .sidecard{ display:none; } }

/* Продающий модуль гео-страниц (inc/geo-sell.php) */
.geo-sell .equip-track figure{ margin:0; }
.trustline{ display:flex; flex-wrap:wrap; gap:10px 22px; align-items:center; margin:var(--s3) 0 0; padding:14px 18px; border:1px dashed var(--line-2); border-radius:var(--r-m); font-size:14px; color:var(--ink-2); }
.trustline span{ display:inline-flex; align-items:center; gap:8px; }
.trustline b{ color:var(--ink); }
.trustline a{ color:var(--ink); font-weight:600; }
.geo-sell .midcta{ margin-top:var(--s4); }
.lm-phone{ margin:-6px 0 14px; font-size:15px; color:var(--ink-2); }
.lm-phone a{ color:var(--ink); text-decoration:none; }
.linklike{ background:none; border:0; padding:0; color:var(--ink); font:inherit; font-weight:600; text-decoration:underline; cursor:pointer; }

/* v2: узкие таблицы без карточек (сервисные страницы) — компактнее, чтобы влезали в 358px */
@media (max-width:480px){
  .prose table:not(.table-cards table){ font-size:13.5px; }
  .prose th, .prose td{ padding:8px 6px; }
  .prose td b{ white-space:nowrap; }
}

/* v3 (аудит v2): сайдкард не перекрывает контент; сетки в колонке 800px; ритм кикер→H2 */
@media (min-width:1200px){
  body.has-sidecard main .container.contact-grid{ grid-template-columns:1fr; max-width:var(--container); }
  body.has-sidecard main .container.contact-grid > *{ max-width:800px; }
  body.has-sidecard .final p.final-text{ margin-inline:0; }
  body.has-sidecard .geo-bridge{ max-width:800px; margin-inline:0; text-align:left; }
  body.has-sidecard .steps{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  body.has-sidecard .cases{ grid-template-columns:1fr 1fr; }
  body.has-sidecard .svc-grid{ grid-template-columns:1fr 1fr; }
  body.has-sidecard .equip-track{ grid-template-columns:1fr 1fr; }
  .sidecard{ transition:opacity .2s, transform .2s; }
  .sidecard.is-away{ opacity:0; transform:translateY(12px); pointer-events:none; }
}
.footer{ position:relative; z-index:45; }
.prose .sec-kicker + h2, .prose .sec-kicker + .sec-title{ margin-top:0; }
.equip-track figcaption{ font-family:inherit; font-size:13.5px; }
.prose .table-cards td:nth-child(2) b{ color:var(--hot); }
.btn-note a{ color:inherit; text-decoration:none; display:inline-block; padding:6px 0; }
.geo-bridge{ max-width:820px; margin:0 auto; text-align:center; font-size:14.5px; line-height:1.55; color:var(--ink-2); }
.geo-bridge a{ font-weight:600; }
@media (min-width:1024px) and (max-width:1199px){ .stickybar{ display:block; } body{ padding-bottom:calc(var(--sticky-h) + env(safe-area-inset-bottom, 0px)); } }

/* v4 (аудит v3): подписи футера без h4; тост при копировании номера на ПК; гео-CTA; тап-зона «оставить заявку» */
.footer .footer-h{ font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.07em; color:var(--ink-3); margin:0 0 var(--s2); }
.midcta-text .midcta-h{ font-size:20px; font-weight:800; margin:0 0 6px; }
.btn-note .linklike{ padding:11px 0; margin:-11px 0; }
.pb-toast{ position:fixed; left:50%; bottom:28px; transform:translate(-50%, 12px); max-width:min(92vw, 520px); padding:12px 16px; border-radius:12px; background:var(--ink, #111); color:#fff; font-size:14.5px; line-height:1.4; box-shadow:0 10px 30px rgba(0,0,0,.35); opacity:0; transition:opacity .25s, transform .25s; z-index:1200; pointer-events:none; }
.pb-toast.is-on{ opacity:1; transform:translate(-50%, 0); }
.geo-cta-wrap{ margin-top:-8px; margin-bottom:8px; }
.geo-cta .geo-cta-h{ font-size:1.1rem; font-weight:800; margin:0 0 4px; }
@media (min-width:1200px){ body.has-sidecard .geo-cta-wrap > .geo-cta{ max-width:800px; } }

@media (min-width:1024px) and (max-width:1199px){ .stickybar{ display:none !important; } body{ padding-bottom:0 !important; } }
/* v5 (аудит v3, дизайн): зигзаг колонки 848–1199; шапка 1024–1099; сироты в сетках; тап-зоны; шаги; таблицы-карточки; мост; сайдкард */
@media (min-width:848px) and (max-width:1199px){
  main .container.prose{ max-width:var(--container); margin-inline:auto; }
  main .container.prose > *{ max-width:800px; }
}
@media (min-width:1024px) and (max-width:1099px){
  .hdr-nav{ gap:var(--s2); margin-left:var(--s2); }
  .hdr-nav a, .hdr-cta{ white-space:nowrap; }
}
@media (min-width:1200px){
  body.has-sidecard :is(.steps, .svc-grid, .cases) > :last-child:nth-child(odd){ grid-column:1 / -1; }
  body.has-sidecard .form-card, body.has-sidecard .contact-list, body.has-sidecard .area-card{ max-width:560px; }
  body.has-sidecard .page-hero:has(.hero-phone) .btn-note{ display:none; }
  .sidecard{ right:max(24px, calc(50% - var(--container) / 2 + var(--s3))); }
}
@media (min-width:900px){ .why-list > .why:last-child:nth-child(odd){ grid-column:1 / -1; } }
@media (max-width:375px){
  .pricecard-mini-row{ padding:4px 0; }
  .hero h1{ margin-bottom:12px; }
  .hero-sub{ margin-bottom:12px; }
  .hero-phone-note{ margin:4px 0 10px; }
  .hero-kicker, .hero-badges, .pricecard-mini{ margin-bottom:10px; }
}
.final-note a{ white-space:nowrap; }
.step{ padding-top:var(--s7); }
.step::before{ top:18px; line-height:1; }
.prose a > b, .prose a > strong{ color:inherit; }
.area-chips span.chip{ background:transparent; border-style:dashed; color:var(--ink-3); }
.chip{ min-height:40px; }
.footer li a{ display:inline-block; padding:7px 0; }
.footer li{ margin-bottom:0; }
.btn-note a{ padding:11px 0; margin:-5px 0; }
.breadcrumbs a{ display:inline-block; padding:10px 0; margin:-10px 0; }
.trustline span{ display:inline; }
#blog .case-img{ display:none; }
.geo-bridge-wrap{ padding-block:var(--s4); border-top:1px solid var(--line); }
.lm-phone{ margin:6px 0 12px; }
@media (max-width:599px){ .lm-phone{ display:none; } }
@media (max-width:639px){
  .table-wrap:has(.table-stack){ overflow:visible; }
  .table-stack thead{ display:none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td{ display:block; width:100%; min-width:0; }
  .table-stack tr{ border:1px solid var(--line); border-radius:12px; padding:10px 12px; margin-bottom:10px; background:var(--surface); }
  .table-stack td{ border:0; padding:4px 0; }
  .table-stack td:first-child{ font-weight:800; color:var(--ink); padding-bottom:6px; margin-bottom:4px; border-bottom:1px solid var(--line); }
  .table-stack td[data-label]::before{ content:attr(data-label) ": "; color:var(--ink-3); font-weight:600; }
}

/* v6 (верификация v5): тост, формы при сайдкарде, чек-лист .sos под сайдкардом, нумерация шагов, колонка 800 на 848–1199, сайдкард 300 */
.pb-toast{ background:#171b23; color:#f4f6f9; border:1px solid #3a4250; }
.prose ol.steps{ list-style:none; padding-left:0; }
.footer li a{ padding:10px 0; }
.btn-note a{ margin:-11px 0; }
@media (min-width:848px) and (max-width:1199px){
  body.has-sidecard main .container > *{ max-width:800px; }
  body.has-sidecard .geo-bridge{ max-width:800px; margin-inline:0; text-align:left; }
  body.has-sidecard .final p.final-text{ margin-inline:0; }
  body.has-sidecard main .steps{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  body.has-sidecard main .cases, body.has-sidecard main .svc-grid, body.has-sidecard main .equip-track{ grid-template-columns:1fr 1fr; }
  body.has-sidecard main :is(.steps, .svc-grid, .cases) > :last-child:nth-child(odd):not(:only-child){ grid-column:1 / -1; }
  body.has-sidecard .sos-in{ grid-template-columns:1fr; }
  body.has-sidecard .sos-list{ grid-template-columns:repeat(2, minmax(0,1fr)); }
}
@media (min-width:1200px){
  .sidecard{ width:300px; }
  body.has-sidecard main .container > .form-card, body.has-sidecard main .container > .area-card, body.has-sidecard main .container > .contact-list{ max-width:560px; }
  body.has-sidecard .sos-in{ grid-template-columns:1fr; }
  body.has-sidecard .sos-list{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  body.has-sidecard :is(.steps, .svc-grid, .cases) > :last-child:nth-child(odd):only-child{ grid-column:auto; }
  body.has-sidecard .final{ background:radial-gradient(640px 360px at calc(50% - 166px) -20%, rgba(255,74,23,.18), transparent 65%), var(--bg-1); }
}
