/* Eralux Favorites — page-specific styles only — theme tokens come from design-system.css (mobile boundary: 900px — see --eralux-mobile-breakpoint) */

/* Eralux favorites — product-card hearts. */

/* ---------- card hearts (only exist on v3 product pages) ---------- */
.also-card-wrap {
  position: relative;
}
.eralux-favorite-heart {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 38px;
  height: 38px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(var(--ews-contrast-ink-rgb), 0.92);
  box-shadow: 0 4px 14px -4px rgba(var(--ews-ink-rgb), 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}
.eralux-favorite-heart:hover {
  transform: scale(1.08);
}
.eralux-favorite-heart svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--ews-ink);
  stroke-width: 2;
  transition:
    fill 0.2s ease,
    stroke 0.2s ease;
}
.eralux-favorite-heart.is-favorite svg {
  fill: var(--ews-accent);
  stroke: var(--ews-accent);
}

/* ---------- catalog cards (/products) ---------- */
/* Heart in the top-right corner of the product card:
   - not hovered + not favorited  -> nothing shown
   - not hovered + favorited      -> a plain blue heart icon (no button
                                     chrome), always visible
   - hovered / keyboard focus     -> the full round heart button        */
.product-media .eralux-favorite-heart {
  z-index: 4;
  opacity: 0;
  pointer-events: auto;
  transition:
    opacity 0.25s ease,
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.25s ease;
}

.product-card:hover .product-media .eralux-favorite-heart,
.product-media .eralux-favorite-heart:focus-visible,
.product-media .eralux-favorite-heart.is-favorite {
  opacity: 1;
}

/* Favorited card at rest: only the blue heart icon, no white circle. */
.product-media .eralux-favorite-heart.is-favorite {
  background: transparent;
  box-shadow: none;
}

.product-card:hover .product-media .eralux-favorite-heart.is-favorite,
.product-media .eralux-favorite-heart.is-favorite:focus-visible {
  background: rgba(var(--ews-contrast-ink-rgb), 0.92);
  box-shadow: 0 4px 14px -4px rgba(var(--ews-ink-rgb), 0.28);
}

/* ---------- single product heading ---------- */
.eralux-product .product-hero .container {
  position: relative;
}

.eralux-product .product-hero .eralux-favorite-heart {
  top: 4px;
  right: var(--eralux-page-padding-horizontal);
  z-index: 5;
}

/* Touch devices have no hover — keep the catalog hearts visible. */
@media (hover: none), (max-width: 900px) {
  .product-media .eralux-favorite-heart {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eralux-favorite-heart {
    transition: none;
  }
  .product-media .eralux-favorite-heart {
    transition: none;
  }
}
