header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, rgba(26,31,113,0.95) 0%, rgba(39,48,165,0.95) 100%);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: background 0.3s ease;
}
header.shrink {
  padding-top: 5px;
  padding-bottom: 5px;
  background: linear-gradient(90deg, #1a1f71 0%, #2730a5 100%);
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}


.navbar {
  background: transparent !important;
}

.navbar .nav-link {
  color: #ffffff !important;
  font-weight: 500;
  transition: color 0.3s ease, transform 0.2s;
}

.navbar .nav-link:hover {
  color: #ffd700 !important; /* vàng nhạt nổi bật */
  transform: translateY(-2px);
}

.navbar-brand {
  color: #fff !important;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.navbar-brand span {
  color: #ffd700; /* tô vàng riêng cho chữ MBX */
}

.navbar-toggler {
  border-color: rgba(255,255,255,0.5);
}


body {
    font-family: 'Segoe UI', sans-serif;
    background: #f4f6f8;
    color: #333;
}
.hero {
  position: relative;
  width: 100%;
  height: 680px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}

/* ảnh nền hero */
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 1s ease-in-out;
  z-index: 0;
}

/* hiệu ứng fade */
.hero-img.fade-out {
  opacity: 0;
}

/* lớp phủ tối giúp chữ nổi bật */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.1) 30%,
    rgba(0, 0, 0, 0.6) 100%
  );
  z-index: 1;
}

.hero .container-fluid {
  position: relative;
  z-index: 2;
}

.hero h1,
.hero p,
.hero a {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    height: 50vh;
    background-position: center top;
    padding: 2rem 1rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero p {
    font-size: 1rem;
  }
}
#hero-image {
  transition: opacity 0.8s ease-in-out;
}

#hero-image.fade-out {
  opacity: 0;
}
.hero {
  position: relative;
  width: 100%;
  height: 680px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}

.hero-img {
  transition: opacity 1s ease-in-out;
  object-fit: cover;
}

.hero-img.fade-out {
  opacity: 0;
}

@media (max-width: 768px) {
  .hero {
    height: 50vh;
  }
}





.car-card {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.car-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

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

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

.price {
    color: #1a1f71;
    font-weight: bold;
    font-size: 1.3rem;
}

.location {
    font-size: 0.9rem;
    color: #6c757d;
}

.btn-custom {
    background: linear-gradient(90deg, #1a1f71, #2e3b9f);
    color: white;
    border: none;
    transition: background 0.3s ease;
}

.btn-custom:hover {
    background: linear-gradient(90deg, #2e3b9f, #1a1f71);
}

footer {
    background: #1a1f71;
    color: white;
    padding: 20px 0;
    margin-top: 30px;
}
.btn-custom {
    background: linear-gradient(90deg, #1a1f71, #2e3b9f);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.btn-custom:hover {
    background: linear-gradient(90deg, #2e3b9f, #1a1f71);
}

footer {
    background: #1a1f71;
    color: white;
    padding: 20px 0;
    margin-top: 30px;
}
#listing-container {
    padding-left: 0;
    padding-right: 0;
}

.row.g-4 {
    margin-left: 0;
    margin-right: 0;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #1a1f71;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#btnBackToTop {
  bottom: 80px;
  right: 20px;
  width: 45px;
  height: 45px;
  display: none; /* ẩn mặc định */
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#btnBackToTop.show {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

#btnBackToTop.hide {
  opacity: 0;
  transform: translateY(20px);
}

#btnBackToTop:hover {
  transform: scale(1.1);
}
