/* =========================================================
   СТО MultiCars — общий стиль сайта
   Layout: «доска мастерской» — стальной фон, белые рабочие
   карточки, янтарный цвет только для действий и статуса
   «открыто»; цены набраны моноширинным, как в прайсе запчастей.
   ========================================================= */

:root {
  /* Цвета (светлая тема) */
  --bg: #f1f4f7;
  --surface: #ffffff;
  --surface-2: #e7ecf1;
  --ink: #111820;
  --muted: #586572;
  --line: #d4dbe2;
  --accent: #f2a007;
  --accent-hover: #ffb52e;
  --on-accent: #1b1300;
  --accent-text: #8f5400;
  --band: #18222c;
  --band-2: #212e3a;
  --band-ink: #eef2f5;
  --band-muted: #a3b1be;
  --ok: #157a41;
  --ok-soft: #e3f4ea;
  --err: #c53a2e;
  --err-soft: #fbe9e7;
  --plate-blue: #0a52b5;
  --shadow: 0 1px 2px rgb(17 24 32 / .06), 0 8px 24px rgb(17 24 32 / .07);
  --shadow-lg: 0 18px 50px rgb(17 24 32 / .16);

  /* Шрифты */
  --font-display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --font-body: "Golos Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* Размеры */
  --container: 1200px;
  --header-h: 68px;
  --radius: 14px;
  --radius-sm: 10px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1217;
    --surface: #151c23;
    --surface-2: #1c252e;
    --ink: #e8edf1;
    --muted: #97a4b1;
    --line: #27323d;
    --accent: #f5ad1f;
    --accent-hover: #ffc04a;
    --on-accent: #1b1300;
    --accent-text: #f7b844;
    --band: #141c24;
    --band-2: #212c37;
    --band-ink: #eef2f5;
    --band-muted: #9aa8b5;
    --ok: #4cc583;
    --ok-soft: #12291d;
    --err: #ff7b6e;
    --err-soft: #2e1714;
    --plate-blue: #2f6fd0;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
    --shadow-lg: 0 18px 50px rgb(0 0 0 / .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1217;
  --surface: #151c23;
  --surface-2: #1c252e;
  --ink: #e8edf1;
  --muted: #97a4b1;
  --line: #27323d;
  --accent: #f5ad1f;
  --accent-hover: #ffc04a;
  --on-accent: #1b1300;
  --accent-text: #f7b844;
  --band: #141c24;
  --band-2: #212c37;
  --band-ink: #eef2f5;
  --band-muted: #9aa8b5;
  --ok: #4cc583;
  --ok-soft: #12291d;
  --err: #ff7b6e;
  --err-soft: #2e1714;
  --plate-blue: #2f6fd0;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
  --shadow-lg: 0 18px 50px rgb(0 0 0 / .5);
  color-scheme: dark;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 72px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; z-index: 60;
  height: env(safe-area-inset-top, 0px); background: var(--surface);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; text-wrap: balance; }
/* Довге слово в заголовку на вузькому екрані переноситься, а не вилазить за край */
h1, h2, h3, h4, .h1, .h2, .h3, .fact strong, .svc-name { overflow-wrap: break-word; hyphens: auto; }
p { margin: 0; }
ul { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 64px);
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}
@media (min-width: 720px) {
  .container { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
}

/* ---------- Типографика ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 4.6vw, 52px); letter-spacing: -.02em; }
.h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 3vw, 36px); letter-spacing: -.015em; }
.h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(18px, 1.8vw, 21px); letter-spacing: -.01em; }
.lead { font-size: clamp(16.5px, 1.6vw, 19px); color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.text-link { color: var(--accent-text); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.text-link:hover { text-decoration-thickness: 2.5px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border: 1.5px solid transparent; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15.5px; line-height: 1.2; text-decoration: none;
  cursor: pointer; white-space: nowrap;
  transition: background-color .18s, border-color .18s, color .18s, transform .18s, box-shadow .18s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 18px -8px rgb(242 160 7 / .7); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { opacity: .9; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 14.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); cursor: pointer;
  transition: border-color .18s, background-color .18s;
}
.icon-btn:hover { border-color: var(--ink); }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px -12px rgb(0 0 0 / .25); }
.header-inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; flex: none; }
.logo-mark { width: 38px; height: 38px; flex: none; }
.logo-text { display: grid; line-height: 1.05; }
.logo-name { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -.02em; }
.logo-name b { color: var(--accent-text); font-weight: 600; }
.logo-sub { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: 2px; }
.main-nav a {
  display: block; padding: 9px 13px; border-radius: 8px;
  text-decoration: none; font-weight: 500; font-size: 15px; color: var(--muted);
  transition: color .15s, background-color .15s;
}
.main-nav a:hover { color: var(--ink); background: var(--surface-2); }
.main-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-phone { display: grid; text-decoration: none; line-height: 1.2; text-align: right; }
.header-phone strong { font-family: var(--font-mono); font-size: 15px; font-weight: 600; white-space: nowrap; }
.header-phone span { font-size: 12px; }
.burger { display: none; }

.status { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
/* На вузьких екранах довгий статус переноситься, а не виходить за край */
@media (max-width: 480px) {
  .status { white-space: normal; align-items: flex-start; }
  .status .status-dot { margin-top: .45em; }
}
.status.is-open .status-dot { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 22%, transparent); }
.status.is-open { color: var(--ok); }

@media (max-width: 1140px) {
  .header-phone { display: none; }
}
@media (max-width: 960px) {
  .main-nav, .header-actions .btn-book { display: none; }
  .burger { display: inline-grid; }
  .header-actions { margin-left: auto; }
}

/* Мобильное меню */
.mobile-nav {
  position: fixed; inset: 0; z-index: 70; display: none;
}
.mobile-nav.is-open { display: block; }
.mobile-nav-backdrop { position: absolute; inset: 0; background: rgb(8 12 16 / .55); animation: fade .2s ease; }
.mobile-nav-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 88vw);
  background: var(--surface); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 20px;
  padding: calc(16px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) 20px;
  overflow-y: auto; animation: slide-in .25s ease;
}
.mobile-nav-head { display: flex; align-items: center; justify-content: space-between; }
.mobile-nav ul { list-style: none; display: grid; gap: 2px; }
.mobile-nav ul a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 12px; border-radius: 10px; text-decoration: none;
  font-family: var(--font-display); font-weight: 500; font-size: 17px;
}
.mobile-nav ul a[aria-current="page"] { background: var(--surface-2); }
.mobile-nav-contacts { margin-top: auto; display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14.5px; }
.mobile-nav-contacts a { text-decoration: none; font-family: var(--font-mono); font-weight: 600; font-size: 16px; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide-in { from { transform: translateX(30px); opacity: 0; } }

/* ---------- Секции ---------- */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section-tight { padding-block: clamp(40px, 6vw, 64px); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head > div { display: grid; gap: 12px; min-width: 0; max-width: 720px; }

/* Шапка внутренних страниц */
.page-hero { padding-block: clamp(36px, 6vw, 64px) clamp(28px, 4vw, 40px); border-bottom: 1px solid var(--line); background: var(--surface); }
.page-hero .container { display: grid; gap: 14px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--muted); list-style: none; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .5; }

/* ---------- Главный экран ---------- */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(28px, 5vw, 64px); align-items: center;
  padding-block: clamp(36px, 6vw, 72px);
}
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero-copy .h1 em { font-style: normal; color: var(--accent-text); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14.5px; color: var(--muted); }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-visual { position: relative; min-width: 0; }
.hero-photo {
  width: 100%; aspect-ratio: 5 / 4.6; max-width: 100%; object-fit: cover; object-position: 40% 50%;
  border-radius: 20px; background: var(--surface-2);
}
.hero-chip {
  position: absolute; display: grid; gap: 2px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 16px; box-shadow: var(--shadow);
}
.hero-chip small { font-size: 12px; color: var(--muted); }
.hero-chip strong { font-size: 16px; font-weight: 600; }
.hero-chip.c1 { left: -18px; bottom: 26px; }
.hero-chip.c2 { right: 16px; top: 16px; }
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .hero-photo { aspect-ratio: 16 / 10; }
  .hero-chip.c1 { left: 12px; bottom: 12px; }
}

