/* trd-theme.css — dweb.bosscar.co (dev template ตัวที่ 4)
 * ดีไซน์ตามแนวโตรถดี.com: แดง #d20a13 + เหลืองทอง #ffca05 บนพื้นขาว/เทาอ่อน, ฟอนต์ Anuphan
 * โหลดท้าย css/bootstrap.css (BS3) — เอาเฉพาะ layout/สี/ฟอนต์/pattern ของเว็บต้นแบบดีไซน์
 * ห้ามคัดลอก content/รูป/แบรนด์/เบอร์ของเว็บต้นแบบ — เว็บนี้ใช้ค่า dev ของ BosscarSoft
 */

:root {
  --trd-red: #d20a13;
  --trd-red-dark: #89060c;
  --trd-red-hover: #c62c18;
  --trd-gold: #ffca05;
  --trd-gold-light: #ffe7a3;
  --trd-orange: #fd9800;
  --trd-ink: #1e1e1e;
  --trd-ink2: #343434;
  --trd-gray: #7a7a7a;
  --trd-gray2: #868686;
  --trd-bg: #f5f5f5;
  --trd-bg2: #f7f7f7;
  --trd-line: #e5e5e5;
  --trd-radius-card: 25px;
  --trd-radius-pill: 64px;
  --trd-shadow: 0 0 35px rgba(0, 0, 0, 0.15);
}

/* ── base ─────────────────────────────────────────────── */
body {
  font-family: 'Anuphan', 'Kanit', Helvetica, Arial, sans-serif;
  font-weight: 400;
  color: var(--trd-ink2);
  background: #fff;
}
h1, h2, h3, h4, h5, h6 { font-family: 'Anuphan', 'Kanit', Helvetica, Arial, sans-serif; color: var(--trd-ink); font-weight: 600; }
a { color: var(--trd-red); }
a:hover, a:focus { color: var(--trd-red-hover); text-decoration: none; }
img { max-width: 100%; }
.trd-container { max-width: 1340px; }

/* หัว section — ขาวบนพื้นเทา / เข้มบนพื้นขาว + เส้นทองใต้ */
.trd-section { padding: 40px 0; }
.trd-section-alt { background: var(--trd-bg); }
.trd-section-title { text-align: center; margin-bottom: 26px; }
.trd-section-title h2 { font-size: 26px; font-weight: 700; margin: 0; }
.trd-section-title .trd-sub { color: var(--trd-gray); font-size: 14px; margin-top: 4px; }
.trd-divider { display: block; width: 64px; height: 4px; border-radius: 2px; background: var(--trd-gold); margin: 10px auto 0; }

/* ── topbar ส้ม ───────────────────────────────────────── */
.trd-topbar { background: var(--trd-orange); color: var(--trd-ink); font-size: 13px; padding: 5px 0; }
.trd-topbar a { color: var(--trd-ink); }
.trd-topbar .trd-topbar-item { display: inline-block; margin-right: 16px; }
.trd-topbar .fa { margin-right: 5px; }
.trd-lang { float: right; }
.trd-lang a { padding: 0 6px; font-weight: 600; }
.trd-lang .active { color: var(--trd-red-dark); text-decoration: underline; }

/* ── header sticky ขาว ────────────────────────────────── */
.trd-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.trd-header .navbar { margin: 0; min-height: 60px; border: 0; background: transparent; }
.trd-logo {
  font-size: 26px; font-weight: 700; color: var(--trd-ink) !important;
  line-height: 38px; padding: 11px 15px; display: inline-block;
}
.trd-logo .trd-red { color: var(--trd-red); }
.trd-tagline { display: block; font-size: 11px; color: var(--trd-gray); line-height: 1; font-weight: 400; }
.trd-header .navbar-nav > li > a {
  color: var(--trd-ink2); font-size: 15px; font-weight: 500;
  line-height: 30px; padding: 15px 14px;
}
.trd-header .navbar-nav > li > a:hover, .trd-header .navbar-nav > li > a:focus { color: var(--trd-red); background: transparent; }
.trd-header .navbar-toggle { border-color: var(--trd-line); margin-top: 13px; }
.trd-header .navbar-toggle .icon-bar { background: var(--trd-ink); }
.trd-header .navbar-collapse { border-top: 1px solid var(--trd-line); max-height: 70vh; overflow-y: auto; }

