請參閱以下圖片
https://ibb.co/84G5Hhzn
修改以下HTML 及 CSS 代碼 以符合圖中的樣式
<?php
    // 整理資料結構，成為像原本cartData結構（分店分類）
    // $cart結構可能是扁平，先做分店群組，並帶必需欄位
    
    // 用店名分組
    $grouped = [];
    foreach($cart as $row) {
      if(empty($row['qty']) || $row['qty'] == 0) continue; //跳過無數量商品
      $store = $row['store_name'] ?? 'Unknown Store';
      if(!isset($grouped[$store])) $grouped[$store] = [];
      $price = $row['special_price_num'] != '' && $row['special_price_num'] != null && $row['special_price_num'] > 0 ? $row['special_price_num'] : $row['price_num'];
      $price_text = $row['special_price'] != '' && $row['special_price'] != null && $row['special_price_num'] > 0 ? $row['special_price'] : $row['price'];
      $qty = (int)$row['qty'];
      $grouped[$store][] = [
        'id' => $row['id'],
        'product_variant_id' => $row['product_variant_id'],
        'image' => $row['image'],
        'name' => $row['name'],
        'price' => $price,
        'price_text' => $price_text,
        'qty' => $qty,
        'slug' => $row['slug'],
        'minimum_order_quantity' => $row['minimum_order_quantity'],
        'quantity_step_size' => $row['quantity_step_size'],
        'total_allowed_quantity' => $row['total_allowed_quantity'],
        'total' => $row['total']
      ];
    }

    $finalData = [];
    foreach($grouped as $storeName => $items) {
      $finalData[] = [
        'store' => $storeName,
        'items' => $items
      ];
    }
  ?>
<style>
/* 頁面標題 */
h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 600;
    color: #333;
}

/* 商店區塊 */
.store-group {
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 12px;
    background: #fafafa;
}

.store-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #222;
    border-bottom: 2px solid #ccc;
    padding-bottom: 5px;
}

/* 購物車商品清單 */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 單筆商品 */
.cart-item {
    display: flex;
    flex-wrap: nowrap; /* 不換行 */
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding: 5px 10px;
    position: relative;
    gap: 8px;
    min-height: auto;
}

/* 商品圖片縮小 */
.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

/* 內容區塊 */
.item-details {
    flex: 1 1 auto;
    padding: 0 10px;
    min-width: 0;
}

/* 商品標題限制2行，文字溢出省略 */
.item-details .title a.link {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    font-size: 0.95rem;
    line-height: 1.2rem;
    margin-bottom: 4px;
    color: #111;
    font-weight: 600;
}

/* 單價與總價 */
.unit-price,
.item-total-price {
    font-size: 0.85rem;
    color: #444;
    line-height: 1.1rem;
}

/* 數量及總價區塊寬度拉滿，方便排列 */
.quantity-and-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* 數量控制區（減、加按鈕與輸入框）*/
.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
    width: 100px;
    margin-top: 4px;
}

.quantity-control button {
    background: #eee;
    border: none;
    width: 28px;
    height: 28px;
    font-size: 18px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.quantity-control button:hover {
    background: #ddd;
}

.quantity-control input.in-num {
    width: 44px;
    border: none;
    text-align: center;
    font-size: 0.9rem;
    height: 28px;
    outline: none;
}

/* 商品總價不絕對定位，避免文字錯位 */
.item-total-price {
    font-weight: 700;
    color: #000;
    min-width: 70px;
    text-align: right;
    position: relative;
    bottom: auto;
    right: auto;
}

/* 移除按鈕 */
.remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    border: none;
    background: transparent;
    font-size: 16px !important; /* 強制字體大小 */
    line-height: 1;
    cursor: pointer;
    color: #a00;
    font-weight: 700;
    user-select: none;
    padding: 0;
    transition: color 0.2s ease;
    z-index: 10;
}

.remove-btn:hover {
    color: #e00;
}

/* 購物車摘要 */
.cart-summary {
    border-top: 2px solid #333;
    padding-top: 20px;
    max-width: 350px;
    margin-left: auto;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 1rem;
    color: #333;
}

.summary-row.total {
    font-weight: 700;
    font-size: 1.2rem;
    border-top: 2px solid #333;
    padding-top: 12px;
    margin-top: 12px;
}

