.favorites-component {
  background: #f6f4f3;
  color: #04060e;
}

.favorites-component__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}

.favorites-component__title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.favorites-component__title {
  margin: 0;
  color: #04060e;
  font-family: "contralto-small", serif;
  font-size: 40px;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
}

.favorites-component__count {
  color: #9e9a95;
  font-family: "contralto-small", serif;
  font-size: 24px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.2;
}

.favorites-component__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.favorites-component__action {
  min-height: 68px;
  padding: 16px 36px;
  border: 1.5px solid #2b3e8b;
  background: transparent;
  color: #2b3e8b;
  font-family: "Outfit", sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 1.28px;
  text-transform: uppercase;
}

.favorites-component__action--primary {
  background: #2b3e8b;
  color: #ffffff;
}

.favorites-component__action[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.favorites-component__empty {
  padding: 48px 24px;
  border: 1px solid #c7cce4;
  text-align: center;
}

.favorites-component__empty h3 {
  margin: 0 0 12px;
  color: #04060e;
  font-family: "contralto-small", serif;
  font-size: 24px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.2;
}

.favorites-component__empty p {
  margin: 0;
  color: #2f2f2f;
  font-family: "Outfit", sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 300;
  line-height: 1.6;
}

.favorites-component__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.favorites-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.favorites-card.is-removing {
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
}

.favorites-card__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 24px;
  background: linear-gradient(180deg, #e1d9d2 0%, #f6f4f3 100%);
}

.favorites-card__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.favorites-card__topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px;
}

.favorites-card__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 16px;
  border-radius: 999px;
  color: #0d142f;
  font-family: "Outfit", sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 1.12px;
  text-transform: uppercase;
}

.favorites-card__status--available {
  background: rgba(187, 229, 146, 0.88);
}

.favorites-card__status--reserved {
  background: #E5C192E0;
}

.favorites-card__status--sold {
  background: rgba(199, 204, 228, 0.92);
}

.favorites-card__status--second {
  background: rgba(121, 133, 183, 0.92);
  color: #ffffff;
}

.favorites-component .favorite-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #dadeef;
  border-radius: 999px;
  background: transparent;
  color: transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.favorites-component .favorite-button i {
  display: none;
}

.favorites-component .favorite-button:before {
  content: "";
  display: block;
  width: 18px;
  height: 16px;
  background-image: url("../../img/icon_hearth.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.favorites-component .favorite-button:hover,
.favorites-component .favorite-button.is-active {
  background: #dadeef;
  border-color: #dadeef;
}

.favorites-component .favorite-button:hover:before,
.favorites-component .favorite-button.is-active:before {
  background-image: url("../../img/icon_hearth_hover.svg");
}

.favorites-card__content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  background: #0d142f;
}

.favorites-card__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border-bottom: 1px solid #7985b7;
}

.favorites-card__heading h3 {
  margin: 0;
  color: #ffffff;
  font-family: "contralto-small", serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.2;
}

.favorites-card__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #b3bbd9;
  color: #0d142f;
  font-family: "Outfit", sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.2;
}

.favorites-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 12px 14px;
  color: #c7cce4;
  font-family: "Outfit", sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 300;
  line-height: 1.2;
}

.favorites-card__meta-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.favorites-card__meta-item--area {
  white-space: nowrap;
}

.favorites-card__summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border-top: 1px solid #7985b7;
}

.favorites-card__price {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.favorites-card__price strong {
  color: #ffffff;
  font-family: "contralto-small", serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.2;
}

.favorites-card__price span {
  color: #c7cce4;
  font-family: "Outfit", sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 300;
  line-height: 1.2;
}

.favorites-card__price-history {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #b3bbd9;
  font-family: "Outfit", sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 300;
  line-height: 1.2;
  cursor: pointer;
  width: fit-content;
}

.favorites-card__price-history-icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: url("../../img/icon_price_history.svg") center / contain no-repeat;
}

.favorites-card__lowest-price {
  color: #c7cce4;
  font-family: "Outfit", sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 300;
  line-height: 1.2;
}

.favorites-card__price small {
  color: #b3bbd9;
  font-family: "Outfit", sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 300;
  line-height: 1.2;
  text-decoration: line-through;
}

.favorites-card__links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.favorites-card__detail {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #5262a1 !important;
  font-family: "Outfit", sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 300;
  line-height: 1.2;
  text-decoration: none !important;
}

.favorites-card__detail-icon {
  display: inline-block;
  width: 10px;
  height: 12px;
  background-color: #5262a1;
  -webkit-mask: url("../../img/arrow_right.svg") center / contain no-repeat;
  mask: url("../../img/arrow_right.svg") center / contain no-repeat;
  flex: 0 0 auto;
}

.favorites-card__cta {
  width: 100%;
  min-height: 68px;
  margin-top: auto;
  padding: 16px 36px;
  border: 0;
  background: #2b3e8b;
  color: #ffffff;
  font-family: "Outfit", sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 1.28px;
  text-transform: uppercase;
}

.favorites-component__back {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1f2a52;
  font-family: "Outfit", sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.favorites-component__back-icon {
  position: relative;
  display: inline-flex;
  width: 32px;
  height: 32px;
  border: 1px solid #cfd8f3;
  border-radius: 999px;
  flex-shrink: 0;
}

.favorites-component__back-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-left: 2px solid #6d7db9;
  border-bottom: 2px solid #6d7db9;
  transform: translate(-35%, -50%) rotate(45deg);
}

.favorites-component__back-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  background: #6d7db9;
  transform: translate(-15%, -50%);
}

@media (max-width: 1399px) {
  .favorites-component__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1199px) {
  .favorites-component__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .favorites-component__actions {
    justify-content: flex-start;
  }

  .favorites-component__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .favorites-component__title {
    font-size: 32px;
  }

  .favorites-component__actions {
    width: 100%;
  }

  .favorites-component__action {
    width: 100%;
  }

  .favorites-component__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .favorites-card__meta {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .favorites-card__summary {
    flex-direction: column;
  }

  .favorites-card__links {
    align-items: flex-start;
  }

  .favorites-component__back {
    margin-top: 40px;
  }
}
