.brands {
  max-width: 1410px;
  width: 100%;
  margin: 0 auto;
  padding-top: 70px;
  padding-bottom: 100px;
}
.brands__banner {
  height: 315px;
  width: 100%;
  border-radius: 30px;
  background-color: #81C7FC;
  display: flex;
  flex-direction: column;
  padding: 40px;
  align-items: start;
  justify-content: flex-end;
  position: relative;
  margin-bottom: 40px;
  background-image: url("/main/design2025/images/brands/banner-smile.svg");
  background-position: 40px top;
  background-size: auto;
  background-repeat: no-repeat;
}
.brands__banner::after {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  width: 100%;
  height: 103%;
  background-image: url("/main/design2025/images/brands/banner.svg");
  background-position: right 77px top;
  background-size: 42%;
  background-repeat: no-repeat;
}

.brands__banner__title {
  font-weight: 600;
  font-size: 40px;
  line-height: 105%;
  margin-bottom: 19px;
  max-width: 410px;
}
.brands__banner__text {
  font-weight: 500;
  font-size: 20px;
  line-height: 120%;
}

@media (max-width: 1024px) {
  .brands {
    width: calc(100% - 120px);
  }
  .brands__banner {
    height: 254px;
    padding: 20px;
    margin-bottom: 30px;
    background-position: 27px top;
  }
  .brands__banner::after {
    background-position: right top;
    background-size: 67%;
    top: -7px;
    height: 102%;
  }
  .brands__banner__title {
    margin-bottom: 13px;
    max-width: 270px;
    font-size: 27px;
  }
  .brands__banner__text {
    margin-bottom: 30px;
    font-size: 13px;
  }
}

@media (max-width: 767px) {
  .brands {
    padding-bottom: 40px;
    width: calc(100% - 20px);
  }
  .brands__banner {
    width: 100%;
    height: 273px;
    padding: 39px 14px 0;
    background-position: right 27px top;
    background-size: 104px;
    margin-bottom: 20px;
    justify-content: flex-start;
  }
  .brands__banner::after {
    background-position: right 13px bottom -80px;
    background-size: 60%;
    height: 103%;
  }
  .brands__banner__text {
    flex-grow: 1;
  }
}

@media (max-width: 400px) {
  .brands__banner::after {
    background-position: left 13px bottom -80px;
    background-size: 64%;
    height: 102%;
  }
}

@media (max-width: 330px) {
  .brands__banner::after {
    background-size: 77%;
  }
}

.main-content {
  max-width: 1410px;
  padding: 0 40px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 767px) {
  .main-content {
    padding: 0;
  }
}

.brands-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.brand {
  background: #FFFFFF;
  border-radius: 30px;
  padding: 20px;
}

.brand__header {
  display: flex;
  align-items: end;
  gap: 16px;
  margin-bottom: 16px;
}

.brand__image-wrapper {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 20px;
  background: #F1F1F1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand__image {
  object-fit: contain;
}

.brand__title {
  font-weight: 600;
  font-size: 24px;
  line-height: 130%;
  color: #636363;
}

.brand__text {
  font-weight: 500;
  font-size: 16px;
  line-height: 140%;
  color: #636363;
  margin-bottom: 16px;
}

