/* =====================================
   SHOPPING CART COMPONENT
   Sidebar, Notifications, Controls
   ===================================== */
/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  pointer-events: none;
}
.cart-sidebar.active {
  pointer-events: all;
}
/* Overlay */
.cart-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}
.cart-sidebar.active .cart-overlay {
  opacity: 1;
}
/* Panel */
.cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: var(--color-surface-bg, #FFFFFF);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
}
.cart-sidebar.active .cart-panel {
  transform: translateX(0);
}
/* Header */
.cart-header {
  padding: var(--space-md, 24px);
  border-bottom: 1px solid var(--color-border, #EAE7E2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.cart-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  color: var(--color-text-primary, #2C2825);
}
.cart-close {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--color-text-secondary, #6B645D);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.2s ease;
}
.cart-close:hover {
  background: var(--color-border, #EAE7E2);
  color: var(--color-text-primary, #2C2825);
}
/* Body */
.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md, 24px);
}
/* Empty State */
.cart-empty {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--color-text-secondary, #6B645D);
}
.empty-icon {
  font-size: 64px;
  margin-bottom: var(--space-md, 24px);
  opacity: 0.3;
}
.cart-empty p {
  margin: 0;
  font-size: 16px;
}
/* Cart Items */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-md, 24px);
}
/* Cart Item */
.cart-item {
  display: flex;
  gap: var(--space-sm, 16px);
  padding: var(--space-sm, 16px);
  background: var(--color-page-bg, #FDFBF8);
  border-radius: var(--border-radius, 8px);
  position: relative;
  animation: cart-item-enter 0.3s ease;
}
@keyframes cart-item-enter {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.cart-item-image {
  width: 80px;
  height: 112px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cart-item-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  color: var(--color-text-primary, #2C2825);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.cart-item-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary-main, #29336B);
  margin: 0 !important;
}
/* Quantity Controls */
.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-item-subtotal {
  font-size: 13px;
  color: var(--color-text-secondary, #6B645D);
  margin: 4px 0 0 0;
}
/* Remove Button */
.btn-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--color-error, #B91C1C);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
}
.btn-remove:hover {
  background: var(--color-error, #B91C1C);
  color: white;
}
/* Footer */
.cart-footer {
  display: flex;
  flex-direction: column;
  padding: var(--space-md, 24px);
  border-top: 1px solid var(--color-border, #EAE7E2);
  flex-shrink: 0;
  background: var(--color-surface-bg, #FFFFFF);
  gap: var(--space-sm);
}
.cart-total {
  display: flex;
  gap: var(--space-2);
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary, #2C2825);
}
.cart-total-amount {
  font-size: 24px;
  color: var(--color-primary-main, #29336B);
  margin-left: auto;
}
/* =====================================
   CART BADGE (in Header)
   ===================================== */
.cart-icon-wrapper {
  position: relative;
  display: inline-block;
}
.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--color-error, #B91C1C);
  color: white;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  animation: badge-bounce 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}
@keyframes badge-bounce {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}
/* =====================================
   NOTIFICATIONS
   ===================================== */
/*
.cart-notifications {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}
.cart-notification {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: white;
  border-radius: var(--border-radius, 8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  min-width: 320px;
  max-width: 420px;
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-left: 4px solid;
  pointer-events: all;
}
.cart-notification.show {
  opacity: 1;
  transform: translateX(0);
}
.cart-notification.success {
  border-left-color: var(--color-success, #1E8A5A);
}
.cart-notification.error {
  border-left-color: var(--color-error, #B91C1C);
}
.cart-notification.warning {
  border-left-color: var(--color-warning, #D97706);
}
.cart-notification.info {
  border-left-color: var(--color-primary-main, #29336B);
}
.notification-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.notification-content {
  flex: 1;
}
.notification-content strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--color-text-primary, #2C2825);
}
.notification-content p {
  font-size: 13px;
  margin: 0;
  color: var(--color-text-secondary, #6B645D);
}
*/
/* =====================================
   RESPONSIVE
   ===================================== */
@media (max-width: 480px) {
  .cart-panel {
    max-width: 100%;
  }
  .cart-notifications {
    right: 12px;
    left: 12px;
  }
  .cart-notification {
    min-width: auto;
    max-width: none;
  }
}