/* Cart Notification System */

/* Cart Toast Notification */
.cart-toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.cart-toast {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 0;
  min-width: 350px;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 15px;
  pointer-events: auto;
  animation: slideInRight 0.3s ease-out;
  border-left: 4px solid #0d6efd;
  overflow: hidden;
}

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

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

.cart-toast-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f7ff;
  flex-shrink: 0;
}

.cart-toast.success .cart-toast-icon {
  background: #d4edda;
}

.cart-toast.error .cart-toast-icon {
  background: #f8d7da;
}

.cart-toast-icon i {
  font-size: 24px;
  color: #0d6efd;
}

.cart-toast.success .cart-toast-icon i {
  color: #28a745;
}

.cart-toast.error .cart-toast-icon i {
  color: #dc3545;
}

.cart-toast-content {
  flex: 1;
  padding: 15px 15px 15px 0;
}

.cart-toast-title {
  font-weight: 600;
  font-size: 16px;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.cart-toast-message {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.cart-toast-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  padding: 10px;
  line-height: 1;
  transition: color 0.2s;
  flex-shrink: 0;
}

.cart-toast-close:hover {
  color: #333;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.cart-toast.hiding {
  animation: slideOutRight 0.3s ease-in forwards;
}

/* Mini Cart Dropdown */
.cart-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 380px;
  max-height: 500px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  margin-top: 10px;
  display: none;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
}

.cart-dropdown.show {
  display: flex;
  animation: fadeInDown 0.3s ease-out;
}

.cart-dropdown-header {
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.cart-dropdown-header h6 {
  margin: 0;
  font-weight: 600;
  font-size: 16px;
  color: #1a1a1a;
}

.cart-dropdown-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.cart-dropdown-close:hover {
  color: #333;
}

.cart-dropdown-items {
  flex: 1;
  overflow-y: auto;
  max-height: 350px;
  padding: 10px 0;
}

.cart-dropdown-item {
  padding: 15px 20px;
  display: flex;
  gap: 12px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}

.cart-dropdown-item:hover {
  background: #f8f9fa;
}

.cart-dropdown-item-image {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.cart-dropdown-item-details {
  flex: 1;
  min-width: 0;
}

.cart-dropdown-item-name {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-dropdown-item-price {
  font-size: 14px;
  color: #0d6efd;
  font-weight: 600;
}

.cart-dropdown-footer {
  padding: 20px;
  border-top: 1px solid #e0e0e0;
  background: #f8f9fa;
}

.cart-dropdown-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.cart-dropdown-total-label {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
}

.cart-dropdown-total-amount {
  font-size: 18px;
  font-weight: 700;
  color: #0d6efd;
}

.cart-dropdown-actions {
  display: flex;
  gap: 10px;
}

.cart-dropdown-actions .btn {
  flex: 1;
  padding: 10px;
  font-weight: 600;
}

.cart-dropdown-empty {
  padding: 40px 20px;
  text-align: center;
  color: #999;
}

.cart-dropdown-empty-icon {
  font-size: 48px;
  color: #ddd;
  margin-bottom: 15px;
}

.cart-dropdown-empty-text {
  font-size: 16px;
  margin-bottom: 20px;
}

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

/* Cart Count Animation */
.flipkart-cart-count {
  animation: cartBounce 0.5s ease-out;
}

@keyframes cartBounce {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .cart-toast-container {
    top: 60px;
    right: 10px;
    left: 10px;
  }

  .cart-toast {
    min-width: auto;
    max-width: 100%;
  }

  .cart-dropdown {
    width: calc(100vw - 20px);
    max-width: 380px;
    right: 10px;
  }
}