.brand-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-buttons__btn--primary {
  background: #477CFF;
  border-radius: 30px;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 16px;
  line-height: 100%;
  padding: 16px 33px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.brand-buttons__btn--secondary {
  color: #477CFF;
  text-decoration: underline;
  font-weight: 500;
  font-size: 16px;
  line-height: 140%;
}

@media (max-width: 1024px) {
  .brands-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .brand__header {
    align-items: center;
    margin-bottom: 12px;
  }

  .brand__image-wrapper {
    width: 55px;
    height: 55px;
  }

  .brand__title {
    font-weight: 500;
    font-size: 18px;
    line-height: 120%;
  }

  .brand__text {
    font-size: 12px;
    line-height: 120%;
    margin-bottom: 12px;
  }

  .brand-buttons {
    gap: 8px;
  }

  .brand-buttons__btn--primary {
    font-size: 14px;
    line-height: 130%;
    padding: 9px 14px;
  }

  .brand-buttons__btn--secondary {
    font-weight: 600;
    font-size: 14px;
    line-height: 130%;
  }
}

@media (max-width: 767px) {
  .brands-list {
    grid-template-columns: repeat(1, 1fr);
    gap: 12px;
  }
}

/* BRANDS FILTER */
.brand__filter-form--items {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  list-style: none;
  padding: 0;
  gap: 14px;
  overflow: hidden;
  /* advanced animation technique */
  backface-visibility: hidden;
  height: calc-size(auto);
  transition: height 0.5s;
}
.brand__filter-form--last-item {
  margin-left: auto;
}
@media (max-width: 1440px) {
  .brand__filter-form--items {
    gap: 14px;
  }
}
@media (max-width: 948px) {
  .brand__filter-form--items {
    margin-bottom: 32px;
  }
}
.brand__filter-form--item {
  border-radius: 50px;
  padding: 14px 24px;
  color: #636363;
  cursor: pointer;
  background-color: #fff;
}
@media (max-width: 948px) {
  .brand__filter-form--items {
    margin-bottom: 32px;
  }
  .brand__filter-form--item {
    font-size: 16px;
    line-height: 120%;
    padding: 7px 14px;
  }
}
.brand__filter-search-form--item {
  border-radius: 50px;
  margin-bottom: 16px;
  color: #000000;
  cursor: pointer;
  background-color: #fff;
}
.brand__filter-search-form--item label {
  cursor: pointer;
}
.brand__filter-form--item.filter__disabled {
  opacity: 0.3;
  filter: grayscale(100%);
}
#brand-filter-form-open,
.brand__filter-form--items .brand__filter-form--item input {
  display: none;
}
.brand__filter-form--item input[type="checkbox"]:checked + label::before,
.brand__filter-form--item input[type="checkbox"]:not(:checked) + label::before {
  content: none;
}
.brand__filter-form--item input[type="checkbox"]:checked + label, .brand__filter-form--item input[type="checkbox"]:not(:checked) + label {
  font-size: 22px;
  padding-left: 0;
  line-height: 24px;
  cursor: pointer;
}
@media (max-width: 948px) {
  .brand__filter-form--item input[type="checkbox"]:checked + label, .brand__filter-form--item input[type="checkbox"]:not(:checked) + label {
    font-size: 16px;
    line-height: 120%;
    cursor: pointer;
  }
}
.brand__filter-form--item.active {
  background-color: #477CFF;
  color: #ffffff;
}
@media (max-width: 767px) {
  .brand__filter-form--item.active {
    font-size: 16px;
    line-height: 120%;
    cursor: pointer;
    color: #000000;
    background-color: transparent;
  }
}

.brands__list__filters {
  margin-bottom: 40px;
}
@media (max-width: 768px) {
  .brands__list__filters {
    margin-bottom: 20px;
  }
}
#brands-filters {
  display: flex;
  gap: 24px;
}
#brands-filters-form.show {
  transform: translateY(0%);
}

.brands__filters__triggers {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}
.brands__filters__triggers button {
  height: 30px;
  padding: 0 20px;
  font-weight: 500;
  font-size: 16px;
  line-height: 130%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border-radius: 50px;
}
#whole-filter-clean, #whole-filter-clean-mobile {
  background-color: #fff;
  color: #477cff;
  padding-right: 0;
}
#whole-filter-clean {
  background-color: #fff;
  color: #477cff;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 50px;
  height: 52px;
  padding: 11px 6px 11px 20px;
  font-weight: 600;
  font-size: 22px;
  line-height: 120%;
  gap: 17px;
}
#whole-filter-clean[data-count="0"], #whole-filter-clean-mobile[data-count="0"] {
  display: none;
}
#whole-filter-clean span, #whole-filter-clean-mobile span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #477cff;
  color: #fff;
}
#whole-filter-clean svg, #whole-filter-clean-mobile svg {
  width: 9px;
  height: 9px;
}
@media (max-width: 948px) {
  #whole-filter-clean {
    font-weight: 500;
    font-size: 16px;
    line-height: 120%;
    padding: 1px 1px 1px 16px;
    height: 32px;
    gap: 8px;
  }
}
#whole-filter-show {
  color: #fff;
  background-color: #477cff;
}
#whole-filter-show span {
  color: #fff;
  width: 22px;
  height: 13px;
}
.brands__filters__footer {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 16px;
  flex-grow: 0;
  flex-shrink: 0;
}
.brands__filters__footer button {
  appearance: none;
  width: 100%;
  height: 50px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 22px;
  line-height: 27.24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#brands-mobile-reset[data-count="0"] {
  display: none;
}
#brands-mobile-apply {
  background-color: #477cff;
  color: #fff;
}

