/* 5Sao Move — trang chủ.
 * Nguyên tắc: nền trung tính, một màu nhấn (xanh 5Sao) cho hành động và trạng thái chọn,
 * cam chỉ xuất hiện trong logo và viền dòng gói dịch vụ đang chọn.
 * Bo góc 8/12 px, bóng đổ chỉ dùng cho khung đặt xe và lớp nổi.
 */
:root {
  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --line: #E4E7EC;
  --line-2: #D0D5DD;
  --bg: #FFFFFF;
  --bg-alt: #F8F9FB;
  --brand: #2D5CA8;
  --brand-hover: #244B8B;
  --brand-tint: #F3F6FB;
  --orange: #F47F20;        /* cam thương hiệu, như trong logo */
  --orange-strong: #E26C0C; /* viền gói đang chọn: cùng tông cam, tương phản 3,3:1 trên nền trắng (cam logo chỉ 2,7:1) */
  --danger: #B42318;

  --r-sm: 8px;
  --r: 12px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .05), 0 12px 32px -16px rgba(16, 24, 40, .18);
  --shadow-pop: 0 4px 6px -2px rgba(16, 24, 40, .05), 0 16px 32px -8px rgba(16, 24, 40, .16);
  --header-h: 64px;
  --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }

.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(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-sm); }
.skip-link:focus { top: 12px; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r-sm); border: 1px solid transparent;
  font-weight: 600; font-size: 15px; line-height: 1; white-space: nowrap;
  transition: background-color .15s, border-color .15s;
  text-decoration: none !important;
}
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-lg { min-height: 52px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { background: var(--bg-alt); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: var(--r-sm); border: 0; background: transparent; color: var(--ink-2);
}
.icon-btn:hover { background: var(--bg-alt); }
.icon-btn .ic { width: 20px; height: 20px; }
.icon-btn-outline { border: 1px solid var(--line-2); width: 46px; height: 46px; }
.text-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 0;
  border: 0; background: none; color: var(--brand); font-weight: 600; font-size: 14px;
}
.text-btn:hover { color: var(--brand-hover); text-decoration: underline; text-underline-offset: 3px; }
.text-btn .ic { width: 16px; height: 16px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 1100; background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 32px; height: var(--header-h); }
.brand { display: block; flex: none; }
.brand img { width: 155px; height: auto; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a, .nav-btn {
  padding: 8px 12px; border-radius: var(--r-sm); border: 0; background: none;
  color: var(--ink-2); font-weight: 500; font-size: 15px; text-decoration: none !important;
}
.main-nav a:hover, .nav-btn:hover { color: var(--ink); background: var(--bg-alt); }
.main-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.header-phone { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; font-size: 15px; }
.header-phone .ic { width: 16px; height: 16px; color: var(--muted); }
.header-zalo .ic { color: var(--brand); }
.header-zalo:hover { color: var(--brand); text-decoration: none; }
.menu-btn { display: none; }

/* ---------- Hero: khung đặt xe + bản đồ ---------- */
.hero { padding: 36px 0 48px; background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 460px minmax(0, 1fr); gap: 28px; align-items: stretch; }
.hero-main { min-width: 0; }
.hero h1 { font-size: clamp(28px, 3vw, 38px); letter-spacing: -0.03em; }
.lead { margin-top: 8px; font-size: 16px; color: var(--ink-2); }
.hero-card { margin-top: 20px; }
.note-mobile { display: none; }

.hero-map { position: relative; isolation: isolate; min-height: 620px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #E8EEF5; }
.book-map { position: absolute; inset: 0; }
.book-map.leaflet-container { font-family: var(--font); cursor: crosshair; }
.map-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px; padding: 16px; text-align: center; }
.map-hint {
  position: absolute; top: 14px; left: 14px; z-index: 500;
  max-width: calc(100% - 32px); padding: 8px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-pop);
  font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.map-quote {
  position: absolute; right: 14px; top: 14px; z-index: 500; display: grid; gap: 2px; text-align: right;
  padding: 10px 14px; border-radius: var(--r-sm); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-pop);
}
.map-quote strong { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.map-quote span { font-size: 13px; color: var(--muted); }
.map-label.leaflet-tooltip { background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 500; font-size: 12.5px; padding: 2px 8px; border-radius: 6px; box-shadow: none; }
.map-label.leaflet-tooltip::before { display: none; }
.leaflet-div-icon.pin-wrap { background: none; border: 0; }
.pin {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  font: 700 12px var(--font); color: #fff; cursor: grab; box-shadow: 0 2px 8px rgba(16, 24, 40, .35);
}
.pin-pickup { background: #fff; border: 7px solid var(--brand); }
.pin-drop { background: var(--ink); border: 2px solid #fff; }
.pin-error.pin-drop { background: var(--danger); }
.pin-error.pin-pickup { border-color: var(--danger); }

/* ---------- Khung đặt xe ---------- */
.book-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 24px; box-shadow: var(--shadow-card); }
.book-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.book-title { font-size: 20px; }
.book-sub { font-size: 13px; font-weight: 600; color: var(--brand); background: var(--brand-tint); border: 1px solid #D5E0F2; padding: 3px 10px; border-radius: 6px; white-space: nowrap; }

.stops { position: relative; list-style: none; padding: 0; margin: 0; }
/* Xe nhỏ chạy trên đường nối, xuất phát ngay dưới chấm điểm lấy và dừng ngay trên chấm điểm giao cuối.
   --van-track do JS đặt (syncVanTrack) theo vị trí điểm cuối. */
.stops::after {
  content: ""; position: absolute; left: 1.5px; top: 38px; width: 17px; height: 24px; z-index: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 24'%3E%3Crect x='0.5' y='5' width='3' height='4.5' rx='1' fill='%23101828'/%3E%3Crect x='12.5' y='5' width='3' height='4.5' rx='1' fill='%23101828'/%3E%3Crect x='0.5' y='15' width='3' height='4.5' rx='1' fill='%23101828'/%3E%3Crect x='12.5' y='15' width='3' height='4.5' rx='1' fill='%23101828'/%3E%3Crect x='2.5' y='1' width='11' height='22' rx='3' fill='%232D5CA8' stroke='%23fff' stroke-width='1.2'/%3E%3Crect x='4.5' y='3.5' width='7' height='10' rx='1' fill='%23fff' fill-opacity='.22'/%3E%3Cpath d='M5 17.5h6l.6 2.5H4.4z' fill='%23fff' fill-opacity='.9'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: van-run 4.2s cubic-bezier(.45, 0, .55, 1) infinite;
}
@keyframes van-run {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 1; }
  80% { transform: translateY(var(--van-track, 75px)); opacity: 1; }
  90%, 100% { transform: translateY(var(--van-track, 75px)); opacity: 0; }
}
.stop { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; column-gap: 10px; align-items: start; }
.stop + .stop { margin-top: 8px; }
.stop::before { content: ""; position: absolute; left: 9px; top: 42px; bottom: -20px; border-left: 1px dashed var(--line-2); }
.stop:last-child::before { display: none; }
.stop-marker { margin-top: 24px; width: 20px; height: 20px; display: grid; place-items: center; position: relative; z-index: 1; font-size: 11px; font-weight: 700; color: #fff; }
.stop-marker::before { content: ""; position: absolute; border-radius: 50%; }
.stop[data-kind="pickup"] .stop-marker::before { inset: 3px; border: 4px solid var(--brand); background: #fff; }
.stop[data-kind="drop"] .stop-marker::before { inset: 4px; background: var(--ink); }
.stop[data-kind="drop"] .stop-marker.has-num::before { inset: 0; }
.stop-marker span { position: relative; }
.stop-field { position: relative; min-width: 0; }
.stop-box {
  position: relative; display: block; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: #fff; cursor: text; transition: border-color .15s, box-shadow .15s;
}
.stop-box:hover { border-color: #98A2B3; }
.stop-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(45, 92, 168, .15); }
.stop.has-error .stop-box { border-color: var(--danger); }
.stop.has-geo .stop-box { padding-right: 48px; }
/* Gợi ý chú ý: viền nhịp nhẹ ở ô đầu tiên khi trang vừa mở */
.stop-box.attn { animation: attn 1.6s ease-out 3; }
@keyframes attn {
  0% { box-shadow: 0 0 0 0 rgba(45, 92, 168, .45); border-color: var(--brand); }
  100% { box-shadow: 0 0 0 10px rgba(45, 92, 168, 0); border-color: var(--brand); }
}
.stop-label { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; }
.stop-input { width: 100%; border: 0; outline: none; padding: 0; background: transparent; font-size: 16.5px; font-weight: 500; text-overflow: ellipsis; }
.stop-input::placeholder { color: #98A2B3; font-weight: 400; }
.stop-sub { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.geo-btn { position: absolute; right: 6px; top: 13px; width: 38px; height: 38px; color: var(--brand); }
.geo-btn:hover { background: var(--brand-tint); }
.stop-remove { margin-top: 16px; width: 34px; height: 34px; }
.stop-remove .ic { width: 16px; height: 16px; }
.stop-placeholder { width: 34px; }

.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 1000;
  list-style: none; margin: 0; padding: 6px; max-height: 320px; overflow: auto;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-pop);
}
.suggest-group { padding: 8px 10px 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.suggest-hint { padding: 8px 10px; font-size: 14px; color: var(--muted); }
.suggest-opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.suggest-opt .ic { margin-top: 3px; width: 16px; height: 16px; color: var(--muted); }
.suggest-opt[aria-selected="true"], .suggest-opt:hover { background: var(--bg-alt); }
.suggest-opt strong { display: block; font-weight: 500; font-size: 15px; }
.suggest-opt small { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; }
.suggest-opt.geo { color: var(--brand); font-weight: 500; align-items: center; }
.suggest-opt.geo .ic { color: var(--brand); margin-top: 0; }

.field-error { font-size: 13.5px; color: var(--danger); margin-top: 6px; line-height: 1.45; }
.field-error:empty { display: none; }

.stop-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 6px 0 0 30px; min-height: 36px; }
.quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 0 0 30px; }
.quick:empty { display: none; }
.quick-label { font-size: 13px; color: var(--muted); margin-right: 2px; }
.chip-btn {
  padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff;
  font-size: 13px; font-weight: 500; color: var(--ink-2); transition: border-color .15s, color .15s;
}
.chip-btn:hover { border-color: var(--brand); color: var(--brand); }

/* Gói dịch vụ: hai nhóm (Nhanh, Tiết kiệm), mỗi gói một dòng: icon, tên + thời điểm lấy hàng bên trái, giá bên phải */
.plans { border: 0; padding: 0; margin: 16px 0 0; }
.plans legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; padding: 0; }
.plan-group { margin: 10px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.plan-list > .plan-group:first-child { margin-top: 0; }
.plan-row {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; align-items: center;
  padding: 9px 12px; cursor: pointer; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.plan-row + .plan-row { margin-top: 6px; }
.plan-row input { position: absolute; opacity: 0; pointer-events: none; }
.plan-row:hover { border-color: #98A2B3; }
.plan-row:has(input:checked) { border-color: var(--orange-strong); box-shadow: inset 0 0 0 1px var(--orange-strong); }
.plan-row:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.plan-ic { grid-row: 1 / span 2; display: grid; place-items: center; width: 26px; color: var(--ink-2); }
.plan-ic .ic { width: 22px; height: 22px; stroke-width: 1.8; }
.plan-row:has(input:checked) .plan-ic { color: var(--orange-strong); }
.plan-name { grid-column: 2; font-weight: 600; font-size: 15px; line-height: 1.35; }
.plan-desc { grid-column: 2; font-size: 13px; color: var(--muted); line-height: 1.4; }
.plan-price { grid-column: 3; grid-row: 1 / span 2; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plan-price:empty { display: none; }
.plans .field-hint:empty { display: none; }
.modal-panel .plans { margin: 0; }
/* Dòng tóm tắt gói đang chọn trong khung đặt xe; bấm vào mở bảng chọn */
.plan-pick-wrap { margin-top: 16px; }
.plan-pick-label { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.plan-pick {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; column-gap: 12px; align-items: center; width: 100%;
  padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: #fff; text-align: left; font: inherit; color: inherit;
  cursor: pointer; transition: border-color .15s;
}
.plan-pick:hover { border-color: #98A2B3; }
.plan-pick-main { display: grid; min-width: 0; line-height: 1.35; }
.plan-pick-main strong { font-weight: 600; font-size: 15px; }
.plan-pick-main span { font-size: 13px; color: var(--muted); }
.plan-pick-price { font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plan-pick-price:empty { display: none; }
.plan-pick .ic { width: 18px; height: 18px; color: var(--muted); }
.plan-pick-ic { display: grid; place-items: center; width: 24px; color: var(--ink-2); }
.plan-pick-ic .ic { width: 22px; height: 22px; stroke-width: 1.8; color: inherit; }
.select, .input {
  width: 100%; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: #fff; font-size: 15px;
}
.select {
  appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.select:focus, .input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(45, 92, 168, .15); }
.input.has-error { border-color: var(--danger); }

.quote { margin: 18px 0 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.quote-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.quote-label { font-weight: 600; font-size: 15px; }
.quote-meta { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.quote-total { font-size: 26px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.quote-total:empty { display: none; }
.breakdown { margin-top: 8px; padding: 12px; border-radius: var(--r-sm); background: var(--bg-alt); font-size: 14px; }
.breakdown dl { margin: 0; }
.breakdown dl div { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.breakdown dt { color: var(--ink-2); }
.breakdown dd { margin: 0; font-variant-numeric: tabular-nums; }
.breakdown .bd-total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; font-weight: 600; }
.bd-note { color: var(--muted); font-size: 12.5px; padding-top: 8px; line-height: 1.45; }
.book-note { margin-top: 10px; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- Đơn nháp ---------- */
.drafts { padding: 32px 0 0; }
.drafts-title { font-size: 17px; font-weight: 600; letter-spacing: 0; margin-bottom: 12px; }
.drafts-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.draft { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); }
.draft-route { font-weight: 500; font-size: 15px; display: grid; }
.draft-route span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.draft-route span + span::before { content: "→ "; color: var(--muted); }
.draft-meta { font-size: 13px; color: var(--muted); }
.draft-actions { display: flex; gap: 8px; margin-top: 4px; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { font-size: clamp(26px, 2.6vw, 32px); }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head p, .section-text { margin-top: 12px; color: var(--ink-2); font-size: 16.5px; max-width: 36em; }

/* ---------- Bảng giá tương tác ---------- */
.calc { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 32px; align-items: stretch; }
.calc-controls { padding: 28px; border: 1px solid var(--line); border-radius: var(--r); }
.calc-km { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.calc-km label { font-weight: 600; padding-bottom: 8px; }
.calc-km-value { display: inline-flex; align-items: baseline; gap: 6px; }
.calc-km-value input {
  width: 130px; padding: 0; border: 0; border-bottom: 2px solid var(--line-2); background: transparent;
  font-size: 44px; font-weight: 700; letter-spacing: -0.03em; text-align: right; font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.calc-km-value input::-webkit-outer-spin-button, .calc-km-value input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc-km-value input:focus { outline: none; border-color: var(--brand); }
.calc-km-value span { font-size: 18px; font-weight: 600; color: var(--muted); }
.range {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 6px; margin: 22px 0 10px;
  border-radius: 999px; background: linear-gradient(to right, var(--brand) var(--p, 12%), var(--line) var(--p, 12%));
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand); box-shadow: 0 2px 6px rgba(16, 24, 40, .2); cursor: grab;
}
.range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); box-shadow: 0 2px 6px rgba(16, 24, 40, .2); cursor: grab; }
.range:focus-visible { outline-offset: 6px; }
.calc-scale { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.calc-label { margin-top: 24px; font-weight: 600; font-size: 14px; }
.calc-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.preset {
  display: grid; gap: 1px; padding: 10px 12px; text-align: left;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.preset:hover { border-color: #98A2B3; }
.preset strong { font-size: 14px; font-weight: 600; }
.preset span { font-size: 13px; color: var(--muted); }
.preset[aria-pressed="true"] { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.calc-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.seg { display: inline-flex; padding: 3px; border-radius: var(--r-sm); background: var(--bg-alt); border: 1px solid var(--line); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 6px; font-size: 14px; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg .ic { width: 16px; height: 16px; stroke-width: 1.9; }
.seg input:checked + span { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, .1); }
.seg input:focus-visible + span { outline: 2px solid var(--brand); }
.stepper { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.stepper > span { color: var(--ink-2); margin-right: 4px; }
.stepper .icon-btn { width: 34px; height: 34px; border: 1px solid var(--line-2); font-size: 18px; font-weight: 600; line-height: 1; }
.stepper output { min-width: 20px; text-align: center; font-weight: 700; }

.receipt { display: flex; flex-direction: column; justify-content: center; padding: 32px 28px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.receipt-label { font-size: 14px; font-weight: 500; color: var(--muted); }
.receipt-total { margin-top: 4px; font-size: 52px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.receipt-avg { margin-top: 4px; font-size: 14px; color: var(--muted); }
.receipt .btn { margin-top: 24px; }
.calc-note { margin-top: 16px; font-size: 14px; color: var(--muted); }

/* ---------- Xe ---------- */
.van-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.van-media { margin: 0; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #DCEBF8; }
.van-media img { width: 100%; height: auto; aspect-ratio: 2 / 1; }
.spec-list { margin: 28px 0 16px; border-top: 1px solid var(--line); }
.spec-list div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.spec-list dt { color: var(--ink-2); }
.spec-list dd { margin: 0; font-weight: 600; text-align: right; }

/* ---------- Khu vực ---------- */
.area-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 64px; align-items: center; }
.area-grid .muted { margin-top: 12px; }
.area-map {
  position: relative; isolation: isolate; height: 460px; overflow: hidden;
  border-radius: 20px; border: 1px solid var(--line); background: var(--bg-alt); box-shadow: var(--shadow-card);
}
.area-map .leaflet-container { font-family: var(--font); }
.area-map .map-label.leaflet-tooltip { font-weight: 600; padding: 3px 9px; border-radius: 8px; box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; font-weight: 600; font-size: 16.5px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; flex: none; width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center no-repeat;
  transition: transform .2s;
}
.faq-list details[open] summary::after { transform: rotate(180deg); }
.faq-list details p { padding: 0 32px 18px 0; color: var(--ink-2); }

/* ---------- Footer ---------- */
.site-footer { padding: 56px 0 28px; font-size: 15px; color: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; }
.footer-brand img { width: 134px; height: auto; }
.footer-brand p { margin-top: 14px; max-width: 24em; color: var(--muted); }
.site-footer h3 { font-size: 14px; font-weight: 600; letter-spacing: 0; margin-bottom: 12px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: var(--muted); }
.footer-links a { color: var(--ink-2); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }

.mobile-bar { display: none; }

/* ---------- Modal + toast ---------- */
.modal { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16, 24, 40, .5); }
.modal-panel {
  position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow: auto;
  background: #fff; border-radius: var(--r); padding: 24px; box-shadow: var(--shadow-pop); display: grid; gap: 14px;
}
.modal-panel h2 { font-size: 20px; padding-right: 36px; }
.modal-close { position: absolute; top: 14px; right: 14px; }
.modal-actions { display: grid; gap: 8px; margin-top: 4px; }
.field-label { display: block; font-weight: 500; font-size: 14px; margin-bottom: 6px; }
.summary-route { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 15px; }
.summary-route li { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 10px; }
.summary-route li::before { content: ""; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--ink); }
.summary-route li:first-child::before { background: #fff; border: 2px solid var(--brand); width: 6px; height: 6px; }
.summary-addr { display: block; }
.summary-when { font-size: 14px; }
.summary-price { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.summary-price strong { font-size: 22px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 1300; transform: translateX(-50%);
  max-width: min(92vw, 460px); padding: 12px 16px; border-radius: var(--r-sm);
  background: var(--ink); color: #fff; font-size: 14.5px; box-shadow: var(--shadow-pop);
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 420px minmax(0, 1fr); gap: 20px; }
  .calc { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
}

@media (max-width: 960px) {
  :root { --header-h: 60px; }
  .menu-btn { display: inline-grid; }
  .header-phone { display: none; }
  .main-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px;
    background: #fff; border-bottom: 1px solid var(--line); display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a, .nav-btn { padding: 12px; font-size: 16px; text-align: left; }
  /* iPhone tự phóng to khi chạm vào ô nhập có chữ dưới 16px */
  .input, .select { font-size: 16px; }

  /* Mobile: form đặt xe lên đầu màn hình. Tiêu đề một dòng, bỏ đoạn dẫn, không dùng bản đồ chọn điểm.
     Thứ tự giống desktop: địa chỉ → thời gian lấy hàng → tạm tính → nút. Bản đồ khu vực phục vụ vẫn hiện.
     Quy tắc của form gắn với .book-card vì .plans, .btn-block cũng có ở trang chi tiết đơn. */
  .hero { padding: 16px 0 28px; background: #fff; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero-map { display: none; }
  .area-map { height: 360px; border-radius: var(--r); }
  .hero h1 { font-size: 22px; font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; }
  .lead { display: none; }
  .hero-card { margin-top: 12px; }
  .book-head { margin: 0 0 12px; }
  .book-title { display: none; }
  .quick { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin-right: -16px; padding-right: 16px; }
  .quick::-webkit-scrollbar { display: none; }
  .quick .quick-label, .quick .chip-btn { flex: 0 0 auto; }
  .book-card .plan-pick-wrap { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
  .book-card .quote:not(.has-route) { display: none; }
  .book-card .quote:not(.has-route) + .btn { margin-top: 20px; }
  .note-desktop { display: none; }
  .note-mobile { display: inline; }

  .section { padding: 56px 0; }
  .calc, .van-grid, .area-grid, .faq-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .mobile-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1050;
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid var(--line);
    transform: translateY(110%); transition: transform .2s ease;
  }
  .mobile-bar.is-visible { transform: translateY(0); }
  .mobile-bar > div { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
  .mobile-bar-label { font-size: 12.5px; color: var(--muted); }
  .mobile-bar strong { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .mobile-bar .btn { min-height: 46px; padding: 0 22px; }
  body.has-mobile-bar .site-footer { padding-bottom: 96px; }
  .toast { bottom: 92px; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .brand img { width: 132px; }
  .header-actions .btn { display: none; }
  .book-card { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .map-hint { font-size: 13px; }
  .calc-controls, .receipt { padding: 20px 16px; }
  /* Bốn gói có icon không vừa một hàng trên điện thoại: xếp 2 × 2 */
  .seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .seg span { display: flex; justify-content: center; }
  .calc-km-value input { width: 104px; font-size: 36px; }
  .receipt-total { font-size: 40px; }
  .calc-presets { grid-template-columns: minmax(0, 1fr); }
  .area-map { height: 320px; }
  .area-map .map-label.leaflet-tooltip { font-size: 11px; padding: 2px 7px; }
  .faq-list details p { padding-right: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .modal { align-items: end; padding: 0; }
  .modal-panel { max-width: none; border-radius: var(--r) var(--r) 0 0; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .stops::after { display: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Thành phần dùng chung cho các trang luồng đặt xe ---------- */
body.modal-open { overflow: hidden; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #912018; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.modal-sm { max-width: 400px; }
.modal-text { color: var(--ink-2); font-size: 15px; }
.modal-text p + p { margin-top: 8px; }
.modal-actions-row { grid-template-columns: 1fr 1fr; }
.field-hint { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.demo-note { padding: 8px 12px; border-radius: var(--r-sm); background: #FEF7E6; color: #7A4B00; font-size: 13.5px; }
.toast { display: flex; align-items: center; gap: 14px; }
.toast[hidden] { display: none; }
.toast-action { flex: none; border: 0; background: none; padding: 0; color: #9DBBEA; font-weight: 600; font-size: 14.5px; }
.toast-action:hover { text-decoration: underline; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; line-height: 1.5; white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-info { background: var(--brand-tint); color: var(--brand); }
.badge-ok { background: #ECFDF3; color: #067647; }
.badge-warn { background: #FEF7E6; color: #9A5B00; }
.badge-muted { background: var(--bg-alt); color: var(--muted); border: 1px solid var(--line); }
.badge-danger { background: #FEF3F2; color: var(--danger); }

.current-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.draft.current .draft-route { gap: 0; }
