.brand-list {
  background-color: rgb(var(--color-background));
}

.block-brand-card__image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: var(--aspect-ratio);
  padding: var(--padding);
  overflow: hidden;
  font-size: 0;
  background-color: rgb(var(--color-media-background));
}

.block-brand-list__link img {
  display: block;
  width: 100%;
  height: auto;
  background-color: transparent;
  animation: fadeIn 1s cubic-bezier(0.26, 0.54, 0.32, 1) 0s forwards;
}

.block-brand-list__link svg {
  width: 100%;
  height: 100%;
}

/* Optional labeled navigation keeps the artwork independent from the text. */
.joy-category-item {
  aspect-ratio: auto;
  overflow: visible;
}

.block-brand-list__link.joy-category-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 67px;
  padding: 4px 2px;
  color: inherit;
  text-decoration: none;
}

.joy-category-icon {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  transform-origin: 50% 70%;
}

.joy-category-link .joy-category-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: none;
}

.joy-category-label {
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  text-align: center;
}

.joy-category-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -2px;
  border-radius: 4px;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .joy-category-wiggle:hover .joy-category-icon,
  .joy-category-wiggle:focus-visible .joy-category-icon {
    animation: joy-category-wiggle 700ms ease-in-out both;
  }
}

@keyframes joy-category-wiggle {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-13deg); }
  40% { transform: rotate(11deg); }
  60% { transform: rotate(-7deg); }
  80% { transform: rotate(4deg); }
}

@media (max-width: 959px) {
  .joy-category-icon { width: 40px; height: 40px; }
  .joy-category-label { font-size: 11px; }
}