/* 結帳按鈕 */
.checkout-button {
    display: block;
    width: 100%;
    background-color: #28a745;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 15px 0;
    text-align: center;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 25px;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.checkout-button:hover {
    background-color: #218838;
}

/* 響應式調整 */
@media (max-width: 600px) {
    .cart-item {
        flex-direction: row; /* 水平排列 */
        padding: 6px 10px;
        gap: 6px;
    }

    .item-details {
        padding: 0 10px;
        width: 60%;
        min-width: 0;
    }

    .quantity-control {
        width: 90px;
        margin-top: 0;
    }

    .item-total-price {
        min-width: 60px;
        font-size: 1rem;
        text-align: right;
        position: relative;
        bottom: auto;
        right: auto;
    }
}
</style>

<!-- ========================= Breadcrumb Start =============================== -->
<div class="breadcrumb mb-0 py-26 bg-main-two-50">
    <div class="container container-lg">
        <div class="breadcrumb-wrapper flex-between flex-wrap gap-16">
            <h6 class="mb-0">購物車</h6>
            <ul class="flex-align gap-8 flex-wrap">
                <li class="text-sm">
                    <a href="https://yymart.com.hk" class="text-gray-900 flex-align gap-8 hover-text-main-600">
                        <i class="ph ph-house"></i>
                        主頁
                    </a>
                </li>
                <li class="flex-align">
                    <i class="ph ph-caret-right"></i>
                </li>
                <li class="text-sm text-main-600"> 購物車 </li>
            </ul>
        </div>
    </div>
</div>
<!-- ========================= Breadcrumb End =============================== -->

    <!-- ================================ Cart Section Start ================================ -->
 <section class="cart py-80">
    <div class="container container-lg">
        <?php if (isset($cart[0]['total_items']) && !empty($cart[0]['total_items']) && $cart[0]['total_items'] != "") { ?>
            <div id="cart-container" class="col-xl-9 col-lg-8">
                <?php foreach($finalData as $storeData) {?>
                    <div class="store-group" data-store="<?=$storeData['store']?>">
                        <div class="store-name"><?=$storeData['store']?></div>
                        <div class="cart-items">
                            <?php foreach($storeData['items'] as $row) { ?>
                                <div class="cart-item" data-id="<?=$row['id']?>" data-store="<?=$storeData['store']?>" data-price="<?=$row['price']?>">
                                    <div class="product-removal remove-btn">
                                        <i class="ph ph-trash" name="remove_inventory" id="remove_inventory" data-id="<?=$row['product_variant_id']?>" title="Remove From Cart" style="font-size:28px;"></i>
                                    </div>
                                    <img src="<?=$row['image']?>" alt="<?=$row['name']?>" />
                                    <div class="item-details">
                                        <h6 class="title text-lg fw-semibold mb-8">
                                            <a href="<?= base_url('products/details/' . $row['slug']) ?>" class="link text-line-2" tabindex="0"><?= output_escaping(str_replace('\r\n', '&#13;&#10;', $row['name'] ?? "")); ?></a>
                                        </h6>
                                        <p class="unit-price"><?="單價: ".$row['price_text']?></p>
                                        <div class="quantity-and-total">
                                            <div class="quantity-control">
                                                <div class="d-flex rounded-4 overflow-hidden qty_box num-block skin-2 product-quantity">
                                                    <?php $check_current_stock_status = validate_stock(
                                                        [$row['id']],
                                                        [$row['qty']]
                                                    ); ?>
                                                    <?php if (isset($check_current_stock_status['error'])  && $check_current_stock_status['error'] == TRUE) { ?>
                                                            <div><span class='text text-danger'>  沒有庫存 </span></div>
                                                        <?php } else { ?>
                                                        <div class="num-in" style="margin-top:0px;display:flex;">
                                                            <button type="button" class="minus dis quantity__minus text-neutral-600 flex-center hover-bg-main-600 hover-text-white" data-min="<?= (isset($row['minimum_order_quantity']) && !empty($row['minimum_order_quantity'])) ? $row['minimum_order_quantity'] : 1 ?>" data-step="<?= (isset($row['minimum_order_quantity']) && !empty($row['quantity_step_size'])) ? $row['quantity_step_size'] : 1 ?>">
                                                                <i class="ph ph-minus"></i>
                                                            </button>
                                                            <!--<input type="number" class="quantity__input flex-grow-1 border border-gray-100 border-start-0 border-end-0 text-center w-32 px-4" value="1" min="1">-->
                                                            <input type="number" class="in-num itemQty" data-page="cart" data-id="<?= $row['id']; ?>" value="<?= $row['qty'] ?>" data-price="<?= $row['price'] ?>" data-step="<?= (isset($row['minimum_order_quantity']) && !empty($row['quantity_step_size'])) ? $row['quantity_step_size'] : 1 ?>" data-min="<?= (isset($row['minimum_order_quantity']) && !empty($row['minimum_order_quantity'])) ? $row['minimum_order_quantity'] : 1 ?>" data-max="<?= (isset($row['total_allowed_quantity']) && !empty($row['total_allowed_quantity'])) ? $row['total_allowed_quantity'] : 0 ?>">
                                                            <button type="button" class="plus quantity__plus text-neutral-600 flex-center hover-bg-main-600 hover-text-white" data-max="<?= (isset($row['total_allowed_quantity']) && !empty($row['total_allowed_quantity'])) ? $row['total_allowed_quantity'] : '0' ?> " data-step="<?= (isset($row['minimum_order_quantity']) && !empty($row['quantity_step_size'])) ? $row['quantity_step_size'] : 1 ?>">
                                                                <i class="ph ph-plus"></i>
                                                            </button>
                                                        </div>
                                                        <?php } ?>
                                                        
                                                </div>
                                            </div>
                                            <div class="item-total-price"><span class="product-line-price text-lg h6 mb-0 fw-semibold" data-value="<?=$row['total']?>"><?= $row['total'] ?></span></div>
                                        </div>
                                    </div>
                                </div>
                            <?php } ?>
                        </div>
                    </div>
                <?php } ?>
            </div>
            <?php $delivery_charge = !empty($cart['sub_total']) ? $cart['delivery_charge_sf_number'] : 0 ?>
            <?php $total = !empty($cart['sub_total']) ? $cart['overall_amount'] : 0 ?>
            <?php $total_num = $cart['overall_amount']?>
            <div class="col-xl-3 col-lg-4">
                <div class="cart-sidebar border border-gray-100 rounded-8 px-24 py-40">
                    <h6 class="text-xl mb-32">購物車總額</h6>
                    <div class="bg-color-three rounded-8 p-24">
                        <div class="mb-32 flex-between gap-8">
                            <span class="text-gray-900 font-heading-two">產品總額</span>
                            <span id="product_total" data-value="<?=$cart['sub_total']?>" class="text-gray-900 fw-semibold"><?= $cart['sub_total'] ?></span>
                        </div>
                        <div class="mb-32 flex-between gap-8">
                            <span class="text-gray-900 font-heading-two">運費</span>
                            <span id="shipping-fee" data-value="<?=$delivery_charge?>" class="text-gray-900 fw-semibold"><?= $cart['delivery_charge_sf'] ?></span>
                        </div>
                        <!--
                        <div class="mb-0 flex-between gap-8">
                            <span class="text-gray-900 font-heading-two">Extimated Taxs</span>
                            <span class="text-gray-900 fw-semibold">USD 10.00</span>
                        </div>
                        -->
                    </div>  
                    <div class="bg-color-three rounded-8 p-24 mt-24">
                        <div class="flex-between gap-8 total-price">
                            <span class="text-gray-900 text-xl fw-semibold">共需支付</span>
                            <span class="text-gray-900 text-xl fw-semibold" style="font-weight: bold !important;" id="final_total" data-value="<?=$total_num?>"><?=$total?></span>
                        </div>
                    </div>  
                    <?php $disabled = empty($cart['sub_total']) ? 'disabled' : '' ?>
                    <a href="<?=base_url('cart/checkout')?>" class="btn btn-main mt-40 py-18 w-100 rounded-8" <?= $disabled ?>>前往付款</a>
                </div>
            </div>
        <?php } else { ?>
        <div class="align-items-center d-flex flex-column">
            <img src="<?= base_url('assets/front_end/classic/images/empty-orders.webp') ?>" alt="Empty Cart" class="w-23" style="width:20%" />
            <h1 class="h2 text-center"><?= '你的購物車是空的' ?></h1>
        </div>
        <?php } ?>
    </div>
 </section>
<!-- ================================ Cart Section End ================================ -->

以下是原樣式的範例，給你參考:
<section class="cart py-80">
    <div class="container container-lg">
                    <div id="cart-container" class="col-xl-9 col-lg-8">
                                    <div class="store-group" data-store="網上商店">
                        <div class="store-name">網上商店</div>
                        <div class="cart-items">
                                                            <div class="cart-item" data-id="83" data-store="網上商店" data-price="100.00">
                                    <div class="product-removal remove-btn">
                                        <i class="ph ph-trash" name="remove_inventory" id="remove_inventory" data-id="12" title="Remove From Cart" style="font-size:28px;"></i>
                                    </div>
                                    <img src="https://yymart.com.hk/uploads/media/2025/temp_product.png" alt="測試電子產品">
                                    <div class="item-details">
                                        <h6 class="title text-lg fw-semibold mb-8">
                                            <a href="https://yymart.com.hk/products/details/測試電子產品" class="link text-line-2" tabindex="0">測試電子產品</a>
                                        </h6>
                                        <p class="unit-price">單價: HK$100.00</p>
                                        <div class="quantity-and-total">
                                            <div class="quantity-control">
                                                <div class="d-flex rounded-4 overflow-hidden qty_box num-block skin-2 product-quantity">
                                                                                                                                                                <div class="num-in" style="margin-top:0px;display:flex;">
                                                            <button type="button" class="minus dis quantity__minus text-neutral-600 flex-center hover-bg-main-600 hover-text-white" data-min="1" data-step="1">
                                                                <i class="ph ph-minus"></i>
                                                            </button>
                                                            <!--<input type="number" class="quantity__input flex-grow-1 border border-gray-100 border-start-0 border-end-0 text-center w-32 px-4" value="1" min="1">-->
                                                            <input type="number" class="in-num itemQty" data-page="cart" data-id="83" value="1" data-price="100.00" data-step="1" data-min="1" data-max="1">
                                                            <button type="button" class="plus quantity__plus text-neutral-600 flex-center hover-bg-main-600 hover-text-white" data-max="1 " data-step="1">
                                                                <i class="ph ph-plus"></i>
                                                            </button>
                                                        </div>
                                                                                                                
                                                </div>
                                            </div>
                                            <div class="item-total-price"><span class="product-line-price text-lg h6 mb-0 fw-semibold" data-value="HK$100.00">HK$100.00</span></div>
                                        </div>
                                    </div>
                                </div>
                                                            <div class="cart-item" data-id="78" data-store="網上商店" data-price="700.00">
                                    <div class="product-removal remove-btn">
                                        <i class="ph ph-trash" name="remove_inventory" id="remove_inventory" data-id="6" title="Remove From Cart" style="font-size:28px;"></i>
                                    </div>
                                    <img src="https://yymart.com.hk/uploads/media/2025/799x799_product_6.webp" alt="Abena 雅保 - M3 加強日用成人紙尿褲 (中) | (原箱6包 x 15片)">
                                    <div class="item-details">
                                        <h6 class="title text-lg fw-semibold mb-8">
                                            <a href="https://yymart.com.hk/products/details/abena-雅保-m3-加強日用成人紙尿褲-中-原箱6包-x-15片" class="link text-line-2" tabindex="0">Abena 雅保 - M3 加強日用成人紙尿褲 (中) | (原箱6包 x 15片)</a>
                                        </h6>
                                        <p class="unit-price">單價: HK$700.00</p>
                                        <div class="quantity-and-total">
                                            <div class="quantity-control">
                                                <div class="d-flex rounded-4 overflow-hidden qty_box num-block skin-2 product-quantity">
                                                                                                                                                                <div class="num-in" style="margin-top:0px;display:flex;">
                                                            <button type="button" class="minus dis quantity__minus text-neutral-600 flex-center hover-bg-main-600 hover-text-white" data-min="1" data-step="1">
                                                                <i class="ph ph-minus"></i>
                                                            </button>
                                                            <!--<input type="number" class="quantity__input flex-grow-1 border border-gray-100 border-start-0 border-end-0 text-center w-32 px-4" value="1" min="1">-->
                                                            <input type="number" class="in-num itemQty" data-page="cart" data-id="78" value="1" data-price="700.00" data-step="1" data-min="1" data-max="0">
                                                            <button type="button" class="plus quantity__plus text-neutral-600 flex-center hover-bg-main-600 hover-text-white" data-max="0 " data-step="1">
                                                                <i class="ph ph-plus"></i>
                                                            </button>
                                                        </div>
                                                                                                                
                                                </div>
                                            </div>
                                            <div class="item-total-price"><span class="product-line-price text-lg h6 mb-0 fw-semibold" data-value="HK$700.00">HK$700.00</span></div>
                                        </div>
                                    </div>
                                </div>
                                                            <div class="cart-item" data-id="68" data-store="網上商店" data-price="0.01">
                                    <div class="product-removal remove-btn">
                                        <i class="ph ph-trash" name="remove_inventory" id="remove_inventory" data-id="11" title="Remove From Cart" style="font-size:28px;"></i>
                                    </div>
                                    <img src="https://yymart.com.hk/uploads/media/2025/temp_product.png" alt="內部測試產品">
                                    <div class="item-details">
                                        <h6 class="title text-lg fw-semibold mb-8">
                                            <a href="https://yymart.com.hk/products/details/內部測試產品" class="link text-line-2" tabindex="0">內部測試產品</a>
                                        </h6>
                                        <p class="unit-price">單價: HK$0.01</p>
                                        <div class="quantity-and-total">
                                            <div class="quantity-control">
                                                <div class="d-flex rounded-4 overflow-hidden qty_box num-block skin-2 product-quantity">
                                                                                                                                                                <div class="num-in" style="margin-top:0px;display:flex;">
                                                            <button type="button" class="minus dis quantity__minus text-neutral-600 flex-center hover-bg-main-600 hover-text-white" data-min="1" data-step="1">
                                                                <i class="ph ph-minus"></i>
                                                            </button>
                                                            <!--<input type="number" class="quantity__input flex-grow-1 border border-gray-100 border-start-0 border-end-0 text-center w-32 px-4" value="1" min="1">-->
                                                            <input type="number" class="in-num itemQty" data-page="cart" data-id="68" value="11" data-price="0.01" data-step="1" data-min="1" data-max="0">
                                                            <button type="button" class="plus quantity__plus text-neutral-600 flex-center hover-bg-main-600 hover-text-white" data-max="0 " data-step="1">
                                                                <i class="ph ph-plus"></i>
                                                            </button>
                                                        </div>
                                                                                                                
                                                </div>
                                            </div>
                                            <div class="item-total-price"><span class="product-line-price text-lg h6 mb-0 fw-semibold" data-value="HK$0.11">HK$0.11</span></div>
                                        </div>
                                    </div>
                                </div>
                                                    </div>
                    </div>
                            </div>
                                                <div class="col-xl-3 col-lg-4">
                <div class="cart-sidebar border border-gray-100 rounded-8 px-24 py-40">
                    <h6 class="text-xl mb-32">購物車總額</h6>
                    <div class="bg-color-three rounded-8 p-24">
                        <div class="mb-32 flex-between gap-8">
                            <span class="text-gray-900 font-heading-two">產品總額</span>
                            <span id="product_total" data-value="HK$800.11" class="text-gray-900 fw-semibold">HK$800.11</span>
                        </div>
                        <div class="mb-32 flex-between gap-8">
                            <span class="text-gray-900 font-heading-two">運費</span>
                            <span id="shipping-fee" data-value="0.00" class="text-gray-900 fw-semibold">HK$0.00</span>
                        </div>
                        <!--
                        <div class="mb-0 flex-between gap-8">
                            <span class="text-gray-900 font-heading-two">Extimated Taxs</span>
                            <span class="text-gray-900 fw-semibold">USD 10.00</span>
                        </div>
                        -->
                    </div>  
                    <div class="bg-color-three rounded-8 p-24 mt-24">
                        <div class="flex-between gap-8 total-price">
                            <span class="text-gray-900 text-xl fw-semibold">共需支付</span>
                            <span class="text-gray-900 text-xl fw-semibold" style="font-weight: bold !important;" id="final_total" data-value="HK$800.11">HK$800.11</span>
                        </div>
                    </div>  
                                        <a href="https://yymart.com.hk/cart/checkout" class="btn btn-main mt-40 py-18 w-100 rounded-8">前往付款</a>
                </div>
            </div>
            </div>
 </section>