/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999999999;
  pointer-events: none;
}

.toast {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  margin-bottom: 10px;
  min-width: 320px;
  max-width: 400px;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: all;
  border-left: 4px solid;
}

.toast-visible {
  opacity: 1;
  transform: translateX(0);
}

.toast-leaving {
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease-in;
}

.toast-success {
  border-left-color: #28a745;
}

.toast-error {
  border-left-color: #dc3545;
}

.toast-info {
  border-left-color: #17a2b8;
}

.toast-content {
  display: flex;
  align-items: flex-start;
  padding: 16px;
  gap: 12px;
}

.toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  color: white;
}

.toast-success .toast-icon {
  background: #28a745;
}

.toast-error .toast-icon {
  background: #dc3545;
}

.toast-info .toast-icon {
  background: #17a2b8;
}

.toast-body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast-product-image {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 6px;
  overflow: hidden;
  background: #f8f9fa;
}

.toast-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.toast-text {
  flex: 1;
}

.toast-message {
  font-weight: 600;
  color: #333;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 2px;
}

.toast-product-name {
  font-size: 12px;
  color: #666;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.toast-close:hover {
  background: #f8f9fa;
  color: #666;
}

/* Cart Icon Animation */
.cart-icon-bounce {
  animation: cartBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes cartBounce {
  0% { transform: scale(1); }
  25% { transform: scale(1.1); }
  50% { transform: scale(1.2); }
  75% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.cart-notification-pulse {
  animation: notificationPulse 0.6s ease-out;
}

@keyframes notificationPulse {
  0% { 
    transform: scale(1);
    background: #007bff;
  }
  50% { 
    transform: scale(1.3);
    background: #28a745;
  }
  100% { 
    transform: scale(1);
    background: #007bff;
  }
}

/* Button Success State */
.btn-cart-success,
.btn.btn-cart2.btn-cart-success,
button.btn.btn-cart2.btn-cart-success {
  background: #28a745 !important;
  color: white !important;
  border-color: #28a745 !important;
  transform: scale(0.98) !important;
  transition: all 0.3s ease !important;
}

.btn-cart-success:hover,
.btn.btn-cart2.btn-cart-success:hover,
button.btn.btn-cart2.btn-cart-success:hover {
  background: #218838 !important;
  border-color: #218838 !important;
  color: white !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .toast-container {
    top: 10px;
    right: 10px;
    /* Remove left: 10px to allow natural sizing */
  }
  
  .toast {
    min-width: 280px;
    max-width: 320px;
    /* Remove width: 100% to allow natural sizing like desktop */
  }
  
  .toast-content {
    padding: 12px;
  }
  
  .toast-product-image {
    width: 40px;
    height: 40px;
  }
  
  .toast-message {
    font-size: 13px;
  }
  
  .toast-product-name {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .toast-container {
    top: 5px;
    right: 5px;
    /* Remove left: 5px to allow natural sizing */
  }
  
  .toast-content {
    padding: 10px;
    gap: 8px;
  }
  
  .toast-body {
    gap: 8px;
  }
}