/* Filter podľa vozidla */
.autofilter {
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
  background: #f6f6f6;
  border-radius: 6px;
}

.autofilter__title {
  margin: 0 0 .75rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.autofilter__active {
  margin: -.25rem 0 .75rem;
  padding: .4rem .7rem;
  border-left: 3px solid #1d6b34;
  background: #e8f6ec;
  font-size: .9rem;
}

.autofilter__fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: .75rem;
  align-items: end;
}

.autofilter--vertical .autofilter__fields {
  grid-template-columns: 1fr;
}

.autofilter__field {
  min-width: 0;
}

.autofilter__label {
  display: block;
  margin-bottom: .25rem;
  font-size: .85rem;
  font-weight: 600;
}

.autofilter__field select {
  width: 100%;
}

.autofilter__field select:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.autofilter__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}

.autofilter__clear {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: .85rem;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 767px) {
  .autofilter__fields {
    grid-template-columns: 1fr;
  }

  .autofilter__actions .btn {
    width: 100%;
  }
}

/* Výsledky – kategórie */
.autofilter-categories {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 1.5rem;
}

.autofilter-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .75rem;
  border: 1px solid #ddd;
  border-radius: 999px;
  background: #fff;
  color: inherit;
  font-size: .9rem;
  text-decoration: none;
}

.autofilter-chip span {
  color: #888;
  font-size: .8rem;
}

.autofilter-chip:hover,
.autofilter-chip.is-active {
  border-color: currentColor;
  text-decoration: none;
}

.autofilter-chip.is-active {
  font-weight: 700;
}

/* Karta produktu */
.autofilter-fit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin: 1rem 0;
  padding: .6rem .9rem;
  border-radius: 6px;
  font-size: .95rem;
}

.autofilter-fit--yes {
  background: #e8f6ec;
  color: #1d6b34;
}

.autofilter-fit--no {
  background: #fdecec;
  color: #a12626;
}

.autofilter-fit__link {
  color: inherit;
  text-decoration: underline;
}

.autofilter-vehicles {
  margin: 2rem 0;
}

.autofilter-vehicles__make {
  border-bottom: 1px solid #eee;
  padding: .5rem 0;
}

.autofilter-vehicles__make summary {
  font-weight: 700;
  cursor: pointer;
}

.autofilter-vehicles__make ul {
  margin: .5rem 0 0 1rem;
  padding: 0;
  font-size: .9rem;
}

.autofilter-vehicles__more {
  margin-top: .75rem;
  color: #888;
  font-size: .85rem;
}

/* Vzhľad ako filter pneumatík (namelikecategory) – zelené menu, červené "Zrušiť výber" */
.autofilter {
  --af-green: #52bf05;
  --af-green-dark: #45a303;
  --af-red: #d9302c;
  --af-red-dark: #b82522;
  text-align: left;
}

.autofilter .autofilter__label {
  width: 100%;
  margin: 0 0 .3rem;
  padding: 0;
  font-size: 1rem;
  text-align: left;
}

.autofilter .autofilter__field select {
  height: auto;
  padding: .7rem 2.5rem .7rem 1rem;
  border: 0;
  border-radius: 4px;
  box-shadow: none;
  background: var(--af-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 1rem center;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: background-color .15s, opacity .15s;
}

.autofilter .autofilter__field select:hover,
.autofilter .autofilter__field select:focus {
  background-color: var(--af-green-dark);
  outline: none;
}

.autofilter .autofilter__field select:disabled {
  opacity: .5;
}

.autofilter .autofilter__field select option {
  background: #fff;
  color: #333;
  font-weight: normal;
}

.autofilter .autofilter__actions .btn {
  padding: .7rem 1.25rem;
  border: 0;
  border-radius: 4px;
  background: var(--af-green-dark);
  color: #fff;
  font-weight: 600;
}

.autofilter .autofilter__actions .btn:hover,
.autofilter .autofilter__actions .btn:focus {
  background: #3a8a02;
  color: #fff;
}

.autofilter .autofilter__actions .btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.autofilter .autofilter__clear {
  padding: .55rem 1.1rem;
  border-radius: 4px;
  background: var(--af-red);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.autofilter .autofilter__clear:hover,
.autofilter .autofilter__clear:focus {
  background: var(--af-red-dark);
  color: #fff;
}
