/* Micro-animações — carrinho e favoritos */

@keyframes wishlist-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.28); }
  65% { transform: scale(0.92); }
  100% { transform: scale(1); }
}

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

.wishlist-btn--pop {
  animation: wishlist-pop 0.45s ease;
}

.wishlist-btn--pop .wishlist-btn__icon {
  filter: drop-shadow(0 0 6px rgba(197, 160, 89, 0.55));
}

.wishlist-btn--unpop {
  animation: wishlist-unpop 0.35s ease;
}

@keyframes nav-badge-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.hbtn--cart-bump .badge,
.hbtn--wishlist-bump .badge {
  animation: nav-badge-bump 0.45s ease;
}

.hbtn--cart-bump,
.hbtn--wishlist-bump {
  animation: wishlist-pop 0.4s ease;
}

@keyframes cart-btn-success {
  0% { transform: scale(1); }
  30% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.btn.is-cart-added {
  animation: cart-btn-success 0.4s ease;
  pointer-events: none;
}

/* Produto “saltando” até o carrinho */
.cart-fly-item {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 16px 40px rgba(18, 16, 14, 0.22),
    0 0 0 2px rgba(255, 255, 255, 0.95);
  will-change: transform, opacity;
}

.cart-fly-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-fly-item--dot {
  border-radius: 50%;
  background: var(--gold-display, #c5a059);
  box-shadow: 0 8px 24px rgba(197, 160, 89, 0.55);
}

@keyframes cart-catch {
  0% { transform: translateY(0) scale(1); }
  20% { transform: translateY(-8px) scale(1.12); }
  45% { transform: translateY(3px) scale(0.96); }
  65% { transform: translateY(-4px) scale(1.06); }
  100% { transform: translateY(0) scale(1); }
}

.hbtn--cart-catch {
  animation: cart-catch 0.6s cubic-bezier(0.34, 1.4, 0.48, 1);
}

.hbtn--cart-catch .wishlist-head-icon,
.hbtn--cart-catch svg {
  transform-origin: center;
}

.shop-toast {
  position: fixed;
  z-index: 10000;
  left: 50%;
  bottom: 1.25rem;
  transform: translate(-50%, 120%);
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  background: var(--ink, #0d0c0a);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  box-shadow: 0 12px 40px rgba(18, 16, 14, 0.22);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.2, 1), opacity 0.3s ease;
  pointer-events: none;
  max-width: min(92vw, 320px);
  text-align: center;
}

.shop-toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .wishlist-btn--pop,
  .wishlist-btn--unpop,
  .hbtn--cart-bump,
  .hbtn--wishlist-bump,
  .hbtn--cart-bump .badge,
  .hbtn--wishlist-bump .badge,
  .btn.is-cart-added {
    animation: none !important;
  }

  .cart-fly-item {
    display: none !important;
  }

  .hbtn--cart-catch {
    animation: none !important;
  }

  .shop-toast {
    transition: opacity 0.2s ease;
    transform: translate(-50%, 0);
  }
}
