:root {
  --primary: #0d6efd;
  --primary-dark: #0a4fb8;
  --dark: #0f172a;
  --muted: #64748b;
  --surface: #ffffff;
  --bg-soft: #f8fafc;
  --success: #198754;
  --warning: #f59e0b;
  --danger: #dc3545;
  --shadow-sm: 0 10px 25px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 18px 35px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg-soft);
  color: var(--dark);
  min-height: 100vh;
}

a {
  text-decoration: none;
}

.section-title {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.text-muted-custom {
  color: var(--muted);
}

.top-strip {
  background: #0b1220;
  color: #e2e8f0;
  font-size: 0.87rem;
}

.navbar {
  backdrop-filter: blur(8px);
}

.navbar-brand {
  font-weight: 900;
  letter-spacing: 0.2px;
}

.brand-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #36c2ff);
  color: #fff;
  margin-right: 0.45rem;
}

.hero {
  position: relative;
  min-height: 75vh;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  margin-top: 1rem;
  background: linear-gradient(
      90deg,
      rgba(11, 18, 32, 0.9) 0%,
      rgba(11, 18, 32, 0.66) 45%,
      rgba(11, 18, 32, 0.22) 100%
    ),
    url("https://images.unsplash.com/photo-1553440569-bcc63803a83d?auto=format&fit=crop&w=1800&q=80")
      center/cover no-repeat;
}

.hero .carousel-inner,
.hero .carousel-item {
  min-height: 75vh;
}

.hero-slide-bg {
  min-height: 75vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}

.hero-slide-overlay {
  width: 100%;
  min-height: 75vh;
  display: flex;
  align-items: center;
  background: linear-gradient(
    90deg,
    rgba(11, 18, 32, 0.9) 0%,
    rgba(11, 18, 32, 0.68) 45%,
    rgba(11, 18, 32, 0.3) 100%
  );
}

.hero .hero-content {
  max-width: 640px;
  color: #fff;
}

.hero h1 {
  font-weight: 900;
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  line-height: 1.06;
}

.hero p {
  color: rgba(255, 255, 255, 0.88);
}

.glass-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-md);
  border-radius: 16px;
}

.search-panel {
  margin-top: -60px;
  z-index: 5;
  position: relative;
}

.stat-card,
.brand-card,
.category-card,
.info-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  transition: all 0.28s ease;
}

.stat-card:hover,
.brand-card:hover,
.category-card:hover,
.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.car-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  height: 100%;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.car-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.car-card .car-media {
  position: relative;
  height: 210px;
  overflow: hidden;
}

.car-card .car-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.car-card:hover .car-media img {
  transform: scale(1.05);
}

.mini-feature-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: all 0.25s ease;
}

.mini-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.mini-feature-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.brand-logo-carousel .carousel-item {
  padding: 0.4rem 0;
}

.brand-logo-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  text-align: center;
  padding: 1rem;
  transition: all 0.25s ease;
}

.brand-logo-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.brand-logo-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 0.45rem;
  background: #eff6ff;
  color: var(--primary);
  font-size: 1.45rem;
}

.car-chip {
  background: rgba(15, 23, 42, 0.76);
  color: #fff;
  border-radius: 999px;
  font-size: 0.74rem;
  padding: 0.22rem 0.6rem;
}

.price-badge {
  font-weight: 800;
  color: var(--primary);
}

.meta-list {
  font-size: 0.9rem;
  color: var(--muted);
}

.meta-list i {
  color: var(--primary);
}

.fav-btn.active {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.compare-btn.active {
  color: #fff;
  background: var(--success);
  border-color: var(--success);
}

.testimonial-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  height: 100%;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.footer {
  background: #0b1220;
  color: #cbd5e1;
}

.footer a {
  color: #cbd5e1;
}

.footer a:hover {
  color: #fff;
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 999;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  display: none;
  place-items: center;
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.back-to-top.show {
  display: grid;
}

.page-hero {
  background: linear-gradient(
      100deg,
      rgba(11, 18, 32, 0.84),
      rgba(11, 18, 32, 0.48)
    ),
    url("https://images.unsplash.com/photo-1511919884226-fd3cad34687c?auto=format&fit=crop&w=1800&q=80")
      center/cover no-repeat;
  color: #fff;
  border-radius: 18px;
}

.sticky-card {
  position: sticky;
  top: 90px;
}

.list-view .car-card {
  display: flex;
  flex-direction: row;
}

.list-view .car-card .car-media {
  width: 290px;
  min-width: 290px;
  height: auto;
}

.filter-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

.empty-state {
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: #fff;
}

.gallery-main {
  border-radius: 14px;
  overflow: hidden;
  max-height: 470px;
}

.gallery-main img {
  width: 100%;
  object-fit: cover;
}

.thumb-item {
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  appearance: none;
}

.thumb-item.active {
  border-color: var(--primary);
}

.thumb-item img {
  height: 85px;
  width: 100%;
  object-fit: cover;
}

.details-more-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
}

.details-feature-pill {
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
}

.spec-list li {
  border-bottom: 1px solid #e2e8f0;
  padding: 0.5rem 0;
}

.map-placeholder {
  border-radius: 16px;
  min-height: 320px;
  background: linear-gradient(135deg, #dbeafe, #f1f5f9);
  border: 1px solid #cbd5e1;
  display: grid;
  place-items: center;
  color: #475569;
}

.blog-card img {
  height: 220px;
  object-fit: cover;
}

.auth-card {
  max-width: 520px;
  margin: 0 auto;
}

.compare-table th,
.compare-table td {
  min-width: 180px;
}

.loading-overlay {
  display: none;
}

.loading-overlay.show {
  display: block;
}

@media (max-width: 991.98px) {
  .hero {
    min-height: 60vh;
  }

  .hero .carousel-inner,
  .hero .carousel-item,
  .hero-slide-bg,
  .hero-slide-overlay {
    min-height: 60vh;
  }

  .search-panel {
    margin-top: 1rem;
  }

  .list-view .car-card {
    display: block;
  }

  .list-view .car-card .car-media {
    width: 100%;
    min-width: auto;
    height: 230px;
  }
}