/* Полоса фактов */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--line); background: var(--bg); }
.fact { padding: 22px clamp(14px, 2vw, 26px); display: grid; gap: 4px; align-content: start; }
.fact + .fact { border-left: 1px solid var(--line); }
.fact strong { font-family: var(--font-display); font-weight: 600; font-size: clamp(17px, 1.8vw, 21px); letter-spacing: -.01em; }
.fact span { font-size: 14px; color: var(--muted); }
@media (max-width: 820px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(3) { border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- Карточки услуг ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1000px) { .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .svc-grid { grid-template-columns: 1fr; gap: 12px; }
  .svc-grid .svc-card { display: grid; grid-template-columns: 104px minmax(0, 1fr); }
  .svc-grid .svc-card img { height: 100%; aspect-ratio: auto; min-height: 140px; }
  .svc-grid .svc-card-body { padding: 14px 14px 14px 16px; gap: 6px; }
  .svc-grid .svc-card-body p { font-size: 14px; }
  .svc-grid .svc-card .h3 { font-size: 17px; }
  .svc-grid .svc-card-foot { padding-top: 4px; }
  .svc-grid .svc-card .arrow { width: 30px; height: 30px; }
  .hero-visual .hero-chip { padding: 8px 12px; }
  .hero-chip strong { font-size: 15px; }
  .hero-chip small { font-size: 11px; }
}
@media (max-width: 400px) {
  .svc-grid .svc-card { grid-template-columns: 84px minmax(0, 1fr); }
  .svc-grid .svc-card .h3 { font-size: 16px; }
  .fact { padding-inline: 12px; }
  .fact strong { font-size: 16px; }
}
.svc-card {
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .22s, box-shadow .22s, border-color .22s;
}
.svc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.svc-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--surface-2); }
.svc-card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 20px; flex: 1; }
.svc-card-body p { font-size: 14.5px; color: var(--muted); }
.svc-card-foot { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.price-from { font-family: var(--font-mono); font-weight: 600; font-size: 15px; white-space: nowrap; }
.price-from small { font-weight: 400; color: var(--muted); font-size: 12.5px; margin-right: 4px; }
.svc-card .arrow { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); transition: background-color .2s, color .2s; }
.svc-card:hover .arrow { background: var(--accent); color: var(--on-accent); }
.badge {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted);
}
.badge-accent { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent-text); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }

/* ---------- Тёмная полоса (специализация) ---------- */
.band { background: var(--band); color: var(--band-ink); }
.band .eyebrow, .band .muted, .band .lead { color: var(--band-muted); }
.spec-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.spec-grid > div { min-width: 0; }
.spec-photo { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; border-radius: 18px; }
.spec-list { list-style: none; display: grid; gap: 0; margin-top: 26px; border-top: 1px solid var(--band-2); }
.spec-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--band-2); }
.spec-list .icon { color: var(--accent); margin-top: 3px; }
.spec-list strong { display: block; font-weight: 600; }
.spec-list span { color: var(--band-muted); font-size: 14.5px; }
.cert-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.cert {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px;
  border: 1px solid var(--band-2); border-radius: 10px; background: var(--band-2); font-size: 14px;
}
.cert b { font-family: var(--font-display); font-weight: 600; letter-spacing: .02em; }
@media (max-width: 880px) { .spec-grid { grid-template-columns: 1fr; } }

/* ---------- Этапы работы ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step { position: relative; display: grid; gap: 10px; align-content: start; padding-top: 18px; border-top: 2px solid var(--line); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-weight: 600; font-size: 13px; color: var(--accent-text);
}
.step h3 { font-family: var(--font-display); font-weight: 500; font-size: 17px; }
.step p { font-size: 14.5px; color: var(--muted); }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Отзывы ---------- */
.reviews-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 960px) { .reviews-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .reviews-grid { grid-template-columns: 1fr; } }
.review {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
}
.review-head { display: flex; gap: 12px; align-items: center; }
.avatar {
  width: 42px; height: 42px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 16px;
  background: var(--surface-2); color: var(--ink);
}
.review-who { display: grid; min-width: 0; line-height: 1.3; }
.review-who strong { font-weight: 600; }
.review-who span { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.review-text { font-size: 15.5px; overflow-wrap: anywhere; }
.review-foot { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted); }
.review-foot a { color: var(--muted); }
.review-foot a:hover { color: var(--ink); }
.stars { display: inline-flex; gap: 2px; color: var(--accent); }
.stars .icon { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.stars .off { color: var(--line); }
.review.is-pending { border-style: dashed; }

/* Фото у відгуку */
.review-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.review-photo {
  width: 64px; height: 64px; padding: 0; overflow: hidden; cursor: zoom-in;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2);
}
.review-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.review-photo img:not([src]) { visibility: hidden; }
.review-photo:hover { border-color: var(--ink); }
.review-photo:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.review-photo.is-missing { display: none; }

form[aria-busy="true"] { opacity: .75; transition: opacity .2s; }

