/* ADD button / "- qty +" stepper — same footprint in both states, so the
   card never jumps when an item is added. */
.AddToCartButton {
  width: 100%;
  max-width: 150px;
  height: 36px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease,
    transform 0.15s ease;
}

.AddToCartButton.busy {
  opacity: 0.7;
  cursor: progress;
}

/* ---------- ADD ---------- */
.AddToCartButton.add_state {
  gap: 8px;
  border: 1.5px solid #f97316;
  background: #ffffff;
  color: #f97316;
  cursor: pointer;
}

.AddToCartButton.add_state:hover:not(:disabled) {
  background: #f97316;
  color: #ffffff;
}

.AddToCartButton.add_state:active:not(:disabled) {
  transform: scale(0.96);
}

.AddToCartButton .atc_icon {
  font-size: 13px;
}

/* ---------- Stepper ---------- */
.AddToCartButton.stepper_state {
  justify-content: space-between;
  border: 1.5px solid #f97316;
  background: #f97316;
  color: #ffffff;
  overflow: hidden;
  animation: atcPop 0.25s ease-out;
}

.AddToCartButton .atc_step {
  width: 36px;
  height: 100%;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.AddToCartButton .atc_step:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.12);
}

.AddToCartButton .atc_step:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.AddToCartButton .atc_qty {
  min-width: 24px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
}

/* ---------- Out of stock ---------- */
.AddToCartButton.out_of_stock {
  border: 1.5px solid #e5e7eb;
  background: #f3f4f6;
  color: #9ca3af;
  font-size: 13px;
  cursor: not-allowed;
}

@keyframes atcPop {
  0% { transform: scale(0.94); }
  60% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

@media (max-width: 575px) {
  .AddToCartButton {
    height: 34px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .AddToCartButton,
  .AddToCartButton .atc_step {
    transition: none;
  }

  .AddToCartButton.stepper_state {
    animation: none;
  }
}
