/* Modern Modal Dialog for Cart Operations */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
  }
  
  .modal-overlay.show {
    opacity: 1;
    visibility: visible;
  }
  
  .modal-dialog {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.2s ease;
  }
  
  .modal-overlay.show .modal-dialog {
    transform: scale(1);
  }
  
  .modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #f1f5f9;
  }
  
  .modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .modal-body {
    padding: 16px 24px 24px;
  }
  
  .modal-message {
    font-size: 16px;
    line-height: 1.5;
    color: #475569;
    margin: 0;
  }
  
  .modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
  }
  
  .modal-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
  }
  
  .modal-btn-secondary {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
  }
  
  .modal-btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
  }
  
  .modal-btn-danger {
    background: #ef4444;
    color: white;
  }
  
  .modal-btn-danger:hover {
    background: #dc2626;
  }
  
  .modal-btn-primary {
    background: #3b82f6;
    color: white;
  }
  
  .modal-btn-primary:hover {
    background: #2563eb;
  }
  
  .modal-icon {
    font-size: 24px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
  }
  
  .modal-icon.danger {
    background: #fef2f2;
    color: #ef4444;
  }
  
  .modal-icon.warning {
    background: #fffbeb;
    color: #f59e0b;
  }
  
  .modal-icon.success {
    background: #f0fdf4;
    color: #22c55e;
  }
  
  .modal-icon.info {
    background: #eff6ff;
    color: #3b82f6;
  }
  
  /* Mobile responsive */
  @media (max-width: 640px) {
    .modal-dialog {
      margin: 16px;
      max-width: none;
      width: auto;
    }
    
    .modal-header,
    .modal-body {
      padding-left: 20px;
      padding-right: 20px;
    }
    
    .modal-actions {
      flex-direction: column;
    }
    
    .modal-btn {
      flex: none;
    }
  }