.brands__filters__row {
  display: flex;
  gap: 16px;
  margin-left: auto;
}

.brand__name__filter {
  position: relative;
  height: 52px;
  width: 411px;
}
@media (max-width: 450px) {
  .brand__name__filter {
    width: 100%;
  }
}
.brand__name__filter input {
  border: none;
  font-size: 20px;
  line-height: 1;
  font-weight: 600;
  width: 100%;
  height: 100%;
  border-radius: 50px;
  background-color: #F9FAFF;
  padding: 14px 24px;
}
.filter__input {
  display: none;
}
.brand__name__filter input::placeholder {
  color: rgba(99, 99, 99, 0.3);
}
.brand__name__filter input:focus {
  background-color: #fafafa;
}
@media (max-width: 948px) {
  .brand__name__filter input {
    font-size: 16px;
    line-height: 130%;
    font-weight: 500;
    padding: 9px 16px;
  }
}
.brand__name__filter #brand-name-search {
  position: absolute;
  top: 9px;
  right: 8px;
  z-index: 1;
  border: none;
  background-color: #E4E4E4;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand__name__filter #brand-name-clear {
  display: none;
  position: absolute;
  top: 9px;
  right: 54px;
  z-index: 1;
  border: none;
  background-color: #FFFFFF;
  width: 30px;
  height: 30px;
}
.brand__name__filter #brand-name-clear.show {
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 768px) {
  .brand__name__filter #brand-name-search {
    top: 5px;
  }
  .brand__name__filter #brand-name-clear {
    top: 5px;
  }
}
.brand__name__filter input:focus + button {
  background-color: #e4e4e4;
}
.brand__name__filter #brand-name-search svg {
  width: 20px;
  height: 20px;
}
.brand__name__filter #brand-name-clear svg {
  width: 15px;
  height: 15px;
}
#mobile-filters-form-close,
.brands__filters__triggers,
.brands__filters__footer,
.mobile__brand__filter-form--head {
  display: none;
}
.brands__filters .brand__filter-form {
  margin: 0;
}

.mobile__brand__filter-form--head {
  display: none;
}

@media (max-width: 948px) {
  #brands-filters {
    flex-direction: column;
  }
}

@media (max-width: 767px) {
  #brands-filters {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: fixed;
    background: #fff;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    transform: translateY(120%);
    transition: transform 0.5s;
    overflow: auto;
    padding: 0 10px 50px;
  }
  #brands-filters #mobile-filters-form-close {
    display: flex !important;
    background: transparent;
    align-items: flex-start;
    justify-content: center;
    padding: 16px 0 43px;
    flex-grow: 0;
    flex-shrink: 0;
    order: -2;
  }
  .brands-filters__close {
    position: absolute;
    right: 10px;
    top: 16px;
    width: 34px;
    height: 34px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #E4E4E4;
    border-radius: 50%;
  }
  .brands-filters__close svg {
    width: 15px;
    height: 15px;
  }
  .brands__filters__row {
    display: contents;
  }
  .brands .brand__name__filter {
    order: -1;
    margin-bottom: 16px;
    height: 40px;
  }
  .brand__filter-form--item {
    width: 100%;
  }
  .brands .brand__filter-form--item input[type="checkbox"]:checked + label, .brands .brand__filter-form--item input[type="checkbox"]:not(:checked) + label {
    display: inline-block;
    position: relative;
    padding-left: 36px;
    line-height: 130%;
    cursor: pointer;
    padding-bottom: 16px;
    flex: 1;
    font-size: 16px;
    margin-left: 0;
    height: auto;
    width: auto;
    border-radius: 0;
    user-select: auto;
    color: inherit;
    box-shadow: none;
  }
  .brands .brand__filter-form--item input[type="checkbox"]:not(:checked) + label:before {
    display: flex;
    content: "";
    width: 20px;
    height: 20px;
    border-radius: 5px;
    background-color: transparent;
    justify-content: center;
    align-items: center;
    top: 0;
    border: 1px solid #000000;
  }
  .brands .brand__filter-form--item input[type="checkbox"]:checked + label:before {
    display: flex;
    justify-content: center;
    align-items: center;
    content: url("data:image/svg+xml,%3Csvg width='12' height='13' viewBox='0 0 12 13' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 6.08059L5.20773 12L11 1.5' stroke='%23F9FAFF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    width: 20px;
    height: 20px;
    border-radius: 5px;
    background-color: #477CFF;
    top: 0;
    padding-top: 4px;
  }
}

