/* ==========================================================================
   main.css — เว็บไซต์ บริษัท แบล็คไลอ้อน รถเช่า จำกัด (รถเช่าหาดใหญ่)
   - ใช้ร่วมกันทั้ง index.html (แบบ A: Classic Clean) และ index-b.html (แบบ B: Bold Lion)
   - โทนสี: ขาว 60% / แดง 30% / ดำ 10%
   - ห้ามใช้ display: grid ตามกฎโปรเจค ใช้ flex แทนทั้งหมด
   ========================================================================== */

/* ---------- ตัวแปรสี / ระยะ / ฟอนต์ (Design tokens) ---------- */
:root {
  --red: #d7191f;          /* แดงหลักของแบรนด์ */
  --red-dark: #a80f14;     /* แดงเข้ม ใช้ตอน hover */
  --red-soft: #fdeced;     /* แดงอ่อน ใช้เป็นพื้นไอคอน */
  --ink: #111111;          /* ดำหลัก */
  --ink-2: #262626;        /* ดำรอง */
  --white: #ffffff;
  --soft: #f6f6f6;         /* เทาอ่อน พื้น section สลับ */
  --line: #e7e7e7;         /* เส้นขอบ */
  --muted: #5a5a5a;        /* ตัวหนังสือรอง (contrast ผ่าน AA) */
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 6px 24px rgba(17, 17, 17, .08);
  --shadow-lg: 0 14px 40px rgba(17, 17, 17, .14);
  --font-head: "Kanit", "Sarabun", system-ui, sans-serif;
  --font-body: "Sarabun", system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-h: 72px;
}

/* ---------- Reset พื้นฐาน ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
  background: var(--white);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.25; margin: 0; font-weight: 600; }
p { margin: 0; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* ข้อความสำหรับ screen reader เท่านั้น */
.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: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; }

/* ---------- Layout หลัก: กว้างสูงสุด 1200px ---------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.section { padding: 80px 0; }
.section--soft { background: var(--soft); }
.text-red { color: var(--red); }
.nowrap { white-space: nowrap; }  /* แก้ไข: กันคำภาษาไทยถูกตัดกลางคำ */

/* หัวข้อ section */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 500; font-size: 15px;
  color: var(--red); letter-spacing: .04em; margin-bottom: 10px;
}
.eyebrow::before { content: ""; width: 28px; height: 3px; background: var(--red); border-radius: 2px; }
.section-head h2 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 14px; }
.section-head p { color: var(--muted); }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px;
  font-family: var(--font-head); font-weight: 500; font-size: 17px; line-height: 1.2;
  border-radius: 999px; border: 2px solid transparent;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--red { background: var(--red); color: var(--white); box-shadow: 0 8px 20px rgba(215, 25, 31, .28); }
.btn--red:hover { background: var(--red-dark); }
.btn--dark { background: var(--ink); color: var(--white); }
.btn--dark:hover { background: #000; }
.btn--white { background: var(--white); color: var(--red); }
.btn--white:hover { background: var(--ink); color: var(--white); }
.btn--ghost { border-color: currentColor; color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn--outline { border-color: var(--red); color: var(--red); background: transparent; }
.btn--outline:hover { background: var(--red); color: var(--white); }
.btn--sm { min-height: 42px; padding: 8px 16px; font-size: 15px; }
.btn--block { width: 100%; }

/* ---------- Topbar (แถบดำด้านบน) ---------- */
.topbar { background: var(--ink); color: #d9d9d9; font-size: 14px; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; }
.topbar__info, .topbar__links { display: flex; align-items: center; gap: 20px; }
.topbar i { color: var(--red); margin-right: 6px; }
.topbar a:hover { color: var(--white); }

/* ---------- Header / เมนู ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s;
}
.header.is-scrolled { box-shadow: var(--shadow); }
.header .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.logo img { height: 52px; width: auto; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  position: relative;
  font-family: var(--font-head); font-weight: 500; font-size: 16px;
  padding: 8px 12px; color: var(--ink);
  border-radius: var(--radius-sm);
  transition: color .2s;
}
.nav a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px;
  background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav a:hover { color: var(--red); }
.nav a:hover::after { transform: scaleX(1); }
.header__cta { display: flex; align-items: center; gap: 10px; }

/* ปุ่มเปิดเมนูมือถือ */
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 46px; height: 46px; border: 0; border-radius: var(--radius-sm);
  background: var(--red); color: var(--white); font-size: 20px;
}

/* ---------- Hero แบบ A: รูปเต็ม + overlay ---------- */
.hero { position: relative; color: var(--white); overflow: hidden; background: var(--ink); }
/* แก้ไข: แบนเนอร์แสดงเต็มภาพตามสัดส่วนจริง ไม่ crop ไม่มี overlay ทับ */
.hero__bg { display: block; width: 100%; height: auto; }  /* แก้ไข: เอา max-height/object-fit ออก เพื่อไม่ให้ภาพถูก crop ส่วนบนบน desktop */
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(17, 17, 17, .94) 0%, rgba(17, 17, 17, .82) 55%, rgba(17, 17, 17, .35) 100%); }  /* แก้ไข: overlay เข้มขึ้น เพราะรูป banner มีตัวหนังสือในรูป */
.hero .container { position: relative; display: flex; align-items: center; min-height: min(78vh, 640px); padding-top: 64px; padding-bottom: 64px; }
.hero__content { max-width: 640px; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--red); color: var(--white);
  font-family: var(--font-head); font-size: 15px; font-weight: 500;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { color: var(--white); font-size: clamp(32px, 5.4vw, 56px); font-weight: 700; margin-bottom: 18px; }
