<?php echo $header; ?>

<style>
    #promo_container .product-thumb .caption {
        min-height: initial;
        margin-bottom:20px;
    }
</style>

<!--style type="text/css">
    .promo_box {
        height:300px;
        padding: 10px;
        margin-bottom: 20px;
    }

    .promo_entity {
        box-shadow: 1px 1px 8px 0px #afaaaa;
    }

    .promo_entity > .image {
        height: 180px;
        border-bottom: 1px solid #efefef;
    }

    .promo_entity > .image img {
        max-width:100%;
        width: 100%;
        max-height: 100%;
    }

    .promo_entity  > .caption {
        height: 120px;
        padding: 5px 0px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .promo_entity > .caption > .title {
        font-size: 16px;
        font-weight: bold;
        margin-bottom: 0px;
    }

    .promo_entity > .caption > .description {
        max-height: 42px;
        height: 42px;
    }

    .promo_entity > .caption > .view_more {

            /* background-color: #f6f7f9; 
               border-top: 1px solid #ced0d4;
               border-left: 1px solid #ced0d4; */

            border-radius: 2px;
            font-weight: bold;
            text-align: center;
            float: right;
            padding: 5px;
            position: absolute;
            bottom: -11px;
            right: 11px;
           
    }


</style-->

<div class="container">
  <ul class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
    <?php } ?>
  </ul>
  <div class="row"><?php echo $column_left; ?>
    <?php if ($column_left && $column_right) { ?>
    <?php $class = 'col-sm-6'; ?>
    <?php } elseif ($column_left || $column_right) { ?>
    <?php $class = 'col-sm-9'; ?>
    <?php } else { ?>
    <?php $class = 'col-sm-12'; ?>
    <?php } ?>
    <div id="content" class="<?php echo $class; ?>"><?php echo $content_top; ?>

    <h1><?php echo $heading_title; ?></h1>

    <div id="promo_container">
        <?php foreach (array_chunk($promotions, 4) as $promotions) { ?>
            <div class="row">
                <?php foreach ($promotions as $index => $promo) { ?>


                    <div class="product-layout col-lg-3 col-md-3 col-sm-6 col-xs-12">
                      <div class="product-thumb transition">
                          <div class="image"><a href="<?php echo $promo['page_link']; ?>"><img src="<?php echo $promo['image']; ?>" alt="<?php echo $promo['name']; ?>" title="<?php echo $promo['name']; ?>" class="img-responsive" /></a></div>
                          <div class="caption">
                            <h4><a href="<?php echo $promo['page_link']; ?>"><?php echo $promo['name']; ?></a></h4>
                            <?php $content = strip_tags(html_entity_decode($promo['information_page']['description'][$current_language])); ?>
                            <p><?php echo (strlen($content) > 100) ? substr($content, 0, 100) . '..' : $content; ?></p>
                            <a href="<?php echo $promo['page_link']; ?>" class="btn btn-primary"><?php echo $view_more_button_text; ?></a>
                          </div>
                      </div>
                    </div>
                <?php } ?>
            </div>
        <?php } ?>
    </div>

    <?php echo $content_bottom; ?></div>
    <?php echo $column_right; ?></div>
</div>
<?php echo $footer; ?>