/* wishlist.css — corazones de favoritos: ícono del header, corazón en cards de
   colección y en el PDP, y variante del drawer. Calca el lenguaje de cart.css
   (ELÓR style, square corners); el drawer reusa las clases de cart-drawer. */

/* --- HEADER ICON --- */
.site-wish {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 4px 4px;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  transition: opacity 200ms var(--easing-editorial);
}

.site-wish[hidden] {
  display: none;
}

.site-wish:hover {
  opacity: 0.7;
}

.site-wish:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.site-wish__icon {
  width: 22px;
  height: 22px;
  display: block;
}

.site-wish__badge {
  position: absolute;
  top: -4px;
  right: -8px;
  background: #DC2626;
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
  box-shadow: 0 0 0 1.5px var(--elor-paper);
}

.site-wish__badge[hidden] {
  display: none;
}

@media (max-width: 767px) {
  /* 44px touch target sin mover el ícono ni el badge (mismo truco que
     .site-cart en hero.css: borde transparente + margen negativo). */
  .site-wish {
    min-height: 44px;
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    margin-left: -11px;
    margin-right: -11px;
  }
}

/* --- CORAZÓN (compartido cards + PDP) --- */
.wish-heart {
  width: 20px;
  height: 20px;
  display: block;
}

[data-wish-toggle] .wish-heart path {
  transition: fill 160ms ease;
}

[data-wish-toggle].is-wished .wish-heart path {
  fill: currentColor;
}

/* Pop solo al guardar (clase temporal desde wishlist.js — el sync inicial
   de una página no debe animar corazones ya guardados). */
[data-wish-toggle].is-pop .wish-heart {
  animation: wish-pop 340ms var(--easing-editorial);
}

@keyframes wish-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  [data-wish-toggle].is-pop .wish-heart {
    animation: none;
  }
}

/* --- CORAZÓN EN CARDS (colecciones Wear + home + Gallery) --- */
/* El botón vive FUERA del <a> de la card (button dentro de anchor es inválido
   y navegaría) — absoluto sobre la esquina del media, que arranca en el tope. */
.bestseller-card,
.ct-card {
  position: relative;
}

.card-wish {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--elor-ink);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 200ms var(--easing-editorial);
}

.card-wish:hover,
.card-wish:focus-visible,
.card-wish.is-wished {
  opacity: 1;
}

.card-wish:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* --- CORAZÓN EN EL PDP (junto al título) --- */
.pdp__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px 0;
}

.pdp__title-row .pdp__title {
  margin: 0;
}

.pdp__wish {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin: -10px -10px 0 0; /* target 44px sin engordar el layout del panel */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--elor-ink);
  cursor: pointer;
  transition: opacity 200ms var(--easing-editorial);
}

.pdp__wish[hidden] {
  display: none;
}

.pdp__wish:hover {
  opacity: 0.7;
}

.pdp__wish:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.pdp__wish .wish-heart {
  width: 22px;
  height: 22px;
}

/* --- DRAWER «Tus favoritos» (sobre las clases de cart-drawer) --- */
.wish-item-cta {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--elor-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.wish-item-cta:hover {
  opacity: 0.7;
}