/* Вибір фото у формі відгуку */
.photo-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.photo-picker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.photo-thumb, .photo-add { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); }
.photo-thumb { overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.photo-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-thumb.is-busy { animation: photo-pulse 1s ease-in-out infinite alternate; }
@keyframes photo-pulse { to { opacity: .45; } }
.photo-remove {
  position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: rgb(8 12 16 / .65); color: #fff;
}
.photo-remove .icon { width: 14px; height: 14px; }
@media (max-width: 400px) {
  .photo-picker { gap: 6px; }
  .photo-remove { top: 3px; right: 3px; width: 24px; height: 24px; }
  .photo-add span { font-size: 11.5px; }
}
.photo-remove:hover { background: rgb(8 12 16 / .85); }
.photo-add {
  display: grid; place-content: center; justify-items: center; gap: 2px; cursor: pointer;
  border: 1.5px dashed var(--line); color: var(--muted); font-size: 12.5px; font-weight: 600;
  transition: border-color .12s, color .12s;
}
.photo-add .icon { width: 22px; height: 22px; }
.photo-add:hover { border-color: var(--ink); color: var(--ink); }
.photo-add[hidden] { display: none; }
.photo-input:focus-visible + .photo-picker .photo-add { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Перегляд фото на весь екран */
.lightbox {
  position: fixed; inset: 0; z-index: 88; display: grid; place-items: center;
  padding: 56px max(16px, env(safe-area-inset-right, 0px)) 56px max(16px, env(safe-area-inset-left, 0px));
  background: rgb(8 12 16 / .92); animation: fade .15s ease;
}
.lightbox[hidden] { display: none; }
.lightbox-img { max-width: 100%; max-height: 100%; border-radius: 6px; object-fit: contain; user-select: none; }
.lightbox-img:not([src]) { visibility: hidden; }
.lightbox-btn {
  position: absolute; width: 46px; height: 46px; padding: 0; display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer; background: rgb(255 255 255 / .14); color: #fff;
}
.lightbox-btn:hover { background: rgb(255 255 255 / .26); }
.lightbox-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.lightbox-btn .icon { width: 22px; height: 22px; }
.lightbox-btn[hidden] { display: none; }
.lightbox-close { top: max(10px, env(safe-area-inset-top, 0px)); right: max(10px, env(safe-area-inset-right, 0px)); }
.lightbox-prev, .lightbox-next { top: 50%; margin-top: -23px; }
.lightbox-prev { left: max(10px, env(safe-area-inset-left, 0px)); }
.lightbox-prev .icon { transform: rotate(180deg); }
.lightbox-next { right: max(10px, env(safe-area-inset-right, 0px)); }
.lightbox-count { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 14px; }
body.lightbox-open { overflow: hidden; }
@media (max-width: 620px) {
  .lightbox { padding-inline: 0; }
  .lightbox-img { border-radius: 0; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); margin-top: 0; }
}

/* ---------- CTA-полоса ---------- */
.cta-band {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: center;
  background: var(--accent); color: var(--on-accent); border-radius: 22px;
  padding: clamp(26px, 4vw, 48px);
}
.cta-band .h2 { color: var(--on-accent); }
.cta-band p { color: color-mix(in srgb, var(--on-accent) 78%, transparent); margin-top: 10px; max-width: 52ch; }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.cta-band .btn-dark { background: #111820; color: #fff; }
.cta-band .btn-ghost { border-color: rgb(27 19 0 / .35); color: var(--on-accent); }
.cta-band .btn-ghost:hover { border-color: var(--on-accent); }
@media (max-width: 820px) { .cta-band { grid-template-columns: 1fr; } .cta-band-actions { justify-content: flex-start; } }

/* ---------- Подвал ---------- */
.site-footer { background: var(--band); color: var(--band-ink); margin-top: clamp(56px, 8vw, 96px); }
.site-footer.flush { margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr minmax(min-content, 1fr) 1.2fr; gap: 32px; padding-block: 56px 36px; }
/* Номер телефону не розривається посередині */
.footer-grid a[href^="tel:"] { white-space: nowrap; }
.footer-grid > div { display: grid; gap: 12px; align-content: start; min-width: 0; }
.footer-grid h4 { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--band-muted); }
.footer-grid ul { list-style: none; display: grid; gap: 8px; }
.footer-grid a { text-decoration: none; color: var(--band-ink); }
.footer-grid a:hover { color: var(--accent); }
.footer-grid p { color: var(--band-muted); font-size: 14.5px; }
.site-footer .logo-name { color: var(--band-ink); }
.site-footer .logo-name b { color: var(--accent); }
.site-footer .logo-sub { color: var(--band-muted); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-block: 20px calc(20px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--band-2); font-size: 13px; color: var(--band-muted); }
.hours-mini { display: grid; gap: 4px; font-size: 14.5px; }
.hours-mini div { display: flex; justify-content: space-between; gap: 12px; }
.hours-mini span:last-child { font-family: var(--font-mono); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* Мобильная панель «Позвонить / Записаться» */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: none; gap: 10px;
  padding: 10px var(--gutter-r) calc(10px + env(safe-area-inset-bottom, 0px)) var(--gutter-l);
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -12px rgb(0 0 0 / .2);
}
.mobile-bar .btn { flex: 1; min-height: 46px; }
@media (max-width: 720px) {
  .mobile-bar { display: flex; }
  body.has-mobile-bar { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Страница услуг ---------- */
.svc-toolbar {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--header-h)); z-index: 30;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.svc-toolbar .container { display: flex; gap: 14px; align-items: center; padding-block: 12px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1; padding-block: 2px; }
.chips::-webkit-scrollbar { display: none; }
/* Край стрічки, яку можна прокрутити, плавно згасає — видно, що там є ще пункти */
.chips.fade-right, .admin-tabs.fade-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.chips.fade-left, .admin-tabs.fade-left { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); }
.chips.fade-left.fade-right, .admin-tabs.fade-left.fade-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.chip {
  flex: none; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--surface); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: border-color .15s, background-color .15s, color .15s;
}
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.search {
  position: relative; flex: 0 1 300px; min-width: 0;
}
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 42px; padding: 0 12px 0 40px; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--surface);
}
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
@media (max-width: 720px) {
  .svc-toolbar .container { flex-direction: column; align-items: stretch; gap: 10px; }
  .search { flex: none; }
}

.price-note {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  font-size: 14.5px; color: var(--muted);
}
.price-note .icon { color: var(--accent-text); margin-top: 2px; }

.cat { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; padding-block: 36px; border-bottom: 1px solid var(--line); }
.cat:last-of-type { border-bottom: 0; }
.cat-aside { display: grid; gap: 14px; align-content: start; position: sticky; top: calc(var(--header-h) + 90px); }
.cat-aside img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--surface-2); }
.cat-aside p { font-size: 14.5px; color: var(--muted); }
@media (max-width: 900px) {
  .cat { grid-template-columns: 1fr; gap: 18px; }
  .cat-aside { position: static; grid-template-columns: 120px minmax(0, 1fr); align-items: center; }
  .cat-aside img { aspect-ratio: 1; grid-row: span 2; }
}
@media (max-width: 420px) { .cat-aside { grid-template-columns: 88px minmax(0, 1fr); } }

.price-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.price-table th { text-align: left; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; color: var(--muted); padding: 12px 16px; background: var(--surface-2); }
.price-table td { padding: 13px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.price-table tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.price-table .col-price { text-align: right; white-space: nowrap; width: 1%; }
.price-table .col-add { width: 1%; padding-left: 4px; }
.svc-name { font-weight: 500; }
.svc-name small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }
.add-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px;
  border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; color: var(--ink);
  transition: background-color .15s, border-color .15s, color .15s;
}
/* Натискання будь-де в комірці з «+» спрацьовує як кнопка — зона більша за 44×44 px для пальця */
.price-table .col-add { cursor: pointer; }
.add-btn:hover { border-color: var(--ink); }
.add-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.add-btn .i-check { display: none; }
.add-btn[aria-pressed="true"] .i-plus { display: none; }
.add-btn[aria-pressed="true"] .i-check { display: block; }
.empty-search { padding: 48px 0; text-align: center; color: var(--muted); }
@media (max-width: 520px) {
  .price-table th, .price-table td { padding: 12px 8px; }
  .price-table th:first-child { padding-left: 14px; }
  .price-table td:first-child { padding-left: 14px; }
}
/* Вузький телефон: «від» над ціною, компактніша кнопка — таблиця вміщається без прокрутки */
@media (max-width: 420px) {
  .price-table th, .price-table td { padding-inline: 6px; }
  .price-table th:first-child, .price-table td:first-child { padding-left: 12px; }
  .price-table .col-add { padding-right: 10px; }
  .price-table .col-price .price-from small { display: block; margin: 0; }
  .svc-name { font-size: 14.5px; }
  .add-btn { width: 32px; height: 32px; }
}

