/* ============================================================
   YumnAI Favorites — heart control + Favorites page states
   Shared by Shop and the Favorites page. Adds styles only; it
   does not override any existing card rule.
   ============================================================ */

.yn-fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink, #1A1A1A);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, color 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.yn-fav-btn:active { transform: scale(0.92); }

.yn-fav-btn:focus-visible {
  outline: 2px solid var(--accent, #B76E79);
  outline-offset: 2px;
}

.yn-fav-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.yn-fav-btn.is-active { color: var(--accent, #B76E79); }
.yn-fav-btn.is-active svg { fill: currentColor; }

.yn-fav-btn[aria-busy="true"] {
  opacity: 0.55;
  pointer-events: none;
}

/* Transient message (save failed, product not found, …) */
.yn-fav-toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  z-index: 1000;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink, #1A1A1A);
  color: #fff;
  font-size: 0.82rem;
  line-height: 1.4;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

/* Favorites page: a product that left the catalog */
.yn-fav-unavailable .yn-shop-card-img-wrap {
  background: rgba(244, 218, 214, 0.25);
}

/* Favorites page: placeholder cards while the first list loads */
.yn-fav-skeleton .yn-shop-card-img-wrap {
  background: linear-gradient(90deg, #F6EEEA 25%, #FBF6F3 50%, #F6EEEA 75%);
  background-size: 200% 100%;
  animation: yn-fav-shimmer 1.2s ease-in-out infinite;
}

.yn-fav-skeleton .yn-shop-card-body span {
  display: block;
  height: 10px;
  margin: 8px 0;
  border-radius: 6px;
  background: #F3EAE6;
}

.yn-fav-skeleton .yn-shop-card-body span:nth-child(1) { width: 40%; }
.yn-fav-skeleton .yn-shop-card-body span:nth-child(2) { width: 90%; }
.yn-fav-skeleton .yn-shop-card-body span:nth-child(3) { width: 65%; }

@keyframes yn-fav-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .yn-fav-skeleton .yn-shop-card-img-wrap { animation: none; }
}

.yn-fav-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* "Updating…" / "Couldn't refresh. Retry" beside the count */
.yn-fav-status-retry {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent, #B76E79);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
