/* Cart Drawer */
.cart-drawer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: none;
}

.cart-drawer.open {
  display: block;
}

.cart-drawer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.cart-drawer-content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 400px;
  background: white;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 2;
}

.cart-drawer.open .cart-drawer-content {
  transform: translateX(0);
}

.cart-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.cart-drawer-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.cart-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
  padding: 0.25rem;
  line-height: 1;
}

.cart-close-btn:hover {
  color: #111827;
}

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

.cart-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid #f3f4f6;
}

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

.cart-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #111827;
  margin-bottom: 0.25rem;
  word-wrap: break-word;
}

.cart-item-details {
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.cart-item-price {
  font-size: 0.85rem;
  color: #374151;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.cart-qty-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.25rem;
}

.cart-qty-controls button {
  background: none;
  border: none;
  width: 24px;
  height: 24px;
  font-size: 1rem;
  cursor: pointer;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-qty-controls button:hover {
  color: #111827;
  background: #f3f4f6;
  border-radius: 4px;
}

.cart-qty-controls span {
  min-width: 20px;
  text-align: center;
  font-weight: 500;
}

.cart-item-total {
  font-weight: 600;
  color: #111827;
}

.cart-remove-btn {
  background: none;
  border: none;
  color: #dc2626;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
}

.cart-remove-btn:hover {
  text-decoration: underline;
}

.cart-drawer-footer {
  border-top: 1px solid #e5e7eb;
  padding: 1rem 1.5rem;
  position: relative;
  z-index: 10;
}

.cart-drawer-footer button,
.cart-drawer-footer a {
  -webkit-tap-highlight-color: rgba(0,0,0,0.1);
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

.cart-subtotal-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Added to Cart Toast */
.added-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #111827;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 10000;
}

.added-toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Checkout Modal (for legacy support) */
.checkout-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.checkout-modal-content {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
