<div class="product-card-square">

    <div class="top">

        <a href="#" class="wishlist-button">
            <i class="icon icon-wishlist <?php if ($index < 3) echo 'liked' ?>"></i>
        </a>

        <div class="sale">
            <span class="num"> 18% </span>
            <span class="text"> Off</span>
        </div>



        <?php if ($productType == 1) { ?>
            <a href="product-details.php">
                <img src="assets/img/thumbs/products/0<?php echo $index + 1 ?>.jpg" class="product-image" onerror="this.onerror=null; this.src='assets/img/thumbs/products/default.jpg';">
            </a>
        <?php } elseif ($productType == 2) { ?>
            <a href="card-details.php">
                <img src="assets/img/thumbs/cards/0<?php echo $index + 1 ?>.jpg" class="product-image" onerror="this.onerror=null; this.src='assets/img/thumbs/products/default.jpg';">
            </a>
        <?php } ?>


    </div><!-- top -->

    <div class="bottom">

        <a href="product-details.php">
            <p class="product-name">
                <?php
                switch ($index) {
                    case  1:
                        print  'name name name ';
                        break;
                    case  2:
                        print 'name name name name name name name';
                        break;
                    default:
                        print 'Shutter 30000 67 mB a0000 67 mB a0000 6 Shutter 30000 67 mB a0000 67 mB a0000 6';
                        break;
                }
                ?>
            </p>
        </a>

        <div class="flex-between align-items-end">
            <div class="d-block">
                <p class="product-old-price"> 522.000 KWD </p>
                <p class="product-price"> 421.000 KWD </p>
            </div>
            <a href="#" class="d-block add-to-cart-button">
                <i class="icon icon-add-to-cart <?php if ($index > 3) echo 'icon-added-to-cart' ?>"></i>
            </a>
        </div>


    </div><!-- bottom -->
</div><!-- product-card-square -->