.hero h1 span { color: var(--red); display: block; }
.hero__lead { font-size: clamp(17px, 2vw, 20px); color: #eaeaea; margin-bottom: 28px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.hero__checks { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 16px; color: #f0f0f0; }
.hero__checks i { color: var(--red); margin-right: 6px; }

/* ---------- แถบตัวเลข/ความน่าเชื่อถือใต้ hero ---------- */
.stats { position: relative; z-index: 2; margin-top: 24px; }  /* แก้ไข: ไม่ให้แถบนี้ทับส่วนล่างของแบนเนอร์ */
.stats__box {
  display: flex; flex-wrap: wrap; background: var(--white);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
}
.stat { flex: 1 1 25%; display: flex; align-items: center; gap: 14px; padding: 22px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat i { flex-shrink: 0; width: 50px; height: 50px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--red-soft); color: var(--red); font-size: 20px; }
.stat strong { display: block; font-family: var(--font-head); font-size: 20px; color: var(--ink); line-height: 1.2; }
.stat span { font-size: 15px; color: var(--muted); }

/* ---------- เกี่ยวกับเรา ---------- */
.about { display: flex; align-items: center; gap: 56px; }
.about__media { flex: 0 0 42%; position: relative; }
.about__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.about__tag {
  position: absolute; right: -18px; bottom: 28px;
  background: var(--red); color: var(--white); border-radius: var(--radius);
  padding: 16px 20px; font-family: var(--font-head); line-height: 1.2; box-shadow: var(--shadow-lg);
}
.about__tag strong { display: block; font-size: 22px; }  /* แก้ไข: ป้ายข้อความความน่าเชื่อถือ */
.about__body { flex: 1; }
.about__body h2 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 16px; }
.about__body > p { color: var(--muted); margin-bottom: 24px; }
.services { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.service {
  flex: 1 1 calc(50% - 7px); display: flex; gap: 12px; align-items: flex-start;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white);
}
.service i { color: var(--red); font-size: 22px; margin-top: 3px; width: 26px; text-align: center; }
.service h3 { font-size: 17px; margin-bottom: 2px; }
.service p { font-size: 15px; color: var(--muted); line-height: 1.5; }

/* ---------- จุดเด่น / ทำไมต้องเลือกเรา ---------- */
.features { display: flex; flex-wrap: wrap; gap: 22px; }
.feature {
  flex: 1 1 calc(33.333% - 15px);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.feature__icon {
  width: 58px; height: 58px; border-radius: 16px; margin-bottom: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--red); color: var(--white); font-size: 24px;
}
.feature h3 { font-size: 20px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 16px; }

