/* ============================================================
   CUONGXEDIEN — giao diện khách hàng (tone hiện đại)
   ============================================================ */

:root {
  --ink: #0a1220;          /* nền đậm */
  --ink-2: #101b31;
  --primary: #2e6bff;      /* xanh điện */
  --primary-dark: #1f54d6;
  --cyan: #00c2ff;         /* điểm nhấn */
  --grad: linear-gradient(120deg, #2e6bff, #00c2ff);
  --bg: #f6f8fc;
  --card: #ffffff;
  --text: #101828;
  --muted: #64748b;
  --line: #e5eaf3;
  --danger: #ef4444;
  --success: #16a34a;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(16, 32, 70, 0.09);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; text-wrap: balance; }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 18, 32, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }

.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(46, 107, 255, .45);
}
.logo-text {
  color: #fff; font-weight: 800; letter-spacing: .8px; font-size: 18px;
  display: flex; flex-direction: column; line-height: 1.15;
}
.logo-text em { font-style: normal; color: var(--cyan); display: inline; }
.logo-text small {
  font-size: 10.5px; font-weight: 600; letter-spacing: 1.6px;
  color: #7d8ba3; text-transform: uppercase;
}

.main-nav { display: flex; gap: 22px; margin-left: auto; }
.main-nav a {
  color: #aebad0; text-decoration: none; font-size: 15px; font-weight: 500;
  transition: color .15s;
}
.main-nav a:hover, .main-nav a:focus-visible { color: #fff; }

.nav-toggle {
  display: none; background: none; border: none; color: #fff;
  font-size: 24px; cursor: pointer;
}

/* ============ NÚT ============ */
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 12px;
  text-decoration: none; font-weight: 700; font-size: 15px;
  border: none; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:focus-visible { outline: 3px solid rgba(46,107,255,.4); outline-offset: 2px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent {
  background: var(--grad); color: #fff;
  box-shadow: 0 6px 18px rgba(0, 170, 255, .35);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0, 170, 255, .45); }
.btn-outline {
  border: 1.5px solid var(--primary); color: var(--primary); background: transparent;
}
.btn-outline:hover { background: rgba(46,107,255,.08); }
.btn-outline-light {
  border: 1.5px solid rgba(255,255,255,.35); color: #dbe6ff; background: transparent;
}
.btn-outline-light:hover { background: rgba(255,255,255,.08); }
.btn-full { display: block; text-align: center; width: 100%; margin-top: 10px; }
.btn-hotline {
  background: var(--grad); color: #fff !important;
  font-weight: 800; white-space: nowrap; padding: 10px 18px; border-radius: 999px;
  font-size: 14.5px;
}

/* ============ HERO ============ */
.hero {
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(0, 194, 255, .22), transparent 65%),
    radial-gradient(700px 380px at 5% 110%, rgba(46, 107, 255, .25), transparent 60%),
    linear-gradient(165deg, var(--ink) 0%, var(--ink-2) 70%, #0d2246 100%);
  color: #fff;
  padding: 76px 0 60px;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: rgba(0, 194, 255, .1);
  border: 1px solid rgba(0, 194, 255, .4);
  color: #6fd8ff;
  padding: 7px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(30px, 5vw, 50px); letter-spacing: .5px; font-weight: 800; }
.hero h1 span {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { max-width: 660px; margin: 16px auto 28px; color: #b7c3d9; font-size: 17px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.ref-banner {
  max-width: 620px; margin: 30px auto 0;
  background: rgba(255,255,255,.05);
  border: 1px dashed rgba(0,194,255,.45);
  border-radius: 14px; padding: 14px 20px;
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  font-size: 14px; color: #9fb0ca;
}
.ref-banner strong {
  font-size: 18px; letter-spacing: 2px; color: #6fd8ff; font-weight: 800;
}
.ref-banner em { flex-basis: 100%; font-style: normal; font-size: 12.5px; color: #7d8ba3; }
.btn-copy {
  background: rgba(0,194,255,.12); color: #6fd8ff; border: 1px solid rgba(0,194,255,.4);
  border-radius: 8px; padding: 5px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.btn-copy:hover { background: rgba(0,194,255,.22); }

.hero-perks {
  list-style: none; display: flex; gap: 26px; justify-content: center;
  flex-wrap: wrap; margin-top: 34px; padding: 0;
}
.hero-perks li { font-size: 14px; color: #9fb0ca; display: flex; align-items: center; gap: 8px; }
.hero-perks li::before { content: "✓"; color: var(--cyan); font-weight: 800; }

/* ============ SECTION ============ */
.section { padding: 76px 0; }
.section-alt { background: #eef2f9; }
.section-title { font-size: clamp(24px, 3.4vw, 34px); color: var(--ink); text-align: center; font-weight: 800; }
.section-title span { color: var(--primary); }
.section-desc { text-align: center; color: var(--muted); max-width: 640px; margin: 12px auto 36px; }

/* ============ FILTER CHIPS ============ */
.filter-chips { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.chip {
  padding: 9px 22px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--muted); font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--grad); border-color: transparent; color: #fff; }

/* ============ CAR CARDS ============ */
.car-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.car-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  border: 1px solid var(--line);
  transition: transform .18s, box-shadow .18s;
}
.car-card:hover { transform: translateY(-5px); box-shadow: 0 16px 36px rgba(16,32,70,.15); }

.car-visual {
  position: relative; height: 160px; overflow: hidden;
  background: radial-gradient(400px 160px at 50% 115%, rgba(46,107,255,.14), transparent 70%),
              linear-gradient(180deg, #f2f6fd 0%, #e6edf9 100%);
  display: flex; align-items: flex-end; justify-content: center;
}
.car-visual .car-art { width: 88%; height: auto; display: block; margin-bottom: 4px; }
.car-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; background: #fff;
}
.promo-badge {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: var(--danger); color: #fff; font-size: 12px; font-weight: 800;
  padding: 4px 12px; border-radius: 999px;
  box-shadow: 0 3px 10px rgba(239,68,68,.4);
}
.car-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.car-title { font-size: 20px; font-weight: 800; color: var(--ink); }
.car-segment {
  font-size: 12px; font-weight: 800; color: var(--primary);
  text-transform: uppercase; letter-spacing: 1px;
}
.car-spec { font-size: 13.5px; color: var(--muted); min-height: 40px; }
.car-price .from { font-size: 13px; color: var(--muted); }
.car-price .value { font-size: 25px; font-weight: 800; color: var(--ink); }
.car-price .old { font-size: 13.5px; color: #98a2b3; text-decoration: line-through; margin-left: 8px; }
.car-versions { font-size: 13px; color: var(--muted); }
.car-actions { display: flex; gap: 10px; margin-top: 12px; }
.car-actions .btn { flex: 1; text-align: center; padding: 10px 8px; font-size: 14px; }

/* ============ CALCULATOR ============ */
.calc-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 26px; align-items: start; }
.calc-form { display: flex; flex-direction: column; gap: 18px; }
.form-block {
  background: var(--card); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.form-block h3 { font-size: 17px; color: var(--ink); margin-bottom: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field > span { font-size: 13.5px; font-weight: 700; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

select, input[type="number"], input[type="text"], input[type="tel"], textarea {
  width: 100%; padding: 12px 13px; border: 1.5px solid var(--line);
  border-radius: 11px; font-size: 15px; background: #fff; color: var(--text);
  outline: none; transition: border .15s, box-shadow .15s; font-family: inherit;
}
select:focus, input:focus, textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46,107,255,.13);
}
input[type="range"] { width: 100%; accent-color: var(--primary); }

/* Màu sắc */
.color-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch-wrap { display: flex; flex-direction: column; align-items: center; width: 64px; }
.swatch {
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  border: 3px solid transparent; outline: 1px solid var(--line);
  transition: all .12s;
}
.swatch.active { border-color: var(--primary); transform: scale(1.12); }
.swatch-label { font-size: 12.5px; color: var(--muted); margin-top: 4px; text-align: center; }
.swatch-fee { font-size: 11px; color: var(--danger); font-weight: 700; }

/* Checkbox ưu đãi */
.promo-check {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 12px;
  margin-bottom: 10px; cursor: pointer; transition: border .15s;
}
.promo-check:hover { border-color: var(--primary); }
.promo-check input { margin-top: 4px; accent-color: var(--primary); }
.promo-check.locked { background: #f1f6ff; border-color: #c9dcff; }
.promo-check .pc-name { font-weight: 700; font-size: 14.5px; }
.promo-check .pc-detail { font-size: 13px; color: var(--muted); }
.promo-check .pc-value { margin-left: auto; font-weight: 800; color: var(--danger); white-space: nowrap; font-size: 14px; }

/* Radio */
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border: 1.5px solid var(--line); border-radius: 11px;
  cursor: pointer; font-size: 14.5px; font-weight: 600; background: #fff;
  transition: all .15s; color: var(--muted);
}
.radio-pill:hover { border-color: var(--primary); }
.radio-pill input { accent-color: var(--primary); }
.radio-pill.active { border-color: var(--primary); background: #f1f6ff; color: var(--primary); }

/* Bảng tổng hợp */
.calc-summary { position: sticky; top: 88px; }
.summary-card {
  background: linear-gradient(165deg, var(--ink) 0%, #10203e 100%);
  color: #fff; border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
  border: 1px solid rgba(0,194,255,.15);
}
.summary-card h3 { font-size: 18px; margin-bottom: 16px; color: #6fd8ff; }
.summary-line {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; font-size: 14.5px; border-bottom: 1px dashed rgba(255,255,255,.13);
}
.summary-line .lbl { color: #a4b2c9; }
.summary-line .val { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.summary-line .val.discount { color: #5eead4; }
.summary-line.subtotal .lbl, .summary-line.subtotal .val { color: #fff; font-weight: 800; }
.summary-total {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 16px; padding: 15px 17px; border-radius: 12px;
  background: rgba(0,194,255,.09); border: 1px solid rgba(0,194,255,.4);
}
.summary-total span { font-size: 12.5px; font-weight: 800; color: #6fd8ff; letter-spacing: .3px; }
.summary-total strong { font-size: 22px; color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; }
.summary-note { font-size: 12.5px; color: #8494ad; margin-top: 12px; }
.dark-note { color: var(--muted); }

/* ============ KHUYẾN MÃI ============ */
.promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.promo-card {
  background: var(--card); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
  border-top: 4px solid var(--primary);
  display: flex; flex-direction: column; gap: 8px;
}
.promo-card.hot { border-top-color: var(--danger); }
.promo-card.info { border-top-color: var(--cyan); }
.promo-tag {
  align-self: flex-start; font-size: 12px; font-weight: 800;
  padding: 3px 11px; border-radius: 999px;
  background: #e9f0ff; color: var(--primary);
}
.promo-card.hot .promo-tag { background: #feecec; color: var(--danger); }
.promo-card.info .promo-tag { background: #e5f8ff; color: #0083ad; }
.promo-card h3 { font-size: 16.5px; color: var(--ink); }
.promo-card p { font-size: 14px; color: var(--muted); }
.promo-apply { font-size: 13px; color: var(--primary); font-weight: 700; }

/* ============ LIÊN HỆ ============ */
.contact-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 26px; align-items: start; }
.contact-form h3 { margin-bottom: 16px; }
.form-status { font-size: 14px; font-weight: 600; margin-top: 10px; min-height: 20px; }
.form-status.ok { color: var(--success); }
.form-status.err { color: var(--danger); }

.contact-side { display: flex; flex-direction: column; gap: 16px; }
.contact-card {
  background: var(--card); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
}
.contact-icon { font-size: 28px; }
.contact-card h3 { color: var(--ink); font-size: 15.5px; }
.contact-card p { color: var(--muted); font-size: 13.5px; }
.contact-card .btn { margin-left: auto; padding: 9px 16px; font-size: 13.5px; white-space: nowrap; }

/* ============ MODAL ĐẶT CỌC ============ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8, 14, 26, .62); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  overflow-y: auto;
}
.modal-backdrop[hidden] { display: none !important; }
.modal {
  background: var(--card); border-radius: 18px; padding: 28px;
  width: 100%; max-width: 560px; position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,.3);
  max-height: 92vh; overflow-y: auto;
}
.modal h3 { font-size: 20px; color: var(--ink); margin-bottom: 6px; }
.modal-sub { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: #f1f4f9; border: none; width: 34px; height: 34px; border-radius: 50%;
  font-size: 15px; cursor: pointer; color: var(--muted);
}
.modal-close:hover { background: #e5eaf3; color: var(--ink); }
.ref-inline {
  background: #f1f6ff; border: 1px dashed #b9d2ff; border-radius: 10px;
  padding: 10px 14px; font-size: 13.5px; color: var(--muted); margin: 4px 0 12px;
}
.ref-inline strong { color: var(--primary); letter-spacing: 1.5px; }
.bank-box {
  background: #f1f6ff; border: 1px solid #d4e3ff; border-radius: 12px;
  padding: 18px; margin-bottom: 16px; font-size: 15px;
}
.bank-box .bank-row { display: flex; justify-content: space-between; padding: 5px 0; gap: 10px; }
.bank-box .bank-row span { color: var(--muted); font-size: 13.5px; }
.bank-box .bank-row strong { font-variant-numeric: tabular-nums; }
.bank-box .bank-note { font-size: 13px; color: var(--danger); font-weight: 600; margin-top: 8px; }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--ink); color: #a4b2c9; padding: 38px 0;
  text-align: center; font-size: 14px;
}
.site-footer .disclaimer { max-width: 720px; margin: 12px auto; color: #8494ad; font-size: 13px; }
.site-footer .copyright { color: #5c6c87; font-size: 12.5px; margin-top: 8px; }
.site-footer a { color: #6fd8ff; text-decoration: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .calc-layout, .contact-layout { grid-template-columns: 1fr; }
  .calc-summary { position: static; }
}
@media (max-width: 760px) {
  .main-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--ink); flex-direction: column; gap: 0; padding: 8px 20px 16px;
    box-shadow: 0 12px 20px rgba(0,0,0,.3);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
  .nav-toggle { display: block; }
  .btn-hotline { margin-left: auto; padding: 8px 14px; font-size: 13px; }
  .logo-text { font-size: 16px; }
  .field-row { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
}
