/* ===============================
   CARS PAGE LAYOUT
================================ */

.cars-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.page-title {
  text-align: center;
  margin-bottom: 30px;
  font-size: 28px;
  color: #1f3c88;
}

/* ===============================
   GRID
================================ */

.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}

/* ===============================
   CARD
================================ */

.car-card {
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 25px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.car-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 35px rgba(0,0,0,0.15);
}

/* ===============================
   IMAGE CONTAINER (AUTO-FIT)
================================ */

.car-image {
  width: 100%;
  height: 180px;
  background: #f4f6f8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.car-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.car-card:hover img {
  transform: scale(1.03);
}

/* ===============================
   INFO
================================ */

.car-info {
  padding: 20px;
}

.car-info h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.price {
  font-size: 18px;
  font-weight: bold;
  color: #2b7a0b;
  margin-bottom: 6px;
}

.desc {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
}

/* ===============================
   BUTTON
================================ */

.btn {
  display: inline-block;
  padding: 10px 16px;
  background: #1f3c88;
  color: #ffffff;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.btn:hover {
  background: #162c66;
}

/* ===============================
   ANIMATIONS
================================ */

.fade-up {
  animation: fadeUp 0.8s ease forwards;
  opacity: 0;
}

.delay-1 {
  animation-delay: 0.2s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===============================
   PAGINATION
================================ */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 40px 0;
}

.pagination button {
  padding: 10px 18px;
  border: none;
  background: #1f3c88;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s ease;
}

.pagination button:hover:not(:disabled) {
  background: #162c66;
}

.pagination button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

#pageInfo {
  font-weight: bold;
  color: #333;
}

/* ===============================
   RESPONSIVE DESIGN
================================ */

@media (max-width: 768px) {
  .page-title {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .cars-container {
    margin: 25px auto;
  }

  .page-title {
    font-size: 22px;
  }

  .car-info {
    padding: 16px;
  }

  .price {
    font-size: 16px;
  }

  .btn {
    width: 100%;
    text-align: center;
  }
}
