/* ==========================================================================
   Trang chi tiết xe — template dùng chung cho 10 mẫu
   Cấu trúc: banner đầu (module) → khối 2 cột (gallery + info) → bài viết → banner cuối (module)
   ========================================================================== */

.car-body { background: #fff; }

/* ---------- Banner đầu ---------- */
.car-hero { position: relative; min-height: 560px; height: min(78vh, 700px); display: flex; align-items: center; overflow: hidden; isolation: isolate; color: #fff; }
.car-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; z-index: -2; }
.car-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(8, 12, 18, .88) 0%, rgba(8, 12, 18, .64) 38%, rgba(8, 12, 18, .18) 68%, rgba(8, 12, 18, .05) 100%); }
.car-hero-inner { width: var(--page); margin: 0 auto; padding-top: 76px; }
.car-hero .eyebrow { letter-spacing: .26em; font-size: 10px; color: rgba(255, 255, 255, .74); }
.car-hero h1 { margin: 18px 0 0; max-width: 720px; font-size: clamp(38px, 4.6vw, 66px); line-height: 1.02; letter-spacing: -.04em; font-weight: 300; text-transform: uppercase; }
.car-hero p:not(.eyebrow) { margin: 22px 0 0; max-width: 480px; font-size: 15px; line-height: 1.7; color: rgba(255, 255, 255, .82); }
.car-hero .car-btn { margin-top: 28px; }

