:root {
  --main: #3872ff;
  --main-soft: #e8f0ff;
  --main-line: #afc7ff;
  --title: #21212f;
  --sub: #6f6f82;
  --muted: #adaeb2;
  --success: #00ddb0;
  --danger: #ef4444;
  --card: #f8f9fa;
  --line: #ececf0;
  --bg: #ffffff;
  --shadow: 0 6px 20px rgba(33, 33, 47, 0.08);
  --radius: 18px;
  font-family: 'Quicksand', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--title);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
a { color: inherit; }

.page {
  max-width: 780px;
  margin: 0 auto;
  padding: 20px 16px 120px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- header ---------- */
.brand { display: flex; align-items: center; gap: 16px; padding: 4px 0 18px; }
.brand-logo {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  background: #111; box-shadow: var(--shadow);
}
.brand-name { font-size: 22px; font-weight: 700; margin: 0; }
.hero { position: relative; margin: -20px -16px 20px; height: 240px; overflow: hidden; background: #0b0b0d; }
.hero-bg { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.72)); }
.hero-in { position: absolute; left: 0; right: 0; bottom: 18px; z-index: 1; display: flex; justify-content: center; padding: 0 16px; }
.hero h1, .brand-bar h1 { margin: 0; line-height: 0; }
.hero-logo { width: min(300px, 78vw); height: auto; }
@media (min-width: 812px) { .hero { margin: 0 0 22px; border-radius: 22px; height: 300px; } }
.brand-bar { background: #0b0b0d; border-radius: 18px; padding: 16px 18px; margin: 0 0 18px; display: flex; justify-content: center; }
.brand-bar img { width: min(230px, 64vw); height: auto; }

/* ---------- primary buttons ---------- */
.btn {
  border: 0; border-radius: 999px; background: var(--main); color: #fff;
  font-weight: 600; font-size: 16px; padding: 14px 28px;
  box-shadow: 0 10px 24px rgba(56, 114, 255, 0.28);
  transition: transform .12s ease, opacity .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-block { display: block; width: 100%; max-width: 460px; margin: 0 auto; }
.btn-ghost { background: var(--main-soft); color: var(--main); box-shadow: none; }

.add-vehicle-btn {
  width: 100%; max-width: 480px; margin: 6px auto 0; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; padding: 16px 22px; border-radius: 999px;
  border: 0; background: var(--main); color: #fff; font-size: 18px; font-weight: 600;
  box-shadow: 0 10px 24px rgba(56, 114, 255, 0.28);
}
.add-vehicle-btn svg { flex-shrink: 0; }
.hint { color: var(--success); text-align: center; font-weight: 500; margin: 12px 0 4px; }

/* ---------- vehicles ---------- */
.vehicle-strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.vehicle-chip {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
  padding: 10px 14px; border-radius: 16px; border: 2px solid transparent;
  background: var(--card); text-align: left; max-width: 260px;
}
.vehicle-chip.active { border-color: var(--main); background: var(--main-soft); }
.vehicle-chip .vc-icon { width: 42px; height: 42px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--main); flex-shrink: 0; }
.vehicle-chip .vc-text { min-width: 0; }
.vehicle-chip .vc-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vehicle-chip .vc-service { font-size: 13px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vehicle-chip .vc-service.ok { color: var(--success); font-weight: 600; }
.vehicle-chip .vc-del { border: 0; background: transparent; color: var(--muted); padding: 4px; margin-left: 2px; border-radius: 50%; }
.vehicle-chip .vc-del:hover { color: var(--danger); background: #fff; }
.add-more { flex-shrink: 0; border: 2px dashed var(--main-line); background: #fff; color: var(--main); border-radius: 16px; padding: 10px 16px; font-weight: 600; }

/* ---------- tabs ---------- */
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); margin: 18px 0 16px; border-bottom: 1px solid var(--line); }
.tab { background: none; border: 0; padding: 12px 4px 14px; color: var(--muted); font-size: 17px; font-weight: 500; position: relative; }
.tab.active { color: var(--main); font-weight: 600; }
.tab.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px; background: var(--main); }

/* ---------- service cards ---------- */
.services { display: flex; flex-direction: column; gap: 14px; }
.svc { background: var(--card); border-radius: var(--radius); border: 1.5px solid transparent; transition: border-color .15s, box-shadow .15s; }
.svc.open { border-color: var(--success); background: #fff; }
.svc.selected { border-color: var(--main); background: #fff; box-shadow: var(--shadow); }
.svc-head { display: flex; align-items: center; gap: 14px; padding: 14px 16px; width: 100%; background: none; border: 0; text-align: left; }
.svc-img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #ddd; }
.svc-ini { display: grid; place-items: center; background: var(--main-soft); color: var(--main); font-weight: 700; font-size: 24px; }
.svc-main { flex: 1; min-width: 0; }
.svc-name { font-weight: 600; font-size: 17px; margin: 0 0 6px; }
.svc-meta { display: flex; align-items: center; gap: 14px; font-size: 14px; flex-wrap: wrap; }
.svc-price { color: var(--main); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.svc-time { color: var(--sub); display: inline-flex; align-items: center; gap: 5px; }
.svc-price svg { color: var(--success); }
.svc-time svg { color: var(--success); }
.svc-chev { color: var(--muted); transition: transform .2s; flex-shrink: 0; padding: 6px; border-radius: 50%; background: none; border: 0; }
.svc.open .svc-chev { transform: rotate(180deg); }
.svc-body { padding: 0 18px 16px 18px; }
.svc-body ul { list-style: none; margin: 0; padding: 0; }
.svc-body li { color: var(--sub); padding: 7px 0 7px 16px; position: relative; font-size: 15px; }
.svc-body li::before { content: ''; position: absolute; left: 0; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: #8b8b98; }
.svc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.svc-actions .btn { padding: 11px 20px; font-size: 15px; }
.svc-check { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--main); color: #fff; flex-shrink: 0; }
.svc-addons-summary { font-size: 13px; color: var(--sub); margin-top: 6px; }

/* ---------- about / portfolio ---------- */
.about { text-align: center; color: var(--sub); line-height: 1.75; font-size: 15px; padding: 4px 8px 22px; border-bottom: 1px solid var(--line); }
.contact { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 20px 4px; }
.contact a { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; word-break: break-all; }
.contact svg { color: var(--success); flex-shrink: 0; }
.contact a.mail svg { color: var(--main); }
.socials { display: flex; justify-content: center; gap: 14px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; background: var(--main-soft); display: grid; place-items: center; color: var(--main); }
.portfolio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.portfolio button { padding: 0; border: 0; background: #eee; border-radius: 12px; overflow: hidden; aspect-ratio: 1; }
.portfolio img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.portfolio button:hover img { transform: scale(1.04); }
.empty { color: var(--muted); text-align: center; padding: 30px 0; }

/* ---------- sticky footer ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, #fff 70%, rgba(255,255,255,0));
}
.cta-total { text-align: center; color: var(--sub); font-size: 14px; margin-bottom: 8px; }
.cta-total b { color: var(--title); }

/* ---------- sub pages ---------- */
.subhead { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; margin: 0 0 18px; }
.back { border: 0; background: none; padding: 6px; color: var(--muted); border-radius: 50%; display: grid; place-items: center; }
.back:hover { background: var(--card); color: var(--title); }
.subhead h2 { text-align: center; margin: 0; color: var(--main); font-weight: 600; font-size: 20px; }

.field { margin-bottom: 20px; }
.label { display: block; font-weight: 700; margin-bottom: 10px; font-size: 16px; }
.label .req { color: var(--title); }
.input, .select, .textarea {
  width: 100%; border: 1.5px solid transparent; background: var(--card); border-radius: 22px;
  padding: 15px 18px; font-size: 16px; outline: none; box-shadow: 0 4px 10px rgba(33,33,47,.06);
  transition: border-color .15s, background .15s;
}
.textarea { min-height: 110px; resize: vertical; border-radius: 18px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--main); background: #fff; }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input.invalid, .select.invalid { border-color: var(--danger); }
.err { color: var(--danger); font-size: 13px; margin: 6px 4px 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.phone-row { display: grid; grid-template-columns: 120px 1fr; gap: 10px; }

.type-picker { display: flex; gap: 12px; flex-wrap: wrap; }
.type-opt { width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--main-soft); color: var(--main); display: grid; place-items: center; transition: background .15s, color .15s, transform .15s; }
.type-opt.active { background: var(--main); color: #fff; transform: scale(1.04); }
.type-caption { margin-top: 8px; font-size: 14px; color: var(--sub); min-height: 20px; }

.checks { display: flex; gap: 12px; flex-wrap: wrap; }
.check {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px;
  background: var(--card); border: 1.5px solid transparent; font-weight: 600; user-select: none; cursor: pointer;
}
.check input { width: 18px; height: 18px; accent-color: var(--main); margin: 0; }
.check:has(input:checked) { border-color: var(--main); background: var(--main-soft); color: var(--main); }

/* ---------- address autocomplete ---------- */
.ac { position: relative; }
.ac-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border-radius: 14px; box-shadow: 0 14px 34px rgba(33,33,47,.16); list-style: none; margin: 0; padding: 6px; max-height: 280px; overflow: auto; }
.ac-list li { padding: 11px 12px; border-radius: 10px; cursor: pointer; font-size: 15px; }
.ac-list li small { display: block; color: var(--muted); font-size: 13px; }
.ac-list li:hover, .ac-list li.hl { background: var(--main-soft); }
.place-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.place-opt { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; }
.place-opt input { position: absolute; opacity: 0; pointer-events: none; }
.place-opt b { font-size: 15px; }
.place-opt small { color: var(--sub); font-size: 13px; line-height: 1.35; }
.place-opt:has(input:checked) { border-color: var(--main); background: var(--main-soft); }
.place-opt:has(input:focus-visible) { outline: 2px solid var(--main); outline-offset: 2px; }
.shop-addr { margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--card); border-radius: 16px; padding: 14px 16px; font-weight: 600; }
.shop-addr a { color: var(--main); font-weight: 700; text-decoration: none; flex-shrink: 0; }
@media (max-width: 380px) { .place-opts { grid-template-columns: 1fr; } }
.travel-note { font-size: 13px; color: var(--sub); margin: 8px 4px 0; }

/* ---------- calendar ---------- */
.section-title { font-weight: 700; font-size: 18px; margin: 4px 0 14px; }
.cal { background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 26px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head strong { font-size: 17px; }
.cal-nav { width: 38px; height: 38px; border-radius: 50%; border: 0; background: #fff; display: grid; place-items: center; color: var(--title); }
.cal-nav:disabled { opacity: .3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-dow { font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 0; }
.cal-day { aspect-ratio: 1; max-height: 52px; border: 0; border-radius: 50%; background: transparent; font-weight: 600; color: #c9cad0; display: grid; place-items: center; margin: 0 auto; width: 100%; max-width: 52px; }
.cal-day.avail { color: var(--title); background: #fff; }
.cal-day.avail:hover { background: var(--main-soft); color: var(--main); }
.cal-day.sel, .cal-day.sel:hover { background: var(--main); color: #fff; }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--main-line); }
.cal-day:disabled { cursor: default; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.slot { border: 1.5px solid var(--main-line); background: #fff; border-radius: 999px; padding: 11px 6px; font-weight: 600; color: var(--title); }
.slot:hover { border-color: var(--main); color: var(--main); }
.slot.sel { background: var(--main); border-color: var(--main); color: #fff; }
.slots-msg { color: var(--muted); text-align: center; padding: 18px 0; }

/* ---------- review ---------- */
.review-row { padding: 18px 0; border-bottom: 2px solid var(--main-line); }
.review-row:last-child { border-bottom: 0; }
.review-label { font-weight: 700; font-size: 18px; display: block; margin-bottom: 4px; }
.review-value { color: var(--muted); font-weight: 700; font-size: 17px; margin: 0; word-break: break-word; }
.review-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 6px; }
.review-line .amt { color: var(--title); font-weight: 700; font-size: 17px; flex-shrink: 0; }
.review-line .muted-amt { color: var(--muted); }
.total-row .review-label, .total-row .amt { font-size: 22px; }
.terms { text-align: center; font-size: 13px; color: var(--sub); margin: 12px 0 0; }
.terms a { color: var(--main); }

/* ---------- modal & lightbox ---------- */
.overlay { position: fixed; inset: 0; background: rgba(20, 20, 32, .5); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
@media (min-width: 640px) { .overlay { align-items: center; } }
.sheet { background: #fff; width: 100%; max-width: 520px; border-radius: 24px 24px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); max-height: 88vh; display: flex; flex-direction: column; animation: up .2s ease; }
@media (min-width: 640px) { .sheet { border-radius: 24px; } }
.sheet h3 { margin: 0 0 4px; font-size: 20px; text-align: center; color: var(--main); font-weight: 600; }
.sheet .sheet-sub { text-align: center; color: var(--sub); font-size: 14px; margin: 0 0 14px; }
.sheet-list { overflow: auto; margin: 0 -4px; padding: 0 4px; }
.addon { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--card); margin-bottom: 10px; cursor: pointer; border: 1.5px solid transparent; }
.addon:has(input:checked) { border-color: var(--main); background: var(--main-soft); }
.addon input { width: 20px; height: 20px; accent-color: var(--main); margin: 0; flex-shrink: 0; }
.addon .a-name { flex: 1; font-weight: 600; }
.addon .a-meta { text-align: right; font-size: 14px; }
.addon .a-meta b { color: var(--main); display: block; }
.addon .a-meta span { color: var(--sub); font-size: 12px; }
.sheet-foot { display: flex; gap: 10px; padding-top: 12px; }
.sheet-foot .btn { flex: 1; }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 60; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 10px; object-fit: contain; }
.lb-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; display: grid; place-items: center; }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
.lb-close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; display: grid; place-items: center; }
.lb-count { position: absolute; bottom: 18px; color: #fff; opacity: .8; font-size: 14px; }

/* ---------- success ---------- */
.done { text-align: center; padding: 40px 10px; }
.done-icon { width: 84px; height: 84px; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; margin: 0 auto 18px; box-shadow: 0 12px 30px rgba(0, 221, 176, .35); }
.done h2 { margin: 0 0 8px; font-size: 24px; }
.done p { color: var(--sub); line-height: 1.6; margin: 0 auto 6px; max-width: 420px; }

.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: var(--title); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 80; font-size: 14px; max-width: calc(100vw - 32px); box-shadow: var(--shadow); animation: up .2s ease; }
.banner-demo { background: #fff7e0; color: #8a6200; border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; text-align: center; }

.spinner { width: 22px; height: 22px; border: 3px solid var(--main-soft); border-top-color: var(--main); border-radius: 50%; animation: spin .8s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(16px); opacity: 0; } }

@media (max-width: 480px) {
  .brand-logo { width: 60px; height: 60px; }
  .brand-name { font-size: 19px; }
  .svc-img { width: 54px; height: 54px; }
  .svc-name { font-size: 16px; }
  .portfolio { grid-template-columns: repeat(2, 1fr); }
  .row2 { grid-template-columns: 1fr; }
  .phone-row { grid-template-columns: 104px 1fr; }
  .review-label { font-size: 16px; }
  .review-value, .review-line .amt { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- per-vehicle service lists ---------- */
.svc-head { cursor: pointer; border-radius: var(--radius); }
.svc-head:focus-visible, .addon-card:focus-visible { outline: 2px solid var(--main); outline-offset: 2px; }
.svc-chev { display: grid; place-items: center; }
.veh-block { display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
.veh-head { display: flex; align-items: center; gap: 12px; padding: 4px 2px; }
.veh-head .vc-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--main-soft); color: var(--main); display: grid; place-items: center; flex-shrink: 0; }
.veh-text { flex: 1; min-width: 0; }
.veh-head .vc-name { font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.veh-head .vc-service { font-size: 13px; color: var(--sub); }
.veh-head .vc-del { border: 0; background: var(--card); color: var(--muted); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }
.veh-head .vc-del:hover { color: var(--danger); }

/* ---------- add-ons step ---------- */
.addon-groups { display: flex; flex-direction: column; gap: 26px; }
.addon-group { display: flex; flex-direction: column; gap: 12px; }
.addon-group-title { margin: 0 0 2px; font-size: 18px; font-weight: 700; }
.addon-group-title span { color: var(--sub); font-weight: 600; }
.addon-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-radius: 15px; background: #f7f7f7; border: 1.5px solid #eeeff3; cursor: pointer; transition: border-color .15s, background .15s; }
.addon-card.on { border-color: var(--main); background: var(--main-soft); }
.addon-info { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.addon-name { margin: 0; font-weight: 600; font-size: 17px; }
.addon-box { width: 32px; height: 32px; border-radius: 7px; border: 1.5px solid #d4d5e3; background: #fff; display: grid; place-items: center; flex-shrink: 0; color: #fff; }
.addon-card.on .addon-box { background: var(--main); border-color: var(--main); }
