/home/awneajlw/public_html/codestechvista.com/shop-registration-form.php
<?php
session_start();

// Check if email is verified
if (!isset($_SESSION['email_verified']) || $_SESSION['email_verified'] !== true) {
    // Email not verified, redirect to verification page
    header('Location: verify-otp.php');
    exit();
}

// Check if registration email exists
if (!isset($_SESSION['registration_email'])) {
    header('Location: register.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 - OPTI SLIP</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>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: white;
            min-height: 100vh;
            padding: 0;
            margin: 0;
            position: relative;
        }
        
        /* Back Button and Header */
        .back-btn {
            position: absolute;
            top: 30px;
            left: 30px;
            color: black;
            font-size: 24px;
            text-decoration: none;
            z-index: 10;
        }
        
        .container {
            display: flex;
            flex-direction: column;
            align-items: center;
            min-height: 100vh;
            padding: 80px 40px 40px;
            position: relative;
            max-width: 1200px;
            margin: 0 auto;
        }
        
        /* Logo Section */
        .logo-section {
            text-align: center;
            margin-bottom: 40px;
        }
        
        .logo-container {
            margin-bottom: 20px;
        }
        
        .logo-image {
            width: 100%;
            height: 120px;
            margin-top:-50px;
            object-fit: contain;
            filter: brightness(0) saturate(100%);
        }
        
        /* Main Content Area */
        .main-content {
            width: 100%;
            max-width: 900px;
            margin: 0 auto;
        }
        
        /* Individual Field Cards */
        .field-card {
            background: transparent;
            border-radius: 25px;
            padding: 10px;
            margin-bottom: 5px;
            border: none;
            transition: all 0.3s ease;
            position: relative;
        }
        
        /* Form Title */
        .form-title {
            color: #374151;
            font-size: 24px;
            font-weight: 600;
            margin-bottom: 30px;
            text-align: left;
        }
        
        /* Form Fields */
        .form-group {
            margin-bottom: 10px;
            position: relative;
        }
        
        .upload-group {
            margin-bottom: 0;
            width: 100%;
        }
        
        .form-label {
            color: black;
            font-size: 16px;
            font-weight: 700;
            margin-bottom: 6px;
            display: block;
            /*text-align: left;*/
            position: relative;
            /*top: -10px;*/
            left: 20px;
            background: white;
            /*padding: 0 8px;*/
            z-index: 2;
            width: fit-content;
        }
        
        .form-input {
            width: 100%;
            padding: 15px 10px;
            border: 2px solid black;
            border-radius: 25px;
            font-size: 16px;
            line-height: 1.5;
            font-weight: 600;
            color: black;
            background: white;
            transition: all 0.3s ease;
            box-sizing: border-box;
            outline: none;
            min-height: 55px;
        }
        
        .form-input:focus {
            outline: none;
            background: white;
        }
        
        .field-card:focus-within .form-input {
            border-color: #169D53;
            box-shadow: 0 0 0 3px rgba(22, 157, 83, 0.1);
        }
        
        .field-card:focus-within .upload-input {
            border-color: #169D53;
            box-shadow: 0 0 0 3px rgba(22, 157, 83, 0.1);
        }
        
        /* Upload Section */
        .upload-section {
            display: flex;
            align-items: stretch;
            gap: 15px;
            margin-bottom: 30px;
            width: 100%;
        }
        
        .upload-input {
            flex: 1;
            padding: 25px 20px;
            border: 2px solid black;
            border-radius: 25px;
            font-size: 16px;
            font-weight: 600;
            color: black;
            background: white;
            outline: none;
            min-width: 0;
            width: 100%;
            min-height: 60px;
        }
        
        .upload-btn {
            background: #169D53;
            color: white;
            border: none;
            padding: 25px 32px;
            border-radius: 25px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            white-space: nowrap;
            flex-shrink: 0;
            min-width: fit-content;
            min-height: 60px;
        }
        
        .upload-btn:hover {
            background: #059669;
        }
        
        /* Continue Button */
        .continue-btn {
            width: 100%;
            background: #10b981;
            color: white;
            border: none;
            padding: 20px;
            border-radius: 25px;
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-bottom: 30px;
        }
        
        .continue-btn:hover {
            background: #059669;
        }
        
        /* Navigation */
        .navigation {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 20px;
        }
        
        .nav-btn {
            color: #10b981;
            text-decoration: none;
            font-size: 18px;
            font-weight: 600;
            padding: 12px 24px;
            border: 2px solid #10b981;
            border-radius: 8px;
            background: white;
            transition: all 0.3s ease;
            cursor: pointer;
        }
        
        .nav-btn:hover {
            color: white;
            background: #10b981;
            text-decoration: none;
        }
        
        .pagination {
            display: flex;
            gap: 8px;
            align-items: center;
        }
        
        .page-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #d1d5db;
        }
        
        .page-dot.active {
            background: #10b981;
        }
        
        .page-number {
            color: #6b7280;
            font-size: 14px;
        }
        
        .page-number.active {
            color: #10b981;
            font-weight: 600;
        }
        
        /* Logo Fallback Text */
        .logo-fallback {
            display: none;
            color: black;
            font-size: 24px;
            font-weight: 900;
            letter-spacing: 2px;
            text-transform: uppercase;
        }
        
        /* Responsive Design */
        @media (max-width: 1024px) {
            .container {
                padding: 60px 30px 40px;
                max-width: 95%;
            }
            
            .main-content {
                max-width: 100%;
                margin: 0 15px;
            }
            
            .field-card {
                margin-bottom: 18px;
            }
            


        }
        
        @media (max-width: 768px) {
            .container {
                padding: 50px 20px 30px;
            }
            
            .main-content {
                max-width: 100%;
                margin: 0 10px;
            }
            
            .field-card {
                margin-bottom: 8px;
                padding: 5px;
            }
            
            .form-input, .upload-input {
                padding: 22px 18px;
                font-size: 15px;
                min-height: 55px;
            }
            
            
            .form-label {
                font-size: 13px;
                top: 15px;
            }
            
            .continue-btn {
                padding: 18px;
                font-size: 15px;
            }
            
            .upload-btn {
                padding: 18px 25px;
                font-size: 13px;
                min-width: 120px;
            }
            
            .upload-section {
                gap: 12px;
            }
            
            .back-btn {
                top: 20px;
                left: 20px;
                font-size: 20px;
            }
            
            .logo-image {
                width: 100%;
                height: 120px;
            }
            
            .logo-section {
                margin-bottom: 30px;
            }
        }
        
        @media (max-width: 480px) {
            .container {
                padding: 40px 15px 25px;
            }
            
            .main-content {
                margin: 0 5px;
            }
            
            .field-card {
                margin-bottom: 6px;
                padding: 3px;
            }
            
            .form-input, .upload-input {
                padding: 20px 15px;
                font-size: 14px;
                min-height: 50px;
            }
            
            .form-label {
                font-size: 12px;
                top: 12px;
                left: 15px;
            }
            
            .continue-btn {
                padding: 16px;
                font-size: 14px;
            }
            
            .upload-section {
                flex-direction: column;
                gap: 15px;
                align-items: stretch;
            }
            
            .upload-input {
                margin-right: 0;
                margin-bottom: 0;
                width: 100%;
                flex: none;
            }
            
            .upload-btn {
                width: 100%;
                text-align: center;
                padding: 15px;
                font-size: 12px;
        }
        
        .back-btn {
                top: 15px;
                left: 15px;
                font-size: 18px;
            }
            
            .logo-image {
                width: 50px;
                height: 50px;
            }
            
            .logo-section {
                margin-bottom: 25px;
            }
            
            .navigation {
                flex-direction: column;
                gap: 15px;
                text-align: center;
            }
            
            .pagination {
                justify-content: center;
                flex-wrap: wrap;
            }
            
            .nav-btn {
                font-size: 16px;
                padding: 10px 20px;
            }
        }
        
        @media (max-width: 320px) {
            .container {
                padding: 30px 10px 20px;
            }
            
            .main-content {
                margin: 0;
            }
            
            .field-card {
                margin-bottom: 5px;
            }
            
            .form-input, .upload-input {
                padding: 18px 12px;
                font-size: 13px;
                min-height: 45px;
            }
            
            .form-label {
                font-size: 11px;
                top: 10px;
                left: 12px;
            }
            
            .continue-btn {
                padding: 14px;
                font-size: 13px;
            }
            
            .logo-image {
                width: 40px;
                height: 40px;
            }
        }
        
        .logo-container {
            display: flex;
            align-items: center;
            gap: 15px;
        }
        
        .logo {
            width: 50px;
            height: 50px;
            background: #10b981;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .logo-icon {
            font-size: 24px;
            color: white;
        }
        
        .logo-text {
            color: #1f2937;
            font-size: 20px;
            font-weight: bold;
            letter-spacing: 1px;
        }
        
        .form-title {
            color: #1f2937;
            font-size: 32px;
            font-weight: 700;
            margin-bottom: 40px;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            letter-spacing: 0.5px;
        }
        
        .form-group {
            /*margin-bottom: 30px;*/
            position: relative;
        }
        
        .form-label {
            color: #374151;
            font-weight: 600;
            /*margin-bottom: 12px;*/
            display: block;
            font-size: 16px;
            letter-spacing: 0.5px;
        }
        
        .form-control {
            width: 100%;
            /*padding: 16px 20px;*/
            border: 2px solid #e5e7eb;
            border-radius: 12px;
            font-size: 16px;
            transition: all 0.4s ease;
            background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
        }
        
        .form-control:focus {
            outline: none;
            border-color: #4f46e5;
            background: white;
            box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.05);
            transform: translateY(-2px);
        }
        
        .upload-section {
            display: flex;
            gap: 15px;
            align-items: end;
        }
        
        .file-input-wrapper {
            flex: 1;
            position: relative;
        }
        
        .file-input {
            width: 100%;
            padding: 15px 20px;
            border: 2px solid #e5e7eb;
            border-radius: 12px;
            font-size: 16px;
            background: #f9fafb;
            cursor: pointer;
        }
        
        .file-input:focus {
            outline: none;
            border-color: #10b981;
            box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
        }
        
        .btn-upload {
            background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
            color: white;
            border: none;
            padding: 16px 30px;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.4s ease;
            white-space: nowrap;
            position: relative;
            overflow: hidden;
        }
        
        .btn-upload::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.5s;
        }
        
        .btn-upload:hover::before {
            left: 100%;
        }
        
        .btn-upload:hover {
            background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
            transform: translateY(-3px);
            box-shadow: 0 15px 35px rgba(79, 70, 229, 0.4);
        }
        
        .pagination-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 40px;
            padding-top: 20px;
            border-top: 1px solid #e5e7eb;
        }
        
        .pagination-btn {
            color: #10b981;
            text-decoration: none;
            font-weight: 600;
            font-size: 16px;
            transition: all 0.3s ease;
        }
        
        .pagination-btn:hover {
            color: #059669;
            text-decoration: underline;
        }
        
        .pagination-steps {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .step-number {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 14px;
        }
        
        .step-active {
            background: #10b981;
            color: white;
        }
        
        .step-inactive {
            background: #e5e7eb;
            color: #6b7280;
        }
        
        .step-dots {
            color: #9ca3af;
            font-weight: bold;
        }
        
        .btn-submit {
            width: 100%;
            background: #10b981;
            color: white;
            border: none;
            padding: 15px;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-top: 20px;
        }
        
        .btn-submit:hover {
            background: #059669;
            transform: translateY(-2px);
        }
        
        @media (max-width: 1024px) {
            .container {
                max-width: 95%;
            }
            
            .form-card {
                max-width: 100%;
            }
        }
        
        @media (max-width: 768px) {
            .forms-container {
                grid-template-columns: 1fr;
                gap: 20px;
            }
            
            .form-card {
                padding: 30px 20px;
                max-width: 100%;
            }
            
            .upload-section {
                flex-direction: column;
                gap: 10px;
            }
            
            .btn-upload {
                width: 100%;
            }
            
            .pagination-footer {
                flex-direction: column;
                gap: 15px;
                text-align: center;
            }
            
            .pagination-steps {
                order: -1;
            }
        }
        
        @media (max-width: 480px) {
            .form-card {
                padding: 20px 15px;
            }
            
            .form-title {
                font-size: 20px;
            }
            
            .pagination-steps {
                flex-wrap: wrap;
                gap: 5px;
            }
            
            .step-number {
                width: 25px;
                height: 25px;
                font-size: 12px;
            }
        }
        
        /* Responsive Design */
        @media (max-width: 768px) {
            .form-card {
                padding: 30px 20px;
                margin: 10px;
            }
            
            .form-header h2 {
                font-size: 24px;
            }
            
            .form-group {
                margin-bottom: 20px;
            }
            
            .form-control {
                padding: 12px 15px;
            }
            
            .btn-primary {
                padding: 12px 30px;
                font-size: 16px;
            }
        }
        
        @media (max-width: 480px) {
            .form-card {
                padding: 20px 15px;
                margin: 5px;
            }
            
            .form-header h2 {
                font-size: 20px;
            }
            
            .form-group {
                margin-bottom: 15px;
            }
            
            .form-control {
                padding: 10px 12px;
            }
            
            .btn-primary {
                padding: 10px 25px;
                font-size: 14px;
            }
        }
    </style>
</head>
<body>
    <!-- Back Button -->
                    <a href="verify-otp.php" class="back-btn">
                        <i class="fas fa-arrow-left"></i>
                    </a>
    
    <div class="container">
        <!-- Logo Section -->
        <div class="logo-section">
                    <div class="logo-container">
                <img src="assets/images/Optislipimage.png" 
                     alt="Opti Slip Logo" 
                     class="logo-image"
                     onerror="this.style.display='none'; document.querySelector('.logo-fallback').style.display='block';">
                <div class="logo-fallback">OPTI SLIP</div>
                    </div>
                </div>
                
        <!-- Main Content -->
        <div class="main-content">
            <form method="POST" action="save-shop-basic.php" enctype="multipart/form-data" id="shopForm">
                <!-- Shop Name Field -->
                <div class="field-card">
                    <div class="form-group">
                        <label class="form-label">Shop Name</label>
                        <input type="text" name="shop_name" class="form-input" placeholder="XXXXXXXXXX" required>
                    </div>
                    </div>
                    
                <!-- Phone Number/Username Field -->
                <div class="field-card">
                    <div class="form-group">
                        <label class="form-label">Phone Number/Username</label>
                        <input type="text" name="phone" class="form-input" placeholder="XXXXXXXXXX" required>
                    </div>
                    </div>
                    
                <!-- Password Field -->
                <div class="field-card">
                    <div class="form-group">
                        <label class="form-label">Password</label>
                        <input type="password" name="password" class="form-input" placeholder="XXXXXXXXXX" required>
                    </div>
                    </div>
                    
                <!-- Upload Logo Field -->
                <div class="field-card">
                    <div class="form-group upload-group">
                        <label class="form-label">Upload Logo</label>
                        <div class="upload-section">
                            <input type="text" class="upload-input" placeholder="Choose file..." readonly id="fileName">
                            <button type="button" class="upload-btn" onclick="triggerFileUpload()">UPLOAD</button>
                            <input type="file" name="shop_logo" id="logoFile" accept="image/*,.jpg,.jpeg,.png,.gif" style="display: none;" onchange="updateFileName(this)">
                            </div>
                        </div>
                    </div>
                    
                </form>
                
                <!-- Navigation -->
                <div class="navigation">
                    <a href="verify-otp.php" class="nav-btn">PREVIOUS</a>
                    <div class="pagination">
                        <span class="page-number">1</span>
                        <span class="page-number active">2</span>
                        <span class="page-number">3</span>
                        <span class="page-number">4</span>
                        <span class="page-number">5</span>
                        <span class="page-number">6</span>
                        <span class="page-number">.</span>
                        <span class="page-number">.</span>
                        <span class="page-number">.</span>
                        <span class="page-number">.</span>
                        <span class="page-number">10</span>
                    </div>
                    <button type="submit" form="shopForm" class="nav-btn">NEXT</button>
                </div>
            </div>
        </div>
    </div>
    
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        function triggerFileUpload() {
            document.getElementById('logoFile').click();
        }
        
        function updateFileName(input) {
            const fileName = document.getElementById('fileName');
            if (input.files && input.files[0]) {
                const file = input.files[0];
                fileName.value = file.name;
                console.log('File selected:', file.name, 'Size:', file.size, 'Type:', file.type);
                
                // Visual feedback
                fileName.style.color = 'green';
                fileName.style.fontWeight = 'bold';
            } else {
                fileName.value = 'Choose file...';
                fileName.style.color = 'black';
                fileName.style.fontWeight = '600';
            }
        }
        
        // Form validation
        document.querySelectorAll('form').forEach(form => {
            form.addEventListener('submit', function(e) {
                const requiredFields = this.querySelectorAll('input[required]');
                let isValid = true;
                
                requiredFields.forEach(field => {
                    if (!field.value.trim()) {
                        field.style.borderColor = '#ef4444';
                        isValid = false;
                    } else {
                        field.style.borderColor = '#e5e7eb';
                    }
                });
                
                if (!isValid) {
                    e.preventDefault();
                    alert('Please fill in all required fields');
                }
            });
        });
        
        // File upload preview
        document.querySelector('input[type="file"]').addEventListener('change', function(e) {
            const file = e.target.files[0];
            if (file) {
                // Show file name
                this.style.color = '#10b981';
                this.style.fontWeight = '500';
            }
        });
    </script>
</body>
</html>