/* Плавающая корзина заявки */
.cart-bar {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 45;
  transform: translateX(-50%); width: min(560px, calc(100% - 32px));
  display: flex; align-items: center; gap: 14px; justify-content: space-between;
  padding: 10px 10px 10px 18px; border-radius: 14px;
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg);
  animation: rise .25s ease;
}
.cart-bar strong { font-weight: 600; }
.cart-bar span { font-family: var(--font-mono); font-size: 13.5px; opacity: .8; }
.cart-bar-info { display: grid; line-height: 1.3; min-width: 0; }
.cart-bar-actions { display: flex; gap: 8px; flex: none; }
.cart-bar .cart-bar-clear { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 30%, transparent); gap: 6px; }
.cart-bar .cart-bar-clear:hover { border-color: var(--bg); }
.cart-bar .cart-bar-clear b { font-weight: 600; }
/* На вузькому телефоні — два ряди: зверху кількість і сума, знизу кнопки */
@media (max-width: 420px) {
  .cart-bar { flex-wrap: wrap; gap: 8px; padding: 10px; }
  .cart-bar-info { flex: 1 1 100%; padding: 2px 4px 0; }
  .cart-bar-actions { flex: 1 1 100%; }
  .cart-bar-actions .btn-primary { flex: 1; }
}
@keyframes rise { from { transform: translate(-50%, 16px); opacity: 0; } }
@media (max-width: 720px) { .cart-bar { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); } }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 20px; font-weight: 600;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform .2s; color: var(--muted); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { padding: 0 20px 18px; color: var(--muted); max-width: 70ch; }

