
<?php
   $pricetbl = get_theme_mod('howcan_pricing_section_on');
   
    if($pricetbl){
      
      ?>
      
<section id="pricing" class="py-5 bg-light">
  <div class="container text-center">
    <h2 class="mb-4 fw-bold"><?php  echo esc_html(get_theme_mod('howcan_psection_title'),'howcan'); ?></h2>
    <p class="mb-5 text-muted">
     <?php  echo esc_html(get_theme_mod('howcan_psection_desc'),'howcan'); ?>
      </p>
    <div class="row g-4">

      <?php 
      $packages = array('basic', 'standard', 'premium');
      foreach ($packages as $pkg) :
        $title = get_theme_mod("howcan_{$pkg}_title");
        $price = get_theme_mod("howcan_{$pkg}_price");
        $features = explode("\n", get_theme_mod("howcan_{$pkg}_features"));
        $btn = get_theme_mod("howcan_{$pkg}_btn");
        $link = get_theme_mod("howcan_{$pkg}_link");
      ?>
      <div class="col-md-4">
        <div class="card shadow-sm border-0 h-100">
          <div class="card-body p-4">
            <h5 class="fw-bold mb-3 text-capitalize"><?php echo esc_html($title); ?></h5>
            <h3 class="text-dark mb-3"><?php echo esc_html($price); ?></h3>
            <ul class="list-unstyled mb-4 text-start">
              <?php foreach ($features as $f) : ?>
                <li><i class="fas fa-check text-success me-2"></i><?php
                echo ' ';
                echo  esc_html($f);
                
                ?></li>
              <?php endforeach; ?>
            </ul>
            <a href="<?php echo esc_url($link); ?>" class="btn btn-outline-dark rounded-pill px-4">
              <?php echo esc_html($btn); ?>
            </a>
          </div>
        </div>
      </div>
      <?php endforeach; ?>

    </div>
  </div>
</section>
    

      <?php
      
    }else{
      echo'';
    }
?>
