/* =================== SEARCH PAGE STYLES =================== */

body {
  background-color: #f9f9f9;
  color: #000;
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  padding: 0;
}

/* ----------------- SEARCH SECTION ----------------- */

.search-section {
  padding: 60px 20px 20px;
  text-align: center;
  background-color: #fff;
}

.search-title {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #111;
}

/* ----------------- RESULTS SECTION ----------------- */

#results {
  padding: 2rem 1rem 4rem;
  background-color: #f9f9f9;
  min-height: 50vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* ----------------- CAR CARDS ----------------- */

.car-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.car-card {
  background-color: #fff;
  border-radius: 15px;
  overflow: hidden;
  width: 300px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.car-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.car-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.car-info {
  padding: 1rem;
  text-align: left;
  color: #000;
}

.car-info h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: bold;
  color: #222;
}

.car-info p {
  margin: 0.2rem 0;
  font-size: 0.95rem;
  color: #555;
}

.price {
  color: #000;
  font-size: 1.2rem;
  font-weight: bold;
  margin-top: 0.8rem;
}

/* ----------------- MODAL IMAGE ----------------- */

.image-modal {
  position: fixed;
  z-index: 999;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  display: none;
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

/* ----------------- MOBILE RESPONSIVE ----------------- */

@media (max-width: 768px) {
  .search-section {
    padding: 40px 10px 20px;
  }

  .search-title {
    font-size: 2rem;
  }

  .car-cards {
    flex-direction: column;
    align-items: center;
  }

  .car-card {
    width: 90%;
    max-width: 340px;
  }

  .modal-content {
    max-width: 95%;
    max-height: 70vh;
  }

  .close-modal {
    font-size: 32px;
    right: 20px;
    top: 10px;
  }
}
