<?php
require_once 'config.php';

$pageTitle = 'Contact Us - Performance Boat Parts';

require_once 'header.php';

$messageSent = false;

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $messageSent = true;
}
?>

    <div class="breadcrumbs">
        <div class="container">
            <ul>
                <li><a href="index.php">Home</a></li>
                <li>Contact Us</li>
            </ul>
        </div>
    </div>

    <section class="contact-page">
        <div class="container">
            <h1 style="margin-bottom: 30px; text-align: center;">Contact Us</h1>
            
            <?php if ($messageSent): ?>
                <div class="alert alert-success" style="text-align: center; padding: 40px;">
                    <div style="font-size: 48px; color: var(--success); margin-bottom: 15px;"><i class="fas fa-check-circle"></i></div>
                    <h2 style="margin-bottom: 15px;">Message Sent!</h2>
                    <p>Thank you for contacting us. We'll get back to you within 24 hours.</p>
                </div>
            <?php endif; ?>
            
            <div class="contact-grid">
                <div class="contact-form">
                    <h3 style="margin-bottom: 20px;">Send us a Message</h3>
                    <form method="POST">
                        <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 15px;">
                            <div class="form-group">
                                <label>First Name *</label>
                                <input type="text" name="first_name" required>
                            </div>
                            <div class="form-group">
                                <label>Last Name *</label>
                                <input type="text" name="last_name" required>
                            </div>
                        </div>
                        
                        <div class="form-group">
                            <label>Email Address *</label>
                            <input type="email" name="email" required>
                        </div>
                        
                        <div class="form-group">
                            <label>Phone Number</label>
                            <input type="tel" name="phone">
                        </div>
                        
                        <div class="form-group">
                            <label>Subject *</label>
                            <select name="subject" required>
                                <option value="">Select a subject</option>
                                <option value="order">Order Status</option>
                                <option value="product">Product Question</option>
                                <option value="technical">Technical Support</option>
                                <option value="partnership">Partnership</option>
                                <option value="other">Other</option>
                            </select>
                        </div>
                        
                        <div class="form-group">
                            <label>Message *</label>
                            <textarea name="message" rows="6" required></textarea>
                        </div>
                        
                        <button type="submit" class="btn btn-primary">Send Message</button>
                    </form>
                </div>
                
                <div class="contact-info">
                    <h3>Get in Touch</h3>
                    
                    <div style="margin-top: 30px;">
                        <h4 style="margin-bottom: 10px;"><i class="fas fa-map-marker-alt"></i> Address</h4>
                        <p>123 Marina Drive<br>Miami, FL 33101</p>
                    </div>
                    
                    <div style="margin-top: 30px;">
                        <h4 style="margin-bottom: 10px;"><i class="fas fa-phone"></i> Phone</h4>
                        <p>Toll Free: 1-800-BOAT-PARTS<br>Local: (305) 555-0123</p>
                    </div>
                    
                    <div style="margin-top: 30px;">
                        <h4 style="margin-bottom: 10px;"><i class="fas fa-envelope"></i> Email</h4>
                        <p>Sales: sales@performanceboatparts.com<br>Support: support@performanceboatparts.com</p>
                    </div>
                    
                    <div style="margin-top: 30px;">
                        <h4 style="margin-bottom: 10px;"><i class="fas fa-clock"></i> Business Hours</h4>
                        <p>Monday - Friday: 8AM - 6PM EST<br>Saturday: 9AM - 3PM EST<br>Sunday: Closed</p>
                    </div>
                    
                    <div style="margin-top: 30px;">
                        <h4 style="margin-bottom: 10px;"><i class="fas fa-comments"></i> Live Chat</h4>
                        <p>Available during business hours for instant support.</p>
                    </div>
                </div>
            </div>
        </div>
    </section>

<?php require_once 'footer.php'; ?>