/* ---------- รายการรถเช่า ---------- */
.cars { display: flex; flex-wrap: wrap; gap: 22px; }
.car {
  flex: 0 1 calc(25% - 16.5px);  /* แก้ไข: 4 คอลัมน์ (รถ 17 รุ่น) */
  display: flex; flex-direction: column;
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); transition: transform .25s, box-shadow .25s;
}
.car:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
/* แก้ไข: เปลี่ยนสัดส่วนกรอบรูปรถจาก 4:3 เป็น 1:1 ให้ตรงกับรูปจริง (480x480) รูปจะใหญ่ขึ้นและไม่ถูกตัดหัว-ท้าย */
.car__media { position: relative; aspect-ratio: 1 / 1; background: var(--soft); overflow: hidden; }
.car__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.car:hover .car__media img { transform: scale(1.05); }
.car__type {
  position: absolute; left: 12px; top: 12px;
  background: var(--ink); color: var(--white); font-size: 13px; font-family: var(--font-head);
  padding: 3px 12px; border-radius: 999px;
}
.car__body { display: flex; flex-direction: column; flex: 1; padding: 20px; }
.car__body h3 { font-size: 21px; margin-bottom: 8px; }
.car__specs { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 15px; color: var(--muted); margin-bottom: 16px; }
.car__specs i { color: var(--red); margin-right: 5px; }
.car__price { display: flex; align-items: baseline; gap: 6px; margin-top: auto; margin-bottom: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.car__price small { font-size: 14px; color: var(--muted); }
.car__price strong { font-family: var(--font-head); font-size: 30px; color: var(--red); line-height: 1; }
.car__actions { display: flex; gap: 10px; }
.car__actions .btn { flex: 1; }
.car.is-hidden { display: none; }

/* ปุ่มกรองประเภทรถ */
.car-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 32px; }
.car-filter button {
  min-height: 42px; padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
  font-family: var(--font-head); font-weight: 500; font-size: 15px; transition: background-color .2s, color .2s, border-color .2s;
}
.car-filter button:hover { border-color: var(--red); color: var(--red); }
.car-filter button.is-active { background: var(--red); border-color: var(--red); color: var(--white); }
.theme-b .car-filter button { border-radius: 4px; }
.theme-b .car-filter button.is-active { background: var(--ink); border-color: var(--ink); }

.cars-note { text-align: center; margin-top: 32px; color: var(--muted); font-size: 15px; }

/* ---------- ขั้นตอนการจอง ---------- */
.steps { display: flex; flex-wrap: wrap; gap: 18px; counter-reset: step; margin-bottom: 48px; }
.step {
  flex: 1 1 calc(20% - 15px); min-width: 180px;
  position: relative; text-align: center; padding: 28px 18px 22px;
  background: var(--white); border-radius: var(--radius); border: 1px solid var(--line);
}
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--red); color: var(--white); font-family: var(--font-head); font-weight: 600;
}
.step i { font-size: 28px; color: var(--ink); margin: 6px 0 12px; }
.step h3 { font-size: 18px; margin-bottom: 4px; }
.step p { font-size: 15px; color: var(--muted); line-height: 1.5; }

.terms { display: flex; flex-wrap: wrap; gap: 22px; }
.terms__box { flex: 1 1 calc(50% - 11px); background: var(--white); border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); }
.terms__box h3 { display: flex; align-items: center; gap: 10px; font-size: 21px; margin-bottom: 16px; }
.terms__box h3 i { color: var(--red); }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.checklist li::before {
  content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; left: 0; top: 1px; color: var(--red);
}

/* ---------- แกลเลอรี่ ---------- */
/* แก้ไข: รูปรีวิวเป็นแนวตั้ง ใช้สัดส่วน 3/4 และไม่ยืดรูปแถวสุดท้าย (จัดกึ่งกลางแทน) */
/* แก้ไข: เพิ่ม gap เป็น 22px เผื่อพื้นที่ให้เงาแดงและการเอียงของกรอบรูป */
.gallery { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; padding: 6px 6px 12px; }
/* แก้ไข: แสดง 6 รูปต่อแถว (gap 22px x 5 ช่อง / 6 ≈ 18.4px)
   ตกแต่งเป็นกรอบรูปแบรนด์ (แนวเดียวกับรูปตัวอย่าง): ขอบดำหนา หัวกรอบชื่อแบรนด์ ท้ายกรอบดาวรีวิว
   มีมิติด้วยเงาแดงซ้อนด้านหลัง + เอียงสลับซ้ายขวาแบบรูปโพลารอยด์
   ใช้ property rotate/translate แยก เพื่อไม่ชนกับ transform ของคลาส .reveal */
