<?php $product = $params['product'] ?>
<div class="container">
  <div class="p-4 mb-4 bg-light rounded-3">
    <div class="container">

      <h1 class="fw-bold"><?= $product['name'] ?>
        <?php if ($params['quantity']  > 0) : ?>
          <a href="/kosar-megtekintese">
            <button type="button" class="btn btn-primary position-relative">
              Kosár <i class="fa fa-shopping-cart"></i>
              <span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger">
                <?= $params['quantity'] ?> elem
              </span>
            </button>
          </a>
        <?php endif; ?>
      </h1>

    </div>
    <div class="row">
      <div class="col-sm-4">
        <img class="img img-fluid" src="/public/images/<?= $product['image'] ?>" alt="<?= $product['name'] ?>">
      </div>
      <div class="col-sm-8">
        <h2 class="lead p-2 text-center font-weight-bold">
          <?= $product['description'] ?>
        </h2>
        <h3 class="display-4 p-2 text-center font-weight-bold">
          <b><?= $product['price'] ?> Ft -</b>
        </h3>
        <div class="row">


          <form action="/order-product/<?= $product['id'] ?>" method="post">
            <button type="submit" class="btn btn-lg btn-primary form-control">
              Kosárba teszem
              <i class="fa fa-shopping-cart"></i>
            </button>
          </form>

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

  </div>
</div>