/* =========================================================================
   Đặt Xe Rẻ Sài Gòn — design system
   ========================================================================= */
:root {
    --brand: #0b6cff;
    --brand-600: #0a5ad6;
    --brand-700: #0847a8;
    --navy: #0a1a33;
    --navy-2: #13294d;
    --ink: #0f2038;
    --body: #33415a;
    --muted: #6b7a90;
    --accent: #ff7a1a;
    --accent-600: #ea6a0c;
    --bg: #f4f7fc;
    --surface: #ffffff;
    --line: #e5ebf3;
    --zalo: #0068ff;
    --success: #16a34a;
    --danger: #dc2626;

    --r-sm: 10px;
    --r: 16px;
    --r-lg: 24px;
    --pill: 999px;

    --sh-1: 0 1px 2px rgba(15, 32, 56, .06), 0 3px 10px rgba(15, 32, 56, .05);
    --sh-2: 0 8px 28px rgba(15, 32, 56, .09);
    --sh-3: 0 20px 50px rgba(10, 26, 51, .16);

    --container: 1160px;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--body);
    background: var(--bg);
    line-height: 1.6;
    font-size: 16px;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 800; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 200;
    background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border-radius: var(--pill); border: 2px solid transparent;
    font-weight: 700; font-size: .98rem; cursor: pointer; text-decoration: none;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(255, 122, 26, .32); }