.gallery__item {
  margin: 0; flex: 0 0 calc(16.666% - 18.4px);
  display: flex; flex-direction: column; gap: 6px;
  padding: 8px 8px 10px; background: var(--white);
  border: 3px solid var(--ink); border-radius: var(--radius-sm);
  box-shadow: 6px 6px 0 var(--red), var(--shadow-lg);
  rotate: -2deg;
  transition: rotate .35s ease, translate .35s ease, box-shadow .35s ease;
}
.gallery__item:nth-child(even) { rotate: 2deg; }
.gallery__item:nth-child(3n) { rotate: -1deg; }
/* หัวกรอบ: ชื่อแบรนด์ */
.gallery__item::before {
  content: "BLACK LION CAR RENTAL";
  font-family: var(--font-head); font-weight: 600; font-size: 10px; letter-spacing: .06em;
  color: var(--ink); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-bottom: 5px; border-bottom: 2px solid var(--red);
}
/* ท้ายกรอบ: ดาวรีวิว */
.gallery__item::after {
  content: "★★★★★ รีวิวจริง";
  font-family: var(--font-head); font-size: 11px; color: var(--red); text-align: center; white-space: nowrap;
}
.gallery__item img {
  width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: 4px; background: var(--soft);
}
/* hover: ตั้งตรง ยกขึ้น และเงาแดงยืดออก */
.gallery__item:hover {
  rotate: 0deg; translate: -3px -6px;
  box-shadow: 10px 12px 0 var(--red), 0 20px 44px rgba(17, 17, 17, .22);
  z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
  .gallery__item { transition: none; }
}

/* ---------- FAQ (details/summary ไม่ต้องใช้ JS) ---------- */
.faq { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq details[open] { border-color: var(--red); box-shadow: var(--shadow); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; cursor: pointer; list-style: none;
  font-family: var(--font-head); font-weight: 500; font-size: 18px; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "\2b"; font-family: "Font Awesome 6 Free"; font-weight: 900; flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--red-soft); color: var(--red); font-size: 14px; transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(45deg); background: var(--red); color: var(--white); }
.faq__answer { padding: 0 22px 20px; color: var(--muted); }

/* ---------- แถบ CTA สีแดง ---------- */
.cta-band { background: var(--red); color: var(--white); padding: 56px 0; }
.cta-band .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band h2 { color: var(--white); font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 6px; }
.cta-band p { color: #ffe3e4; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- ติดต่อเรา ---------- */
.contact { display: flex; flex-wrap: wrap; gap: 28px; }
.contact__info { flex: 1 1 380px; display: flex; flex-direction: column; gap: 14px; }
.contact-card { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); transition: border-color .2s, box-shadow .2s; }
a.contact-card:hover { border-color: var(--red); box-shadow: var(--shadow); }
.contact-card i { flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--red); color: var(--white); font-size: 20px; }
.contact-card small { display: block; color: var(--muted); font-size: 14px; }
.contact-card strong { font-family: var(--font-head); font-size: 19px; font-weight: 500; color: var(--ink); }
.areas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.areas li { padding: 6px 14px; border-radius: 999px; background: var(--soft); font-size: 15px; }
.areas li i { color: var(--red); margin-right: 6px; }