.car-btn { display: inline-flex; align-items: center; gap: 16px; height: 46px; padding: 0 24px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; transition: transform .2s, background .2s, color .2s; }
.car-btn:hover { transform: translateY(-2px); }
.car-btn-light { background: #fff; color: #171a1e; }
.car-btn-dark { background: #171a1e; color: #fff; }
.car-btn-dark:hover { background: #000; }

/* ---------- Khối 2 cột ---------- */
.car-product { width: var(--page); margin: 0 auto; padding: 60px 0 64px; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 48px; align-items: start; }

.car-gallery { position: relative; min-width: 0; }
.car-gallery-main { margin: 0; overflow: hidden; border-radius: 12px; background: #f4f4f2; aspect-ratio: 16 / 10; }
.car-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .25s ease; }
.car-gallery-main.is-fading img { opacity: .3; }
.car-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.car-thumb { padding: 0; border: 1px solid transparent; border-radius: 8px; overflow: hidden; background: #f4f4f2; aspect-ratio: 16 / 10; cursor: pointer; opacity: .68; transition: opacity .2s, border-color .2s; }
.car-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.car-thumb:hover { opacity: 1; }
.car-thumb.is-active { opacity: 1; border-color: #171a1e; }
.car-nav { position: absolute; top: 32%; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #e2e3e2; border-radius: 50%; background: rgba(255, 255, 255, .95); color: #171a1e; font-size: 15px; cursor: pointer; transition: background .2s, border-color .2s; }
.car-nav:hover { background: #fff; border-color: #171a1e; }
.car-prev { left: -18px; }
.car-next { right: -18px; }

.car-info { display: flex; flex-direction: column; align-items: flex-start; padding-top: 4px; }
.car-info .eyebrow { color: #8a8f94; }
.car-info h2 { margin: 10px 0 0; font-size: clamp(34px, 3.6vw, 52px); line-height: 1; font-weight: 400; letter-spacing: -.035em; text-transform: uppercase; }
.car-sub { margin: 12px 0 0; font-size: 11px; line-height: 1.6; letter-spacing: .12em; text-transform: uppercase; color: #6d7277; }
.car-price { margin: 30px 0 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8a8f94; }
.car-price strong { display: block; margin-top: 8px; font-size: 24px; letter-spacing: -.01em; text-transform: none; color: #171a1e; font-weight: 500; }
.car-hotline { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; font-size: 13px; color: #3c4145; }
.car-hotline svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.car-info .car-btn { margin-top: 24px; }

/* ---------- Bài viết ---------- */
.car-article { border-top: 1px solid #ececec; background: #fff; padding: 64px 0 70px; }
.car-article-inner { width: var(--page); max-width: 860px; margin: 0 auto; }
.car-article .eyebrow { color: #8a8f94; }
.car-article h2 { margin: 12px 0 0; font-size: clamp(26px, 3vw, 40px); line-height: 1.08; font-weight: 300; letter-spacing: -.03em; text-transform: uppercase; }
.car-article-body { margin-top: 26px; font-size: 16px; line-height: 1.9; color: #4a4f53; }
.car-article-body p { margin: 0 0 18px; }
.car-article-body p:last-child { margin-bottom: 0; }
.car-article-body h3 { margin: 32px 0 12px; font-size: 18px; font-weight: 600; letter-spacing: .02em; color: #23272b; text-transform: uppercase; }
.car-article-body ul { margin: 0 0 18px; padding-left: 20px; }
.car-article-body li { margin-bottom: 8px; }
.car-article-body img { width: 100%; height: auto; border-radius: 10px; margin: 8px 0 20px; }

/* ---------- Banner cuối ---------- */
.car-cta { position: relative; min-height: 420px; display: flex; align-items: center; overflow: hidden; isolation: isolate; color: #fff; }
.car-cta > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 58% 12%; z-index: -2; }
.car-cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(8, 12, 18, .88) 0%, rgba(8, 12, 18, .6) 45%, rgba(8, 12, 18, .1) 100%); }
.car-cta-inner { width: var(--page); margin: 0 auto; padding: 64px 0; }
.car-cta .eyebrow { color: rgba(255, 255, 255, .66); }
.car-cta h2 { margin: 14px 0 0; max-width: 620px; font-size: clamp(28px, 3.4vw, 48px); line-height: 1.05; font-weight: 300; letter-spacing: -.035em; text-transform: uppercase; }
.car-cta p { margin: 16px 0 0; max-width: 380px; font-size: 14px; line-height: 1.7; color: rgba(255, 255, 255, .8); }
.car-cta .car-btn { margin-top: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .car-hero { min-height: 520px; height: auto; padding: 130px 0 60px; }
  .car-hero::before { background: linear-gradient(180deg, rgba(8, 12, 18, .8) 0%, rgba(8, 12, 18, .5) 45%, rgba(8, 12, 18, .9) 100%); }
  .car-hero > img { object-position: center 45%; }
  .car-hero-inner { padding-top: 0; }
  .car-product { grid-template-columns: 1fr; gap: 30px; padding: 44px 0 52px; }
  .car-nav { top: 34%; }
  .car-prev { left: 8px; }
  .car-next { right: 8px; }
  .car-article { padding: 48px 0 54px; }
  .car-cta { min-height: 360px; }
}

@media (max-width: 680px) {
  .car-hero { min-height: 520px; padding: 120px 0 52px; }
  .car-hero h1 { font-size: 34px; }
  .car-hero p:not(.eyebrow) { font-size: 14px; }
  .car-gallery-main { aspect-ratio: 4 / 3; }
  .car-thumbs { grid-template-columns: repeat(4, 1fr); gap: 7px; }
  .car-nav { display: none; }
  .car-info h2 { font-size: 38px; }
  .car-article-body { font-size: 15px; }
  .car-cta { min-height: 380px; }
  .car-cta-inner { padding: 48px 0; }
  .car-cta h2 { font-size: 30px; }
}

/* ---------- Popup đăng ký lái thử ---------- */
button.car-btn { border: 0; cursor: pointer; font-family: inherit; }
button.outline-button { background: transparent; cursor: pointer; font: inherit; }

.car-modal { position: fixed; inset: 0; z-index: 130; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(8, 12, 18, .66); backdrop-filter: blur(4px); }
.car-modal[hidden] { display: none; }
.car-modal-panel { position: relative; width: min(560px, 100%); max-height: 90vh; overflow: auto; background: #fff; border-radius: 16px; padding: 30px 30px 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.car-modal .eyebrow { color: #8a8f94; }
.car-modal h2 { margin: 10px 0 0; font-size: 30px; font-weight: 400; letter-spacing: -.02em; text-transform: uppercase; }
.car-modal-lead { margin: 10px 0 20px; font-size: 13px; line-height: 1.6; color: #6d7277; }
.car-modal-close { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f3f3f1; color: #3c4145; font-size: 18px; cursor: pointer; }
.car-modal-close:hover { background: #e9e9e6; }
.car-modal-form { display: grid; gap: 12px; }
.car-modal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.car-modal-form label span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.car-modal-form input, .car-modal-form select { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #cdd0d2; border-radius: 8px; font: inherit; color: #23272b; outline: none; }
.car-modal-form input:focus, .car-modal-form select:focus { border-color: #555d64; box-shadow: 0 0 0 3px rgba(31, 40, 48, .07); }
.car-modal-form .car-btn { width: 100%; justify-content: center; margin-top: 4px; }
.car-modal-status { min-height: 20px; margin: 2px 0 0; font-size: 12px; color: #44554c; }
.car-modal-form small { font-size: 11px; line-height: 1.6; color: #9a9fa3; }
body.modal-open { overflow: hidden; }

@media (max-width: 680px) {
  .car-modal-panel { padding: 24px 18px 20px; }
  .car-modal-row { grid-template-columns: 1fr; }
  .car-modal h2 { font-size: 26px; }
}

/* Ảnh slide luôn 1 dòng */
.car-thumbs { display: flex; flex-wrap: nowrap; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.car-thumbs::-webkit-scrollbar { display: none; }
.car-thumbs .car-thumb { flex: 0 0 calc((100% - 30px) / 4); }

/* Mô tả ngắn: văn bản thường, giữ định dạng */
.car-sub { margin: 12px 0 0; font-size: 13.5px; line-height: 1.75; letter-spacing: 0; text-transform: none; color: #5a6168; max-width: 470px; }
.car-sub p { margin: 0 0 8px; }
.car-sub p:last-child { margin-bottom: 0; }
.car-sub strong, .car-sub b { color: #23272b; font-weight: 600; }
.car-sub ul, .car-sub ol { margin: 0 0 8px; padding-left: 18px; }
.car-sub a { color: inherit; text-decoration: underline; }
