/* remobilka.ru — шапка и подвал v2 (по ТЗ). Все классы с префиксом sv2-, старые стили не затрагиваются. */
:root {
  --sv2-accent: #2563eb;
  --sv2-accent-dark: #1d4ed8;
  --sv2-accent-soft: #eff6ff;
  --sv2-ink: #0f172a;
  --sv2-text: #334155;
  --sv2-muted: #64748b;
  --sv2-line: #e2e8f0;
  --sv2-bg: #f8fafc;
}

.sv2-head, .sv2-footer { font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased; }
.sv2-head *, .sv2-footer * { box-sizing: border-box; }
.sv2-head a, .sv2-footer a { text-decoration: none; }
.sv2-head a:hover, .sv2-head a:focus, .sv2-footer a:hover, .sv2-footer a:focus { text-decoration: none; }
.sv2-head [hidden], .sv2-footer [hidden] { display: none !important; }
.sv2-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== шапка ===== */
.sv2-head { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--sv2-line); }
body > .sv2-head + main.mainContent { margin-top: 0; padding-top: 0; }
.sv2-head__in { display: flex; align-items: center; gap: 18px; min-height: 76px; position: relative; }
.sv2-head a.sv2-logo, .sv2-footer a.sv2-logo { font-weight: 800; font-size: 22px; letter-spacing: .02em; color: var(--sv2-ink); white-space: nowrap; }
.sv2-logo span { color: var(--sv2-accent); }
.sv2-brand { display: flex; flex-direction: column; flex: 0 0 auto; line-height: 1.15; }
.sv2-tag { display: block; margin-top: 2px; color: var(--sv2-muted); font-size: 12px; font-weight: 600; white-space: nowrap; }