/* แผนที่แบบคลิกแล้วค่อยโหลด เพื่อให้หน้าเว็บเร็ว */
.map { flex: 1 1 480px; min-height: 380px; border-radius: var(--radius); overflow: hidden; position: relative; background: var(--ink); }
.map__load {
  position: absolute; inset: 0; width: 100%; border: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: var(--white); text-align: center; padding: 24px;
  background: radial-gradient(circle at 30% 30%, #2b2b2b, var(--ink));
}
.map__load i { font-size: 46px; color: var(--red); }
.map__load span { font-family: var(--font-head); font-size: 19px; }
.map__load small { color: #bdbdbd; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #bdbdbd; padding: 64px 0 0; font-size: 15px; }
.footer__cols { display: flex; flex-wrap: wrap; gap: 36px; padding-bottom: 44px; }
.footer__col { flex: 1 1 200px; }
.footer__col--brand { flex: 1.6 1 300px; }
.footer__logo { background: var(--white); border-radius: var(--radius-sm); padding: 8px 12px; display: inline-block; margin-bottom: 16px; }
.footer__logo img { height: 44px; width: auto; }
.footer h3 { color: var(--white); font-size: 18px; margin-bottom: 16px; }
.footer li { margin-bottom: 8px; }
.footer a:hover { color: var(--white); }
.footer i { color: var(--red); width: 20px; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #222; color: var(--white); }
.socials a i { color: var(--white); width: auto; }
.socials a:hover { background: var(--red); }
.footer__bottom { border-top: 1px solid #262626; padding: 18px 0; text-align: center; font-size: 14px; }

/* ---------- ปุ่มลอยบนมือถือ ---------- */
.float-cta { display: none; }

/* ---------- เพิ่ม: Floating Action Button มุมขวาล่าง (กดแล้วสไลด์โชว์ Facebook / LINE / โทร) ---------- */
.fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 70;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}
.fab__menu { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.fab__item {
  display: inline-flex; align-items: center; gap: 10px;
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(.9);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
/* สไลด์ขึ้นทีละปุ่ม (ปุ่มล่างสุดขึ้นก่อน) */
/* แก้ไข: เพิ่มรายการที่ 4 (เบอร์โทรที่ 2) ไล่ delay จากล่างขึ้นบน */
.fab__menu li:nth-child(4) .fab__item { transition-delay: 0s; }
.fab__menu li:nth-child(3) .fab__item { transition-delay: .05s; }
.fab__menu li:nth-child(2) .fab__item { transition-delay: .1s; }
.fab__menu li:nth-child(1) .fab__item { transition-delay: .15s; }
.fab.is-open .fab__item { opacity: 1; visibility: visible; transform: none; }
.fab__label {
  background: var(--white); color: var(--ink); font-family: var(--font-head); font-weight: 500; font-size: 15px;
  padding: 6px 14px; border-radius: 8px; box-shadow: 0 4px 14px rgba(0, 0, 0, .14); white-space: nowrap;
}
.fab__icon {
  width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 22px; box-shadow: 0 6px 16px rgba(0, 0, 0, .2);
  transition: transform .2s;
}
.fab__item:hover .fab__icon { transform: scale(1.08); }
.fab__item--fb .fab__icon { background: #1877f2; }
.fab__item--line .fab__icon { background: #06c755; font-size: 26px; }
/* แก้ไข: เปลี่ยนพื้นหลังไอคอนโทรเป็นสีแดง */
.fab__item--tel .fab__icon { background: var(--red); }
.fab__toggle {
  width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--red); color: var(--white); font-size: 24px;
  box-shadow: 0 8px 22px rgba(215, 25, 31, .4);
  transition: background .2s, transform .25s;
}
.fab__toggle:hover { background: var(--red-dark); }
.fab__toggle:focus-visible, .fab__item:focus-visible .fab__icon { outline: 3px solid var(--ink); outline-offset: 3px; }
.fab.is-open .fab__toggle { background: var(--ink); transform: rotate(90deg); }

/* ---------- Animation ตอนเลื่อนเห็น (ใส่คลาสด้วย JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   แบบ B: "Bold Lion" — override เฉพาะ body.theme-b
   ========================================================================== */
.theme-b .header { background: var(--ink); border-bottom: 3px solid var(--red); }
.theme-b .nav a { color: var(--white); }
.theme-b .nav a:hover { color: var(--red); }
.theme-b .logo { background: var(--white); border-radius: var(--radius-sm); padding: 4px 10px; }
.theme-b .logo img { height: 46px; }
.theme-b .section-head h2 { font-weight: 700; }
.theme-b .eyebrow { background: var(--red); color: var(--white); padding: 4px 14px; border-radius: 4px; transform: skewX(-10deg); }
.theme-b .eyebrow::before { display: none; }

/* Hero B: แบ่งครึ่งซ้ายขาว ขวาแดงตัดเฉียง */
.hero-b { position: relative; background: var(--white); overflow: hidden; }
.hero-b::before {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 46%;
  background: var(--red); clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%);
}
.hero-b .container { position: relative; display: flex; align-items: center; gap: 40px; min-height: min(82vh, 660px); padding-top: 56px; padding-bottom: 56px; }
.hero-b__text { flex: 1 1 52%; }
.hero-b__kicker { font-family: var(--font-head); font-weight: 500; color: var(--red); font-size: 18px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.hero-b__kicker::before { content: ""; width: 40px; height: 3px; background: var(--ink); }
.hero-b h1 { font-size: clamp(34px, 5.6vw, 64px); font-weight: 700; line-height: 1.12; margin-bottom: 18px; }
.hero-b h1 em { font-style: normal; color: var(--red); }
.hero-b__lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); margin-bottom: 26px; max-width: 540px; }
.hero-b__price { display: inline-flex; align-items: baseline; gap: 8px; margin-bottom: 26px; font-family: var(--font-head); }
.hero-b__price strong { font-size: 54px; color: var(--ink); line-height: 1; }
.hero-b__price span { color: var(--muted); }
.hero-b__media { flex: 1 1 48%; position: relative; }
.hero-b__media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 20px; border: 6px solid var(--white); box-shadow: var(--shadow-lg);
  transform: rotate(-2deg);
}
.hero-b__sticker {
  position: absolute; left: -22px; bottom: -18px; z-index: 2;
  background: var(--ink); color: var(--white); border-radius: 16px; padding: 14px 18px;
  display: flex; align-items: center; gap: 12px; font-family: var(--font-head); line-height: 1.25; box-shadow: var(--shadow-lg);
}
.hero-b__sticker i { font-size: 28px; color: var(--red); }
.hero-b .hero__checks { color: var(--ink-2); }

/* แถบจุดเด่นพื้นแดงเต็มความกว้าง + ขอบเฉียง */
.band-red { background: var(--red); color: var(--white); clip-path: polygon(0 0, 100% 40px, 100% 100%, 0 calc(100% - 40px)); padding: 120px 0; }
.band-red .section-head h2 { color: var(--white); }
.band-red .section-head p { color: #ffe3e4; }
.band-red .eyebrow { background: var(--ink); }
.theme-b .band-red .feature { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); }
.theme-b .band-red .feature:hover { background: var(--white); }
.theme-b .band-red .feature h3 { color: var(--white); }
.theme-b .band-red .feature p { color: #ffe3e4; }
.theme-b .band-red .feature:hover h3 { color: var(--ink); }
.theme-b .band-red .feature:hover p { color: var(--muted); }
.theme-b .band-red .feature__icon { background: var(--white); color: var(--red); }
.theme-b .band-red .feature:hover .feature__icon { background: var(--red); color: var(--white); }

/* การ์ดรถแบบ B: ป้ายราคาทรงแท็กสีแดง */
.theme-b .car { border: 0; box-shadow: var(--shadow); border-radius: 6px; }
.theme-b .car__type { background: var(--red); border-radius: 4px; }
.theme-b .car__price { border-top: 0; margin-top: auto; padding-top: 0; }
.theme-b .car__price strong {
  position: relative; display: inline-block;
  background: var(--red); color: var(--white); font-size: 24px;
  padding: 8px 16px 8px 26px; clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%);
}
.theme-b .car__body h3 { font-weight: 700; }

/* ขั้นตอนแบบ B: แถบดำ */
.theme-b .step { background: var(--ink); border-color: var(--ink); }
.theme-b .step h3, .theme-b .step i { color: var(--white); }
.theme-b .step p { color: #c9c9c9; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .header__cta .btn--outline { display: none; }
  .car { flex-basis: calc(33.333% - 15px); }
  .nav a { padding: 8px 9px; font-size: 15px; }
}

@media (max-width: 960px) {
  :root { --header-h: 64px; }
  .section { padding: 64px 0; }
  .topbar__links { display: none; }
  .logo img { height: 44px; }

  /* เมนูมือถือ: เลื่อนลงมาจาก header */
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); padding: 8px 16px 20px;
    box-shadow: var(--shadow-lg); border-top: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: transform .25s, opacity .25s, visibility .25s;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 14px 4px; font-size: 17px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a::after { display: none; }
  .theme-b .nav { background: var(--ink); border-top-color: #262626; }
  .theme-b .nav a { border-bottom-color: #262626; }
  .header__cta .btn--red { display: none; }

  .stat { flex: 1 1 50%; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }

  .about { flex-direction: column; gap: 40px; }
  .about__media { flex: none; width: 100%; max-width: 460px; }
  .about__tag { right: 12px; }

  .feature { flex-basis: calc(50% - 11px); }
  .car { flex-basis: calc(50% - 11px); }
  .gallery__item { flex-basis: calc(33.333% - 14.7px); } /* แก้ไข: คำนวณใหม่ตาม gap 22px */

  .hero-b::before { width: 100%; top: auto; height: 38%; clip-path: polygon(0 30%, 100% 0, 100% 100%, 0 100%); }
  .hero-b .container { flex-direction: column; align-items: stretch; }
  .hero-b__media { max-width: 560px; margin: 0 auto; width: 100%; }
}

@media (max-width: 640px) {
  /* แก้ไข: ย้ายระยะเว้นปุ่มลอยไปไว้ที่ footer แทน body เพื่อไม่ให้เกิดช่องสีขาวใต้ footer */
  body { font-size: 16px; }
  .footer__bottom { padding-bottom: calc(18px + 58px); }  /* 58px = ความสูงแถบปุ่มลอย .float-cta */
  .topbar { display: none; }
  .section { padding: 52px 0; }
  .section-head { margin-bottom: 32px; }
  .hero .container { min-height: 0; padding-top: 48px; padding-bottom: 88px; }
  .hero__overlay { background: rgba(17, 17, 17, .86); }
  .hero__actions .btn { flex: 1 1 100%; }
  .stat { flex-basis: 100%; border-right: 0; border-bottom: 1px solid var(--line); padding: 16px 18px; }
  .stat:last-child { border-bottom: 0; }
  .service, .feature, .terms__box { flex-basis: 100%; }
  /* แก้ไข: การ์ดรถบนมือถือ 2 คอลัมน์ กะทัดรัด */
  .cars { gap: 12px; }
  .car { flex-basis: calc(50% - 6px); }
  .car__body { padding: 12px; }
  .car__body h3 { font-size: 16px; margin-bottom: 4px; }
  .car__specs { font-size: 13px; gap: 2px 10px; margin-bottom: 10px; }
  .car__specs li:last-child { display: none; }
  .car__price { margin-bottom: 10px; padding-top: 10px; gap: 4px; flex-wrap: wrap; }
  .car__price strong { font-size: 22px; }
  .theme-b .car__price strong { font-size: 18px; }
  .car__price small { font-size: 12px; }
  .car__actions { flex-direction: column; gap: 6px; }
  .car__type { left: 8px; top: 8px; font-size: 12px; padding: 2px 10px; }
  .car-filter { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; }
  .car-filter button { flex-shrink: 0; }
  .gallery { gap: 16px; } /* แก้ไข: มือถือลด gap */
  .gallery__item { flex-basis: calc(50% - 8px); padding: 6px 6px 8px; box-shadow: 4px 4px 0 var(--red), var(--shadow); }
  .step { flex-basis: 100%; }
  .cta-band__actions, .cta-band__actions .btn { width: 100%; }
  .map { min-height: 300px; }
  .band-red { padding: 90px 0; clip-path: polygon(0 0, 100% 20px, 100% 100%, 0 calc(100% - 20px)); }
  .hero-b__price strong { font-size: 44px; }
  .hero-b__sticker { left: 8px; }

  /* แถบปุ่มลอยด้านล่างจอ: โทร / LINE */
  .float-cta {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--white); box-shadow: 0 -4px 18px rgba(0, 0, 0, .12);
  }
  .float-cta a {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 58px; font-family: var(--font-head); font-weight: 500; font-size: 16px;
  }
  .float-cta a:first-child { background: var(--ink); color: var(--white); }
  .float-cta a:last-child { background: var(--red); color: var(--white); }

  /* เพิ่ม: ยก FAB ขึ้นเหนือแถบปุ่มลอยด้านล่างบนมือถือ */
  .fab { right: 16px; bottom: 76px; }
}
