/* ------------------------------------------------------
   //DRIVEHUB MOTORS — FULL CSS (Giao diện tối sang trọng + Vàng)
   Cập nhật: logo lớn hơn, sắc nét hơn + hiệu ứng hover tinh tế
-------------------------------------------------------*/

/* -------------------------
   BIẾN GIAO DIỆN (THEME VARIABLES)
------------------------- */
:root {
  --bg: var(--tsa-page, #f4f6f8);
  --panel: var(--tsa-surface, #ffffff);
  --text-main: var(--tsa-ink, #111317);
  --text-muted: var(--tsa-muted, #667085);
  --gold: var(--tsa-brand, #b8862f);
  --gold-light: var(--tsa-brand-dark, #6f4f17);
  --accent: var(--tsa-brand, #b8862f);
  --radius: var(--tsa-radius, 8px);
  --gap: 20px;
  --gap-sm: 10px;
  --max-width: 1200px;
  --font-sans: var(--tsa-font-body, "Be Vietnam Pro", Arial, sans-serif);
  --line-height: 1.6;
  --h1-size: 2.75rem;
  --h2-size: 2rem;
  --text-base: 1rem;
}

/* -------------------------
   ĐẶT LẠI TOÀN CẦU (GLOBAL RESET)
------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-main);
  line-height: var(--line-height);
}

img {
  width: 100%;
  display: block;
  border-radius: var(--radius);
  object-fit: cover;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Utility container */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: var(--gap);
}

/* -------------------------
   ĐIỀU HƯỚNG / HEADER (Cập nhật Logo)
------------------------- */
.navbar {
  background: var(--panel);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--gap);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Logo wrapper — image + brand text */
.navbar .logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Logo lớn hơn, sắc nét hơn với hover tinh tế */
.navbar .logo img {
  height: 70px;         /* tăng kích thước */
  width: auto;
  display: block;
  border-radius: 8px;
  transition: transform 0.28s cubic-bezier(.2,.9,.3,1), box-shadow 0.28s;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

.navbar .logo img:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
}

/* Văn bản thương hiệu tùy chọn bên cạnh logo */
.navbar .logo h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
  margin: 0;
}

.navbar .logo h1 span {
  color: var(--gold);
  letter-spacing: .2px;
}

/* Liên kết điều hướng chính */
.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  font-size: var(--text-base);
  color: var(--text-main);
  transition: color 0.18s ease, transform 0.18s ease;
  padding: 6px 4px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
  transform: translateY(-2px);
}

/* -------------------------
   HERO / BANNER
------------------------- */
.hero {
  position: relative;
  height: 350px;
  background: url("../assets/images/DriveHub-Motors-Hero-Banner.png") center/cover no-repeat;
  display: flex;
  align-items: flex-start;
  padding: 2rem var(--gap);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.hero .hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
}

.hero h1 {
  font-size: var(--h1-size);
  color: var(--gold);
  margin-bottom: 10px;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* -------------------------
   TRANG CHI TIẾT XE
------------------------- */
.car-details-page {
  padding-block: 40px;
}

.car-overview {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1fr);
  gap: var(--gap);
  align-items: start;
}

/* THƯ VIỆN ẢNH (IMAGE GALLERY) */
.car-image-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.car-image-gallery .main-image {
  height: 420px;
  border-radius: var(--radius);
  box-shadow: 0 8px 25px rgba(0,0,0,0.7);
  overflow: hidden;
}

.thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: var(--gap-sm);
}

.thumbnails img {
  width: 100%;
  height: 88px;
  object-fit: cover;
  border-radius: var(--radius);
  cursor: pointer;
  opacity: 0.9;
  transition: transform 0.22s ease, opacity 0.18s ease;
}

.thumbnails img:hover {
  transform: scale(1.03);
  opacity: 1;
}

.thumbnails img.active {
  outline: 3px solid var(--gold);
  opacity: 1;
}

/* THÔNG TIN XE (CAR INFO) */
.car-info h2 {
  font-size: var(--h2-size);
  color: var(--gold);
  margin-bottom: 12px;
}

.car-info .price {
  font-size: 2rem;
  font-weight: 700;
  margin: 10px 0 18px;
  color: var(--gold-light);
}

.car-info .description {
  color: var(--text-muted);
  margin-bottom: 25px;
  line-height: 1.7;
}

/* THÔNG SỐ KỸ THUẬT (SPECIFICATIONS) */
.specs-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.specs-list li {
  background: rgba(255,255,255,0.05);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.specs-list li strong {
  color: var(--gold);
}

/* NÚT HÀNH ĐỘNG (ACTION BUTTONS) */
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: 0.25s ease;
}

.btn-add-cart {
  background: var(--gold);
  color: var(--panel);
}

.btn-add-cart:hover {
  background: var(--gold-light);
}

.btn-favorite {
  background: rgba(255,255,255,0.1);
  color: var(--text-main);
}

.btn-favorite:hover {
  background: rgba(255,255,255,0.2);
}

/* -------------------------
   MÁY TÍNH TRẢ GÓP (LOAN CALCULATOR)
------------------------- */
.loan-calculator {
    margin-top: 28px;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius);
    background: rgba(184, 134, 47, 0.06);
}

.loan-calculator h3 {
    margin-bottom: 14px;
    color: var(--gold);
    font-size: 18px;
}

.loan-calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.loan-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.loan-field label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

.loan-field input,
.loan-field select {
    padding: 9px 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    background: #fff;
    color: var(--text-main);
    font: inherit;
}

.loan-result {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.loan-result > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.loan-result span {
    font-size: 12px;
    color: var(--text-muted);
}

.loan-result strong {
    font-size: 18px;
    color: var(--text-main);
}

.loan-monthly strong {
    color: var(--gold);
    font-size: 24px;
}

.loan-disclaimer {
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.6;
}

/* -------------------------
   XE LIÊN QUAN (RELATED CARS)
------------------------- */
.related-cars {
  margin-top: 60px;
}

.related-cars h3 {
  color: var(--gold);
  margin-bottom: 25px;
}

.car-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap);
}

.car-card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 15px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

.car-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
}

