/* ==========================================================================
   BRAND LIST SEARCH
   ========================================================================== */
.ep-brand-search {
  margin-bottom: 20px;
}

.ep-search-input {
  width: 100%;
  max-width: 420px;
  padding: 12px 16px;
  border: 1px solid rgba(34, 36, 38, 0.08);
  border-radius: 10px;
  font-size: 1rem;
  background: linear-gradient(180deg, #fff, #fbfdff);
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.04);
  transition: border-color .2s ease;
}

.ep-search-input:focus {
  border-color: var(--ep-primary);
  outline: none;
}

/* ==========================================================================
   BRAND INDEX & ALPHABET
   ========================================================================== */
.ep-brand-index {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ep-alphabet {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ep-alpha-link {
  padding: 6px 10px;
  border-radius: 6px;
  background: transparent;
  color: var(--ep-text-soft);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.ep-alpha-link:hover {
  color: var(--ep-primary);
  background: rgba(var(--ep-primary-rgb), .06);
  border-color: rgba(var(--ep-primary-rgb), .08);
}

.ep-alpha-link.ep-alpha-empty {
  opacity: .35;
  pointer-events: none;
}

/* ==========================================================================
   BRAND GROUPS & GRID
   ========================================================================== */
.ep-brand-group {
  margin-bottom: 28px;
  padding: 8px;
  border-radius: 8px;
  background: transparent;
  border: none;
}

.ep-brand-group h3 {
  margin: 0 0 12px 0;
  font-size: 1.05rem;
  color: var(--ep-text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
}

.ep-brand-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  align-items: stretch;
}

.ep-brand-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  border-radius: 8px;
  background: transparent;
  border: 0;
  color: var(--ep-text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  height: 56px;
  box-sizing: border-box;
  transition: transform .18s ease;
}

.ep-brand-btn img {
  max-height: 30px;
  max-width: 86%;
  object-fit: contain;
  display: block;
}

.ep-brand-btn .ep-brand-name {
  font-size: 0.92rem;
  text-align: center;
  display: block;
}

.ep-brand-btn.has-logo .ep-brand-name {
  display: none;
}

.ep-brand-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 32px rgba(var(--ep-primary-rgb), 0.15), 0 4px 12px rgba(16, 24, 40, 0.08);
  filter: brightness(1.02);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(var(--ep-primary-rgb), 0.02));
}

/* Remove white container for items that have logos */
.ep-brand-btn.has-logo {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 6px;
  height: 48px;
}

.ep-brand-btn.has-logo img {
  max-height: 40px;
}

.ep-brand-btn:focus {
  outline: 3px solid rgba(var(--ep-primary-rgb), 0.08);
  outline-offset: 3px;
}

.ep-muted {
  color: var(--ep-text-soft);
  text-align: left;
  font-style: italic;
}

.ep-hidden {
  display: none;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 520px) {
  .ep-brand-btn {
    max-width: 140px;
    padding: 6px 8px;
    font-size: 0.86rem;
    height: 52px;
  }
  
  .ep-brand-row {
    gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }
  
  .ep-brand-group {
    padding: 6px;
  }
  
  .ep-alpha-link {
    font-size: 0.82rem;
    padding: 6px 8px;
  }
}