<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Right Price Cleaning - Price Calculator</title>
  <style>
    /* General Page Styling */
    body {
      margin: 0;
      padding: 0;
      background-color: #eef2f3;
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 100vh;
    }

    /* Calculator Container Styling */
    .rpc-calculator-container {
      max-width: 400px;
      width: 90%;
      padding: 20px;
      border: 1px solid #dcdcdc;
      border-radius: 8px;
      background-color: #ffffff;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    /* Heading */
    .rpc-calculator-container h2 {
      text-align: center;
      color: #2c3e50;
      margin-bottom: 15px;
      font-size: 1.5em;
    }

    /* Section Titles */
    .rpc-section-title {
      font-size: 1em;
      margin-top: 15px;
      margin-bottom: 8px;
      color: #34495e;
      border-bottom: 1px solid #ecf0f1;
      padding-bottom: 4px;
    }

    /* Service Options */
    .rpc-service-option {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 6px;
    }

    .rpc-service-option label {
      flex: 1;
      font-size: 0.95em;
      color: #2c3e50;
      cursor: pointer;
      display: flex;
      align-items: center;
    }

    .rpc-service-option input[type="checkbox"] {
      margin-right: 10px;
      transform: scale(1.2);
      cursor: pointer;
    }

    /* Calculate Button */
    .rpc-calculate-btn {
      width: 100%;
      padding: 12px;
      background-color: #3498db;
      color: #ffffff;
      border: none;
      border-radius: 6px;
      font-size: 1em;
      cursor: pointer;
      transition: background-color 0.3s ease;
      margin-top: 15px;
    }

    .rpc-calculate-btn:hover {
      background-color: #2980b9;
    }

    /* Result Section */
    .rpc-result {
      display: none;
      margin-top: 20px;
      padding: 15px;
      background-color: #ecf0f1;
      border-radius: 6px;
      text-align: center;
      animation: fadeIn 0.5s ease-in-out;
    }

    .rpc-result p {
      font-size: 1.1em;
      color: #2c3e50;
      margin-bottom: 12px;
    }

    .rpc-contact-btn {
      padding: 10px 20px;
      background-color: #27ae60;
      color: #ffffff;
      border: none;
      border-radius: 6px;
      font-size: 1em;
      cursor: pointer;
      transition: background-color 0.3s ease;
    }

    .rpc-contact-btn:hover {
      background-color: #1e8449;
    }

    /* Animation */
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(-10px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* Responsive Design */
    @media (max-width: 500px) {
      .rpc-calculator-container {
        padding: 15px;
      }

      .rpc-service-option label {
        font-size: 0.9em;
      }

      .rpc-calculate-btn {
        padding: 10px;
        font-size: 0.95em;
      }

      .rpc-contact-btn {
        padding: 8px 16px;
        font-size: 0.95em;
      }
    }
  </style>
</head>
<body>

  <!-- Right Price Cleaning Price Calculator -->
  <div class="rpc-calculator-container">
    <h2>Price Calculator</h2>

    <!-- Carpet Cleaning Section -->
    <div class="rpc-section">
      <div class="rpc-section-title">Carpet Cleaning</div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="carpet" data-price="39">
          Standard Size Lounge (£39)
        </label>
      </div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="carpet" data-price="59">
          Through Lounge/Diner (£59)
        </label>
      </div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="carpet" data-price="49">
          Hall, Stairs, Landing (£49)
        </label>
      </div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="carpet" data-price="39">
          Dining Room (£39)
        </label>
      </div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="carpet" data-price="39">
          Kitchen (£39)
        </label>
      </div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="carpet" data-price="39">
          Bedroom (£39)
        </label>
      </div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="carpet" data-price="89">
          Standard Lounge, Stairs, 2x Bedrooms (£89)
        </label>
      </div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="carpet" data-price="99">
          Standard Lounge, Stairs, 3x Bedrooms (£99)
        </label>
      </div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="carpet" data-price="119">
          Lounge/Diner, Stairs, 3x Bedrooms (£119)
        </label>
      </div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="carpet" data-price="59">
          Standard Lounge, Stairs, Landing (£59)
        </label>
      </div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="carpet" data-price="69">
          Through Lounge, Stairs, Landing (£69)
        </label>
      </div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="carpet" data-price="69">
          Stairs, Landing, 2x Bedrooms (£69)
        </label>
      </div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="carpet" data-price="79">
          Stairs, Landing, 3x Bedrooms (£79)
        </label>
      </div>
    </div>

    <!-- Upholstery Cleaning Section -->
    <div class="rpc-section">
      <div class="rpc-section-title">Upholstery Cleaning</div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="upholstery" data-price="10">
          Footstool (£10)
        </label>
      </div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="upholstery" data-price="39">
          Armchair (From £39)
        </label>
      </div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="upholstery" data-price="49">
          2 Seater Sofa (From £49)
        </label>
      </div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="upholstery" data-price="59">
          3 Seater Sofa (From £59)
        </label>
      </div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="upholstery" data-price="69">
          3 Seater Sofa with Footstool (£69)
        </label>
      </div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="upholstery" data-price="85">
          4 Seater Corner Sofa (From £85)
        </label>
      </div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="upholstery" data-price="95">
          4 Seater Corner Sofa with Scatter Back Cushions (£95)
        </label>
      </div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="upholstery" data-price="110">
          5 Seater Corner Sofa (From £110)
        </label>
      </div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="upholstery" data-price="120">
          5 Seater Corner Sofa with Scatter Back Cushions (£120)
        </label>
      </div>
    </div>

    <!-- Mattress Cleaning Section -->
    <div class="rpc-section">
      <div class="rpc-section-title">Mattress Cleaning</div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="mattress" data-price="40">
          Single Mattress (From £40)
        </label>
      </div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="mattress" data-price="50">
          Double Mattress (From £50)
        </label>
      </div>
      <div class="rpc-service-option">
        <label>
          <input type="checkbox" class="rpc-service" data-category="mattress" data-price="55">
          King Size Mattress (From £55)
        </label>
      </div>
    </div>

    <!-- Calculate Button -->
    <button class="rpc-calculate-btn">Calculate Price</button>

    <!-- Result Display -->
    <div class="rpc-result" id="rpcResult">
      <p>Your estimated price is: <span id="rpcPrice">£0</span></p>
      <p>This is a preliminary estimate. For an accurate quote, please contact our representative.</p>
      <button class="rpc-contact-btn" onclick="window.location.href='mailto:hello@qithub.click'">Contact Us</button>
    </div>
  </div>

  <script>
    // Select necessary elements
    const calculateBtn = document.querySelector('.rpc-calculate-btn');
    const resultDiv = document.getElementById('rpcResult');
    const priceSpan = document.getElementById('rpcPrice');
    const services = document.querySelectorAll('.rpc-service');

    // Minimum charge constant
    const MINIMUM_CHARGE = 39;

    // Function to calculate total price
    function calculateTotal() {
      let total = 0;
      services.forEach(service => {
        if (service.checked) {
          total += parseFloat(service.getAttribute('data-price'));
        }
      });
      // Apply minimum charge
      if (total < MINIMUM_CHARGE && total > 0) {
        total = MINIMUM_CHARGE;
      }
      return total;
    }

    // Event listener for calculate button
    calculateBtn.addEventListener('click', () => {
      const totalPrice = calculateTotal();
      if (totalPrice > 0) {
        priceSpan.textContent = `£${totalPrice}`;
        resultDiv.style.display = 'block';
        // Scroll to result
        resultDiv.scrollIntoView({ behavior: 'smooth' });
      } else {
        alert('Please select at least one service to calculate the price.');
      }
    });
  </script>

</body>
</html>
