<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Premium UK domain name sales and acquisitions from a trusted expert. Secure, streamlined transfers with full support throughout the process.">
    <title>Domain Services | Premium UK Domain Name Sales & Acquisitions</title>
    <link rel="stylesheet" href="/styles.css">
        <script src="https://www.google.com/recaptcha/api.js?render=6Ldy1oMrAAAAAONufpy-1pObZ7HV3WAdbBkhv30-"></script>
        </head>
<body>
    <header class="header">
        <div class="container">
            <div class="logo">
                <h1><a href="index.php">Domain Services</a></h1>
            </div>
            <nav class="nav">
                <ul>
                </ul>
            </nav>
        </div>
    </header>
    <main class="main">
        <div class="container">
            <div class="content-wrapper">
                <div class="info-section">
                    <div class="sale-badge">
                        <span class="for-sale">FOR SALE</span>
                    </div>
                    
                    <h2 class="domain-title">promotionalpens.co.uk</h2>
                    
                    <div class="domain-description">
                        <p class="sale-intro">A premium domain, ready to elevate your brand or personal project with a professional and lasting impression.</p>
                        
                        <div class="trust-indicators">
                            <div class="trust-item">
                                <span class="trust-icon">●</span>
                                <div>
                                    <strong>Trusted Seller</strong>
                                    <p>With two decades of industry experience delivering high-quality domain names to individuals, startups, and established businesses.</p>
                                </div>
                            </div>
                            <div class="trust-item">
                                <span class="trust-icon">●</span>
                                <div>
                                    <strong>Nominet Member and Registrar</strong>
                                    <p>A long-standing Nominet member and registrar with a proven track record of providing domain services across the UK.</p>
                                </div>
                            </div>
                            <div class="trust-item">
                                <span class="trust-icon">●</span>
                                <div>
                                    <strong>Secure Payment Methods</strong>
                                    <p>Payments are handled through trusted, secure platforms — offering flexibility and peace of mind throughout the transaction.</p>
                                </div>
                            </div>
                            
                            <div class="trust-item">
                                <span class="trust-icon">●</span>
                                <div>
                                    <strong>Fast Transfer & Support</strong>
                                    <p>Domains are typically transferred within hours of payment confirmation, with full guidance and support every step of the way.</p>
                                </div>
                            </div>
                        </div>
                        
                        <div class="price-cta">
                            <p class="price-text">Interested in this domain name?</p>
                            <p class="urgency-text">Use the contact form to learn more and take the first step toward making it yours.</p>
                        </div>
                    </div>
                </div>

                <div class="form-section">
                    <form class="contact-form" action="process-form.php" method="post" id="contactForm">
                        <h3>Get In Touch</h3>
                        
                        <!-- CSRF Token -->
                        <input type="hidden" name="csrf_token" value="64f18c170cdf41812b26b1a1ddde046d15ab9fa67a6c5f7e55170eba45d4cf6e">
                        
                        <!-- reCAPTCHA v3 token (hidden) -->
                        <input type="hidden" id="recaptcha-token" name="recaptcha_token" value="">

                        <!-- Form start time to prevent spam -->
                         <input type="hidden" name="form_start_time" value="1781056049">
                        
                        <div class="form-group">
                            <label for="fullName">Full Name</label>
                            <input type="text" 
                                   id="fullName" 
                                   name="fullName" 
                                   required 
                                   maxlength="100"
                                   placeholder="Enter your full name">
                        </div>
                        
                        <div class="form-group">
                            <label for="phoneNumber">Phone Number</label>
                            <input type="tel" 
                                   id="phoneNumber" 
                                   name="phoneNumber" 
                                   required 
                                   maxlength="20"
                                   pattern="[0-9+\-\s\(\)]+"
                                   title="Please enter numbers only (spaces, +, -, parentheses allowed)"
                                   placeholder="07777 123456">
                        </div>
                        
                        <div class="form-group">
                            <label for="emailAddress">Email Address</label>
                            <input type="email" 
                                   id="emailAddress" 
                                   name="emailAddress" 
                                   required 
                                   maxlength="100"
                                   pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}"
                                   title="Please enter a valid email address"
                                   placeholder="your.name@example.co.uk">
                        </div>
                        
                        <div class="form-group">
                            <label for="message">Message</label>
                            <textarea id="message" 
                                      name="message" 
                                      rows="5" 
                                      required 
                                      maxlength="2000"
                                      placeholder="Tell us about your interest in this domain..."></textarea>
                        </div>
                        
                        <button type="submit" class="submit-btn">Send Message</button>
                    </form>
                </div>
            </div>
        </div>
    </main>

