/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Arial", sans-serif;
  color: #1a1a1a;
  background-color: #f2f4f7;
}

.header-section h1 {
  font-size: 2.4rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.header-section .subtitle {
  font-size: 1.1rem;
  color: #666;
}

.inventory-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.header-section {
  text-align: center;
  margin-bottom: 2rem;
}

.car-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
}

.car-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.car-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.car-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  color: #1a1a1a;
  background-color: #26c281; /* oder .blue */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.car-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.car-image-placeholder {
  width: 100%;
  height: 180px;
  background-color: #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
}

.car-info {
  padding: 1rem;
  flex-grow: 1;
}

.car-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.car-details {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.4;
}

.car-price {
  margin-top: 0.5rem;
  font-size: 1.1rem;
  font-weight: bold;
  color: #1a1a1a;
}

.car-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem 1rem;
}

.details-link {
  font-size: 0.95rem;
  color: #3d64ff;
  font-weight: 500;
  text-decoration: none;
  margin-top: 0.4rem;
}

.edit-button,
.delete-button {
  font-size: 0.9rem;
  text-decoration: none;
  background-color: #f0f0f0;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
}

.edit-button {
  background-color: #f2f2f2;
  color: #333;
}
.edit-button:hover {
  background-color: #e0e0e0;
}

.delete-button {
  background-color: #f44336;
  color: #fff;
}

.delete-button:hover {
  background-color: #d32f2f;
}


.sort-section {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 1rem;
}

.sort-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-form label {
  font-weight: 500;
}

.sort-form select {
  padding: 0.5rem;
  font-size: 1rem;
}

.keine-autos {
  display: flex;
  padding: 2rem;
  justify-content: center;
  font-size: 1.2rem;
  color: #555;
}

/* ===== Responsive Breakpoints ===== */

/* === Smartphone: max-width: 767px === */
@media (max-width: 767px) {
  .car-grid {
    grid-template-columns: 1fr;
  }
}

/* === Tablet: 768px–1023px === */
@media (min-width: 768px) and (max-width: 1023px) {
  .car-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* === Desktop: min-width: 1024px === */
@media (min-width: 1024px) and (max-width: 1100px) {
  .car-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
