<?php 
if (get_theme_mod('pricing_area_disable') != 'on') { 

$cols = get_theme_mod('pricing_npp_count', 2);
$cols++;

?>
<div class="pricing-area" id="pricing">
    <?php
        $pricimgsec_subtitle  = get_theme_mod('pricimgsec_subtitle', 'Pricing Packages');
        $pricingsec_maintitle = get_theme_mod('pricingsec_maintitle', 'Lorem Ipsum Are Believable.');
                
    ?>  
    <div class="container">
        <div class="section-title-area">
            <?php if( get_theme_mod('pricehimg_display','show' ) == 'show'): ?>
                <div class="pricehedimg">
                    <img class="img-responsive" src="<?php echo esc_url(get_template_directory_uri().'/images/pricehdR.png');?>" alt="wedding" />
                </div>
            <?php endif ?>
            <div class="section-title">
                <h4><?php echo ($pricimgsec_subtitle); ?></h4>
                <h2><?php echo ($pricingsec_maintitle); ?></h2>              
            </div>
            <div class="clearfix"></div>  
        </div>
    </div>
     
    <div class="container"> 
        <div class="pricebx"> 
            <div class="row">

            <?php 
                switch($cols) {
                    case 1:
                        $colCls = 'col-lg-12 col-md-12 col-sm-6 col-xs-12';
                        break;
                    case 2:
                        $colCls = 'col-lg-6 col-md-4 col-sm-6 col-xs-12';
                        break;
                    case 3:
                    case 5:
                    case 6:
                    case 9:
                    case 11:
                    case 13:
                    case 15:
                        $colCls = 'col-lg-4 col-md-4 col-sm-6 col-xs-12';
                        break;
                    default:
                        $colCls = 'col-lg-3 col-md-3 col-sm-6 col-xs-12';
                        break;
                }

                for ($i = 1; $i <= $cols; $i++) {
                    $url          = get_theme_mod('pricing_plan_url_'.$i, '#');
                    $planTitle    = get_theme_mod('planTitle'.$i, 'Basic');
                    $plantmonth    = get_theme_mod('plantmonth'.$i, '/Month');
                    $planPrice    = get_theme_mod('planPrice'.$i, '$199');
                    $planContent  = get_theme_mod('pricing_plan_content_'.$i, '
                        <li>Hall Access – 6 Hours</li>
                        <li>Guest Capacity up to 300</li>
                        <li>Standard Decor & Lighting</li>
                        <li>Basic Sound System</li>');

                    $buttonTitle  = get_theme_mod('pricing_button_title_'.$i, 'Book Now');
            ?>

                <div class="<?php echo esc_attr($colCls); ?> sp-bx">
                    <div class="simg"></div>
                    <div class="single-pricing"> 
                        <div class="p_bxinn">
                            <?php if (!empty($planTitle)) { ?>
                                <div class="plan-title "><?php echo esc_html($planTitle); ?> </div>
                            <?php } ?>
                            <div class="pr-s-area">
                                <h2 class="currency-price"><?php echo esc_html($planPrice); ?><span> <?php echo esc_html($plantmonth); ?> </span>
                                </h2>
                            </div>
                            <ul class="pricing-list">
                                <?php echo wp_kses_post($planContent); ?>
                            </ul>
                        </div>
                        <?php if (!empty($buttonTitle)) { ?>
                            <div class="pc-btn" data-wow-duration="4s">    
                                <a href="<?php echo esc_url($url); ?>">
                                    <?php echo esc_html($buttonTitle); ?>
                                </a>
                            </div>
                        <?php } ?>
                        <div class="clearfix"></div>
                    </div>
                </div>

            <?php } // end for loop ?>
            
            <div class="clearfix"></div>
            </div> <!-- .row -->
        </div> <!-- .pricebx -->
    </div> <!-- .container -->

</div> <!-- .pricing-area -->
<?php } ?>