.favourites-modal {
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.favourites-modal-header {
  padding: 1.15rem 1.35rem;
  background: #ffffff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.favourites-modal-header .modal-title {
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #111827;
}

.favourites-modal-subtitle {
  margin-top: 0.2rem;
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 700;
}

.favourites-modal-body {
  padding: 0;
  background: #f8f9fb;
}

.favourites-tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  background: #ffffff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.favourites-tabs .nav-link {
  border: 0;
  color: #6b7280;
  font-weight: 850;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
}

.favourites-tabs .nav-link:hover {
  color: #111827;
  background: #f3f4f6;
}

.favourites-tabs .nav-link.active {
  color: #111827;
  background: #eef6ff;
}

.favourites-tab-content {
  height: min(72vh, 680px);
  overflow-y: auto;
  padding: 1.25rem;
}

#favouriteListingsPane,
#favouriteSellersPane {
  min-height: 100%;
}

@media (max-width: 575.98px) {
  .favourites-tab-content {
    height: 68vh;
    padding: 1rem;
  }

  .favourites-listings-grid {
    grid-template-columns: 1fr;
  }
}

.favourites-listings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.favourites-sellers-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.favourites-sellers-list .homepage-seller-card {
  width: 100%;
}

.favourites-empty {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: #6b7280;
  font-weight: 800;
}

.favourites-empty i {
  font-size: 1.4rem;
  color: #2563eb;
}

#favouritesModal {
  z-index: 1060;
}

#favouritesModal .modal-dialog {
  width: min(1080px, calc(100vw - 2rem));
  max-width: 1080px;
  pointer-events: auto;
}

#favouritesModal.favourites-modal-stacked {
  pointer-events: none;
}

#favouritesModal.favourites-modal-stacked .modal-dialog {
  pointer-events: auto;
}

#sellerProfileModal {
  z-index: 1085;
}

@media (max-width: 991.98px) {
  .favourites-listings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .favourites-tab-content {
    max-height: 68vh;
    padding: 1rem;
  }

  .favourites-listings-grid {
    grid-template-columns: 1fr;
  }
}

.seller-profile-backdrop {
  z-index: 1075 !important;
}

#favouritesModal {
  z-index: 1060;
}

#sellerProfileModal {
  z-index: 1085;
}

.favourites-listings-grid > .favourites-empty {
  grid-column: 1 / -1;
  width: 100%;
}

.homepage-listing-card.favourites-removing {
  pointer-events: none;
  opacity: 0;
  transform: scale(0.96);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.homepage-listing-card.favourites-collapsing {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-width: 0 !important;
  opacity: 0;
  overflow: hidden;
  transition:
    width 220ms ease,
    max-width 220ms ease,
    min-width 220ms ease,
    margin 220ms ease,
    padding 220ms ease,
    opacity 180ms ease;
}

.favourites-seller-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  padding: 14px;
  border-radius: 18px;

  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.08);

  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.04);

  transition:
    opacity 180ms ease,
    transform 180ms ease,
    max-height 220ms ease,
    padding 220ms ease,
    margin 220ms ease;
}

.favourites-seller-main {
  min-width: 0;

  display: flex;
  align-items: center;
  gap: 12px;

  color: inherit;
  text-decoration: none;
}

.favourites-seller-main:hover {
  color: inherit;
}

.favourites-seller-remove-btn {
  flex: 0 0 auto;

  width: 38px;
  height: 38px;

  border: 1px solid #bfdbfe;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: #eff6ff;
  color: #1d4ed8;

  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.favourites-seller-remove-btn:hover {
  transform: translateY(-1px);
  background: #dbeafe;
}

.favourites-seller-row.favourites-removing {
  pointer-events: none;
  opacity: 0;
  transform: scale(0.98);
}

.favourites-seller-row.favourites-collapsing {
  max-height: 0 !important;
  margin: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-width: 0 !important;
  opacity: 0;
  overflow: hidden;
}