* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #fafafa;
  color: #1a1a1a;
  line-height: 1.6;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

.header-nav {
  background: #1a1a1a;
  padding: 15px 20px;
  display: flex;
  gap: 20px;
}

.nav-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
}

.nav-link:hover {
  text-decoration: underline;
}

h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.filter-form {
  background: #ffffff;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.filter-row input {
  flex: 1;
  min-width: 150px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.btn {
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.btn:hover {
  background: #1d4ed8;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.car-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.car-card {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s;
}

.car-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.car-thumbnail {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.car-thumbnail-placeholder {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e5e5e5;
  color: #6a6a6a;
  font-size: 14px;
}

.car-card-content {
  padding: 15px;
}

.car-card-content h3 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.car-price {
  color: #2563eb;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 5px;
}

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

.car-form {
  background: #ffffff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  max-width: 600px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
}

.car-detail {
  background: #ffffff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 30px;
}

.car-photos {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-bottom: 20px;
}

.car-photo {
  width: 300px;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
}

.car-photo-placeholder {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e5e5e5;
  color: #6a6a6a;
  border-radius: 4px;
  margin-bottom: 20px;
}

.car-info h1 {
  margin-bottom: 10px;
}

.car-price-large {
  color: #2563eb;
  font-weight: 600;
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.car-location-large {
  color: #6a6a6a;
  margin-bottom: 20px;
}

.car-description {
  border-top: 1px solid #eee;
  padding-top: 20px;
  margin-top: 20px;
}

.car-description h3 {
  margin-bottom: 10px;
}

.contact-section {
  background: #ffffff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  max-width: 600px;
}

.contact-section h2 {
  margin-bottom: 15px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 10px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #2563eb;
}

.success-message {
  background: #dcfce7;
  color: #166534;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.error-message {
  color: #dc2626;
  margin-bottom: 10px;
}

.no-results {
  text-align: center;
  padding: 40px;
  color: #6a6a6a;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: #2563eb;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .filter-row {
    flex-direction: column;
  }

  .filter-row input {
    min-width: 100%;
  }
}