  <!--start main wrapper-->
  <main class="main-wrapper">
      <div class="main-content">

          <div class="row">
              <div class="col-md-6 my-2">
                  <h3 class="fmon">Orders</h3>
              </div>
              <div class="col-md-6 d-flex justify-content-end">
                  <div class=" px-2 ">
                      <ul class="nav nav-tabs mb-3 gap-2" id="myTab" role="tablist">
                          <li class="nav-item" role="presentation">
                              <button class="nav-link active " id="inventory-tab" data-bs-toggle="tab" data-bs-target="#inventory" type="button" role="tab" aria-controls="inventory" aria-selected="true">New Orders</button>
                          </li>
                          <li class="nav-item" role="presentation">
                              <button class="nav-link " id="assigned-inventory-tab" data-bs-toggle="tab" data-bs-target="#assigned-inventory" type="button" role="tab" aria-controls="assigned-inventory" aria-selected="false">Ready To Deliver</button>
                          </li>
                          <li class="nav-item" role="presentation">
                              <button class="nav-link " id="low-inventory-tab" data-bs-toggle="tab" data-bs-target="#low-inventory" type="button" role="tab" aria-controls="low-inventory" aria-selected="false">Complete Orders</button>
                          </li>

                      </ul>

                  </div>
              </div>

          </div>
          <div class="row">
              <div class="col-md-12 my-2">
                  <!-- Tabs Content -->
                  <div class="tab-content" id="myTabContent">
                      <!-- New Orders Tab -->
                      <div class="tab-pane fade show active" id="inventory" role="tabpanel" aria-labelledby="inventory-tab">
                          <div class="row">
                              <?php if (empty($newOrders)): ?>
                                  <div class="alert alert-info">No new orders found</div>
                              <?php else: ?>
                                  <?php foreach ($newOrders as $order): ?>
                                      <div class="col-md-6 mb-3">
                                          <div class="orderCard p-3">
                                              <div class="row">
                                                  <div class="col-md-4">
                                                      <img class="clothImage" src="<?= $order['image'] ?>" alt="Order Image">
                                                  </div>
                                                  <div class="col-md-8">
                                                      <div class="d-flex flex-column justify-content-between h-100">
                                                          <div>
                                                              <h5><?= $order['orderNumber'] ?></h5>
                                                              <p class="mb-1"><?= $order['date'] ?></p>
                                                              <p class="mb-1"><?= $order['address'] ?></p>
                                                              <p class="mb-0"><?= $order['price'] ?></p>
                                                          </div>
                                                          <div class="mt-2">
                                                              <a href="<?= base_url('product/orderDetails/' . $order['orderId']) ?>"
                                                                  class="btn setBtn px-4 me-2">
                                                                  View Order
                                                              </a>
                                                          </div>
                                                      </div>
                                                  </div>
                                              </div>
                                          </div>
                                      </div>
                                  <?php endforeach; ?>
                              <?php endif; ?>
                          </div>
                      </div>

                      <!-- Ready to Deliver Tab -->
                      <div class="tab-pane fade" id="assigned-inventory" role="tabpanel" aria-labelledby="assigned-inventory-tab">
                          <div class="row">
                              <?php if (empty($readyOrders)): ?>
                                  <div class="alert alert-info">No orders ready for delivery</div>
                              <?php else: ?>
                                  <?php foreach ($readyOrders as $order): ?>
                                      <div class="col-md-6 mb-3">
                                          <div class="orderCard p-3">
                                              <div class="row">
                                                  <div class="col-md-4">
                                                      <img class="clothImage" src="<?= $order['image'] ?>" alt="Order Image">
                                                  </div>
                                                  <div class="col-md-8">
                                                      <div class="d-flex flex-column justify-content-between h-100">
                                                          <div>
                                                              <h5><?= $order['orderNumber'] ?></h5>
                                                              <p class="mb-1"><?= $order['date'] ?></p>
                                                              <p class="mb-1"><?= $order['address'] ?></p>
                                                              <p class="mb-0"><?= $order['price'] ?></p>
                                                          </div>
                                                          <div class="mt-2">
                                                              <a href="<?= base_url('product/orderDetails/' . $order['orderId']) ?>"
                                                                  class="btn setBtn px-4 me-2">
                                                                  View Order
                                                              </a>
                                                          </div>
                                                      </div>
                                                  </div>
                                              </div>
                                          </div>
                                      </div>
                                  <?php endforeach; ?>
                              <?php endif; ?>
                          </div>
                      </div>

                      <!-- Completed Orders Tab -->
                      <div class="tab-pane fade" id="low-inventory" role="tabpanel" aria-labelledby="low-inventory-tab">
                          <div class="row">
                              <?php if (empty($completedOrders)): ?>
                                  <div class="alert alert-info">No completed orders</div>
                              <?php else: ?>
                                  <?php foreach ($completedOrders as $order): ?>
                                      <div class="col-md-6 mb-3">
                                          <div class="orderCard p-3">
                                              <div class="row">
                                                  <div class="col-md-4">
                                                      <img class="clothImage" src="<?= $order['image'] ?>" alt="Order Image">
                                                  </div>
                                                  <div class="col-md-8">
                                                      <div class="d-flex flex-column justify-content-between h-100">
                                                          <div>
                                                              <h5><?= $order['orderNumber'] ?></h5>
                                                              <p class="mb-1"><?= $order['date'] ?></p>
                                                              <p class="mb-1"><?= $order['address'] ?></p>
                                                              <p class="mb-0"><?= $order['price'] ?></p>
                                                          </div>
                                                          <div class="mt-2">
                                                              <a href="<?= base_url('product/orderDetails/' . $order['orderId']) ?>"
                                                                  class="btn setBtn px-4 me-2">
                                                                  View Order
                                                              </a>
                                                          </div>
                                                      </div>
                                                  </div>
                                              </div>
                                          </div>
                                      </div>
                                  <?php endforeach; ?>
                              <?php endif; ?>
                          </div>
                      </div>
                  </div>



              </div>
          </div>



  </main>
  <!--end main wrapper-->


  <!--start overlay-->
  <div class="overlay btn-toggle"></div>
  <!--end overlay-->