.btn-accent:hover { background: var(--accent-600); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(255, 122, 26, .4); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); transform: translateY(-2px); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn-outline:hover { background: #fff; color: var(--navy); border-color: #fff; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--brand); }
.text-link:hover { color: var(--brand-700); }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
    display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; flex: none;
    background: linear-gradient(140deg, #2b8bff, var(--brand-700)); color: #fff;
    box-shadow: 0 6px 16px rgba(11, 108, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.brand-mark svg { width: 25px; height: 25px; }
.brand-lock { display: grid; line-height: 1.05; }
.brand-text { font-size: 1.16rem; font-weight: 800; letter-spacing: -.01em; }
.brand-text b { color: var(--brand); }
.brand-tag { font-size: .64rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.header-row .brand { margin-right: auto; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
    color: var(--ink); font-weight: 600; padding: 8px 12px; border-radius: var(--r-sm);
}
.main-nav a:hover { background: #eef3fb; color: var(--brand); text-decoration: none; }

.btn-hotline {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--brand); color: #fff; font-weight: 700;
    padding: 9px 16px; border-radius: var(--pill); box-shadow: 0 6px 16px rgba(11, 108, 255, .28);
}
.btn-hotline:hover { background: var(--brand-600); text-decoration: none; }

.nav-burger { display: none; flex-direction: column; gap: 5px; width: 44px; height: 40px; align-items: center; justify-content: center; cursor: pointer; border-radius: var(--r-sm); }
.nav-burger span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }

/* ---------- Hero ---------- */
.hero {
    background:
        radial-gradient(900px 400px at 85% -10%, rgba(11, 108, 255, .35), transparent 60%),
        linear-gradient(160deg, var(--navy), var(--navy-2));
    color: #eaf1ff;
    padding: clamp(40px, 5vw, 72px) 0;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; }
.eyebrow {
    display: inline-block; background: rgba(255, 255, 255, .12); color: #dbe7ff;
    border: 1px solid rgba(255, 255, 255, .18);
    padding: 6px 14px; border-radius: var(--pill); font-size: .88rem; font-weight: 600; margin-bottom: 16px;
}
.hero h1 { color: #fff; font-size: clamp(2rem, 1.3rem + 3vw, 3.15rem); letter-spacing: -.02em; margin-bottom: 14px; }
.hero .hl { color: #ffb14d; }
.hero .lead { color: #c6d6f2; font-size: 1.1rem; max-width: 34em; margin-bottom: 26px; }
.hero .lead strong { color: #fff; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.hero-badges { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.hero-badges li { color: #d6e2f7; font-weight: 600; font-size: .95rem; }

.hero-media { position: relative; }
.hero-media img {
    width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
    border-radius: var(--r-lg); box-shadow: var(--sh-3);
    border: 6px solid rgba(255, 255, 255, .08);
}
.hero-tag {
    position: absolute; left: -12px; bottom: 22px;
    background: #fff; color: var(--ink); border-radius: var(--r);
    padding: 12px 18px; box-shadow: var(--sh-2); display: grid;
}
.hero-tag strong { color: var(--brand); font-size: 1.05rem; }
.hero-tag span { color: var(--muted); font-size: .85rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(44px, 5vw, 76px) 0; }
.section-alt { background: linear-gradient(180deg, #eef3fb, var(--bg)); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head h2 { margin-bottom: 10px; }
.section-head .muted { font-size: 1.05rem; margin: 0; }

/* ---------- Features ---------- */
.features { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 40px 0; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feature { text-align: center; padding: 8px; }
.feature-ico {
    display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 14px;
    border-radius: 16px; background: #e9f1ff; color: var(--brand);
}
.feature-ico svg { width: 28px; height: 28px; }
.feature h3 { margin-bottom: 6px; font-size: 1.08rem; }
.feature p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- Vehicles ---------- */
.vehicles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.vehicle-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
    overflow: hidden; box-shadow: var(--sh-1); transition: transform .18s ease, box-shadow .2s ease;
}
.vehicle-card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); }
.vehicle-thumb { position: relative; aspect-ratio: 16 / 11; overflow: hidden; background: #eef2f8; }
.vehicle-thumb img { width: 100%; height: 100%; object-fit: cover; }
.seat-badge {
    position: absolute; top: 12px; right: 12px; background: var(--accent); color: #fff;
    font-weight: 700; font-size: .82rem; padding: 5px 12px; border-radius: var(--pill);
    box-shadow: 0 4px 12px rgba(255, 122, 26, .4);
}
.vehicle-body { padding: 18px 20px 22px; }
.vehicle-body h3 { margin-bottom: 6px; }
.vehicle-body p { color: var(--muted); font-size: .95rem; margin-bottom: 12px; }

/* ---------- Prices ---------- */
.price-tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--sh-1); min-width: 0; }
.table-card--wide { grid-column: 1 / -1; }
.table-card h4 { display: flex; flex-direction: column; gap: 2px; font-size: 1.05rem; margin-bottom: 14px; }
.table-card h4 small { color: var(--muted); font-weight: 600; font-size: .82rem; }
.table-scroll { overflow-x: auto; }
.table-card table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table-card th { text-align: left; background: #eef3fb; color: var(--ink); font-weight: 700; padding: 10px 12px; white-space: nowrap; }
.table-card th:first-child { border-top-left-radius: 8px; }
.table-card th:last-child { border-top-right-radius: 8px; }
.table-card td { padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-card tbody tr:nth-child(even) { background: #fafcff; }
.table-card td:first-child { font-weight: 700; color: var(--ink); }
.note { text-align: center; margin-top: 22px; }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 30px 24px 24px; box-shadow: var(--sh-1); }
.step-num {
    position: absolute; top: -20px; left: 24px; width: 46px; height: 46px; display: grid; place-items: center;
    border-radius: 14px; background: linear-gradient(135deg, var(--brand), var(--brand-700)); color: #fff;
    font-weight: 800; font-size: 1.25rem; box-shadow: 0 8px 18px rgba(11, 108, 255, .35);
}
.step h3 { margin: 10px 0 6px; }
.step p { color: var(--muted); margin: 0; }

/* ---------- Commitments ---------- */
.commit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.commit-card {
    display: flex; align-items: flex-start; gap: 16px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
    padding: 22px; box-shadow: var(--sh-1);
}
.commit-ico {
    flex: none; width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center;
    background: #e9f1ff; color: var(--brand);
}
.commit-ico svg { width: 24px; height: 24px; }
.commit-card h3 { font-size: 1.05rem; margin: 0 0 4px; }
.commit-card p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- Reviews ---------- */
.reviews-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.review-card {
    margin: 0; display: flex; flex-direction: column; gap: 14px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
    padding: 26px; box-shadow: var(--sh-1);
}
.stars { color: #ffb400; letter-spacing: 3px; font-size: 1.05rem; line-height: 1; }
.review-card blockquote { margin: 0; color: var(--body); font-size: 1rem; line-height: 1.65; }
.review-card figcaption { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.review-avatar {
    flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--brand), var(--brand-700)); color: #fff;
    font-weight: 800; font-size: 1.1rem;
}
.review-who strong { display: block; color: var(--ink); }
.review-who small { color: var(--muted); font-size: .88rem; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 800px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-1); overflow: hidden; }
.faq-item summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 18px 22px; font-weight: 700; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--brand); }
.faq-ico { flex: none; width: 20px; height: 20px; color: var(--brand); transition: transform .2s ease; }
.faq-item[open] .faq-ico { transform: rotate(180deg); }
.faq-answer { padding: 0 22px 18px; color: var(--body); }
.faq-answer p { margin: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.contact-card {
    display: grid; justify-items: center; text-align: center; gap: 6px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 26px 20px;
    box-shadow: var(--sh-1); color: var(--ink);
}
a.contact-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--sh-2); transition: .18s; }
.contact-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: #e9f1ff; color: var(--brand); }
.contact-ico svg { width: 26px; height: 26px; }
.contact-label { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.contact-card strong { font-size: 1.02rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #b9c7de; padding: 54px 0 0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.4fr; gap: 40px; }
.footer-brand .brand { color: #fff; margin-bottom: 12px; }
.footer-brand .brand-text b { color: #ffb14d; }
.footer-brand .brand-tag { color: #8ba0bf; }
.footer-brand p { color: #9fb0cc; max-width: 34em; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-links { display: grid; gap: 8px; align-content: start; }
.footer-links a, .footer-contact a { color: #b9c7de; }
.footer-links a:hover, .footer-contact a:hover { color: #fff; }
.footer-contact p { margin: 0 0 8px; }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
    margin-top: 44px; padding-top: 20px; padding-bottom: 24px; border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: .9rem; color: #8ba0bf;
}
.footer-bottom a { color: #b9c7de; }

/* ---------- Floating contact ---------- */
#floating-contact { position: fixed; right: 22px; bottom: 22px; z-index: 300; display: flex; flex-direction: column; gap: 14px; }
.fab {
    width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer; padding: 0;
    display: grid; place-items: center; color: #fff; box-shadow: 0 8px 22px rgba(0, 0, 0, .28);
    transition: transform .18s ease; animation: fabPulse 2.6s infinite ease-in-out;
}
.fab:hover { transform: scale(1.1); text-decoration: none; }
.fab-phone { background: var(--success); }
.fab-zalo { background: var(--zalo); }
.fab-zalo img { width: 32px; height: 32px; }
@keyframes fabPulse {
    0%, 100% { box-shadow: 0 8px 22px rgba(0, 0, 0, .28); }
    50% { box-shadow: 0 0 0 10px rgba(22, 163, 74, .0), 0 8px 26px rgba(0, 0, 0, .34); transform: scale(1.05); }
}

#floating-zalo-modal {
    display: none; position: fixed; inset: 0; z-index: 400; background: rgba(6, 14, 28, .7);
    align-items: center; justify-content: center; padding: 20px;
}
#floating-zalo-modal.active { display: flex; }
#floating-zalo-modal img {
    width: 280px; max-width: 82vw; height: auto; background: #fff; padding: 14px; border-radius: var(--r);
    box-shadow: var(--sh-3); animation: popIn .25s ease;
}
@keyframes popIn { from { transform: scale(.86); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ========================= Responsive ========================= */
@media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; gap: 32px; }
    .hero-media { order: -1; max-width: 460px; margin-inline: auto; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 26px 18px; }
    .vehicles-grid, .price-tables, .steps, .contact-grid, .commit-grid, .reviews-grid { grid-template-columns: repeat(2, 1fr); }
    .price-tables { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
    .header-row { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 12px; gap: 12px; }
    .nav-burger { display: flex; order: 3; }
    .btn-hotline { order: 2; }
    .main-nav {
        order: 4; flex-basis: 100%; flex-direction: column; align-items: stretch;
        display: none; gap: 2px; padding-top: 6px; border-top: 1px solid var(--line);
    }
    .nav-toggle:checked ~ .main-nav { display: flex; }
    .main-nav a { padding: 12px 10px; }
}

@media (max-width: 620px) {
    .vehicles-grid, .steps, .contact-grid, .commit-grid, .reviews-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .cta-row .btn { flex: 1 1 auto; }
    .hero-tag { left: 0; }
    .btn-hotline span { display: none; }
    .btn-hotline { padding: 9px 12px; }
    #floating-contact { right: 14px; bottom: 14px; gap: 10px; }
    .fab { width: 52px; height: 52px; }
}

/* Chừa khoảng trống dưới footer để nút gọi/Zalo nổi không che nội dung (khi container chạm mép màn hình) */
@media (max-width: 1200px) {
    .footer-bottom { padding-bottom: 92px; }
}

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