/* White Fox · corazón de favoritos en las cards y en la ficha, y sus avisos.
   Los avisos reutilizan el diseño de wf-notices.css (alert-success / alert-warning / alert-danger):
   acá solo se posiciona el contenedor. */

/* ---------- Corazón de la card ---------- */
.wf-card-heart {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(30, 42, 58, .18);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(30, 42, 58, .10);
  color: #1E2A3A;
  line-height: 1;
  cursor: pointer;
  opacity: 1;
  visibility: visible;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s ease, border-color .2s ease;
}

/* Área táctil de 44 × 44 px aunque el círculo visible sea de 36 */
.wf-card-heart::after {
  content: "";
  position: absolute;
  top: -4px;
  right: -4px;
  bottom: -4px;
  left: -4px;
  border-radius: 50%;
}

.wf-card-heart svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transition: fill .2s ease;
}

.wf-card-heart.is-active svg { fill: #1E2A3A; }

@media (hover: hover) {
  .wf-card-heart:hover {
    background: #F9F4F0;
    border-color: rgba(30, 42, 58, .32);
  }
}

.wf-card-heart:focus-visible,
.wf-product-heart:focus-visible {
  outline: 2px solid #1E2A3A;
  outline-offset: 2px;
}

/* ---------- Corazón de la ficha ---------- */
.wf-product-heart.is-active .material-icons { color: #1E2A3A; }

/* ---------- Convivencia con las etiquetas de wflabels ---------- */
/* Computadora: las etiquetas colocadas "arriba a la derecha" bajan debajo del corazón. */
@media (min-width: 768px) {
  .product-miniature .tvproduct-wrapper .tvproduct-image > ul.tvproduct-sale-pack-wrapper { top: 54px; }
}

/* Celular: las etiquetas van en una fila sobre la foto; se les reserva el lugar del corazón. */
@media (max-width: 767px) {
  .wf-card-heart { top: 6px; right: 6px; }
  .product-miniature .tvproduct-wrapper .tvproduct-image > .tvproduct-online-new-wrapper { max-width: calc(100% - 62px); }
  .product-miniature .tvproduct-wrapper .tvproduct-image > .tvproduct-sale-pack-wrapper { margin-right: 52px; max-width: calc(100% - 62px); }
}

/* ---------- Corazón en la foto de la ficha ---------- */
.tvproduct-image-slider > .wf-card-heart { top: 14px; right: 14px; z-index: 8; }
/* Si hay etiquetas "arriba a la derecha" en la ficha, bajan debajo del corazón. */
.tvproduct-image-slider > ul.tvproduct-sale-pack-wrapper { top: 60px; }
@media (max-width: 767px) {
  .tvproduct-image-slider > .wf-card-heart { top: 10px; right: 10px; }
  .tvproduct-image-slider > ul.tvproduct-sale-pack-wrapper { top: 56px; }
}

/* ---------- Avisos ---------- */
.wf-heart-toasts {
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 100001;
  width: 340px;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}

.wf-heart-toasts .wf-heart-toast {
  margin: 0;
  box-shadow: 0 8px 24px rgba(30, 42, 58, .14);
  pointer-events: auto;
  animation: wfHeartToastIn .2s ease;
}

.wf-heart-toasts .wf-heart-toast.alert-warning::before { content: "\e87e"; }

.wf-heart-toasts .wf-heart-toast__link {
  display: inline-block;
  margin-left: 4px;
  font-weight: 600;
  white-space: nowrap;
}

@keyframes wfHeartToastIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .wf-heart-toasts .wf-heart-toast { animation: none; }
  .wf-card-heart, .wf-card-heart svg { transition: none; }
}

@media (max-width: 575px) {
  .wf-heart-toasts { right: 12px; left: 12px; width: auto; max-width: none; }
}
