/* Избранное и сравнение */

/* Кнопки на карточке товара */
.list-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  width: 100%;
  margin: 4px 0 8px;
}

.list-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border: none;
  background: none;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #9A9BBE;
  cursor: pointer;
  transition: .2s color;
}

.list-button:hover,
.list-button.active {
  color: #1E4995;
}

.list-button.active svg path {
  fill: currentColor;
}

.list-button[data-list="cmp"].active svg path {
  fill: none;
}

/* Счётчики в шапке. Свой класс: скрипт корзины пишет число во все .nav__cart-counter */
.list-counter {
  position: absolute;
  top: -5px;
  right: 10px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 17px;
  font-weight: bold;
  color: #fff;
  background: #DF7A30;
  border-radius: 50%;
}

.list-counter.hide {
  display: none;
}

.list-counter--mobile {
  top: -6px;
  right: -10px;
}

/* В мобильной шапке после избранного и сравнения стало шесть значков */
@media (max-width: 420px) {
  .messenger-icons-next {
    gap: 7px;
    padding-right: 0;
  }
}

@media (max-width: 350px) {
  .messenger-icons-next {
    gap: 3px;
  }

  .component-1-icon6-next {
    width: 72px;
    height: auto;
  }
}

/* Сообщение «добавлено», как у корзины */
.list-added {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background-color: #1E4995;
  padding: 12px;
  border-radius: 12px;
  display: grid;
  grid-template-columns: auto 198px;
  align-items: center;
  gap: 16px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
}

.list-added:hover,
.list-added.inactive:hover,
.list-added.active {
  top: 20px;
  opacity: 1;
  pointer-events: all;
  transition: .5s;
}

.list-added.inactive {
  top: 0;
  opacity: 0;
  pointer-events: none;
  transition: 1s;
}

.list-added span {
  color: #fff;
  white-space: nowrap;
}

.list-added a {
  color: #1E4995;
  padding: 0 10px;
  height: 44px;
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .2s color;
}

.list-added a:hover {
  color: #DF7A30;
}

@media (max-width: 400px) {
  .list-added {
    grid-template-columns: auto max-content;
  }

  .list-added a,
  .list-added span {
    font-size: 14px;
  }
}

/* Страницы избранного и сравнения */
.list-page {
  padding: 8px 0 48px;
  font-family: 'Inter', sans-serif;
}

.list-page__col {
  margin-bottom: 24px;
}

.list-page__col .products__card {
  height: 100%;
}

.list-remove {
  margin-top: 8px;
  padding: 0;
  border: none;
  background: none;
  font-size: 14px;
  color: #9A9BBE;
  cursor: pointer;
}

.list-remove:hover {
  color: #1E4995;
}

.list-page__empty {
  padding: 24px 0 40px;
  font-size: 16px;
  color: #001233;
}

.list-page__empty p {
  margin: 0 0 8px;
}

.list-page__link {
  display: inline-flex;
  align-items: center;
  height: 44px;
  margin-top: 16px;
  padding: 0 24px;
  border-radius: 8px;
  background: #DF7A30;
  color: #fff;
  font-weight: 600;
}

.list-page__link:hover {
  color: #fff;
  background: #FF994F;
}

.compare-diff {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 15px;
  cursor: pointer;
}

/* Общие стили обнуляют чекбоксы, здесь нужен обычный */
.compare-diff input {
  -webkit-appearance: checkbox;
  appearance: auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #1E4995;
}

.compare-group {
  margin-bottom: 40px;
}

.compare-group__title {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 600;
}

.compare-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
  color: #001233;
}

.compare-table th,
.compare-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #E9EDF5;
  text-align: left;
  vertical-align: top;
}

.compare-table__name {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 180px;
  max-width: 220px;
  background: #fff;
  font-weight: 500;
  color: #5A5C7E;
}

.compare-table td {
  min-width: 200px;
  max-width: 240px;
}

.compare-table__product .product_container {
  position: relative;
  padding-right: 20px;
}

.compare-table__remove {
  position: absolute;
  top: 0;
  right: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: #9A9BBE;
  cursor: pointer;
}

.compare-table__remove:hover {
  color: #1E4995;
}

.compare-table__link {
  display: block;
  color: #001233;
  font-weight: 500;
}

.compare-table__img {
  display: block;
  width: 120px;
  height: 90px;
  margin-bottom: 8px;
  object-fit: contain;
}

.compare-table__price {
  margin: 8px 0;
  font-size: 16px;
  font-weight: 600;
}

.compare-table__buy {
  display: inline-flex;
  width: auto;
  padding: 0 20px;
}

.compare-group--diff .compare-table__row--same {
  display: none;
}

@media (max-width: 767px) {
  .compare-table__name {
    min-width: 120px;
    max-width: 140px;
  }

  .compare-table td {
    min-width: 160px;
  }
}
