<style>
.breadcrumb {
    display: none;
}
ul, li {
    list-style: none;
    margin: 0;
    padding: 0;
}
</style>
<?php echo $header; ?>
<?php echo $fulltop; ?>
  
<?php echo $content_top; ?>
<section class="g-pt-100 g-pb-70 product-detail">
<div class="container"> 
  <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="product-detail <?php echo $class; ?>">
  <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 if ($column_left || $column_right) { ?>
        <?php $class = 'col-sm-12'; ?>
        <?php } else { ?>
        <?php $class = 'col-sm-12'; ?>
        <?php } ?>
        <div class="<?php echo $class; ?>">
          <div class="g-mb-30 g-mb-0--lg  product-info">
            <article class="g-mb-0">


              <div class="shortcode-html">
                <!-- Article -->
                <article class="row justify-content-between g-color-gray-dark-v5">
                  <div class="col-lg-6 g-mb-0">
                <!-- Article -->
				<?php if ($thumb || $images) { ?>
                <article class="text-center g-brd-around g-brd-gray-light-v4 g-bg-white g-mb-20">
                  <!-- Article Image -->
                  <?php if ($thumb) { ?>
				  <img class="d-block info-v5-2__image g-ml-minus-1" src="<?php echo $thumb; ?>" alt="<?php echo $heading_title; ?>">
                  <?php } ?>
				  <!-- End Article Image -->
                </article>
				<?php } ?>
                <!-- End Article -->
			  </div>
            
                  <!-- Article Content -->
                  <div class="col-lg-6 g-mb-0 product-info">
                   <header class="d-flex justify-content-between">
                   <!-- Article Icons -->
                   <h2 class="h5 g-color-black mb-0"><?php echo $heading_title; ?></h2>
                   <!-- End Article Icons -->
                   </header>
                    <hr class="g-brd-gray-light-v3 g-my-15">
                    <p class="g-mb-15"><?php echo $short_description; ?></p>
                    <!-- Article Prices -->
                    <div class="g-mb-10">
		              <?php if ($price) { ?>
					  <?php if (!$special) { ?>
                      <span class="d-inline-block align-middle g-color-red g-font-size-25 g-mr-10">
					  <?php echo $price; ?>
					  </span>
					  <?php } else { ?>
                      <s class="d-inline-block align-middle g-color-gray-light-v1 g-font-size-20 g-mr-50">
					  <?php echo $price; ?><?php echo $special; ?>
					  </s>
					  <?php } ?>
					  <?php if ($discounts) { ?>
					  <?php foreach ($discounts as $discount) { ?>
                      <span class="d-inline-block align-middle g-color-primary g-font-size-25 g-mr-10">
					  <?php echo $discount['quantity']; ?><?php echo $text_discount; ?><?php echo $discount['price']; ?>
					  </span>
					  <?php } ?>
					  <?php } ?>
					  <?php } ?>
                    </div>
                    <!-- End Article Prices -->

                    <!-- Article Form -->

          <div id="product">
            <div class="form-group">
			  <!-- 预约开始 -->
			  <?php if(!empty($formlinks)){ ?>
				  <?php foreach($formlinks as $formlink) { ?>
				  <?php if($countproduct < 2 ){?>
				  <?php } else { ?>
				  <?php } ?>
			  <?php if(!empty ($formlink['popuplinkname'])) { 
			    $popuplinkname = $formlink['popuplinkname'];
			  } else { 
			   $popuplinkname = $entry_popuplinkname;
			   } ?>
                    <a class="btn btn-md u-btn-lightred g-mr-10 tmdhelptopic" href="<?php echo $formlink['formlink'];?>" data-modal-target="#help-modal" data-modal-effect="fadein"><?php echo $popuplinkname;?>
                    </a>
                   <?php } ?>
                    <div class="modal in" id="help-modal" role="dialog" aria-labelledby="myModalLabel" aria-hidden="ture"></div>
                    <link  rel="stylesheet" href="catalog/view/assets/vendor/custombox/custombox.min.css">
                    <script  src="catalog/view/assets/vendor/custombox/custombox.min.js"></script>
                    <script  src="catalog/view/assets/js/components/hs.modal-window.js"></script>
                    <script >
                      $(document).on('ready', function () {
                        // initialization of popups
                        $.HSCore.components.HSModalWindow.init('[data-modal-target]');
                      });
                    </script>
				<script>
				$(document).on('click','.tmdhelptopic',function(e) {
				$('#help-modal .modal-content').html('<div class="loader-if centered"></div>');
				$('#help-modal').load($(this).attr('href'));			  
				});				
				</script>	
			  <?php } ?>	
			  <!-- 预约结束 -->
              <?php if ($sku): ?><a class="btn btn-md u-btn-indigo g-mr-10" href="<?php echo $upc; ?>" target="_blank"> <?php echo $sku; ?></a><?php endif ?>
              <?php if ($jan): ?><a class="btn btn-md u-btn-black g-mr-10" href="<?php echo $jan; ?>" target="_blank"> <?php echo $ean; ?></a><?php endif ?>
            </div>
          </div>
                  </div>
                  <!-- End Article Content -->
                </article>
                <!-- End Article -->
              </div>
              </div>	

			  
			  
               <!-- TAB切换开始 -->
                <div class="shortcode-html">
                  <!-- Nav tabs -->
                  <ul class="nav u-nav-v5-2 g-brd-bottom--md g-brd-gray-light-v4" role="tablist" data-target="nav-5-2-default-hor-left-border-bottom" data-tabs-mobile-type="slide-up-down" data-btn-classes="btn btn-md btn-block rounded-0 u-btn-bluegray">
					<li class="nav-item">
                      <a class="nav-link active" data-toggle="tab" href="#nav-5-2-default-hor-left-border-bottom--gmbd" role="tab">详情</a>
                    </li>
					
					<?php if ($products) { ?>
					<li class="nav-item">
                      <a class="nav-link" data-toggle="tab" href="#nav-5-2-default-hor-left-border-bottom--xscp" role="tab">相似推荐</a>
                    </li>
					<?php } ?>

                  </ul>
                  <!-- End Nav tabs -->

                  <!-- Tab panes开始 -->
                  <div id="nav-5-2-default-hor-left-border-bottom" class="tab-content g-bg-white">
				  
				  <!-- 详情开始 -->
					<div class="tab-pane fade show active g-pa-10" id="nav-5-2-default-hor-left-border-bottom--gmbd" role="tabpanel">	
                    <?php echo $description; ?>
                    </div>
					<!-- 详情结束 -->
					
					
					<!-- 相似推荐开始 -->
                    <?php if ($products) { ?>
					<div class="tab-pane fade g-pa-15 g-mb-10" id="nav-5-2-default-hor-left-border-bottom--xscp" role="tabpanel">
      <div class="row">
        <?php $i = 0; ?>
        <?php foreach ($products as $product) { ?>

                <div class="col-md-3 col-6 g-mb-30">
                  <!-- Article -->
                  <article class="u-shadow-v19 g-bg-white text-center rounded g-mb-5">
                    <!-- Article Image -->
					<a href="<?php echo $product['href']; ?>">
                    <img class="d-inline-block img-fluid mb-4" src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>">
					</a>
                    <!-- End Article Image -->

                    <!-- Article Content -->
					<div class="g-pb-10">
                    <h4 class="h6 g-color-black g-font-weight-600"><?php echo $product['name']; ?></h4>
					</div>
                    <!-- End Article Content -->
                  </article>
                  <!-- End Article -->
                </div>

        <?php if (($column_left && $column_right) && (($i+1) % 2 == 0)) { ?>
        <div class="clearfix visible-md visible-sm"></div>
        <?php } elseif (($column_left || $column_right) && (($i+1) % 3 == 0)) { ?>
        <div class="clearfix visible-md"></div>
        <?php } elseif (($i+1) % 4 == 0) { ?>
        <div class="clearfix visible-md"></div>
        <?php } ?>
        <?php $i++; ?>
        <?php } ?>
      </div>
                    </div>
					<?php } ?>
					<!-- 相似推荐结束 -->
					
                  </div>
                  <!-- Tab panes 结束-->
                  <script  src="catalog/view/assets/js/components/hs.tabs.js"></script>
                  <script >
                    $(document).on('ready', function () {
                      // initialization of tabs
                      $.HSCore.components.HSTabs.init('[role="tablist"]');
                    });

                    $(window).on('resize', function () {
                      setTimeout(function () {
                        $.HSCore.components.HSTabs.init('[role="tablist"]');
                      }, 200);
                    });
                  </script>
                </div>


            </article>
          </div>
          </div>
		  </div>
      </div><?php echo $content_bottom; ?>
    <?php echo $column_right; ?></div>
</div>
</section>
<?php echo $copyright; ?>
<?php echo $fullbottom; ?>
<?php echo $footer; ?>
