:root {
  --brand-blue: #213686;
  --brand-orange: #F47D30;
}

/* Admin table */
.inv-table {
  width: 100%;
  border-collapse: collapse;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  margin-top: 1em;
}
.inv-table th,
.inv-table td {
  padding: 8px 12px;
  border: 1px solid #eee;
}
.inv-table thead th {
  background: var(--brand-blue);
  color: #fff;
  text-transform: uppercase;
  font-size: 13px;
}
.inv-table tr:nth-child(even) { background: #fafafa; }
.inv-table tr:nth-child(odd)  { background: #fff; }
.inv-table img {
  max-width: 80px;
  display: block;
}

/* Admin controls */
#add-car-btn {
  background-color: var(--brand-orange);
  border-color: var(--brand-orange);
  color: #fff;
  margin-bottom: .5em;
  height: 36px;
  width: calc(160px + 2em);
}
.button-primary:hover {
  background-color: var(--brand-blue);
  border-color: var(--brand-blue);
}
#car-filter {
  height: 36px;
  width: 160px;
}

/* === FRONT-END: cards & grid === */
#amsinv-frontend #amsinv-filter {
  width: 100%;
  max-width: 300px;
  padding: .5em;
  margin-bottom: 1em;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: Arial, sans-serif;
}

#amsinv-frontend #amsinv-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1em;
}

@media screen and (min-width: 768px) {
  #amsinv-frontend #amsinv-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media screen and (min-width: 1024px) {
  #amsinv-frontend #amsinv-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

#amsinv-frontend #amsinv-cards {
  display: grid;
  grid-template-columns: 1fr;  /* mobile: 1 column */
  gap: 1em;
}

@media screen and (min-width: 768px) {
  /* tablet: 2 columns */
  #amsinv-frontend #amsinv-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width: 1024px) {
  /* desktop: 4 columns */
  #amsinv-frontend #amsinv-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* stack image above details */
#amsinv-frontend .amsinv-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #eee;
  border-radius: 5px;
  padding: 1em;
  background: #fff;
  font-family: Arial, sans-serif;
}

#amsinv-frontend .amsinv-card img {
  width: 100%;
  height: auto;
  border-radius: 5px;
  margin-bottom: 1em;
}