<script>
        // Define email pattern once for reuse
        const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;

        // Add reCAPTCHA v3 token to form submission
        function addRecaptchaToken() {
            return new Promise((resolve) => {
                grecaptcha.ready(function() {
                    grecaptcha.execute('6Ldy1oMrAAAAAONufpy-1pObZ7HV3WAdbBkhv30-', {action: 'contact_form'}).then(function(token) {
                        document.getElementById('recaptcha-token').value = token;
                        resolve();
                    });
                });
            });
        }

        // Phone number formatting and validation
        document.getElementById('phoneNumber').addEventListener('input', function(e) {
            // Remove any non-numeric characters except +, -, spaces, and parentheses
            let value = e.target.value.replace(/[^\d+\-\s\(\)]/g, '');
            e.target.value = value;
        });

        // Email validation and formatting
        document.getElementById('emailAddress').addEventListener('input', function(e) {
            // Convert to lowercase and remove invalid characters
            let value = e.target.value.toLowerCase();
            // Allow only valid email characters: letters, numbers, dots, hyphens, underscores, plus, @
            value = value.replace(/[^a-z0-9._%+-@]/g, '');
            e.target.value = value;
            
            // Real-time validation feedback
            if (value.length > 0 && !emailPattern.test(value)) {
                e.target.style.borderColor = '#ff6b6b';
            } else {
                e.target.style.borderColor = '#145374';
            }
        });

        // Form validation and submission
        document.getElementById('contactForm').addEventListener('submit', async function(e) {
            e.preventDefault(); // Prevent default submission first
            
            // Add reCAPTCHA token
            await addRecaptchaToken();
            
            // Get form values
            const fullName = document.getElementById('fullName').value.trim();
            const email = document.getElementById('emailAddress').value.trim();
            const message = document.getElementById('message').value.trim();
            const phone = document.getElementById('phoneNumber').value.trim();
            
            // Validate full name
            if (fullName.length < 2) {
                e.preventDefault();
                alert('Please enter a valid full name.');
                return false;
            }
            
            // Enhanced email validation
            if (!emailPattern.test(email)) {
                e.preventDefault();
                alert('Please enter a valid email address (e.g. name@example.co.uk).');
                return false;
            }

            // TLD blocking - add this section here
            const blockedTlds = ['.ru', '.pl', '.cn', '.tk', '.ml', '.ga', '.cf', '.in.ua'];
            const emailParts = email.split('@');
            if (emailParts.length === 2) {
                const domain = emailParts[1].toLowerCase();
                const isBlocked = blockedTlds.some(tld => domain.endsWith(tld));
                
            if (isBlocked) {
                    e.preventDefault();
                    alert('Please use a different email address for your inquiry.');
                    return false;
            }
}
            
            // Check for common email issues
            if (email.includes('..') || email.startsWith('.') || email.endsWith('.')) {
                e.preventDefault();
                alert('Email address contains invalid formatting. Please check for consecutive dots.');
                return false;
            }
            
            // Check email length (consistent with server-side)
            if (email.length < 5 || email.length > 100) {
                e.preventDefault();
                alert('Email address must be between 5 and 100 characters.');
                return false;
            }
            
            // Phone validation - must contain at least 10 digits
            const phoneDigits = phone.replace(/\D/g, '');
            if (phoneDigits.length < 10 || phoneDigits.length > 15) {
                e.preventDefault();
                alert('Please enter a valid phone number with 10-15 digits.');
                return false;
            }
            
            // Message validation
            if (message.length < 10) {
                e.preventDefault();
                alert('Please enter a more detailed message (at least 10 characters).');
                return false;
            }
            
            // If all validation passes, submit the form
            this.submit();
        });
    </script>

<footer class="footer">
    <div class="container">
        <div class="footer-content-horizontal">
            <div class="footer-logo">
                <a href="https://nominet.uk/uk-registry/uk-policy/" target="_blank" rel="noopener noreferrer" title="View Nominet Terms and Conditions (opens">
                    <img src="images/nominet_t_and_c_white.png" alt="Nominet Terms and Conditions" class="footer-logo-img">
                </a>
            </div>
            <div class="footer-links">
                <a href="#">Terms and Conditions</a>
                <a href="privacy-policy.php">Privacy Policy</a>
            </div>
        </div>
    </div>
</footer>