.customer-favorites {
  padding: 2.25rem 0 3.75rem;
}

.customer-favorites-shell {
  background:
    radial-gradient(circle at 92% 0%, rgba(105, 159, 238, 0.14), transparent 32%),
    linear-gradient(145deg, #fbfdff 0%, #f4f8fe 54%, #f8fbff 100%);
  border: 1px solid #dce7f5;
  border-radius: 30px;
  box-shadow: 0 24px 65px rgba(35, 69, 112, 0.1);
  overflow: hidden;
  padding: 2.5rem 0 2.25rem;
  position: relative;
}

.customer-favorites-shell::after {
  background-image: radial-gradient(rgba(70, 111, 165, 0.12) 1px, transparent 1px);
  background-size: 17px 17px;
  content: "";
  height: 130px;
  inset: auto 0 0 auto;
  opacity: 0.45;
  position: absolute;
  width: 34%;
}

.customer-favorites-header {
  align-items: flex-end;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  margin-bottom: 1.8rem;
  padding: 0 2.5rem;
  position: relative;
  z-index: 2;
}

.customer-favorites-heading {
  max-width: 690px;
}

.customer-favorites-eyebrow {
  align-items: center;
  color: #2d67af;
  display: flex;
  font-size: 0.72rem;
  font-weight: 900;
  gap: 0.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.customer-favorites-eyebrow i {
  align-items: center;
  background: #e2edfb;
  border-radius: 8px;
  display: flex;
  height: 27px;
  justify-content: center;
  width: 27px;
}

.customer-favorites-heading h2 {
  color: #172b45;
  font-family: Quicksand, Nunito, sans-serif;
  font-size: clamp(1.85rem, 3.4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0.65rem 0 0.5rem;
}

.customer-favorites-heading p {
  color: #66778c;
  line-height: 1.7;
  margin: 0;
}

.customer-favorites-actions {
  align-items: center;
  display: grid;
  gap: 0.7rem 0.85rem;
  grid-template-columns: auto auto;
}

.customer-favorites-actions > a {
  align-items: center;
  background: #1f5fa9;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 900;
  gap: 0.5rem;
  justify-content: center;
  padding: 0.72rem 1rem;
  text-decoration: none;
  white-space: nowrap;
}

.customer-favorites-actions > a:hover {
  background: #174d8d;
  color: #fff;
}

.customer-favorites-proof {
  align-items: center;
  color: #24415f;
  display: flex;
  gap: 0.6rem;
  grid-column: 1 / -1;
  justify-self: end;
}

.customer-favorites-proof > i {
  color: #1ba566;
  font-size: 1.25rem;
}

.customer-favorites-proof > span {
  display: flex;
  flex-direction: column;
}

.customer-favorites-proof small {
  color: #8695a6;
  font-size: 0.58rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.customer-favorites-proof b {
  font-size: 0.7rem;
}

.customer-favorites-nav {
  background: #fff;
  border: 1px solid #d8e3f0;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(42, 80, 126, 0.08);
  display: flex;
  gap: 0.15rem;
  padding: 0.23rem;
}

.customer-favorites-nav button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: #315d91;
  display: flex;
  height: 35px;
  justify-content: center;
  transition: background 160ms ease, color 160ms ease;
  width: 35px;
}

.customer-favorites-nav button:hover,
.customer-favorites-nav button:focus-visible {
  background: #e9f1fc;
  color: #174d8d;
  outline: none;
}

.customer-favorites-grid {
  direction: inherit;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.65rem 2.5rem 1.25rem;
  position: relative;
  scroll-behavior: smooth;
  scroll-padding-inline: 2.5rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  z-index: 2;
}

.customer-favorites-grid::-webkit-scrollbar {
  display: none;
}

.customer-favorites-grid:focus-visible {
  outline: 3px solid rgba(38, 105, 184, 0.25);
  outline-offset: -3px;
}

.customer-favorite-item {
  background: #fff;
  border: 1px solid #dfe8f2;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(37, 69, 108, 0.1);
  display: flex;
  flex: 0 0 calc((100% - 3rem) / 4);
  flex-direction: column;
  min-width: 0;
  position: relative;
  scroll-snap-align: start;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.customer-favorite-item:hover {
  border-color: #bed2e9;
  box-shadow: 0 18px 42px rgba(37, 69, 108, 0.16);
  transform: translateY(-4px);
}

.customer-favorite-item > .product-card {
  border: 0 !important;
  border-radius: 20px 20px 0 0 !important;
  box-shadow: none !important;
  flex: 1;
}

.customer-favorite-rank {
  align-items: baseline;
  background: linear-gradient(145deg, #ffd665, #f4ad27);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 7px 18px rgba(120, 72, 0, 0.2);
  color: #503600;
  display: flex;
  font-family: Quicksand, sans-serif;
  font-size: 1rem;
  font-weight: 900;
  height: 40px;
  justify-content: center;
  left: -8px;
  position: absolute;
  top: -10px;
  width: 40px;
  z-index: 5;
}

.customer-favorite-rank small {
  font-size: 0.58rem;
}

.customer-favorite-item:nth-child(n+4) .customer-favorite-rank {
  background: #e4ebf3;
  color: #45617e;
}

.customer-favorite-signal {
  align-items: center;
  background: #f7fafe;
  border-radius: 0 0 20px 20px;
  border-top: 1px solid #e6edf4;
  color: #344c64;
  display: grid;
  font-size: 0.68rem;
  gap: 0.1rem 0.4rem;
  grid-template-columns: auto 1fr;
  padding: 0.7rem 0.9rem;
}

.customer-favorite-signal > i {
  color: #ed7a23;
  font-size: 1rem;
  grid-row: 1 / 3;
}

.customer-favorite-signal span {
  font-weight: 850;
}

.customer-favorite-signal small {
  color: #8292a3;
  font-size: 0.58rem;
}

.customer-favorite-item .product-card-media {
  border-radius: 18px 18px 12px 12px;
}

.customer-favorite-item .product-card-media > a img {
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.customer-favorite-item .product-badge {
  font-size: 0.62rem;
  max-width: calc(100% - 64px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[dir="rtl"] .customer-favorites-shell::after {
  inset: auto auto 0 0;
}

[dir="rtl"] .customer-favorite-rank {
  left: auto;
  right: -8px;
}

[dir="rtl"] .customer-favorites-nav i {
  transform: scaleX(-1);
}

@media (max-width: 1199px) {
  .customer-favorite-item {
    flex-basis: calc((100% - 2rem) / 3);
  }
}

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

  .customer-favorites-actions {
    grid-template-columns: 1fr auto auto;
    width: 100%;
  }

  .customer-favorites-proof {
    grid-column: auto;
    justify-self: start;
  }

  .customer-favorite-item {
    flex-basis: calc((100% - 1rem) / 2);
  }
}

@media (max-width: 767px) {
  .customer-favorites {
    padding: 1.4rem 0 2.75rem;
  }

  .customer-favorites-shell {
    border-radius: 22px;
    padding: 1.5rem 0 1.1rem;
  }

  .customer-favorites-header {
    gap: 1.25rem;
    margin-bottom: 1rem;
    padding: 0 1.2rem;
  }

  .customer-favorites-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
  }

  .customer-favorites-actions > a {
    margin-inline-start: auto;
    padding: 0.65rem 0.85rem;
  }

  .customer-favorites-proof {
    flex: 1 0 100%;
  }

  .customer-favorites-grid {
    gap: 0.85rem;
    padding: 0.65rem 1.2rem 1rem;
    scroll-padding-inline: 1.2rem;
  }

  .customer-favorite-item {
    flex-basis: min(78vw, 300px);
  }

  .customer-favorites-heading p {
    font-size: 0.86rem;
  }
}

@media (max-width: 420px) {
  .customer-favorites-nav button {
    height: 32px;
    width: 32px;
  }

  .customer-favorites-actions > a {
    font-size: 0.68rem;
  }
}
