/* Стили для аккордеона фильтра */

 .brands_accordion-select {
   position: relative;
   width: 100%;
   user-select: none;
 }

.brands_accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: #fff;
  border: 1px solid #224089;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
}

.brands_accordion-header.active {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}

.brands_accordion-header__text {
  color: #224089;
  font-weight: 400;
  font-size: 14px;
}

.brands_accordion-header__arrow {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  transition: transform 0.3s ease;
  fill: #4a90e2;
}

.brands_accordion-header.active .brands_accordion-header__arrow {
  transform: rotate(180deg);
}

.brands_accordion-content {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid transparent;
  border-top: none;
  border-radius: 0 0 5px 5px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.brands_accordion-content.open {
  border: 1px solid #224089;
  max-height: 140px; /* Высота для 4 элементов (примерно 35px * 4) */
  overflow-y: auto;
}

/* Кастомный скроллбар */
.brands_accordion-content.open::-webkit-scrollbar {
  width: 6px;
}

.brands_accordion-content.open::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 0 0 8px 0;
}

.brands_accordion-content.open::-webkit-scrollbar-thumb {
  background: rgba(128, 128, 128, 0.4);
  border-radius: 3px;
  min-height: 35px;
}

.brands_accordion-item {
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(34, 64, 137, 0.3);
  color: #224089;
  font-weight: 400;
  font-size: 14px;
}

.brands_accordion-item:last-child {
  border-bottom: none;
}

.brands_accordion-item.active {
  background: #CED9F9;
}

.brands_accordion-item:first-child.active {
  border-radius: 0;
}

/* Скрываем последний бордер если элемент последний в списке */
.brands_accordion-item:last-child {
  border-radius: 0 0 6px 6px;
}

/* === Отступы для заголовка буквы === */
.brand-search__letter {
  margin-top: 40px;
  margin-bottom: 20px;
}

/* Убираем лишний верхний отступ у самого первого заголовка на странице */
/*.brand-group:first-child .brand-search__letter {*/
/*  margin-top: -20px;*/
/*}*/

#brandsContainer {
  margin-top: -30px;
}


.featured-brand-wrapper {
  margin-top: 20px;
}


/* Мобильная адаптация */
@media (max-width: 768px) {
  .brand-search__letter {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 20px;
  }
  .brand-group:first-child .brand-search__letter {
    margin-top: 10px;
  }
}

@media  (max-width: 640px) {
  .featured-brand-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
  }
  .brands-logos__wrapper {
    justify-content: center;
  }
  .brand-search__letter {
    text-align: center;
  }
}
