/* Recent purchases popup.

   All the cards render into the corner stacked on top of each other; the
   script reveals one at a time, so nothing reflows as they cycle. */

.alt-salespop {
  position: fixed;
  z-index: 90;
  bottom: calc(var(--alt-sp-offset, 24px) + var(--alt-sp-lift, 0px));
  width: min(var(--alt-sp-width, 344px), calc(100vw - 32px));
  pointer-events: none;
}

.alt-salespop--bottom-left { left: var(--alt-sp-offset, 24px); }
.alt-salespop--bottom-right { right: var(--alt-sp-offset, 24px); }

.alt-salespop__list { position: relative; }

.alt-salespop__card {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 40px 16px 20px;
  border-radius: var(--alt-sp-radius, 6px);
  background: var(--alt-sp-bg, #ffffff);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
  pointer-events: none;
}

.alt-salespop__card.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.alt-salespop__media {
  flex: 0 0 var(--alt-sp-thumb, 56px);
  width: var(--alt-sp-thumb, 56px);
  height: var(--alt-sp-thumb, 56px);
  border-radius: 4px;
  overflow: hidden;
  background: #f5f5f5;
}
.alt-salespop__img { width: 100%; height: 100%; object-fit: cover; display: block; }

.alt-salespop__body { min-width: 0; }

.alt-salespop__who {
  margin: 0 0 2px;
  font-size: var(--alt-sp-fs-who, 12px);
  line-height: 1.4;
  color: var(--alt-sp-muted, #767676);
}

.alt-salespop__product {
  display: block;
  margin: 0 0 4px;
  font-size: var(--alt-sp-fs-product, 14px);
  font-weight: 600;
  line-height: 1.35;
  color: var(--alt-sp-text, #161616);
  text-decoration: none;
}
a.alt-salespop__product:hover { text-decoration: underline; }

.alt-salespop__meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  font-size: var(--alt-sp-fs-meta, 11px);
  line-height: 1.4;
  color: var(--alt-sp-muted, #767676);
}
.alt-salespop__meta svg { flex: 0 0 auto; opacity: 0.8; }

.alt-salespop__close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--alt-sp-muted, #767676);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.alt-salespop__close:hover { background: rgba(0, 0, 0, 0.06); color: var(--alt-sp-text, #161616); }

@media (max-width: 640px) {
  .alt-salespop { bottom: 16px; }
  .alt-salespop--bottom-left { left: 16px; }
  .alt-salespop--bottom-right { right: 16px; }
  .alt-salespop__card { padding: 14px 36px 14px 16px; gap: 12px; }
}

.alt-salespop[data-mobile="false"] {
  display: block;
}
@media (max-width: 640px) {
  .alt-salespop[data-mobile="false"] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .alt-salespop__card { transition: opacity 0.2s linear, visibility 0.2s; transform: none; }
  .alt-salespop__card.is-visible { transform: none; }
}