.commons-brand-page .brand-swatch-grid,
.commons-brand-page .brand-logo-grid {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 2rem;
}

.commons-brand-page .brand-swatch-grid {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.commons-brand-page .brand-swatch {
  min-width: 0;
}

.commons-brand-page .brand-swatch-sample,
.commons-brand-page .brand-swatch-swatch-sample {
  height: 76px;
  margin-bottom: 0.55rem;
  border: 1px solid color-mix(in srgb, var(--swatch), #000 18%);
  border-radius: 0.2rem;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12);
}

.commons-brand-page .brand-swatch p {
  margin: 0.1rem 0;
}

.commons-brand-page .brand-logo-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  align-items: stretch;
}

.commons-brand-page .brand-logo-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid var(--bs-border, #d9ccc0);
  border-radius: 0.35rem;
  background: var(--bs-surface, #fffdfc);
}

.commons-brand-page .brand-logo-card figure,
.commons-brand-page .brand-logo-card p {
  margin: 0;
}

.commons-brand-page .brand-logo-card img {
  display: block;
  width: 100%;
  max-width: 230px;
  max-height: 230px;
  margin: 0 auto 0.5rem;
  object-fit: contain;
}

.commons-brand-page .brand-logo-card h3 {
  margin-top: 0.2rem;
}

@media (max-width: 640px) {
  .commons-brand-page .brand-swatch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