.sv2-cityw { position: relative; flex: 0 0 auto; }
.sv2-city { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border: 1px solid var(--sv2-line); border-radius: 12px; background: #fff; color: var(--sv2-ink); font: 600 15px Inter, system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.sv2-city:hover, .sv2-city[aria-expanded="true"] { border-color: var(--sv2-accent); }
.sv2-city svg:last-child { transition: transform .15s; }
.sv2-city[aria-expanded="true"] svg:last-child { transform: rotate(180deg); }

.sv2-search { position: relative; flex: 1 1 280px; min-width: 0; margin: 0; }
.sv2-search > svg { position: absolute; left: 14px; top: 13px; color: #94a3b8; pointer-events: none; }
.sv2-search input[type="search"] { display: block; width: 100%; height: 44px; margin: 0; padding: 0 14px 0 42px; border: 1px solid var(--sv2-line); border-radius: 12px; background: var(--sv2-bg); color: var(--sv2-ink); font: 400 15px Inter, system-ui, sans-serif; box-shadow: none; -webkit-appearance: none; appearance: none; }
.sv2-search input[type="search"]:focus { outline: 0; border-color: var(--sv2-accent); background: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }

.sv2-contacts { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.sv2-head a.sv2-phone { color: var(--sv2-ink); font-weight: 800; font-size: 16px; white-space: nowrap; }
.sv2-head a.sv2-soc { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--sv2-accent-soft); color: var(--sv2-accent); }
.sv2-head a.sv2-soc:hover { background: #dbeafe; }
.sv2-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 18px; border-radius: 10px; font: 700 14px/1.2 Inter, system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.sv2-btn--ghost { background: transparent; color: var(--sv2-accent); border: 1px solid var(--sv2-accent); }
.sv2-btn--ghost:hover { background: var(--sv2-accent-soft); }

.sv2-head a.sv2-phone-ico { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 12px; background: var(--sv2-accent); color: #fff; }
.sv2-burger { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid var(--sv2-line); border-radius: 12px; background: #fff; color: var(--sv2-ink); cursor: pointer; padding: 0; }

.sv2-nav { border-top: 1px solid var(--sv2-line); background: #fff; }
.sv2-navrow { display: flex; gap: 8px; padding-top: 8px; padding-bottom: 8px; overflow-x: auto; }
.sv2-head .sv2-navrow a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 10px; color: var(--sv2-text); font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.sv2-head .sv2-navrow a:hover { background: var(--sv2-bg); color: var(--sv2-ink); }
.sv2-head .sv2-navrow a.sv2-courier { background: var(--sv2-accent); color: #fff; }
.sv2-head .sv2-navrow a.sv2-courier:hover { background: var(--sv2-accent-dark); }
.sv2-navcall { display: none; }

/* ===== выпадающие панели ===== */
.sv2-pop { position: absolute; z-index: 110; top: 52px; background: #fff; border: 1px solid var(--sv2-line); border-radius: 14px; box-shadow: 0 12px 32px rgba(15, 23, 42, .16); }
.sv2-pop--city { left: 0; width: 230px; padding: 6px; max-height: 70vh; overflow-y: auto; }
.sv2-head .sv2-pop--city a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--sv2-ink); font-weight: 600; }
.sv2-head .sv2-pop--city a:hover { background: var(--sv2-bg); }
.sv2-head .sv2-pop--city a.on { background: var(--sv2-accent-soft); color: var(--sv2-accent); }
.sv2-pop--search { left: 0; right: 0; min-width: min(460px, calc(100vw - 32px)); padding: 8px 0 10px; max-height: 70vh; overflow-y: auto; }
.sv2-pop h4 { margin: 0; padding: 10px 18px 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--sv2-muted); }
.sv2-head a.sv2-hit { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 18px; color: var(--sv2-ink); font-weight: 500; }
.sv2-head a.sv2-hit:hover, .sv2-head a.sv2-hit.is-active { background: var(--sv2-bg); }
.sv2-hit small { display: block; color: var(--sv2-muted); font-size: 13px; font-weight: 400; }
.sv2-hit em { font-style: normal; font-weight: 800; white-space: nowrap; }
.sv2-pop__empty { padding: 14px 18px; color: var(--sv2-muted); font-size: 14px; }

/* ===== подвал ===== */
.sv2-footer { background: var(--sv2-ink); color: #aebacb; padding: 44px 0 28px; margin-top: 24px; font-size: 14px; }
.sv2-footer__cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.sv2-footer a { display: block; color: #dbe3ee; padding: 4px 0; }
.sv2-footer a:hover { color: #fff; }
.sv2-footer h3 { margin: 0 0 8px; color: #fff; font-size: 15px; font-weight: 700; }
.sv2-footer p { margin: 0 0 6px; }
.sv2-footer a.sv2-logo { color: #fff; font-size: 20px; margin-bottom: 10px; display: block; }
.sv2-footer__copy { margin-top: 8px; }
.sv2-footer__bottom { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 28px; padding-top: 18px; border-top: 1px solid #2a3647; font-size: 13px; }
.sv2-footer__bottom a { display: inline; padding: 0; }

/* ===== планшет и телефон ===== */
@media (max-width: 900px) {
  .sv2-head__in { flex-wrap: wrap; gap: 10px 12px; padding-top: 12px; padding-bottom: 12px; min-height: 0; }
  .sv2-contacts { display: none; }
  .sv2-brand { margin-right: 0; }
  .sv2-tag { font-size: 11px; }
  .sv2-head a.sv2-phone-ico, .sv2-burger { display: inline-flex; }
  .sv2-cityw { margin-left: auto; min-width: 0; }
  .sv2-city { max-width: 150px; padding: 0 10px; gap: 6px; }
  .sv2-city span { overflow: hidden; text-overflow: ellipsis; }
  .sv2-city svg:first-child { display: none; }
  .sv2-search { order: 5; flex: 1 1 100%; }
  .sv2-pop--search { min-width: 0; }
  .sv2-nav { display: none; }
  .sv2-head.is-open .sv2-nav { display: block; }
  .sv2-navrow { flex-direction: column; overflow: visible; }
  .sv2-head .sv2-navrow a, .sv2-navcall { width: 100%; min-height: 44px; }
  .sv2-navcall { display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--sv2-accent); border-radius: 10px; background: #fff; color: var(--sv2-accent); font: 700 14.5px Inter, system-ui, sans-serif; }
  .sv2-footer__cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .sv2-wrap { padding: 0 16px; }
  .sv2-head__in { gap: 10px 8px; }
  .sv2-head a.sv2-logo { font-size: 19px; }
  .sv2-tag { font-size: 10.5px; }
  .sv2-city { max-width: 112px; height: 40px; font-size: 14px; }
  .sv2-head a.sv2-phone-ico, .sv2-burger { width: 40px; height: 40px; }
  .sv2-footer__cols { grid-template-columns: 1fr; }
}

/* ===== «Ремонт Apple» с выпадающим списком ===== */
.sv2-dd { position: relative; flex: 0 0 auto; }
.sv2-dd__btn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--sv2-text); font: 600 14.5px Inter, system-ui, sans-serif; white-space: nowrap; cursor: pointer; }
.sv2-dd__btn:hover, .sv2-dd__btn[aria-expanded="true"] { background: var(--sv2-bg); color: var(--sv2-ink); }
.sv2-dd__btn svg { transition: transform .15s; }
.sv2-dd__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.sv2-pop--dd { left: 0; top: 44px; width: 240px; padding: 6px; max-height: 70vh; overflow-y: auto; }
.sv2-head .sv2-pop--dd a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--sv2-ink); font-weight: 600; }
.sv2-head .sv2-pop--dd a:hover { background: var(--sv2-bg); }
.sv2-navrow { overflow: visible; flex-wrap: wrap; }
@media (max-width: 900px) {
  .sv2-dd { width: 100%; }
  .sv2-dd__btn { width: 100%; min-height: 44px; justify-content: space-between; }
  .sv2-pop--dd { position: static; width: 100%; margin: 0 0 4px; box-shadow: none; border: 0; padding: 0 0 0 12px; }
}
