<style>
.deltBtn {
    border-radius: 40px;
}
</style>
<div class="row">
    <div class="col-md-5 my-2">
        <div class="proImg p-2">
            <img class="img-fluid" src="<?php echo $productdetail['productUrl']; ?>" alt="">

        </div>
    </div>
    <div class="col-md-7 my-2">
        <h2>Cannabis Oil</h2>
        <div class="row">
            <div class="col-md-6">
                <p class="fss9 mb-0">Base Price:$<?php echo $productdetail['productPrice']; ?></p>
                <p class="fss9">Retail Price:$<?php echo $productdetail['displayPrice']; ?></p>
            </div>
            <div class="col-md-6">
                <form class="input-group" method="post"
                    action="<?php echo base_url() . 'products/updateprice/' . $id; ?>">

                    <input class="form-control f-input pe-5   " type="number" step="0.01" placeholder="Update Price"
                        required id="productPrice" name="displayPrice" required>
                    <span class="input-group-text ipt" id="basic-addon1"><button type="submit"
                            class="btn savbtn">Save</button></span>
                </form>
            </div>
            <div class="col-md-12">
                <p class="fs2">THC potency level</p>
                <p class="fs3 mb-0">low THC</p>
                <div class="progress nprogress">
                    <div class="progress-bar pBar" role="progressbar"
                        style="width: <?php echo $productdetail['potencyLevel']; ?>%"
                        aria-valuenow="<?php echo $productdetail['potencyLevel']; ?>" aria-valuemin="0"
                        aria-valuemax="100"></div>
                </div>
            </div>
            <div class="col-md-12">
                <p class="fs2">THC Nicotine Level</p>
                <p class="fs3 mb-0">low THC</p>
                <div class="progress nprogress">
                    <div class="progress-bar pBar" role="progressbar"
                        style="width: <?php echo $productdetail['nicotineLevel']; ?>%"
                        aria-valuenow="<?php echo $productdetail['nicotineLevel']; ?>" aria-valuemin="0"
                        aria-valuemax="100"></div>
                </div>
            </div>
            <div class="col-md-12">
                <div class="mt-2">
                    <p class="m-0 fss3"><?php echo $productdetail['productName']; ?> </p>
                    <div class="d-flex gap-2 align-items-center">
                        <div class="d-flex">
                            <?php

                            $totalrating = ceil($totalrating);
                            for ($i = 0; $i < $totalrating; $i++) { ?>
                            <i class="fa-solid fa-star" style="color: #72A565; font-size: 12px;"></i>
                            <?php } ?>
                            <?php for ($i = $totalrating; $i < 5; $i++) { ?>
                            <i class="fa-solid fa-star" style="font-size: 12px;"></i>
                            <?php } ?>
                        </div>


                        <p class="fs7 m-0"><?php echo $totalrating; ?></p>

                    </div>
                    <p class="fss8 m-0">(<?php echo $totalreview; ?> reviews)</p>

                </div>
            </div>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-md-12 my-2">
        <h2>Vendor Details</h2>
        <div class="d-flex gap-4">
            <p class="fs5"><span
                    class="fw-bold">Name:</span><?php echo $userinfo['firstName'] . " " . $userinfo['lastName']; ?></p>
            <p class="fs5"><span class="fw-bold">Email:</span><?php echo $userinfo['email']; ?></p>
            <p class="fs5"><span class="fw-bold">Phone:</span></span><?php echo $userinfo['phoneNumber']; ?></p>
        </div>
    </div>
    <div class="col-md-12">
        <h2>Description</h2>
        <p><?php echo $productdetail['productDetail']; ?> </p>
        <div class="d-flex justify-content-between">
            <a class="btn btn-danger deltBtn px-3"
                href="<?php echo base_url() . 'products/deleteproduct/' . $id  ?>">Delete
                Product</a>
            <div>

                <?php if ($productdetail['isVerified'] == false) { ?>
                <a class="btn savbtn"
                    href="<?php echo base_url() . 'products/updatestatus/' . $id . '/approved' ?>">Approve
                    Products</a>
                <?php } else { ?>
                <a class="btn savbtn"
                    href="<?php echo base_url() . 'products/updatestatus/' . $id . '/reject' ?>">Remove From
                    Listing</a>
                <?php } ?>
            </div>
        </div>
    </div>
</div>