/**
 * wishlist.css
 *
 * Dandiran WooCommerce Theme — Wishlist
 *
 * Depends on dnd-tokens.css for every color/radius/shadow value — no
 * variable is redefined here. Mobile-first, minimal footprint.
 */

.woocommerce .products ul::after,
.woocommerce .products ul::before,
.woocommerce ul.products::after,
.woocommerce ul.products::before {
  content: unset;
  display: unset;
}

.wishlist-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--dnd-border);
  border-radius: var(--dnd-radius-pill);
  background: var(--dnd-white);
  color: var(--dnd-muted);
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background-color 0.15s ease;
}

.wishlist-btn:hover {
  border-color: var(--dnd-danger);
  color: var(--dnd-danger);
}

.wishlist-btn:focus-visible {
  outline: 2px solid var(--dnd-danger);
  outline-offset: 2px;
}

.wishlist-btn.is-active {
  border-color: var(--dnd-danger);
  background: var(--dnd-danger-soft);
  color: var(--dnd-danger);
}

.wishlist-btn.is-loading {
  pointer-events: none;
  opacity: 0.6;
}

.wishlist-btn__icon {
  width: 1.125rem;
  height: 1.125rem;
  pointer-events: none;
}

.wishlist-btn__icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  transition: fill 0.15s ease;
}

/* Empty outline by default; filled red heart once the product is in the wishlist. */
.wishlist-btn.is-active .wishlist-btn__icon path {
  fill: currentColor;
}

.wishlist-remove {
  margin-top: 0.5rem;
  width: 100%;
  border: 1px solid var(--dnd-danger);
  border-radius: var(--dnd-radius-md);
  background: var(--dnd-white);
  color: var(--dnd-danger);
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.wishlist-remove:hover {
  background: var(--dnd-danger-soft);
}

.wishlist-remove:focus-visible {
  outline: 2px solid var(--dnd-danger);
  outline-offset: 2px;
}

.wishlist-remove.is-loading {
  pointer-events: none;
  opacity: 0.6;
}

.wishlist-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--dnd-muted);
  background: var(--dnd-bg-soft);
  border-radius: var(--dnd-radius-lg);
}

.wishlist-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
}

@media (min-width: 768px) {
  .wishlist-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.wishlist-grid__item {
  display: flex;
  flex-direction: column;
}

.wishlist-toast {
  position: fixed;
  inset-inline-end: 1rem;
  bottom: 1rem;
  z-index: 9999;
  max-width: 320px;
  padding: 0.75rem 1rem;
  border-radius: var(--dnd-radius-md);
  background: var(--dnd-text);
  color: var(--dnd-white);
  box-shadow: var(--dnd-shadow);
  font-size: 0.875rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  pointer-events: none;
}

.wishlist-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
