/*
-----------------------------------------
FORDON (vehicleList): kort med bild, namn, kort text, tekniska data som tabell och en knapp
-----------------------------------------
*/

.vehicle-list .section-header {
  margin-block-end: var(--space-24);
}

.vehicle-list__items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--size-vehicle-min)), 1fr));
  gap: var(--space-grid);
}

.vehicle-list__item {
  display: flex;
  min-inline-size: 0;
}

.vehicle {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-inline-size: 0;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
}

.vehicle__media {
  aspect-ratio: var(--ratio-vehicle);
  overflow: hidden;
}

.vehicle__img {
  inline-size: 100%;
  block-size: 100%;
  max-inline-size: none;
  object-fit: cover;
}

.vehicle__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-16);
  padding: var(--space-16);
}

.vehicle__title {
  font: var(--font-card-heading);
  color: var(--text-heading);
}

.vehicle__text {
  font: var(--font-body-tight);
  color: var(--text-body);
}

.vehicle__specs {
  inline-size: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font: var(--font-body-tight);
}

.vehicle__spec {
  border-block-end: 1px solid var(--border-subtle);
}

.vehicle__spec-label,
.vehicle__spec-value {
  padding: var(--space-8) var(--space-8) var(--space-8) 0;
  text-align: start;
  vertical-align: top;
}

.vehicle__spec-label {
  inline-size: var(--size-spec-label);
  font-weight: var(--font-weight-semibold);
  color: var(--text-heading);
}

.vehicle__spec-value {
  color: var(--text-body);
  overflow-wrap: anywhere;
}

.vehicle__action {
  margin-block-start: auto;
}
