<?php
require_once __DIR__ . '/includes/functions.php';
require_once __DIR__ . '/includes/seo.php';

$seo = [
    'title' => 'List Your Property | ' . SITE_NAME,
    'description' => 'Submit your property to Kigali Yacu Properties for sale or rent. Our advisors will schedule a valuation and professional photography within 24 hours.',
    'path' => '/list-your-property',
];
include __DIR__ . '/includes/header.php';
?>
<section class="section-pad-sm">
  <div class="container-narrow">
    <?= breadcrumb_html([['name' => 'List Your Property', 'url' => '/list-your-property']]) ?>
    <div class="section-head center">
      <div class="eyebrow" style="justify-content:center;">Sell or Rent With Us</div>
      <h1>List Your Property</h1>
      <p>Tell us about your property and one of our advisors will reach out within 24 hours to schedule a site visit, agree a listing price and arrange professional photography.</p>
    </div>

    <div class="form-card reveal">
      <form data-ajax action="/api/list-property.php" method="post">
        <input type="text" name="website" class="visually-hidden" tabindex="-1" autocomplete="off">
        <div class="field-row mb-4">
          <div class="field"><label for="name">Full Name</label><input type="text" id="name" name="name" required></div>
          <div class="field"><label for="email">Email</label><input type="email" id="email" name="email" required></div>
        </div>
        <div class="field-row mb-4">
          <div class="field"><label for="phone">Phone / WhatsApp</label><input type="tel" id="phone" name="phone" required></div>
          <div class="field">
            <label for="status">Listing Type</label>
            <select id="status" name="status">
              <option value="sale">For Sale</option>
              <option value="rent">For Rent</option>
            </select>
          </div>
        </div>
        <div class="field-row mb-4">
          <div class="field">
            <label for="property_type">Property Type</label>
            <select id="property_type" name="property_type">
              <?php foreach (get_categories() as $c): ?><option><?= e($c['name']) ?></option><?php endforeach; ?>
            </select>
          </div>
          <div class="field"><label for="asking_price">Asking Price (RWF)</label><input type="text" id="asking_price" name="asking_price" placeholder="e.g. 250,000,000"></div>
        </div>
        <div class="field mb-4">
          <label for="address">Property Address</label>
          <input type="text" id="address" name="address" placeholder="District, sector, neighbourhood" required>
        </div>
        <div class="field mb-4">
          <label for="description">Property Description</label>
          <textarea id="description" name="description" placeholder="Bedrooms, bathrooms, size, condition, standout features…"></textarea>
        </div>
        <button type="submit" class="btn btn-accent btn-block">Submit Property</button>
        <p class="text-xs text-muted mt-3">Photos and documents can be shared with your advisor after your initial submission.</p>
      </form>
    </div>
  </div>
</section>
<?php include __DIR__ . '/includes/footer.php'; ?>
