.recent-interest-rail {
  position: fixed;
  z-index: 130;
  top: 50%;
  left: 0;
  width: 54px;
  height: min(620px, calc(100vh - 40px));
  overflow: visible;
  background: transparent;
  transform: translateY(-50%);
  transition: width 280ms cubic-bezier(0.22, 0.7, 0.25, 1);
}

.recent-interest-rail:hover:not(.is-hover-locked),
.recent-interest-rail.is-open {
  width: min(170px, calc(100vw - 24px));
}

.recent-interest-panel {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 0 10px 10px 0;
  box-shadow: 3px 0 14px rgb(31 25 19 / 14%);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-102%);
  transition:
    opacity 180ms ease 40ms,
    transform 260ms cubic-bezier(0.22, 0.7, 0.25, 1);
}

.recent-interest-panel::before,
.recent-interest-panel::after {
  position: absolute;
  z-index: 4;
  right: 0;
  left: 0;
  content: "";
  pointer-events: none;
}

.recent-interest-panel::before {
  top: 52px;
  height: 64px;
  background: linear-gradient(
    180deg,
    #fff 0%,
    #fff 30%,
    rgb(255 255 255 / 82%) 62%,
    rgb(255 255 255 / 0%) 100%
  );
}

.recent-interest-panel::after {
  bottom: 0;
  height: 72px;
  background: linear-gradient(
    0deg,
    #fff 0%,
    #fff 30%,
    rgb(255 255 255 / 82%) 62%,
    rgb(255 255 255 / 0%) 100%
  );
}

.recent-interest-rail:hover:not(.is-hover-locked) .recent-interest-panel,
.recent-interest-rail.is-open .recent-interest-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.recent-interest-triggers {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 0;
  width: 54px;
  display: grid;
  grid-template-rows: 110px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 0;
  border-radius: 0 10px 10px 0;
  box-shadow: 4px 0 14px rgb(31 25 19 / 11%);
  transform: translateY(-50%);
}

.recent-interest-head {
  position: relative;
  z-index: 5;
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: #fff;
}

.recent-interest-head strong {
  font-size: var(--font-body);
  font-weight: 700;
}

.recent-interest-list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-mask-image: linear-gradient(
    180deg,
    transparent 0,
    #000 48px,
    #000 calc(100% - 56px),
    transparent 100%
  );
  mask-image: linear-gradient(
    180deg,
    transparent 0,
    #000 48px,
    #000 calc(100% - 56px),
    transparent 100%
  );
}

.recent-interest-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.recent-interest-list[hidden],
.recent-interest-empty[hidden] {
  display: none;
}

.recent-interest-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  padding: 9px 0;
}

.recent-interest-image {
  width: 100%;
  height: 96px;
  display: block;
  overflow: hidden;
  background: #f5f5f4;
  border-radius: 3px;
}

.recent-interest-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-interest-copy {
  min-width: 0;
}

.recent-interest-copy > strong:first-child {
  display: -webkit-box;
  overflow: hidden;
  color: #2d2926;
  font-size: var(--font-caption);
  font-weight: 500;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recent-interest-item:hover .recent-interest-copy > strong:first-child {
  color: var(--primary);
}

.recent-interest-copy > strong:last-child {
  display: block;
  margin-top: 5px;
  color: #d93d00;
  font-size: var(--font-body);
  font-weight: 600;
}

.recent-interest-copy > strong:last-child small {
  font-size: 0.72em;
}

.recent-interest-empty {
  min-height: 240px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.recent-interest-empty .icon {
  width: 34px;
  height: 34px;
}

.recent-interest-empty p {
  font-size: var(--font-caption);
}

.recent-interest-empty a {
  color: var(--primary);
  font-size: var(--font-caption);
}

.recent-interest-trigger {
  width: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 7px 4px;
  color: #625b55;
  background: #fff;
  text-align: center;
  transition:
    color 160ms ease,
    background 160ms ease;
}

.recent-interest-trigger:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.recent-interest-trigger .icon {
  width: 20px;
  height: 20px;
}

.recent-interest-trigger span {
  width: 42px;
  font-size: var(--font-caption);
  line-height: 1.25;
}

@media (max-width: 1024px) {
  .recent-interest-rail {
    display: none;
  }
}
