.fade-in {
    animation: fadeIn 0.5s ease-in;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.bounce-in {
    animation: bounceIn 0.3s ease-out;
}
@keyframes bounceIn {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.slider {
    position: relative;
    overflow: hidden;
}
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
}
.slide.active {
    opacity: 1;
}
.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.floating-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 40;
    transition: all 0.3s ease;
}

.floating-cart.hidden {
    transform: scale(0);
    opacity: 0;
}

.floating-cart:not(.hidden) {
    transform: scale(1);
    opacity: 1;
}

/* Success Modal Animations */
.success-modal-enter {
  animation: successModalEnter 0.6s ease-out forwards;
}

#success-modal {
  z-index: 100;;
}

@keyframes successModalEnter {
  0% {
      opacity: 0;
      transform: scale(0.8) translateY(50px);
  }
  50% {
      transform: scale(1.05) translateY(-10px);
  }
  100% {
      opacity: 1;
      transform: scale(1) translateY(0);
  }
}

.checkmark-animation {
  animation: checkmarkDraw 0.8s ease-out 0.3s forwards;
  stroke-dasharray: 52;
  stroke-dashoffset: 52;
}

@keyframes checkmarkDraw {
  to {
      stroke-dashoffset: 0;
  }
}

.pulse-ring {
  animation: pulseRing 2s infinite;
}

@keyframes pulseRing {
  0% {
      transform: scale(0.8);
      opacity: 1;
  }
  100% {
      transform: scale(2.4);
      opacity: 0;
  }
}

.gear-rotate {
  animation: gearRotate 4s linear infinite;
}

@keyframes gearRotate {
  from {
      transform: rotate(0deg);
  }
  to {
      transform: rotate(360deg);
  }
}

.success-gradient {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Responsive table scrolling */
.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e0 #f7fafc;
}

.overflow-x-auto::-webkit-scrollbar {
  height: 8px;
}

.overflow-x-auto::-webkit-scrollbar-track {
  background: #f7fafc;
  border-radius: 4px;
}

.overflow-x-auto::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 4px;
}

.overflow-x-auto::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

/* Responsive card improvements */
@media (max-width: 640px) {
  .fade-in {
    animation: fadeInMobile 0.4s ease-in;
  }
}

@keyframes fadeInMobile {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Smooth transitions for responsive changes */
#products-grid, #products-list {
  transition: opacity 0.3s ease-in-out;
}

/* Better table cell spacing on mobile */
@media (max-width: 1280px) {
  table {
    font-size: 0.875rem;
  }
}

/* Mobile supplier list compact styling */
.space-y-0 > * + * {
  margin-top: 0;
}

/* Touch-friendly mobile controls */
@media (max-width: 640px) {
  input[type="number"] {
    font-size: 12px;
  }
  
  button {
    min-height: 32px;
    touch-action: manipulation;
  }
}