/home/awneajlw/.trash/shop-registration-step2.php
<?php
session_start();
require_once 'config/database.php';
require_once 'includes/auth.php';

// Check if user came from step 1
if (!isset($_SESSION['temp_user_id'])) {
    header('Location: shop-signup.php');
    exit();
}

$error = '';
$success = '';

if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $shop_name = sanitizeInput($_POST['shop_name']);
    $shop_category = sanitizeInput($_POST['shop_category']);
    $shop_address = sanitizeInput($_POST['shop_address']);
    $shop_city = sanitizeInput($_POST['shop_city']);
    $shop_phone = sanitizeInput($_POST['shop_phone']);
    $shop_description = sanitizeInput($_POST['shop_description']);
    
    if (empty($shop_name) || empty($shop_category) || empty($shop_address) || empty($shop_city)) {
        $error = 'Please fill in all required fields.';
    } else {
        // Store shop data in session temporarily
        $_SESSION['shop_data'] = [
            'shop_name' => $shop_name,
            'shop_category' => $shop_category,
            'shop_address' => $shop_address,
            'shop_city' => $shop_city,
            'shop_phone' => $shop_phone,
            'shop_description' => $shop_description
        ];
        
        header('Location: shop-registration-step3.php');
        exit();
    }
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Shop Registration - Step 2</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
    <style>
        :root {
            --primary-color: #2563eb;
            --secondary-color: #1e40af;
        }
        
        body {
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            min-height: 100vh;
            font-family: 'Inter', sans-serif;
        }
        
        .registration-container {
            max-width: 600px;
            margin: 0 auto;
            padding: 2rem;
        }
        
        .card {
            border: none;
            border-radius: 20px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
            backdrop-filter: blur(10px);
        }
        
        .card-header {
            background: white;
            border-bottom: none;
            text-align: center;
            border-radius: 20px 20px 0 0 !important;
            padding: 2rem 2rem 1rem;
        }
        
        .progress-indicator {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 1rem;
            margin-bottom: 2rem;
        }
        
        .step {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
        }
        
        .step.active {
            background: var(--primary-color);
            color: white;
        }
        
        .step.completed {
            background: #10b981;
            color: white;
        }
        
        .step.inactive {
            background: #e5e7eb;
            color: #9ca3af;
        }
        
        .step-line {
            width: 50px;
            height: 2px;
            background: #e5e7eb;
        }
        
        .step-line.completed {
            background: #10b981;
        }
        
        .form-control, .form-select {
            border-radius: 12px;
            border: 2px solid #e5e7eb;
            padding: 0.75rem 1rem;
        }
        
        .form-control:focus, .form-select:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
        }
        
        .btn-primary {
            background: var(--primary-color);
            border: none;
            border-radius: 12px;
            padding: 0.75rem 2rem;
            font-weight: 600;
            width: 100%;
        }
        
        .btn-primary:hover {
            background: var(--secondary-color);
        }
        
        .btn-outline-secondary {
            border-radius: 12px;
            padding: 0.75rem 2rem;
            font-weight: 600;
            width: 100%;
            margin-bottom: 1rem;
        }
        
        .logo {
            font-size: 2rem;
            color: var(--primary-color);
            margin-bottom: 1rem;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="registration-container">
            <div class="card">
                <div class="card-header">
                    <div class="logo">
                        <i class="fas fa-store"></i>
                    </div>
                    <h3 class="mb-3">Shop Registration</h3>
                    
                    <!-- Progress Indicator -->
                    <div class="progress-indicator">
                        <div class="step completed">
                            <i class="fas fa-check"></i>
                        </div>
                        <div class="step-line completed"></div>
                        <div class="step active">2</div>
                        <div class="step-line"></div>
                        <div class="step inactive">3</div>
                        <div class="step-line"></div>
                        <div class="step inactive">4</div>
                    </div>
                    
                    <p class="text-muted">Step 2: Shop Information</p>
                </div>
                
                <div class="card-body p-4">
                    <?php if ($error): ?>
                        <div class="alert alert-danger"><?php echo $error; ?></div>
                    <?php endif; ?>
                    
                    <form method="POST">
                        <div class="row">
                            <div class="col-md-6 mb-3">
                                <label class="form-label">Shop Name *</label>
                                <input type="text" name="shop_name" class="form-control" required 
                                       value="<?php echo isset($_POST['shop_name']) ? htmlspecialchars($_POST['shop_name']) : ''; ?>">
                            </div>
                            
                            <div class="col-md-6 mb-3">
                                <label class="form-label">Shop Category *</label>
                                <select name="shop_category" class="form-select" required>
                                    <option value="">Select Category</option>
                                    <option value="Electronics">Electronics</option>
                                    <option value="Clothing">Clothing & Fashion</option>
                                    <option value="Food">Food & Beverages</option>
                                    <option value="Books">Books & Stationery</option>
                                    <option value="Health">Health & Beauty</option>
                                    <option value="Home">Home & Garden</option>
                                    <option value="Sports">Sports & Fitness</option>
                                    <option value="Toys">Toys & Games</option>
                                    <option value="Other">Other</option>
                                </select>
                            </div>
                        </div>
                        
                        <div class="mb-3">
                            <label class="form-label">Shop Address *</label>
                            <textarea name="shop_address" class="form-control" rows="3" required><?php echo isset($_POST['shop_address']) ? htmlspecialchars($_POST['shop_address']) : ''; ?></textarea>
                        </div>
                        
                        <div class="row">
                            <div class="col-md-6 mb-3">
                                <label class="form-label">City *</label>
                                <select name="shop_city" class="form-select" required>
                                    <option value="">Select City</option>
                                    <option value="Karachi">Karachi</option>
                                    <option value="Lahore">Lahore</option>
                                    <option value="Islamabad">Islamabad</option>
                                    <option value="Rawalpindi">Rawalpindi</option>
                                    <option value="Faisalabad">Faisalabad</option>
                                    <option value="Multan">Multan</option>
                                    <option value="Peshawar">Peshawar</option>
                                    <option value="Quetta">Quetta</option>
                                    <option value="Other">Other</option>
                                </select>
                            </div>
                            
                            <div class="col-md-6 mb-3">
                                <label class="form-label">Shop Phone</label>
                                <input type="tel" name="shop_phone" class="form-control" 
                                       value="<?php echo isset($_POST['shop_phone']) ? htmlspecialchars($_POST['shop_phone']) : ''; ?>">
                            </div>
                        </div>
                        
                        <div class="mb-4">
                            <label class="form-label">Shop Description</label>
                            <textarea name="shop_description" class="form-control" rows="4" 
                                      placeholder="Tell us about your shop..."><?php echo isset($_POST['shop_description']) ? htmlspecialchars($_POST['shop_description']) : ''; ?></textarea>
                        </div>
                        
                        <div class="row">
                            <div class="col-md-6">
                                <a href="shop-signup.php" class="btn btn-outline-secondary">
                                    <i class="fas fa-arrow-left me-2"></i> Back
                                </a>
                            </div>
                            <div class="col-md-6">
                                <button type="submit" class="btn btn-primary">
                                    Continue to Step 3 <i class="fas fa-arrow-right ms-2"></i>
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>