/* =========================================================
   Motiv — Cart AJAX feedback
   ========================================================= */

.motiv-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 999;
  transform: translate(-50%, 2rem);
  padding: .85rem 1.25rem;
  background: #151515;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .35s cubic-bezier(.16, 1, .3, 1);
  max-width: min(92vw, 420px);
  text-align: center;
}

.motiv-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.motiv-toast.is-error {
  background: #b83434;
}

.motiv-toast.is-error::before {
  content: "⚠  ";
  margin-inline-end: .25rem;
}

.motiv-toast:not(.is-error)::before {
  content: "✓  ";
  margin-inline-end: .25rem;
  color: #d7ff3f;
}

/* Bump animation cho cart count */
@keyframes motivCartBump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.4); }
  100% { transform: scale(1); }
}

.motiv-header-cart-count.is-bump {
  animation: motivCartBump .35s cubic-bezier(.16, 1, .3, 1);
}

/* Loading state cho ATC button */
.pi-atc.is-loading,
.add-cart.is-loading {
  position: relative;
  opacity: .7;
  pointer-events: none;
  cursor: wait;
}

.pi-atc.is-loading::after,
.add-cart.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  inset-inline-end: 1rem;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: motivSpin .7s linear infinite;
}

@keyframes motivSpin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .motiv-toast,
  .motiv-header-cart-count.is-bump,
  .pi-atc.is-loading::after,
  .add-cart.is-loading::after {
    animation: none !important;
    transition: none !important;
  }
}

/* =========================================================
   Motiv — Cart AJAX feedback
   ========================================================= */

.motiv-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 999;
  transform: translate(-50%, 2rem);
  padding: .85rem 1.25rem;
  background: #151515;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .35s cubic-bezier(.16, 1, .3, 1);
  max-width: min(92vw, 420px);
  text-align: center;
}
.motiv-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.motiv-toast.is-error {
  background: #b83434;
}
.motiv-toast.is-error::before {
  content: "⚠  ";
  margin-inline-end: .25rem;
}
.motiv-toast:not(.is-error)::before {
  content: "✓  ";
  margin-inline-end: .25rem;
  color: #d7ff3f;
}

@keyframes motivCartBump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.4); }
  100% { transform: scale(1); }
}
.motiv-header-cart-count.is-bump {
  animation: motivCartBump .35s cubic-bezier(.16, 1, .3, 1);
}

.pi-atc.is-loading,
.add-cart.is-loading,
.motiv-cart-upsell-add.is-loading {
  position: relative;
  opacity: .7;
  pointer-events: none;
  cursor: wait;
}
.pi-atc.is-loading::after,
.add-cart.is-loading::after,
.motiv-cart-upsell-add.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  inset-inline-end: 1rem;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: motivSpin .7s linear infinite;
}
@keyframes motivSpin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .motiv-toast,
  .motiv-header-cart-count.is-bump,
  .pi-atc.is-loading::after,
  .add-cart.is-loading::after,
  .motiv-cart-upsell-add.is-loading::after {
    animation: none !important;
    transition: none !important;
  }
}