/* ── hero: 1 แผงใหญ่ + 2 การ์ดบริการ ──────────────────── */
.trd-hero { padding: 24px 0 0; background: #fff; }
/* กันคอลัมน์ BS3 (float:left) ล้นออกจาก hero ไปทับการ์ดค้นหา — หัวข้อค้นหาเป็น flex (=BFC) โดนกฎหลบ float จนกว้าง 0px แล้วตัดบรรทัดทีละตัวอักษร */
.trd-hero .row { overflow: hidden; }
.trd-hero-main {
  position: relative; overflow: hidden;
  border-radius: var(--trd-radius-card);
  min-height: 340px;
  background: linear-gradient(135deg, var(--trd-red) 0%, var(--trd-red-dark) 100%);
  display: flex; align-items: center;
}
.trd-hero-main .trd-hero-bg {
  position: absolute; inset: 0;
  background: url('../images/slide/cover_page.jpg') center / cover no-repeat;
  opacity: 0.35;
}
.trd-hero-main .trd-hero-body { position: relative; padding: 36px 40px; max-width: 560px; }
.trd-hero-main h2 { color: #fff; font-size: 32px; font-weight: 700; margin: 0 0 8px; }
.trd-hero-main p { color: #ffe9e9; font-size: 15px; margin-bottom: 18px; }
.trd-hero-service {
  background: #fff; border-radius: var(--trd-radius-card);
  box-shadow: var(--trd-shadow);
  padding: 22px 24px; margin-bottom: 24px;
  border-top: 4px solid var(--trd-orange);
}
.trd-hero-service h3 { color: var(--trd-orange); font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.trd-hero-service p { color: var(--trd-gray); font-size: 13.5px; margin-bottom: 12px; }
@media (max-width: 767px) {
  .trd-hero-main { min-height: 240px; }
  .trd-hero-main .trd-hero-body { padding: 24px; }
  .trd-hero-main h2 { font-size: 22px; }
}

/* ── ปุ่ม ─────────────────────────────────────────────── */
.trd-btn {
  display: inline-block; border: 0; cursor: pointer;
  font-family: 'Anuphan', 'Kanit', sans-serif; font-weight: 600; font-size: 15px;
  border-radius: var(--trd-radius-pill);
  padding: 10px 30px;
  transition: all .15s ease;
}
.trd-btn-red { background: var(--trd-red); color: #fff; }
.trd-btn-red:hover, .trd-btn-red:focus { background: var(--trd-red-hover); color: #fff; }
.trd-btn-gold { background: var(--trd-gold); color: var(--trd-ink); }
.trd-btn-gold:hover, .trd-btn-gold:focus { background: #ffd83d; color: var(--trd-ink); }
.trd-btn-outline { background: #fff; color: var(--trd-red); border: 2px solid var(--trd-red); }
.trd-btn-outline:hover { background: var(--trd-red); color: #fff; }
.trd-btn-gray { background: #fff; color: var(--trd-gray2); border: 2px solid var(--trd-line); }
.trd-btn-gray:hover { color: var(--trd-ink); border-color: var(--trd-gray2); }
.trd-btn-block { display: block; width: 100%; text-align: center; }

/* ── การ์ดค้นหา (ช้อนทับ hero) ────────────────────────── */
.trd-search {
  position: relative; z-index: 5;
  margin: -46px auto 0;
  max-width: 1280px;
  background: #fff;
  border-radius: var(--trd-radius-card);
  box-shadow: var(--trd-shadow);
  padding: 22px 26px 26px;
}
.trd-search .trd-search-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.trd-search .trd-search-head h3 { font-size: 18px; margin: 0; }
.trd-search .form-control {
  height: 46px; border: 1px solid var(--trd-line); border-radius: 10px;
  font-family: 'Anuphan', 'Kanit', sans-serif; font-size: 14px; color: var(--trd-ink);
  box-shadow: none;
}
.trd-search .form-control:focus { border-color: var(--trd-red); box-shadow: 0 0 0 2px rgba(210, 10, 19, 0.12); }
.trd-search label { font-size: 12.5px; color: var(--trd-gray); font-weight: 500; margin-bottom: 4px; }
@media (max-width: 767px) { .trd-search { margin: -30px 12px 0; } }

/* ── การ์ดรถ ──────────────────────────────────────────── */
.trd-cars .row > div { margin-bottom: 30px; }
.trd-item {
  background: #fff; border-radius: var(--trd-radius-card);
  box-shadow: var(--trd-shadow); overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
  height: 100%;
}
.trd-item:hover { transform: translateY(-4px); box-shadow: 0 6px 42px rgba(0, 0, 0, 0.2); }
.trd-item-img { position: relative; background: var(--trd-bg); }
.trd-item-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.trd-item-status {
  position: absolute; top: 12px; left: 12px;
  font-size: 12px; font-weight: 600; color: #fff;
  padding: 3px 12px; border-radius: var(--trd-radius-pill);
}
.trd-item-body { padding: 16px 18px 18px; }
.trd-item-body h3 {
  font-size: 15.5px; font-weight: 600; margin: 0 0 6px;
  letter-spacing: 0.4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.trd-item-body h3 a { color: var(--trd-ink); }
.trd-item-body h3 a:hover { color: var(--trd-red); }
.trd-item-sub { font-size: 12.5px; color: var(--trd-gray); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trd-item-spec { list-style: none; padding: 0; margin: 0 0 10px; font-size: 12.5px; color: var(--trd-ink2); border-top: 1px dashed var(--trd-line); }
.trd-item-spec li { padding: 4px 0; border-bottom: 1px dashed var(--trd-line); display: flex; justify-content: space-between; }
.trd-item-spec .fa { color: var(--trd-orange); margin-right: 6px; }
.trd-item-price { font-size: 24px; font-weight: 700; color: var(--trd-red); line-height: 1.1; }
.trd-item-price small { font-size: 14px; font-weight: 500; color: var(--trd-ink2); margin-left: 2px; }
.trd-item-body .trd-btn { margin-top: 12px; padding: 8px 20px; font-size: 14px; }

/* ผลค้นหาไม่พบ */
.trd-notfound { text-align: center; color: var(--trd-red); padding: 30px 0; font-size: 16px; }

/* ── banner หมวดรถ ────────────────────────────────────── */
.trd-cat {
  display: block; background: #fff;
  border-radius: var(--trd-radius-card); box-shadow: var(--trd-shadow);
  padding: 22px 12px; text-align: center; margin-bottom: 24px;
  color: var(--trd-ink); cursor: pointer;
  transition: transform .15s ease;
}
.trd-cat:hover { transform: translateY(-3px); color: var(--trd-ink); }
.trd-cat .fa { font-size: 30px; color: var(--trd-red); display: block; margin-bottom: 8px; }
.trd-cat .trd-cat-name { font-weight: 600; font-size: 14.5px; }

/* ── โปรโมชั่น (ตัวอย่าง) ─────────────────────────────── */
.trd-promo {
  background: var(--trd-gold-light); border-radius: var(--trd-radius-card);
  padding: 26px 30px; margin-bottom: 24px; position: relative;
}
.trd-promo h3 { color: var(--trd-red-dark); font-weight: 700; margin: 0 0 4px; }
.trd-promo p { color: var(--trd-ink2); font-size: 14px; margin: 0; }
.trd-promo .trd-badge-sample {
  position: absolute; top: -10px; right: 16px;
  background: var(--trd-red); color: #fff; font-size: 11px;
  padding: 2px 12px; border-radius: var(--trd-radius-pill);
}

/* ── ภาพรับรถ ─────────────────────────────────────────── */
.trd-review-grid img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--trd-radius-card);
  margin-bottom: 24px;
}

/* ── รีวิว carousel ───────────────────────────────────── */
.trd-review-card {
  background: #fff; border-radius: var(--trd-radius-card);
  box-shadow: var(--trd-shadow); padding: 20px 22px;
  height: 271px; margin: 0 10px;
}
.trd-review-card .trd-review-name { font-weight: 600; font-size: 14.5px; color: var(--trd-ink); }
.trd-review-card .trd-review-date { font-size: 12px; color: var(--trd-gray2); margin-bottom: 6px; }
.trd-review-card .fa-star { color: #f5a623; }
.trd-review-card .trd-review-text {
  font-size: 12.5px; line-height: 20px; color: var(--trd-gray);
  display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden;
}
.trd-review-carousel .carousel-inner .item .row { margin: 0 -10px; }
.trd-review-badge {
  display: inline-block; background: var(--trd-gold-light); color: var(--trd-red-dark);
  font-size: 11.5px; border-radius: var(--trd-radius-pill); padding: 2px 12px; margin-bottom: 8px;
}

/* ── หน้ารถ ───────────────────────────────────────────── */
.trd-detail { margin-top: 24px; }
.trd-breadcrumb { font-size: 13px; color: var(--trd-gray2); padding: 14px 0 0; }
.trd-breadcrumb a { color: var(--trd-gray2); }
.trd-breadcrumb .fa { margin: 0 6px; font-size: 10px; }
.trd-detail-card {
  background: #fff; border-radius: var(--trd-radius-card);
  box-shadow: var(--trd-shadow); padding: 26px;
}
.trd-detail-card h1 { font-size: 24px; margin: 0 0 4px; }
.trd-detail-price { font-size: 32px; font-weight: 700; color: var(--trd-red); margin: 6px 0 2px; }
.trd-detail-price small { font-size: 16px; font-weight: 500; color: var(--trd-ink2); }
.trd-detail-monthly { font-size: 15px; color: var(--trd-ink2); margin-bottom: 14px; }
.trd-detail-monthly strong { color: var(--trd-red-dark); }
.trd-spec-table { width: 100%; font-size: 14px; margin-top: 6px; }
.trd-spec-table th { width: 160px; font-weight: 500; color: var(--trd-gray); text-align: left; padding: 8px 8px 8px 0; vertical-align: top; border-bottom: 1px dashed var(--trd-line); }
.trd-spec-table td { padding: 8px 0; color: var(--trd-ink); border-bottom: 1px dashed var(--trd-line); }
.trd-detail h3.trd-h3 {
  font-size: 19px; font-weight: 700; margin: 26px 0 10px;
  padding-left: 12px; border-left: 5px solid var(--trd-gold);
}
.trd-feature-text { line-height: 1.9; font-size: 14px; }

/* gallery */
.trd-gallery .carousel-inner > .item > img {
  width: 100%; height: 440px; object-fit: cover;
  border-radius: var(--trd-radius-card); background: var(--trd-bg);
}
.trd-gallery-thumbs { margin-top: 12px; }
.trd-gallery-thumbs img {
  width: 100%; height: 66px; object-fit: cover;
  border: 2px solid transparent; border-radius: 12px; cursor: pointer; opacity: .8;
}
.trd-gallery-thumbs .active img, .trd-gallery-thumbs img:hover { border-color: var(--trd-red); opacity: 1; }
@media (max-width: 767px) { .trd-gallery .carousel-inner > .item > img { height: 240px; } }

/* ตัวคำนวณค่างวด */
.trd-calc {
  background: var(--trd-gold-light); border-radius: var(--trd-radius-card);
  padding: 20px 22px; margin-top: 20px;
}
.trd-calc h3 { font-size: 17px; font-weight: 700; margin: 0 0 12px; color: var(--trd-red-dark); }
.trd-calc select {
  height: 40px; width: 100%; border: 1px solid #ecd98f; border-radius: 10px;
  background: #fff; font-family: 'Anuphan', 'Kanit', sans-serif; padding: 4px 10px;
}
.trd-calc .radio-inline { font-weight: 400; }
.trd-calc .radio-inline input[type=radio] { accent-color: var(--trd-red); }
.trd-calc-result {
  background: #fff; border: 2px dashed var(--trd-red);
  border-radius: 16px; padding: 12px 16px; margin-top: 12px; text-align: center;
}
.trd-calc-result .trd-monthly { color: var(--trd-red); font-size: 28px; font-weight: 700; }
.trd-calc-note { font-size: 12px; color: var(--trd-gray); margin-top: 8px; }
.trd-detail-cta { margin-top: 16px; }
.trd-detail-cta .trd-btn { margin: 0 8px 10px 0; }

/* ── footer แดงเข้ม ───────────────────────────────────── */
.trd-footer { background: var(--trd-red-dark); color: #f3d9d9; padding: 44px 0 0; margin-top: 40px; }
.trd-footer h4 { color: var(--trd-gold); font-size: 17px; font-weight: 700; margin: 0 0 16px; }
.trd-footer a { color: #f3d9d9; }
.trd-footer a:hover { color: var(--trd-gold); }
.trd-footer ul { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.trd-footer ul li { margin-bottom: 8px; }
.trd-footer .fa { color: var(--trd-gold); width: 20px; }
.trd-footer .trd-footer-btn {
  display: block; background: var(--trd-gold); color: var(--trd-red-dark);
  font-weight: 700; text-align: center;
  border-radius: 100px; padding: 10px 0; margin-bottom: 10px; font-size: 15px;
}
.trd-footer .trd-footer-btn:hover { background: #ffd83d; color: var(--trd-red-dark); }
.trd-footer form input, .trd-footer form textarea {
  width: 100%; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 10px;
  background: rgba(255, 255, 255, 0.08); color: #fff;
  font-family: 'Anuphan', 'Kanit', sans-serif; font-size: 13.5px;
  padding: 8px 12px; margin-bottom: 8px;
}
.trd-footer form input::placeholder, .trd-footer form textarea::placeholder { color: #d9b7b7; }
.trd-footer .trd-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center; font-size: 13px; padding: 14px 0; margin-top: 30px;
}

/* ── ปุ่มแชตลอยตัว + pulse ─────────────────────────────── */
.trd-chat-fab {
  position: fixed; right: 20px; bottom: 20px;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--trd-red), var(--trd-red-hover));
  color: #fff; font-size: 24px; text-align: center; line-height: 56px;
  z-index: 9999; box-shadow: 0 6px 18px rgba(210, 10, 19, 0.45);
}
.trd-chat-fab:hover, .trd-chat-fab:focus { color: #fff; }
.trd-chat-fab::before {
  content: ""; position: absolute; left: -6px; top: -6px;
  width: 68px; height: 68px; border-radius: 50%;
  border: 2px solid rgba(210, 10, 19, 0.5);
  animation: trd-pulse 2s infinite;
}
@keyframes trd-pulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  70% { transform: scale(1.45); opacity: 0; }
  100% { transform: scale(1.45); opacity: 0; }
}

/* modal ติดต่อ */
.trd-chat-modal .modal-content { border-radius: var(--trd-radius-card); border: 0; }
.trd-chat-modal .modal-header { background: var(--trd-red); color: #fff; border: 0; border-radius: var(--trd-radius-card) var(--trd-radius-card) 0 0; }
.trd-chat-modal .modal-title { font-weight: 600; }
.trd-chat-modal .close { color: #fff; opacity: 0.9; text-shadow: none; }
.trd-chat-channel {
  display: block; border: 2px solid var(--trd-line); border-radius: 16px;
  padding: 14px 16px; margin-bottom: 10px; color: var(--trd-ink); font-size: 15px;
}
.trd-chat-channel:hover { border-color: var(--trd-red); color: var(--trd-ink); }
.trd-chat-channel .fa { width: 26px; font-size: 18px; color: var(--trd-red); }

/* ── หน้า static ───────────────────────────────────────── */
.trd-page {
  background: #fff; border-radius: var(--trd-radius-card);
  box-shadow: var(--trd-shadow); padding: 30px; margin: 24px 0;
}
.trd-page h1 { font-size: 24px; margin-top: 0; }
.trd-page h1 .trd-red { color: var(--trd-red); }
.trd-contact-table { width: 100%; font-size: 15px; }
.trd-contact-table td { padding: 8px 10px 8px 0; vertical-align: top; }
.trd-contact-table .fa { color: var(--trd-red); width: 24px; }
.trd-map-frame { width: 100%; height: 380px; border: 0; border-radius: var(--trd-radius-card); }
.trd-placeholder-card {
  border: 2px dashed #ddd; border-radius: var(--trd-radius-card);
  min-height: 160px; text-align: center; padding: 34px 16px;
  color: var(--trd-gray2); background: var(--trd-bg2);
  margin-bottom: 24px;
}
.trd-placeholder-card .fa { font-size: 28px; color: var(--trd-orange); }

/* loading */
#more_loading img { border-radius: 50%; }
