<div class="modal fade product_click_card_modal" id="add_to_cart_modal{{ $product->id }}" data-bs-backdrop="static" data-bs-keyboard="false">
    <div class="modal-dialog modal-dialog-centered">
        <div class="modal-content cart_order_modal_container">
            <div class="modal-header">
                <h5 class="modal_cart_order_title">Add to cart this product</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
            </div>
            <div class="modal-body">

                <div class="product_select_attribute_container_modal">
                    <p>Select {{ $product->productVariant[0]->attribute->name ?? 'Size' }}</p>

                    <div class="product_select_attribute_modal">
                        <ul>
                            @foreach ($product->productVariant as $item)
                                <li>
                                    <div class="select_size_name_modal"><span>{{ $item->variant->name }}</span></div>
                                    <div class="select_price_btn_modal">
                                        @if ($item->price > 0)
                                            <span class="select_price_modal">{{ $item->price }}TK</span>
                                        @else
                                            <span class="select_price_modal">{{ $product->sale_price }}TK</span>
                                        @endif
                                        <button id="{{ $product->id }}" data-variant="{{ $item->variant->name }}"
                                            onclick="addToCartFromModal(event, this.id, this.getAttribute('data-variant'),'{{ $product->productVariant[0]->attribute->name }}')">
                                            {{dynamic_lang('add_to_cart')}}
                                        </button>
                                    </div>
                                </li>
                            @endforeach
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