@media (max-width: 767px) {
  .brand__filter-form {
    display: flex;
    flex-direction: column;
    margin: 0 0 32px;
    padding: 0;
    flex-grow: 1;
    flex-shrink: 1;
    width: 100%;
    height: auto;
    min-height: 0%;
  }
  .brands #mobile-filters-form-close {
    display: flex !important;
    background: transparent;
    align-items: flex-start;
    justify-content: center;
    padding: 16px 0 43px;
    flex-grow: 0;
    flex-shrink: 0;
  }
  .brands #mobile-filters-form-close::before {
    content: "";
    display: block;
    background: #96b4ff;
    border-radius: 10px;
    width: 141px;
    height: 7px;
  }
  .mobile__brand__filter-form--head {
    flex-grow: 0;
    flex-shrink: 0;
    display: flex !important;
    width: 100%;
    height: auto;
    background: transparent;
    font-weight: 700;
    font-size: 22px;
    line-height: 26.6px;
    justify-content: space-between;
    margin: 0 0 16px;
    padding: 0;
  }
  .mobile__brand__filter-form--title {
    color: #477cff;
    margin: 0;
  }
  .brand__filter-form--items {
    background-color: #f9faff;
    width: 100%;
    border-radius: 12px;
    padding: 16px 20px;
    flex-grow: 1;
    flex-shrink: 1;
    height: 100%;
    overflow: auto;
    gap: 0;
    display: block;
  }
  .brand__filter-form--item {
    width: auto;
    height: auto;
    display: flex;
    border-radius: 0;
    overflow: visible;
    background-color: transparent;
    transition: none;
    color: #000;
    padding: 0;
  }

  /* трюк для смещения скроллбара внутрь блока */
  .brand__filter-form--items::-webkit-scrollbar {
    width: 19px; /* Общая ширина */
  }
  .brand__filter-form--items::-webkit-scrollbar-thumb {
    background-color: #8b8b8b;
    width: 3px;
    border-right: 16px solid transparent; /* Создаем отступ */
    background-clip: content-box; /* Важно! */
  }
  .brand__filter-form--items::-webkit-scrollbar-track {
    background: #d5d4d4;
    margin-top: 16px;
    margin-bottom: 16px;
    border-right: 16px solid transparent; /* Создаем отступ */
    background-clip: content-box; /* Важно! */
  }

  .brand__filter-form--title,
  .brand__filter-form--button {
    display: none;
  }

  /* BUTTONS WHICH CONTROL FILTERS */
  .brands__filters__triggers {
    display: flex;
    gap: 22px;
    margin: 20px 0;
  }
  #whole-filter-clean {
    display: none;
  }
  #whole-filter-clean-mobile {
    background-color: #fff;
    color: #477cff;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 50px;
    height: 34px;
    padding: 2px 2px 2px 16px;
  }
  #whole-filter-clean-mobile span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #477cff;
    color: #fff;
  }
  #whole-filter-clean-mobile svg {
    width: 9px;
    height: 9px;
  }
  .brands #whole-filter-show {
    display: inline-flex;
    position: relative;
    align-items: center;
    justify-content: flex-start;
    color: #fff;
    background-color: #81c7fc;
    border-radius: 50px;
    height: 34px;
    padding: 2px 2px 2px 16px;
  }
  .brands #whole-filter-show .filters-icon {
    color: #fff;
    width: 30px;
    height: 30px;
  }
  .brands #whole-filter-counter {
    background-color: #477cff;
    border-radius: 50%;
    position: absolute;
    font-size: 13px;
    line-height: 100%;
    min-width: 26px;
    height: 20px;
    top: -10px;
    right: -10px;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .brands__filters__footer {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 16px;
    flex-grow: 0;
    flex-shrink: 0;
  }
  .brands__filters__footer button {
    appearance: none;
    width: 100%;
    height: 50px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 22px;
    line-height: 27.24px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #brands-mobile-reset {
    color: #477cff;
    border: 1px solid;
  }
}

