/* Product Card — design.md §11. 4:5 image, gold-tinted hover shadow,
   cross-fade secondary image, ghost Add-to-Bag reveal, badges, wishlist heart. */

.product-card {
  position: relative;
  background: var(--surface-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-5); /* 20px internal (§11) */
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--duration-base) var(--easing-standard),
              transform var(--duration-base) var(--easing-standard);
  display: flex;
  flex-direction: column;
}

.product-card:hover,
.product-card:focus-within {
  box-shadow: var(--shadow-hover); /* gold-tinted (§7) */
  transform: translateY(-4px);
}

.product-card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 0; /* photography never rounded — only the card (§6) */
  background: var(--color-neutral-50);
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Cross-fade to secondary shot on hover, 400ms (§11) */
.product-card__img--alt {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 400ms var(--easing-standard);
}

.product-card:hover .product-card__img--alt { opacity: 1; }

/* Badges — top-left, stacked (§11) */
.product-card__badges {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  z-index: 1;
}

/* Wishlist heart — top-right (§11) */
.product-card__wishlist {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  z-index: 1;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.85);
  color: var(--color-neutral-ink);
}

.product-card__wishlist svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  transition: fill 150ms, color 150ms;
}

.product-card__wishlist[aria-pressed="true"] {
  color: var(--accent-gold);
}

.product-card__wishlist[aria-pressed="true"] svg {
  fill: var(--accent-gold);
  stroke: var(--accent-gold);
}

/* Micro scale-pulse 1→1.15→1 on save, 300ms (§11) */
.product-card__wishlist--pulse svg { animation: wishlist-pulse 300ms var(--easing-standard); }

@keyframes wishlist-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.product-card__name {
  margin-top: var(--space-3); /* 12px image→name (§11) */
  font-family: var(--font-heading);
  font-size: var(--type-product-name-size);
  font-weight: 600;
  line-height: 1.3;
}

.product-card__price-line {
  margin-top: var(--space-1); /* 4px name→price (§11) */
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.product-card__rating {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-2);
  color: var(--accent-gold);
  font-size: var(--type-caption-size);
}

.product-card__rating .count { color: var(--text-tertiary); }

/* Add to Bag — always visible on mobile; hover-reveal ghost on desktop (§11) */
.product-card__cta {
  margin-top: var(--space-4);
}

@media (min-width: 1024px) and (hover: hover) {
  .product-card__cta {
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 200ms var(--easing-standard), transform 200ms var(--easing-standard);
  }

  .product-card:hover .product-card__cta,
  .product-card:focus-within .product-card__cta {
    opacity: 1;
    transform: none;
  }
}

/* Quick View text-button fades in at image bottom on hover (§11) — Phase 2 wiring */
.product-card__quickview {
  position: absolute;
  bottom: var(--space-2);
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 200ms var(--easing-standard);
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-label);
  font-size: var(--type-label-size);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-neutral-ink);
}

@media (hover: hover) {
  .product-card:hover .product-card__quickview { opacity: 1; }
}

/* Whole-card link overlay — card focusable, Enter activates (§18) */
.product-card__link {
  position: absolute;
  inset: 0;
  z-index: 1; /* ABOVE media/name/price → whole card + image click opens PDP */
  border-radius: var(--radius-xl);
}

.product-card__wishlist,
.product-card__cta,
.product-card__quickview { position: relative; z-index: 2; }

.product-card__wishlist,
.product-card__quickview { position: absolute; }
