/* --- Sweet Modal visibility & stacking priority --- */
#nx-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999 !important;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

#nx-modal.show {
  opacity: 1;
  pointer-events: auto;
}

#nx-modal .nx-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
  z-index: 99998;
  opacity: 0;
  animation: fadeIn 0.4s forwards;
}

#nx-modal .nx-modal__content {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-radius: 16px;
  padding: 32px 36px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  text-align: center;
  transform: scale(0.95);
  opacity: 0;
  animation: popUp 0.45s ease forwards;
  z-index: 99999;
  max-width: 420px;
}

#nx-modal .nx-modal__img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
  margin: 0 auto 18px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

#nx-modal .nx-modal__text {
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 24px;
}

#nx-modal .nx-modal__actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

#nx-modal .nx-modal__btn {
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.3s;
}

#nx-modal .nx-modal__btn.nx-continue {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

#nx-modal .nx-modal__btn.nx-continue:hover {
  background: var(--chip);
}

#nx-modal .nx-modal__btn.nx-cart {
  background: var(--btn-bg);
  color: #fff;
  text-decoration: none;
}

#nx-modal .nx-modal__btn.nx-cart:hover {
  background: var(--btn-hover);
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes popUp {
  to {
    transform: scale(1);
    opacity: 1;
  }
}