@media (max-width: 767px) {
  .brands .brand__filter-form {
    flex-grow: 1;
    margin: 0;
    margin-bottom: 46px;
  }

  .brands .mobile__brand__filter-form--head {
    flex-grow: 0;
    flex-shrink: 0;
    display: flex !important;
    width: 100%;
    height: auto;
    background: transparent;
    font-weight: 700;
    font-size: 22px;
    line-height: 26.6px;
    justify-content: space-between;
    margin: 0 0 16px;
    padding: 0;
  }

  .brands .mobile__brand__filter-form--title {
    font-weight: 500;
    font-size: 18px;
    line-height: 120%;
    color: #477cff;
    margin: 0;
  }

  .brands .mobile__brand__filter-form--counter {
    background: transparent;
    color: #477cff;
    font-weight: 500;
    font-size: 22px;
    line-height: 26.69px;
  }

  .brands .mobile__brand__filter-form--counter::before {
    content: "Сбросить";
  }

  .brands #mobile-filters-form-close {
    display: flex !important;
    background: transparent;
    align-items: flex-start;
    justify-content: center;
    padding: 16px 0 43px;
    flex-grow: 0;
    flex-shrink: 0;
  }

  .brands #mobile-filters-form-close::before {
    content: "";
    display: block;
    background: #96b4ff;
    border-radius: 10px;
    width: 141px;
    height: 7px;
  }

  #brands-filters.show {
    transform: translateY(0%);
  }

  .brands__filters__footer {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 16px;
    flex-grow: 0;
    flex-shrink: 0;
  }

  .brands__filters__footer button {
    appearance: none;
    width: 100%;
    height: 40px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 18px;
    line-height: 120%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Скроллбар для фильтров на странице акций */
  .brands__filters ul::-webkit-scrollbar {
    width: 19px; /* Общая ширина */
  }

  .brands__filters ul::-webkit-scrollbar-thumb {
    background-color: #8b8b8b;
    width: 3px;
    border-right: 16px solid transparent; /* Создаем отступ */
    background-clip: content-box; /* Важно! */
  }

  .brands__filters ul::-webkit-scrollbar-track {
    background: #d5d4d4;
    margin-top: 16px;
    margin-bottom: 16px;
    border-right: 16px solid transparent; /* Создаем отступ */
    background-clip: content-box; /* Важно! */
  }
}

.brands__pagination__more {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 35px;
}
.brands__pagination__more a {
  background-color: #477cff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 30px;
  font-weight: 600;
  font-size: 18px;
  line-height: 120%;
  height: 41px;
  color: #fff;
}
.brands__pagination__pages {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.brands__pagination__pages a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #B0B0B0;
  font-weight: 600;
  font-size: 18px;
  line-height: 120;;
  text-align: center;
}
.brands__pagination__pages a:hover {
  color: #636363;
}
.brands__pagination__pages a.active {
  color: #636363;
}

.brands__pagination__pages div {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-weight: 600;
  font-size: 18px;
  line-height: 120%;
  text-align: center;
}

.brand__filter-search-form--items {
  width: 430px;
  max-height: 160px;
  border-radius: 12px;
  background: #fff;
  padding: 16px 20px;
  overflow-y: auto;
  font-weight: 500;
  font-size: 20px;
  color: #000;
}
.brand__filter--list {
  position: absolute;
  width: 449px;
  border-radius: 12px;
  background: #fff;
  z-index: 100;
  margin-top: 8px;
  display: flex;
  visibility: collapse;
  opacity: 0;
  transition: opacity 0.5s, visibility 0.5s;
}
.brand__name__filter input:focus ~ .brand__filter--list {
  opacity: 1;
  visibility: visible;
}
@media (max-width: 460px) {
  .brand__filter--list {
    width: 100%;
  }
}
