<style type="text/css" media="all">
   @media print {
      @page {
         margin: 0 !important;
         padding: 0;
      }

      .stitek {
         float: none !important;
         border: none !important;
      }
   }

   body {
      margin: 0;
      padding: 0;
   }

   .stitek {
      width: 92mm;
      height: 62mm;
      float: left;
      text-align: center;
      box-sizing: border-box;
      page-break-after: always;
      border: dimgrey dashed 1px;
      overflow: hidden;
      position: relative;
      padding: 2mm;
      background-color: white;
   }

   .stitek > div {
      display: table-cell;
   }

   .stitek > hr {
      border-top: 1px solid black;
      position: absolute;
      top: 8mm;
      width: 85mm;
      left: 3mm;
   }

   .barcode {
      position: absolute;
      right: 0;
      left: 0;
      bottom: 10mm;
      font-size: 16px;
      line-height: 16px;
   }

   .barcode>svg{
      max-width:85%;
   }


   .title {
      font-size: 13px;
      overflow: hidden;
      text-align: left;
      height: 25mm;
      width: 85mm;
      position: absolute;
      top: 17mm;
      left: 3mm;
   }

     .product {
      top: 7mm;
      height: 10mm;
      font-weight: bold;
   }

   .variation {
      top: 18mm;
      height: 8mm;
   }


   .title table {
      width: 100%;
   }

</style>
{get_contexts language=1 assign='context'}
{$languageContext = $context.language}
{$languages = $languageContext->getSupported()}

{foreach $products as $key => $product}
   {for $repeat = 1 to $product.pieces}
      {block stitek}
         <div class="stitek">
            {block descr}
               <div class="title product">{$product.product_title}</div>
               <div class="title variation">{$product.variation_title}</div>
            {/block}
            {block barcode}
               <div class="barcode">
                  {if !empty($smarty.request.sn)}
                     {insert_barcode type="C128" code=$smarty.request.sn height=45 width=2}
                      <br>
                     Sériové číslo: {$smarty.request.sn}
                  {/if}
               </div>
            {/block}
         </div>
      {/block}
   {/for}
{/foreach}
