.brand-recs {
  padding-block: 48px;
  background: #efece6;
  border-top: 1px solid #dcd6cb;
}

.brand-recs__header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.brand-recs__eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b4532a;
}

.brand-recs__title {
  margin: 0;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
  color: #1c1d1f;
}

.brand-recs__refresh {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1c1d1f;
  cursor: pointer;
  background: #fff;
  border: 1px solid #1c1d1f;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}

.brand-recs__refresh:hover {
  color: #fff;
  background: #1c1d1f;
}

.brand-recs__refresh svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-recs__refresh[hidden] {
  display: none;
}

.brand-recs__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* Until the script runs, only the first group is shown */
.brand-recs__list > [data-recs-group]:not([data-recs-group="0"]) {
  display: none;
}

.brand-recs.is-ready .brand-recs__list > [data-recs-group] {
  display: none;
}

.brand-recs.is-ready .brand-recs__list > [data-recs-group].is-visible {
  display: flex;
  animation: brand-recs-in 0.3s ease;
}

@keyframes brand-recs-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-recs.is-ready .brand-recs__list > [data-recs-group].is-visible {
    animation: none;
  }
}

@media (max-width: 959px) {
  .brand-recs {
    padding-block: 32px;
  }

  .brand-recs__header {
    margin-bottom: 16px;
  }

  .brand-recs__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .brand-recs__refresh {
    width: 100%;
    justify-content: center;
  }
}
