/* Quick-add carrello su card (mobile-first) */
.rv-quick-add {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(28, 27, 26, 0.88);
  color: #fff8e8;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.rv-quick-add__ico {
  width: 1.2rem;
  height: 1.2rem;
  display: block;
}

.rv-quick-add__burst {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.55);
  opacity: 0;
}

.rv-quick-add.is-pulse {
  transform: scale(1.08);
  background: var(--rv-gold, #c5a059);
  color: #14120f;
}

.rv-quick-add.is-pulse .rv-quick-add__burst {
  animation: rvQuickAddBurst 0.55s ease-out;
}

.rv-quick-add.is-busy {
  opacity: 0.7;
  pointer-events: none;
}

.rv-quick-add.is-ok {
  background: #2f6b45;
  color: #fff;
}

@keyframes rvQuickAddBurst {
  0% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.55);
  }
  100% {
    opacity: 0;
    box-shadow: 0 0 0 14px rgba(197, 160, 89, 0);
  }
}

.rv-quick-add-sizes {
  position: absolute;
  left: 0.45rem;
  right: 0.45rem;
  bottom: 0.45rem;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.45rem;
  border-radius: 0.75rem;
  background: rgba(15, 14, 12, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.rv-quick-add-sizes[hidden] {
  display: none !important;
}

.rv-quick-add-size {
  flex: 0 0 auto;
  min-width: 2.4rem;
  margin: 0;
  padding: 0.4rem 0.55rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(255, 248, 232, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #fff8e8;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.rv-quick-add-size:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.rv-quick-add-size.is-active {
  background: var(--rv-gold, #c5a059);
  border-color: var(--rv-gold, #c5a059);
  color: #14120f;
}

.rv-quick-add-fly {
  position: fixed;
  z-index: 9999;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  background: var(--rv-gold, #c5a059);
  pointer-events: none;
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.35);
  transition: transform 0.55s cubic-bezier(0.22, 0.9, 0.28, 1), opacity 0.55s ease;
  will-change: transform, opacity;
}

.rv-cart-fab.is-bump {
  animation: rvCartFabBump 0.45s ease;
}

@keyframes rvCartFabBump {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.14);
  }
  100% {
    transform: scale(1);
  }
}

/* Desktop: quick-add solo al hover della card (restano i controlli sotto) */
@media (hover: hover) and (pointer: fine) {
  .rv-product-card .rv-quick-add,
  .rv-home-card .rv-quick-add {
    opacity: 0;
    transform: translateY(6px);
  }

  .rv-product-card:hover .rv-quick-add,
  .rv-home-card:hover .rv-quick-add,
  .rv-product-card .rv-quick-add:focus-visible,
  .rv-home-card .rv-quick-add:focus-visible,
  .rv-product-card .rv-quick-add.is-open,
  .rv-home-card .rv-quick-add.is-open {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 720px) {
  .rv-product-card-cart {
    display: none;
  }

  .rv-product-card-info {
    padding-bottom: 0.85rem;
  }
}