/* ---------- Формы ---------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
@media (max-width: 980px) { .form-layout { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: clamp(20px, 3vw, 32px); }
.form { display: grid; gap: 28px; }
.fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 16px; min-width: 0; }
.fieldset legend { padding: 0; margin-bottom: 4px; display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 500; font-size: 18px; }
.legend-num { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--accent-text); padding: 3px 7px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 18%, transparent); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 641px) { .grid-3 .span-2 { grid-column: span 2; } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.field { display: grid; gap: 7px; min-width: 0; align-content: start; }
.label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-height: 24px; font-weight: 600; font-size: 14.5px; }
.req { color: var(--err); font-weight: 700; }
.opt { color: var(--muted); font-weight: 400; font-size: 13px; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface);
  transition: border-color .15s, box-shadow .15s; font-size: 16px;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in srgb, var(--ink) 35%, var(--line)); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea { border-color: var(--err); }
.field.is-invalid .input:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--err) 25%, transparent); }
.field-error { display: none; font-size: 13.5px; color: var(--err); }
.field.is-invalid .field-error { display: block; }
.field-hint { font-size: 13px; color: var(--muted); }
.select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }

/* Подсказка (?) */
.hint { position: relative; display: inline-flex; }
.hint-btn {
  display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0;
  border-radius: 50%; border: 1.5px solid var(--muted); background: transparent; color: var(--muted);
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; line-height: 1; cursor: help;
  transition: color .15s, border-color .15s, background-color .15s;
}
.hint-btn:hover, .hint.is-open .hint-btn, .hint-btn:focus-visible { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.hint-pop {
  position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 20;
  width: max-content; max-width: min(280px, 78vw);
  padding: 11px 14px; border-radius: 10px;
  background: var(--ink); color: var(--bg); font-size: 13.5px; font-weight: 400; line-height: 1.45;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translate(-50%, 4px);
  transition: opacity .15s, transform .15s, visibility .15s; pointer-events: none;
}
.hint-pop::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--ink); }
.hint:hover .hint-pop, .hint:focus-within .hint-pop, .hint.is-open .hint-pop { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
@media all {
  /* Подсказка у поля встаёт над ним во всю его ширину — не выходит за края формы */
  .field { position: relative; }
  .field .hint { position: static; }
  .field .hint-pop { left: 0; right: 0; bottom: calc(100% - 22px); width: auto; max-width: none; transform: translateY(4px); }
  .field .hint-pop::after { display: none; }
  .field .hint:hover .hint-pop, .field .hint:focus-within .hint-pop, .field .hint.is-open .hint-pop { transform: translateY(0); }
}

/* Номерной знак */
.plate {
  display: flex; align-items: stretch; height: 48px; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; background: #fff;
}
.plate-flag { display: grid; align-content: center; justify-items: center; gap: 2px; width: 34px; flex: none; background: var(--plate-blue); color: #ffd400; font-family: var(--font-mono); font-size: 10px; font-weight: 700; }
.plate-flag i { display: block; width: 16px; height: 11px; background: linear-gradient(#0057b7 50%, #ffd700 50%); border-radius: 1px; }
.plate input {
  flex: 1; min-width: 0; border: 0; background: #fff; color: #111;
  font-family: var(--font-mono); font-weight: 600; font-size: 17px; letter-spacing: .06em; text-transform: uppercase; text-align: center; padding: 0 6px;
}
.plate input:focus { outline: none; }
.plate:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.plate input::placeholder { color: #9aa3ab; }

/* Чекбокс */
.check { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 14.5px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); cursor: pointer; }

/* Сегменты (способ связи) */
.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span { display: inline-flex; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 999px; font-size: 14.5px; font-weight: 500; transition: all .15s; }
.segmented input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.segmented input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Выбор услуг в форме */
.picked { display: flex; flex-wrap: wrap; gap: 8px; }
.picked-item {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  padding: 7px 8px 7px 12px; border-radius: 9px; background: var(--surface-2); font-size: 14px;
}
.picked-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picked-item button { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; color: var(--muted); flex: none; }
.picked-item button:hover { background: var(--line); color: var(--ink); }
.picked-empty { font-size: 14.5px; color: var(--muted); }
.picker { border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.picker > summary { list-style: none; cursor: pointer; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 14.5px; background: var(--surface-2); }
.picker > summary::-webkit-details-marker { display: none; }
.picker[open] > summary .icon { transform: rotate(45deg); }
.picker > summary .icon { transition: transform .2s; }
.picker-body { padding: 12px; display: grid; gap: 12px; max-height: 380px; overflow-y: auto; }
.picker-group h4 { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.picker-opt { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 8px; cursor: pointer; font-size: 14.5px; }
.picker-opt:hover { background: var(--surface-2); }
.picker-opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.picker-opt .mono { font-size: 13px; color: var(--muted); }

/* Сводка заявки */
.summary { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 18px; }
.summary-list { list-style: none; display: grid; gap: 10px; font-size: 14.5px; }
.summary-list li { display: flex; justify-content: space-between; gap: 12px; }
.summary-list li span:last-child { font-family: var(--font-mono); white-space: nowrap; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; border-top: 1px dashed var(--line); font-weight: 600; }
.summary-total strong { font-family: var(--font-mono); font-size: 20px; }
.info-list { list-style: none; display: grid; gap: 12px; font-size: 14.5px; }
.info-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; }
.info-list .icon { color: var(--accent-text); margin-top: 2px; }
@media (max-width: 980px) { .summary { position: static; } }

/* Успешная отправка */
.success { display: grid; gap: 18px; justify-items: start; }
.success-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.success-icon .icon { width: 28px; height: 28px; stroke-width: 2.4; }
.ticket { font-family: var(--font-mono); font-size: 15px; padding: 8px 12px; border-radius: 8px; background: var(--surface-2); }
.demo-note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 14%, transparent); font-size: 14px; }
.demo-note .icon { color: var(--accent-text); margin-top: 1px; }

/* Звёзды-рейтинг */
/* Зірки — від лівого краю, на одній лінії з підписами (у значка є внутрішній відступ ~4px) */
.rating-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; justify-self: start; margin-left: -4px; }
.rating-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating-input label { cursor: pointer; color: var(--line); transition: color .12s, transform .12s; }
.rating-input label .icon { width: 32px; height: 32px; fill: currentColor; stroke: none; }
.rating-input label:hover, .rating-input label:hover ~ label,
.rating-input input:checked ~ label { color: var(--accent); }
.rating-input input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.rating-input label:active { transform: scale(.9); }

/* ---------- Отзывы: сводка ---------- */
.reviews-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.reviews-layout .reviews-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1040px) { .reviews-layout { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .reviews-layout .reviews-grid { grid-template-columns: 1fr; } }
.reviews-toolbar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.sources { display: flex; flex-wrap: wrap; gap: 8px; }
.sources a { font-size: 13.5px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; background: var(--surface); }
.sources a:hover { border-color: var(--ink); }

/* ---------- О нас ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.about-grid > div { min-width: 0; display: grid; gap: 18px; }
.prose { display: grid; gap: 16px; max-width: 64ch; }
.prose p { color: var(--muted); }
.prose strong { color: var(--ink); }
@media (max-width: 880px) { .about-grid { grid-template-columns: 1fr; } }
.gallery { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: clamp(150px, 18vw, 230px) clamp(150px, 18vw, 230px) clamp(170px, 22vw, 280px); gap: 14px; }
.gallery img { width: 100%; height: 100%; min-height: 0; object-fit: cover; border-radius: 14px; background: var(--surface-2); }
.gallery .g1 { grid-column: span 4; grid-row: span 2; }
.gallery .g2, .gallery .g3 { grid-column: span 2; }
.gallery .g4, .gallery .g5 { grid-column: span 3; }
@media (max-width: 720px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: 160px; gap: 10px; }
  .gallery .g1 { grid-column: span 2; grid-row: span 1; }
  .gallery .g2, .gallery .g3, .gallery .g4, .gallery .g5 { grid-column: span 1; }
}
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }
.feature { display: grid; gap: 10px; align-content: start; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.feature .icon-wrap { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-text); }
.feature .icon-wrap .icon { width: 22px; height: 22px; }
.feature p { font-size: 14.5px; color: var(--muted); }
.timeline { list-style: none; display: grid; gap: 0; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li { position: relative; padding: 0 0 22px 24px; display: grid; gap: 4px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.timeline .mono { font-size: 13px; color: var(--accent-text); font-weight: 600; }
.timeline p { color: var(--muted); font-size: 14.5px; }

/* ---------- Контакты ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 24px; align-items: start; }
@media (max-width: 920px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { display: grid; gap: 0; }
.contact-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-row:first-child { padding-top: 0; }
.contact-row:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-row .icon-wrap { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); }
.contact-row small { display: block; color: var(--muted); font-size: 13px; }
.contact-row strong { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.contact-row a { text-decoration: none; }
.contact-row a:hover { color: var(--accent-text); }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 500; color: var(--muted); }
.copy-btn:hover { border-color: var(--ink); color: var(--ink); }
@media (max-width: 520px) {
  .contact-row { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; }
  .contact-row .icon-wrap { width: 40px; height: 40px; }
  .contact-row strong { font-size: 16px; }
  .copy-btn { font-size: 0; gap: 0; padding: 10px; }
}
.hours-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.hours-table td { padding: 11px 0; border-bottom: 1px solid var(--line); }
.hours-table td:last-child { text-align: right; font-family: var(--font-mono); }
.hours-table tr.is-today td { font-weight: 700; }
.hours-table tr.is-today td:first-child::after { content: "сегодня"; margin-left: 8px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); }
.hours-table tr.is-off td:last-child { color: var(--muted); }

.map-card {
  position: relative; display: grid; align-content: end; gap: 14px;
  min-height: 340px; padding: 24px; border-radius: 18px; overflow: hidden;
  background: var(--band); color: var(--band-ink);
}
.map-card canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-card > *:not(canvas) { position: relative; }
.map-pin { position: absolute; left: 58%; top: 40%; transform: translate(-50%, -100%); display: grid; justify-items: center; gap: 4px; }
.map-pin-label { font-family: var(--font-mono); font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 7px; background: var(--accent); color: var(--on-accent); white-space: nowrap; }
.map-pin svg { width: 30px; height: 38px; filter: drop-shadow(0 6px 10px rgb(0 0 0 / .4)); }
.map-card .eyebrow { color: var(--band-muted); }
.map-card .addr { font-family: var(--font-display); font-weight: 600; font-size: clamp(20px, 2.4vw, 26px); }
.map-card .btns { display: flex; flex-wrap: wrap; gap: 10px; }
.map-card .btn-ghost { color: var(--band-ink); border-color: rgb(255 255 255 / .25); }
.map-card .btn-ghost:hover { border-color: var(--band-ink); }

/* ---------- Тост ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 90;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px);
  padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--bg);
  font-size: 14.5px; font-weight: 500; box-shadow: var(--shadow-lg);
  transition: opacity .2s, transform .2s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
/* Ширина за текстом, а не половина екрана (через left: 50%) */
.toast { width: max-content; }
.toast .icon { color: var(--accent); }
@media (max-width: 720px) { .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* =========================================================
   Режим редагування текстів
   ========================================================= */
.cat-title { display: grid; gap: 8px; }
.table-wrap { min-width: 0; overflow-x: auto; }
.toast.is-error .icon { color: var(--err); }
.admin-bar {
  position: fixed; left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 80;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: calc(100% - 32px);
  padding: 8px; border-radius: 14px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg);
}
.admin-bar-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; text-decoration: none; font-weight: 600; font-size: 14px; }
.admin-bar-link:hover { background: color-mix(in srgb, var(--bg) 14%, transparent); }
.admin-bar-edit { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-bar-count { font-family: var(--font-mono); font-size: 13px; padding: 0 6px; }
.admin-bar .btn-ghost { color: var(--bg); border-color: color-mix(in srgb, var(--bg) 35%, transparent); }
@media (max-width: 720px) { .admin-bar { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); } }
.is-editing [data-edit][contenteditable="true"] {
  outline: 2px dashed color-mix(in srgb, var(--accent) 75%, transparent); outline-offset: 4px; border-radius: 4px; cursor: text;
}
.is-editing [data-edit][contenteditable="true"]:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.is-editing [data-edit][contenteditable="true"]:focus { outline-style: solid; outline-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* =========================================================
   Адмін-панель
   ========================================================= */
body.route-admin .site-header, body.route-admin .site-footer, body.route-admin .mobile-bar { display: none; }
body.route-admin.has-mobile-bar { padding-bottom: 0; }
.admin-page { padding-block: clamp(20px, 4vw, 40px) 64px; }
.admin { display: grid; gap: 20px; }
.admin-login { max-width: 420px; margin: 40px auto; display: grid; gap: 16px; justify-items: start; }
.admin-login .field { width: 100%; }
.admin-lock { background: var(--surface-2); color: var(--ink); }
.admin-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.admin-top-title { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.admin-top-actions { display: flex; gap: 8px; }
.admin-top-actions .btn .icon { transform: rotate(180deg); }
.admin-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs button {
  flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 12px 14px; margin-bottom: -1px;
  border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer; font-weight: 600; font-size: 15px; color: var(--muted);
}
.admin-tabs button:hover { color: var(--ink); }
.admin-tabs button.is-active { color: var(--ink); border-bottom-color: var(--accent); }
.tab-count:empty { display: none; }
.tab-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-family: var(--font-mono); font-size: 12px; }
.admin-panel { display: grid; gap: 18px; min-width: 0; }
.admin-section { display: grid; gap: 12px; }
.admin-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 12px; }
.admin-section-head > div { display: grid; gap: 4px; max-width: 640px; }
.admin-empty { padding: 28px; text-align: center; border: 1px dashed var(--line); border-radius: 14px; display: grid; gap: 6px; justify-items: center; }
.small { font-size: 13px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.kpi-dot { width: 10px; height: 10px; border-radius: 50%; }
.kpi-label { font-size: 14px; color: var(--muted); }
.kpi-num { grid-column: 1 / -1; font-size: 26px; font-weight: 600; }
@media (max-width: 720px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.admin-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.admin-toolbar .chips { flex: 1 1 100%; }
.admin-toolbar .search { flex: 1 1 260px; }
.chip .mono { font-size: 12px; opacity: .7; margin-left: 4px; }

/* Статуси */
.pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.st-new { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent-text); }
.st-called { background: color-mix(in srgb, #3b82f6 18%, transparent); color: #2f6fd0; }
.st-work { background: color-mix(in srgb, #8b5cf6 18%, transparent); color: #7c4ddb; }
.st-done { background: var(--ok-soft); color: var(--ok); }
.st-cancel { background: var(--surface-2); color: var(--muted); }
.kpi-dot.st-new { background: var(--accent); }
.kpi-dot.st-called { background: #3b82f6; }
.kpi-dot.st-work { background: #8b5cf6; }
.kpi-dot.st-done { background: var(--ok); }

/* Таблиця заявок */
.bk-table { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.bk-row { display: grid; grid-template-columns: 1.1fr 1.4fr 1.2fr 1fr .6fr .9fr; gap: 14px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--line); cursor: pointer; transition: background-color .15s; }
.bk-row:first-child { border-top: 0; }
.bk-row:hover, .bk-row.is-open { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.bk-row:focus-visible { outline-offset: -3px; }
.bk-row > span { display: grid; gap: 2px; min-width: 0; }
.bk-row b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-row small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-row small.badge { width: fit-content; margin-top: 2px; }
.bk-head { cursor: default; background: var(--surface-2); font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-block: 10px; }
.bk-head:hover { background: var(--surface-2); }
.bk-call .yes { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-weight: 600; }
.bk-call .yes .icon { width: 16px; height: 16px; }
.bk-call .no { color: var(--muted); }
@media (max-width: 900px) {
  .bk-head { display: none; }
  .bk-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .bk-id { grid-column: 1; }
  .bk-status { grid-column: 2; grid-row: 1; justify-items: end; }
  .bk-client, .bk-car, .bk-visit { grid-column: 1 / -1; }
  .bk-call { grid-column: 1 / -1; }
  .bk-visit::before { content: "Візит: "; color: var(--muted); font-size: 13px; }
  .bk-call::before { content: "Дзвінок: "; color: var(--muted); font-size: 13px; }
  .bk-visit, .bk-call { display: flex !important; flex-wrap: wrap; gap: 6px; align-items: center; }
}

/* Бокова картка заявки */
.drawer { position: fixed; inset: 0; z-index: 85; }
.drawer-backdrop { position: absolute; inset: 0; background: rgb(8 12 16 / .5); animation: fade .2s ease; }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(640px, 100%);
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--bg); box-shadow: var(--shadow-lg); animation: slide-in .22s ease;
  padding-top: env(safe-area-inset-top, 0px);
}
.drawer-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 18px max(20px, env(safe-area-inset-right, 0px)) 14px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.drawer-head > div { display: grid; gap: 4px; }
.drawer-body { overflow-y: auto; padding: 20px max(20px, env(safe-area-inset-right, 0px)) 28px 20px; display: grid; gap: 22px; align-content: start; }
.drawer-body .fieldset { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.drawer-body legend { float: left; width: 100%; font-family: var(--font-display); font-weight: 500; font-size: 16px; margin-bottom: 4px; }
.drawer-body legend + * { clear: both; }
.drawer-foot { display: grid; gap: 10px; padding: 12px max(20px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) 20px; background: var(--surface); border-top: 1px solid var(--line); }
.drawer-foot-row { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.drawer-foot-row .btn-primary { flex: 0 1 220px; }
.close-confirm { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 14%, transparent); font-size: 14px; font-weight: 500; }
.quick { display: grid; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); justify-items: start; }
.quick-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-btns .btn[disabled] { opacity: .45; cursor: default; }
.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; min-width: 0; }
.input-row .btn { flex: none; }
.client-comment { display: grid; gap: 6px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); }
.client-comment p { white-space: pre-wrap; overflow-wrap: anywhere; }
.d-services { display: grid; gap: 10px; }

/* Модерація відгуків і змінені тексти */
.mod-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mod-list > .admin-empty { grid-column: 1 / -1; }
@media (max-width: 820px) { .mod-list { grid-template-columns: 1fr; } }
.mod-item { display: grid; gap: 10px; align-content: start; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.mod-item p { overflow-wrap: anywhere; font-size: 15px; }
.mod-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; }
.mod-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rv-add { display: grid; gap: 16px; margin-bottom: 16px; }
.rv-add[hidden] { display: none; }

/* ---------- CRM: список, наряд, фото, історія ---------- */
.select-sm { min-height: 40px; padding-block: 6px; font-size: 14.5px; width: auto; max-width: 220px; }
.bk-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 14px; }
.bk-status small { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.bk-status small.remind { color: var(--accent-text); font-weight: 600; }
.wo { display: grid; gap: 8px; }
/* Рядок наряду: назва на всю ширину, під нею тип, кількість, ціна, сума */
.wo-row {
  display: grid; grid-template-columns: minmax(0, 1.3fr) 76px minmax(0, 1fr) minmax(0, 1fr) 42px; gap: 8px; align-items: end;
  grid-template-areas: "name name name name name" "kind qty price sum del";
  padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
}
.wo-row .wo-name { grid-area: name; }
.wo-kind { grid-area: kind; } .wo-qty { grid-area: qty; } .wo-price { grid-area: price; } .wo-sum-wrap { grid-area: sum; } .wo-del { grid-area: del; }
.wo-row .input, .wo-row .select { min-height: 40px; padding: 7px 10px; font-size: 15px; width: 100%; }
.wo-l { display: grid; gap: 3px; min-width: 0; }
.wo-l > span { font-size: 11.5px; color: var(--muted); }
.wo-sum-wrap { align-self: stretch; align-content: end; padding-bottom: 9px; }
.wo-sum { font-size: 14.5px; white-space: nowrap; }
.wo-add, .wo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
@media (max-width: 520px) {
  .wo-row { grid-template-columns: 1fr 1fr 42px; grid-template-areas: "name name name" "kind qty del" "price sum sum"; }
}
.bk-photo { position: relative; display: inline-block; }
.bk-photo .review-photo { width: 84px; height: 84px; }
.hist { display: grid; gap: 6px; }
.hist-row {
  display: grid; grid-template-columns: 130px minmax(0, 1fr) auto 90px; gap: 10px; align-items: center; text-align: left;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer;
}
.hist-row:hover { border-color: var(--ink); }
.hist-row > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
.hist-row > span:last-child { text-align: right; }
@media (max-width: 560px) { .hist-row { grid-template-columns: 1fr auto; } .hist-row > span:nth-child(2) { grid-column: 1 / -1; order: 3; } .hist-row > span:last-child { order: 4; text-align: left; } }
.btn-danger { color: var(--err); }
.btn-danger:hover { border-color: var(--err); }
.drawer-foot-row [data-delete] { margin-right: auto; }
/* На вузькому екрані три кнопки не вміщаються в рядок — «Зберегти» йде окремим рядком */
@media (max-width: 460px) {
  .drawer-foot-row:has([data-delete]) { flex-wrap: wrap; }
  .drawer-foot-row:has([data-delete]) .btn-primary { flex: 1 1 100%; max-width: none; }
}
.pick-list { display: grid; gap: 6px; margin-top: 14px; }
.pick-row { grid-template-columns: 120px minmax(0, 1fr) auto 112px; }
@media (max-width: 560px) { .pick-row { grid-template-columns: 1fr auto; } }
.set-form { margin-bottom: 18px; }
.set-form .check { width: 100%; }
.howto.small { font-size: 14px; }

/* ---------- CRM: календар ---------- */
.cal-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 16px; }
.cal-nav { display: flex; gap: 8px; align-items: center; }
.cal-prev .icon { transform: rotate(180deg); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-day { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cal-day.is-today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.cal-day.is-closed { background: var(--surface-2); }
.cal-day header { display: grid; gap: 1px; padding: 2px 4px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.cal-day header span { font-size: 13px; color: var(--muted); }
.cal-day header small { font-size: 12px; color: var(--muted); }
.cal-slot { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px; min-height: 40px; padding: 4px 2px; border-bottom: 1px dashed var(--line); }
.cal-slot.is-off { opacity: .45; }
.cal-slot.is-full .cal-time { color: var(--err); font-weight: 600; }
.cal-time { font-size: 11.5px; color: var(--muted); padding-top: 3px; }
.cal-items { display: grid; gap: 4px; min-width: 0; }
.cal-bk {
  display: block; width: 100%; text-align: left; padding: 5px 7px; border-radius: 7px; border: 0; cursor: pointer;
  font: inherit; font-size: 12.5px; line-height: 1.3; color: var(--ink); background: var(--surface-2); overflow-wrap: anywhere;
}
.cal-bk small { display: block; color: var(--muted); font-size: 11.5px; }
.cal-bk:hover { outline: 1.5px solid var(--ink); }
.cal-bk.st-new { box-shadow: inset 3px 0 0 #3b82f6; }
.cal-bk.st-called { box-shadow: inset 3px 0 0 var(--accent); }
.cal-bk.st-work { box-shadow: inset 3px 0 0 #8b5cf6; }
.cal-bk.st-done { box-shadow: inset 3px 0 0 var(--ok); }
.cal-add {
  display: grid; place-items: center; height: 26px; border: 1px dashed var(--line); border-radius: 7px;
  background: transparent; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .15s;
}
.cal-add .icon { width: 14px; height: 14px; }
.cal-slot:hover .cal-add, .cal-add:focus-visible { opacity: 1; }
.cal-add:hover { border-color: var(--ink); color: var(--ink); }
.cal-notime { display: grid; gap: 4px; padding: 4px 2px 6px; border-bottom: 1px dashed var(--line); }
@media (hover: none) { .cal-add { opacity: 1; } }
@media (max-width: 1100px) {
  .cal { grid-template-columns: 1fr; }
  .cal-slot.is-empty:not(:has(.cal-add)) { display: none; }
  .cal-day.is-closed .cal-slot { display: none; }
}

/* ---------- CRM: клієнти ---------- */
.cl-list { display: grid; gap: 8px; }
.cl-item { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cl-item summary {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.6fr) 90px 120px 120px; gap: 12px; align-items: center;
  padding: 12px 14px; cursor: pointer; list-style: none;
}
.cl-item summary::-webkit-details-marker { display: none; }
.cl-item[open] summary { border-bottom: 1px solid var(--line); }
.cl-item .hist { padding: 10px; }
.cl-name, .cl-num { display: grid; min-width: 0; }
.cl-name small, .cl-num small { font-size: 12.5px; color: var(--muted); }
.cl-cars { font-size: 14px; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 820px) {
  .cl-item summary { grid-template-columns: 1fr 1fr 1fr; }
  .cl-name, .cl-cars { grid-column: 1 / -1; }
}
.btn.is-armed, .icon-btn.is-armed { background: var(--err); border-color: var(--err); color: #fff; }
.text-diff { font-size: 14.5px; }
[data-text-list] { display: grid; gap: 12px; }
.texts-intro { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; }
.howto { margin: 8px 0; padding-left: 20px; display: grid; gap: 4px; color: var(--muted); }

/* Редактор прайсу */
.cat-edit { padding: 0; overflow: hidden; }
.cat-edit > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 16px 18px; }
.cat-edit > summary::-webkit-details-marker { display: none; }
.cat-edit > summary .h3 { flex: 1; min-width: 0; font-size: 17px; overflow-wrap: anywhere; }
.cat-edit > summary .mono { white-space: nowrap; }
.cat-edit > summary .icon { flex: none; transition: transform .2s; color: var(--muted); }
.cat-edit[open] > summary .icon { transform: rotate(45deg); }
.cat-edit-body { display: grid; gap: 14px; padding: 4px 18px 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.items-edit { display: grid; gap: 8px; }
.item-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.2fr) 120px 42px; gap: 8px; align-items: center; }
.item-row .input { min-height: 42px; padding: 8px 10px; font-size: 15px; }
.item-head { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 640px) {
  .item-head { display: none; }
  .item-row { grid-template-columns: minmax(0, 1fr) 100px 42px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
  .item-row [name=name] { grid-column: 1 / -1; }
  .item-row [name=note] { grid-column: 1; }
}
.save-bar {
  position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 10px 12px; border-radius: 14px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg);
}
.save-bar span { margin-right: auto; font-weight: 500; font-size: 14.5px; }
.save-bar .btn-ghost { color: var(--bg); border-color: color-mix(in srgb, var(--bg) 35%, transparent); }

/* Контакти й графік */
.admin-form { display: grid; gap: 20px; justify-items: start; }
.admin-form .fieldset, .admin-form .admin-section-head { width: 100%; }
.hours-edit { display: grid; gap: 8px; max-width: 460px; }
.hours-row { display: grid; grid-template-columns: 150px 1fr auto 1fr; gap: 10px; align-items: center; }
.hours-row .input { min-height: 42px; padding: 6px 10px; }
.hours-row .input:disabled { opacity: .45; }
@media (max-width: 480px) { .hours-row { grid-template-columns: 1fr 1fr auto 1fr; } .hours-row .check { grid-column: 1 / -1; } }
.drawer-body .grid-2 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.input[type="datetime-local"], .input[type="date"], .input[type="time"] { min-width: 0; }
body.has-admin-bar .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
/* Повідомлення не перекриває панель вибраних послуг */
body.has-cart-bar .toast { bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 720px) { body.has-cart-bar .toast { bottom: calc(150px + env(safe-area-inset-bottom, 0px)); } }
@media (max-width: 420px) { body.has-cart-bar .toast { bottom: calc(196px + env(safe-area-inset-bottom, 0px)); } }
@media (max-width: 720px) { body.has-admin-bar .toast { bottom: calc(150px + env(safe-area-inset-bottom, 0px)); } }
.admin-login .check { width: 100%; }
.login-error { width: 100%; padding: 10px 12px; border-radius: 10px; background: var(--err-soft); color: var(--err); font-size: 14px; font-weight: 500; }
.site-footer .status { white-space: normal; align-items: flex-start; }
.site-footer .status-dot { margin-top: 6px; }
.footer-grid .status { color: var(--band-muted); }
/* Підвал завжди темний — зелений для нього світліший, ніж у світлій темі */
.site-footer .status.is-open { color: #4cc583; }
.site-footer .status.is-open .status-dot { background: #4cc583; }
.footer-grid .status.is-open { color: var(--ok); }
.admin, .admin-panel, .admin-section { grid-template-columns: minmax(0, 1fr); }
.admin > *, .admin-panel > * { min-width: 0; }

/* Картка заявки: поля дати й часу на всю ширину, кнопка «Зараз» у рядку підпису */
.label-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.link-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 2px; border: 0; background: none; cursor: pointer;
  color: var(--accent-text); font-weight: 600; font-size: 14px; border-radius: 6px;
}
.link-btn .icon { width: 16px; height: 16px; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.check-box { padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); }
/* Поля дати/часу: на iPhone і Android вони мають власну мінімальну ширину й вилазять за край */
input[type="date"].input, input[type="time"].input, input[type="datetime-local"].input {
  display: block; width: 100%; max-width: 100%; min-width: 0; -webkit-appearance: none; appearance: none; text-align: left;
}
input[type="date"].input::-webkit-date-and-time-value,
input[type="time"].input::-webkit-date-and-time-value,
input[type="datetime-local"].input::-webkit-date-and-time-value { text-align: left; margin: 0; }
.drawer-body .fieldset > * { min-width: 0; }
.quick-btns .btn { white-space: normal; text-align: left; }
.drawer-foot-row { flex-wrap: nowrap; }
.drawer-foot-row .btn { min-width: 0; }
.drawer-foot-row .btn-primary { flex: 1 1 auto; max-width: 260px; }
@media (max-width: 360px) { .drawer-foot-row .btn { padding-inline: 14px; } }
.summary-total { gap: 12px; }
.summary-total strong { white-space: nowrap; }

/* Нижня панель на телефоні: кнопки завжди вміщаються в ширину екрана */
.mobile-bar { gap: 8px; }
.mobile-bar .btn { flex: 1 1 0; min-width: 0; padding-inline: 12px; gap: 8px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 360px) {
  .mobile-bar .btn { font-size: 14.5px; padding-inline: 8px; gap: 6px; }
  .mobile-bar .btn .icon { width: 18px; height: 18px; }
}

/* =========================================================
   Анімації. Лише для тих, хто не вимкнув анімацію в системі
   ========================================================= */
:root { --ease-out: cubic-bezier(.2, .7, .2, 1); }
@media (prefers-reduced-motion: no-preference) {
  /* Плавний перехід між сторінками (у браузерах, що це підтримують); шапка лишається на місці */
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: site-header; }
  ::view-transition-old(root) { animation: vt-out .2s ease both; }
  ::view-transition-new(root) { animation: vt-in .38s var(--ease-out) both; }

  /* Поява блоків під час прокрутки (клас reveal-on ставить main.js) */
  .reveal-on [data-reveal] {
    opacity: 0; transform: translateY(24px);
    transition: opacity .75s var(--ease-out), transform .75s var(--ease-out);
    transition-delay: var(--rd, 0ms);
  }
  .reveal-on [data-reveal].is-in { opacity: 1; transform: none; }
  .reveal-on [data-reveal].no-anim { transition: none; }

  /* Перший екран: текст піднімається рядок за рядком, фото плавно наближається */
  .hero-copy > *, .page-hero .container > * { animation: rise-in .9s var(--ease-out) both; }
  .hero-copy > :nth-child(2), .page-hero .container > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3), .page-hero .container > :nth-child(3) { animation-delay: .16s; }
  .hero-copy > :nth-child(4) { animation-delay: .24s; }
  .hero-copy > :nth-child(5) { animation-delay: .32s; }
  .hero-photo { animation: photo-in 1.3s var(--ease-out) both; }
  .hero-chip { animation: chip-in .8s .55s var(--ease-out) both, chip-float 7s 1.4s ease-in-out infinite alternate; }
  .hero-chip.c2 { animation-delay: .7s, 1.6s; }
  .hero-copy .h1 em { background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 92% / 0 .1em; animation: underline-in .9s .7s var(--ease-out) forwards; }

  /* Кнопки: легкий підйом, відблиск на головній, стрілка зсувається */
  .btn-primary { position: relative; overflow: hidden; isolation: isolate; }
  .btn-primary::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(105deg, transparent 30%, rgb(255 255 255 / .5) 50%, transparent 70%);
    transform: translateX(-110%); transition: transform .75s var(--ease-out);
  }
  .btn-primary:hover::after { transform: translateX(110%); }
  .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgb(242 160 7 / .8); }
  .btn .icon { transition: transform .25s var(--ease-out); }
  .btn:hover .icon:has(use[href="#i-arrow"]) { transform: translateX(3px); }

  /* Картки послуг і відгуків */
  .svc-card img { transition: transform .8s var(--ease-out); }
  .svc-card:hover img { transform: scale(1.06); }
  .svc-card .arrow .icon { transition: transform .3s var(--ease-out); }
  .svc-card:hover .arrow .icon { transform: translateX(2px); }
  .review { transition: transform .3s var(--ease-out), box-shadow .3s, border-color .3s; }
  .review:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
  .gallery img, .spec-photo { transition: transform .8s var(--ease-out), filter .5s; }
  .gallery img:hover { transform: scale(1.02); filter: saturate(1.1); }

  /* Етапи ремонту: лінія над кожним кроком промальовується зліва направо */
  .step::after {
    content: ""; position: absolute; left: 0; top: -2px; width: 100%; height: 2px;
    background: var(--accent); transform: scaleX(0); transform-origin: left;
    transition: transform 1s var(--ease-out); transition-delay: calc(var(--rd, 0ms) + .25s);
  }
  .step.is-in::after { transform: scaleX(1); }

  /* Шапка під час прокрутки стає напівпрозорою з розмиттям */
  .site-header { transition: box-shadow .3s, background-color .3s; }
  .site-header.is-scrolled { background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px); }

  /* Тонка смужка прогресу прокрутки під шапкою */
  @supports (animation-timeline: scroll()) {
    .site-header::after {
      content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
      background: var(--accent); transform-origin: left; transform: scaleX(0);
      animation: scroll-progress linear both; animation-timeline: scroll(root);
    }
  }

  /* Позначка «додано» в прайсі */
  .add-btn[aria-pressed="true"] .i-check { animation: pop .35s var(--ease-out); }
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(26px); } }
@keyframes photo-in { from { opacity: 0; transform: scale(1.04); clip-path: inset(6% 6% 6% 6% round 20px); } to { clip-path: inset(0 0 0 0 round 20px); } }
@keyframes chip-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes chip-float { to { translate: 0 -6px; } }
@keyframes underline-in { to { background-size: 100% .1em; } }
@keyframes scroll-progress { to { transform: scaleX(1); } }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.18); } 100% { transform: scale(1); } }
@media print { [data-reveal] { opacity: 1 !important; transform: none !important; } }
