/* Reset and Base */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f9f9f9;
  color: #333;
}

.container {
  display: flex;
  max-width: 1200px;
  margin: 1.5rem auto;
  gap: 1.5rem;
  padding: 0 1rem;
}

/* Top Filters */
.date-time-top {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: flex-end;
  background-color: white;
  padding: 1rem;
  margin: 1rem auto;
  max-width: 1200px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.08);
}

.date-time-top label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #003580;
  margin-bottom: 0.3rem;
}

.date-time-top select,
.date-time-top input[type="datetime-local"] {
  padding: 0.5rem;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline-color: #003580;
  width: 200px;
  background-color: #fff;
}

.date-time-top button {
  padding: 0.6rem 1.2rem;
  background-color: #003580;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.date-time-top button:hover {
  background-color: #00214e;
}

/* Sidebar Filters */
.sidebar {
  flex: 0 0 280px;
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.1);
  height: fit-content;
  position: sticky;
  top: 1rem;
}

.sidebar h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 700;
  color: #003580;
  border-bottom: 2px solid #003580;
  padding-bottom: 0.5rem;
}

.sidebar label {
  display: block;
  margin: 1rem 0 0.3rem 0;
  font-weight: 600;
  font-size: 0.9rem;
  color: #222;
}

.sidebar input[type="range"],
.sidebar select {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 0.9rem;
  outline-color: #003580;
  cursor: pointer;
}

/* Car List */
.car-list {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
  gap: 1rem;
}

/* Car Card */
.car-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease;
}

.car-card:hover {
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.15);
}

.car-card img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  background-color: #f0f0f0;
  padding: 10px;
}

.car-info {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.car-info h3 {
  margin: 0 0 0.6rem 0;
  font-weight: 700;
  color: #003580;
  font-size: 1.1rem;
}

.car-info ul {
  list-style: none;
  padding-left: 0;
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
  color: #444;
}

.car-info ul li {
  margin-bottom: 0.3rem;
}

.car-info button {
  background-color: #003580;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 0.55rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: 1rem;
}

.car-info button:hover {
  background-color: #00214e;
}

/* Responsive */
@media (max-width: 900px) {
  .container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    margin-bottom: 1rem;
    position: relative;
  }

  .date-time-top {
    flex-direction: column;
    align-items: stretch;
  }

  .date-time-top select,
  .date-time-top input[type="datetime-local"] {
    width: 100%;
  }
}
