# IstanbulReserves - VIP Transfer & Booking Platform IstanbulReserves is a luxury, responsive VIP transfer and taxi booking web application tailored for Istanbul, Turkey, and expanding globally. It positions itself as a premium Uber alternative offering high-end comfort at affordable rates. ## Core System Architecture The project is built using semantic HTML5, localized CSS custom properties (luxury champagne gold & light theme architecture), and vanilla client-side JavaScript integrated with Google Maps APIs and WhatsApp communication triggers. ## Key Files & Structure ### 1. Main Landing Page (`index.html`) - **Purpose**: Brand presentation, value proposition, service showcases, branch listings, and localized entry point. - **Visual Token System**: Uses a bespoke Light Luxury theme: - `--gold`: `#B8975A` (Main brand color) - `--ink`: `#1D1D1F` (Charcoal typography) - `--surface`: `#F5F3EF` (Luxury background tint) - **Navigation & Multilingual Stack**: Fixed luxury header with a progressive drop-down selection and mobile-responsive hamburger menu toggling visibility. - **Language Codes Managed**: - `index` / `tr`: Turkey - `en`: English - `de`: German - `ru`: Russian - `fa`: Persian - `ar`: Arabic - **Key UI Sections**: - **Marquee**: Infinite scrolling ribbon highlighting premium offerings ("Sarı Taksi Fiyatına", "7/24 Hizmet"). - **Hero**: Premium introduction detailing high-end fleet metrics. - **Hizmetler**: Service cards split by tier (Fixed price vs. Call out). - **Nası Çalışır**: 3-step dynamic workflow timeline. - **Rezervasyon Entry**: Inline initial reservation call-to-action cards leading to full validation modules. ### 2. Booking Engine Page (`reservetr.html`) - **Purpose**: Full-scale route computing, active Google Maps visual tracking, dynamic live pricing calculation based on real-time traffic, and localized direct order validation. - **Layout Architecture**: - Dual-column workspace (`.main-container`): Left column (`.form-side`) handles standard user input metrics, while the right column (`.map-side`) spins the dynamic map view. Responsive breakpoint flips layout vertically below `992px`. - **Route & Map Interactivity**: - Native integration with Google Maps Javascript libraries. - Real-time place suggestion auto-completes (`.suggest-list`). - Active custom map markers (`.map-badge`) overlaying computed metrics directly onto route bounding structures. ## Calculation & Pricing Logic (`reservetr.html`) The pricing layer uses real-time geometric and metadata fields retrieved dynamically via distance metrics. - **Dynamic Parameters**: - Distance computed in kilometers (`distanceKm`). - Strict normal tracking duration text alongside specialized traffic weight extensions (`trafficDurationText`). - **Calculated Price Bounds**: - Core minimum calculation bounded dynamically (`rr.finalPrice`). - Max limits scaled with specific baseline traffic dynamic offsets: `finalPrice * upprc`. - Global system discount modifier applied cleanly on final render blocks: `* dsc` (set to 10% inside elements like `#txtTotalPriceDis`). - **Traffic Discrepancy Warnings**: - Delays are analyzed via: `delaySec = trafficDurationValue - durationValue`. - If `delayMin > 0`, the form renders customized localized high-priority warning strings inside class `.traffic-warning` panels. ## Communication & Order Dispatch Orders do not process via traditional backend servers; instead, parsed payloads generate a programmatic deep link targeting WhatsApp endpoints. - **Payload Dispatched**: - *Yolcu Bilgileri*: Full Name, active telephone verification code. - *Güzergah*: Formatted pickup details (`pickup`) -> destination boundaries (`dropoff`). - *Planlama*: Chronological date fields accompanied by 24-hour timestamp patterns. - *Araç*: Specified vehicle type class selected by customer. - *Rota Opsiyonu*: Highway evasion preferences (`avoidHw`). - *Maliyet*: Formatted range detailing minimum to maximum calculated pricing thresholds (TRY). - **Endpoint Trigger**: Fires via `window.open` addressing `https://api.whatsapp.com/send?phone=${waNumber}&text=...` immediately before triggering state dismissal transitions (`closeForm()`). ## Technical Design Patterns for LLMs - When writing components for this repository, respect the unified CSS custom property tokens. Do not introduce arbitrary HEX values. - Maintain decoupled layout structures ensuring maps fill their standalone viewport wrappers cleanly without breaking DOM flows. - Ensure all deep-linked query attributes compiled into message payloads pass through precise `encodeURIComponent()` calls before triggering execution windows.