.car-card h4 {
  color: var(--gold);
  margin: 10px 0 6px;
}

.car-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Nút chi tiết */
.btn-details {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 14px;
  background: var(--gold);
  color: var(--panel);
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: 0.25s ease;
}

.btn-details:hover {
  background: var(--gold-light);
}

/* -------------------------
   CHÂN TRANG (FOOTER)
------------------------- */
footer {
  background: #000;
  color: #fff;
  padding: 45px 0 25px;
  border-top: 3px solid var(--gold-light);
  font-family: Arial, sans-serif;
}

.footer-content {
  width: 90%;
  max-width: var(--max-width);
  margin: auto;
  display: grid;
  gap: 25px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.footer-section h3 {
  color: var(--gold-light);
  margin-bottom: 12px;
  font-size: 1.15rem;
  font-weight: bold;
  text-transform: uppercase;
}

.footer-section p {
  font-size: 14px;
  color: #d9d9d9;
}

.footer-section ul {
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section a {
  color: #d9d9d9;
  text-decoration: none;
  font-size: 14px;
  transition: 0.3s ease;
}

.footer-section a:hover {
  color: var(--gold-light);
  padding-left: 4px;
}

footer i {
  color:var(--gold-light) ;
  margin-right: 6px;
  font-size: 14px;
}

.copyright {
  width: 90%;
  max-width: var(--max-width);
  margin: 20px auto 0;
  padding-top: 12px;
  text-align: center;
  font-size: 13px;
  color: #aaa;
  border-top: 1px solid #222;
}

/* -------------------------
   RESPONSIVE
------------------------- */
@media (max-width: 992px) {
  .car-overview {
    grid-template-columns: 1fr;
  }

  .main-image {
    height: 320px;
  }

  .thumbnails img {
    height: 70px;
  }
}

@media (max-width: 480px) {
  .hero {
    height: 220px;
  }

  .main-image {
    height: 240px;
  }

  .thumbnails img {
    height: 56px;
  }

  .navbar {
    padding-inline: 12px;
  }

  .nav-links {
    gap: 12px;
  }

  .footer-content {
    gap: 15px;
  }

  .footer-section h3 {
    font-size: 1rem;
  }

  .footer-section a {
    font-size: 13px;
  }
}
