.brand-detail-hero {
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.1), rgba(var(--bs-info-rgb), 0.08));
}

.brand-detail-subtitle {
  color: var(--bs-secondary-color);
  margin-bottom: 0;
}

.brand-detail-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.brand-sort-form {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.brand-sort-select,
.brand-page-select {
  min-width: 170px;
  border-radius: 0.6rem;
}

.brand-sort-select {
  width: 170px;
}

.brand-page-select {
  width: 165px;
  flex: 0 0 165px;
}

.brand-grid-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.85rem;
  overflow: hidden;
  cursor: pointer;
  background: var(--bs-card-bg);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.brand-grid-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  border-color: rgba(var(--bs-primary-rgb), 0.35);
}

.brand-grid-image {
  width: 100%;
  height: auto;
  object-fit: cover;  /* vult container, geen grijze marge */
  background: var(--bs-tertiary-bg);
  padding: 0.1rem;  /* minimaal, alleen voor spacing */
  transition: opacity 0.3s ease;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;  /* VIERKANTE afbeelding */
}

/* Zet aspect-ratio op de image wrapper zodat alle cards gelijk zijn */
.brand-grid-card {
  min-height: 340px;  /* flexibel groeiend, niet te strak */
}

.brand-grid-card:hover .brand-grid-image {
  opacity: 0.92;
}

.brand-grid-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.46);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.brand-grid-card.show-overlay .brand-grid-overlay,
.brand-grid-card:hover .brand-grid-overlay {
  opacity: 1;
}

.brand-grid-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  text-align: center;
  padding: 0.78rem;
  min-height: 106px;
}

.brand-grid-title {
  font-size: 0.93rem;
  line-height: 1.3;
  margin: 0 0 auto;
  font-weight: 700;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.brand-grid-meta {
  margin-top: 0.52rem;
  font-size: 0.84rem;
  color: var(--bs-secondary-color);
  font-weight: 500;
}

.brand-grid-extra {
  font-size: 0.79rem;
  color: var(--bs-secondary-color);
  margin-top: 0.22rem;
}

.brand-pagination {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.8rem;
  padding: 0.65rem;
  background: var(--bs-body-bg);
}

.brand-page-indicator {
  font-size: 0.9rem;
  min-width: 115px;
  text-align: center;
}

@media (max-width: 767.98px) {
  .brand-detail-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-sort-form {
    justify-content: space-between;
  }

  .brand-sort-select,
  .brand-page-select {
    min-width: 0;
    width: 100%;
  }
}

/* Dark mode: subtiele border rond afbeeldingen voor contrast */
:root[data-bs-theme="dark"] .brand-grid-image,
html.dark .brand-grid-image,
body.dark .brand-grid-image {
  border: 1px solid rgba(255, 255, 255, 0.1);
}
