/* Cart Panel Styles */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-panel {
  position: fixed;
  top: 0;
  right: -450px;
  width: 450px;
  height: 100vh;
  background: #000;
  border-left: 2px solid #f97316;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
}

.cart-panel.active {
  right: 0;
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid #374151;
  background: linear-gradient(135deg, #111827, #000);
}

.cart-header h3 {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.cart-header h3 i {
  color: #f97316;
}

.cart-close {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.cart-close:hover {
  color: #f97316;
  background: rgba(249, 115, 22, 0.1);
}

.cart-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: #9ca3af;
}

.cart-empty i {
  font-size: 3rem;
  color: #374151;
  margin-bottom: 1rem;
}

.cart-empty p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

.btn-continue-shopping {
  background: linear-gradient(135deg, #f97316, #ff8c42);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-continue-shopping:hover {
  background: linear-gradient(135deg, #ea580c, #f97316);
  transform: translateY(-2px);
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  background: linear-gradient(145deg, #111827, #000);
  border: 1px solid #374151;
  border-radius: 12px;
  padding: 1rem;
  transition: all 0.3s ease;
}

.cart-item:hover {
  border-color: #f97316;
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.1);
}

.cart-item-content {
  display: flex;
  gap: 1rem;
}

.cart-item-image {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #374151;
}

.cart-item-details {
  flex: 1;
}

.cart-item-name {
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.cart-item-variant {
  color: #9ca3af;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.cart-item-price {
  color: #f97316;
  font-weight: 700;
  font-size: 1rem;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #374151;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quantity-btn {
  background: #f97316;
  color: black;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.5rem;
}

/* .quantity-btn:hover {
  background: white;
} */

.quantity-btn:disabled {
  background: #1f2937;
  color: #6b7280;
  cursor: not-allowed;
}

.quantity-display {
  color: #fff;
  font-weight: 600;
  min-width: 30px;
  text-align: center;
  font-size: 0.9rem;
}

.remove-item-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-size: 0.875rem;
}

.remove-item-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.cart-footer {
  border-top: 1px solid #374151;
  background: linear-gradient(135deg, #111827, #000);
  padding: 1.5rem;
}

.cart-summary {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  padding: 1rem;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 8px;
}

.total-amount {
  color: #f97316;
  font-size: 1.25rem;
}

.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-continue,
.btn-checkout {
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.btn-continue {
  background: transparent;
  color: #9ca3af;
  border: 1px solid #374151;
}

.btn-continue:hover {
  color: #fff;
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.1);
}

.btn-checkout {
  background: linear-gradient(135deg, #f97316, #ff8c42);
  color: #fff;
  border: none;
}

.btn-checkout:hover {
  background: linear-gradient(135deg, #ea580c, #f97316);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(249, 115, 22, 0.3);
}

.btn-checkout:disabled {
  background: #374151;
  color: #6b7280;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Cart Badge */
.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #f97316, #ff8c42);
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  animation: pulse 2s infinite;
}

.cart-link {
  position: relative;
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.cart-link:hover {
  color: white;
  background: rgb(0, 0, 0);
}

/* Loading States */
.cart-item.loading {
  opacity: 0.6;
  pointer-events: none;
}

.cart-item.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid #374151;
  border-top: 2px solid #f97316;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Success Animation */
.cart-item.success {
  border-color: #10b981;
  background: linear-gradient(145deg, #064e3b, #000);
}

/* Error Animation */
.cart-item.error {
  border-color: #ef4444;
  background: linear-gradient(145deg, #7f1d1d, #000);
}

/* Responsive Design */
@media (max-width: 768px) {
  .cart-panel {
    width: 100%;
    right: -100%;
  }

  .cart-item-content {
    flex-direction: column;
    gap: 0.75rem;
  }

  .cart-item-image {
    width: 100%;
    height: 120px;
  }

  .cart-actions {
    flex-direction: column;
  }
}

/* Animations */
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

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

.cart-item {
  animation: slideInRight 0.3s ease-out;
}

/* Scrollbar Customization */
.cart-content::-webkit-scrollbar {
  width: 6px;
}

.cart-content::-webkit-scrollbar-track {
  background: #1f2937;
}

.cart-content::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 3px;
}

.cart-content::-webkit-scrollbar-thumb:hover {
  background: #f97316;
}
