/* Air Filters Europe - Cartes de catégories sur la page d'accueil */

.afe-home-categories {
  margin: 2rem 0 3rem;
}

.afe-home-categories__title {
  text-align: center;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.afe-home-categories__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
}

.afe-cat-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 120px;
  padding: 1rem 2.5rem 1rem 1rem;
  background: #fff;
  border: 1px solid var(--bs-border-color, #e5e7eb);
  border-radius: 0.75rem;
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

/* Image carrée en background-image : immune aux overrides de styles img du thème.
   background-size: cover = l'image remplit le carré et est croppée si besoin. */
.afe-cat-card__image {
  flex: 0 0 auto;
  width: 80px;
  height: 80px;
  border-radius: 0.5rem;
  background-color: var(--bs-light, #f8f9fa);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: block;
}

.afe-cat-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  flex: 1 1 auto;
}

.afe-cat-card:hover,
.afe-cat-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.10);
  border-color: var(--bs-primary, #2fb5d2);
  color: inherit;
  text-decoration: none;
}

.afe-cat-card__name {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.25;
}

.afe-cat-card__count {
  font-size: 0.85rem;
  opacity: 0.6;
}

.afe-cat-card__cta {
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  color: var(--bs-primary, #2fb5d2);
  opacity: 0.45;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.afe-cat-card:hover .afe-cat-card__cta,
.afe-cat-card:focus-visible .afe-cat-card__cta {
  opacity: 1;
  transform: translateY(-50%) translateX(4px);
}

.afe-cat-card__cta svg {
  width: 100%;
  height: 100%;
  display: block;
}

@media (max-width: 575px) {
  .afe-home-categories__grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.7rem;
  }

  .afe-cat-card {
    min-height: 100px;
    padding: 1rem 2rem 1rem 1rem;
  }

  .afe-cat-card__image {
    width: 56px;
    height: 56px;
  }
}
</content>
</invoke>