@extends('layouts.landing', ['title' => 'Fashion Store - Catalog'])

@section('content')
    <div class="offcanvas offcanvas-end pb-sm-2 px-sm-2" id="shoppingCart" tabindex="-1" aria-labelledby="shoppingCartLabel"
        style="width: 500px">

        <!-- Header -->
        <div class="offcanvas-header flex-column align-items-start py-3 pt-lg-4">
            <div class="d-flex align-items-center justify-content-between w-100 mb-3 mb-lg-4">
                <h4 class="offcanvas-title" id="shoppingCartLabel">Shopping cart</h4>
                <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
            </div>
            <p class="fs-sm">Buy <span class="text-dark-emphasis fw-semibold">$53</span> more to get <span
                    class="text-dark-emphasis fw-semibold">Free Shipping</span></p>
            <div class="progress w-100" role="progressbar" aria-label="Free shipping progress" aria-valuenow="78"
                aria-valuemin="0" aria-valuemax="100" style="height: 4px">
                <div class="progress-bar bg-dark rounded-pill d-none-dark" style="width: 78%"></div>
                <div class="progress-bar bg-light rounded-pill d-none d-block-dark" style="width: 78%"></div>
            </div>
        </div>

        <!-- Items -->
        <div class="offcanvas-body d-flex flex-column gap-4 pt-2">

            <!-- Item -->
            <div class="d-flex align-items-center">
                <a class="flex-shrink-0" href="{{ route('second', ['shop', 'product-fashion']) }}">
                    <img src="/img/shop/fashion/thumbs/07.png" class="bg-body-tertiary rounded" width="110"
                        alt="Thumbnail">
                </a>
                <div class="w-100 min-w-0 ps-3">
                    <h5 class="d-flex animate-underline mb-2">
                        <a class="d-block fs-sm fw-medium text-truncate animate-target"
                            href="{{ route('second', ['shop', 'product-fashion']) }}">Leather sneakers with golden laces</a>
                    </h5>
                    <div class="h6 pb-1 mb-2">$74.00</div>
                    <div class="d-flex align-items-center justify-content-between">
                        <div class="count-input rounded-2">
                            <button type="button" class="btn btn-icon btn-sm" data-decrement
                                aria-label="Decrement quantity">
                                <i class="ci-minus"></i>
                            </button>
                            <input type="number" class="form-control form-control-sm" value="1" readonly>
                            <button type="button" class="btn btn-icon btn-sm" data-increment
                                aria-label="Increment quantity">
                                <i class="ci-plus"></i>
                            </button>
                        </div>
                        <button type="button" class="btn-close fs-sm" data-bs-toggle="tooltip"
                            data-bs-custom-class="tooltip-sm" data-bs-title="Remove" aria-label="Remove from cart"></button>
                    </div>
                </div>
            </div>

            <!-- Item -->
            <div class="d-flex align-items-center">
                <a class="flex-shrink-0" href="{{ route('second', ['shop', 'product-fashion']) }}">
                    <img src="/img/shop/fashion/thumbs/08.png" class="bg-body-tertiary rounded" width="110"
                        alt="Thumbnail">
                </a>
                <div class="w-100 min-w-0 ps-3">
                    <h5 class="d-flex animate-underline mb-2">
                        <a class="d-block fs-sm fw-medium text-truncate animate-target"
                            href="{{ route('second', ['shop', 'product-fashion']) }}">Classic cotton men's shirt</a>
                    </h5>
                    <div class="h6 pb-1 mb-2">$27.00</div>
                    <div class="d-flex align-items-center justify-content-between">
                        <div class="count-input rounded-2">
                            <button type="button" class="btn btn-icon btn-sm" data-decrement
                                aria-label="Decrement quantity">
                                <i class="ci-minus"></i>
                            </button>
                            <input type="number" class="form-control form-control-sm" value="1" readonly>
                            <button type="button" class="btn btn-icon btn-sm" data-increment
                                aria-label="Increment quantity">
                                <i class="ci-plus"></i>
                            </button>
                        </div>
                        <button type="button" class="btn-close fs-sm" data-bs-toggle="tooltip"
                            data-bs-custom-class="tooltip-sm" data-bs-title="Remove" aria-label="Remove from cart"></button>
                    </div>
                </div>
            </div>

            <!-- Item -->
            <div class="d-flex align-items-center">
                <a class="flex-shrink-0" href="{{ route('second', ['shop', 'product-fashion']) }}">
                    <img src="/img/shop/fashion/thumbs/09.png" class="bg-body-tertiary rounded" width="110"
                        alt="Thumbnail">
                </a>
                <div class="w-100 min-w-0 ps-3">
                    <h5 class="d-flex animate-underline mb-2">
                        <a class="d-block fs-sm fw-medium text-truncate animate-target"
                            href="{{ route('second', ['shop', 'product-fashion']) }}">Polarized sunglasses for men</a>
                    </h5>
                    <div class="h6 pb-1 mb-2">$96.00 <del class="text-body-tertiary fs-xs fw-normal">112.00</del></div>
                    <div class="d-flex align-items-center justify-content-between">
                        <div class="count-input rounded-2">
                            <button type="button" class="btn btn-icon btn-sm" data-decrement
                                aria-label="Decrement quantity">
                                <i class="ci-minus"></i>
                            </button>
                            <input type="number" class="form-control form-control-sm" value="1" readonly>
                            <button type="button" class="btn btn-icon btn-sm" data-increment
                                aria-label="Increment quantity">
                                <i class="ci-plus"></i>
                            </button>
                        </div>
                        <button type="button" class="btn-close fs-sm" data-bs-toggle="tooltip"
                            data-bs-custom-class="tooltip-sm" data-bs-title="Remove"
                            aria-label="Remove from cart"></button>
                    </div>
                </div>
            </div>
        </div>

        <!-- Footer -->
        <div class="offcanvas-header flex-column align-items-start">
            <div class="d-flex align-items-center justify-content-between w-100 mb-3 mb-md-4">
                <span class="text-light-emphasis">Subtotal:</span>
                <span class="h6 mb-0">$197.00</span>
            </div>
            <div class="d-flex w-100 gap-3">
                <a class="btn btn-lg btn-secondary w-100" href="#!">View cart</a>
                <a class="btn btn-lg btn-dark w-100" href="#!">Checkout</a>
            </div>
        </div>
    </div>

    <div class="offcanvas offcanvas-top" id="searchBox" data-bs-backdrop="static" tabindex="-1">
        <div class="offcanvas-header border-bottom p-0 py-lg-1">
            <form class="container d-flex align-items-center">
                <input type="search" class="form-control form-control-lg fs-lg border-0 rounded-0 py-3 ps-0"
                    placeholder="Search the products" data-autofocus="offcanvas">
                <button type="reset" class="btn-close fs-lg" data-bs-dismiss="offcanvas" aria-label="Close"></button>
            </form>
        </div>
        <div class="offcanvas-body px-0">
            <div class="container text-center">
                <svg class="text-body-tertiary opacity-60 mb-4" xmlns="http://www.w3.org/2000/svg" width="60"
                    viewBox="0 0 512 512" fill="currentColor">
                    <path
                        d="M340.115,361.412l-16.98-16.98c-34.237,29.36-78.733,47.098-127.371,47.098C87.647,391.529,0,303.883,0,195.765S87.647,0,195.765,0s195.765,87.647,195.765,195.765c0,48.638-17.738,93.134-47.097,127.371l16.98,16.98l11.94-11.94c5.881-5.881,15.415-5.881,21.296,0l112.941,112.941c5.881,5.881,5.881,15.416,0,21.296l-45.176,45.176c-5.881,5.881-15.415,5.881-21.296,0L328.176,394.648c-5.881-5.881-5.881-15.416,0-21.296L340.115,361.412z M195.765,361.412c91.484,0,165.647-74.163,165.647-165.647S287.249,30.118,195.765,30.118S30.118,104.28,30.118,195.765S104.28,361.412,195.765,361.412z M360.12,384l91.645,91.645l23.88-23.88L384,360.12L360.12,384z M233.034,233.033c5.881-5.881,15.415-5.881,21.296,0c5.881,5.881,5.881,15.416,0,21.296c-32.345,32.345-84.786,32.345-117.131,0c-5.881-5.881-5.881-15.415,0-21.296c5.881-5.881,15.416-5.881,21.296,0C179.079,253.616,212.45,253.616,233.034,233.033zM135.529,180.706c-12.475,0-22.588-10.113-22.588-22.588c0-12.475,10.113-22.588,22.588-22.588c12.475,0,22.588,10.113,22.588,22.588C158.118,170.593,148.005,180.706,135.529,180.706z M256,180.706c-12.475,0-22.588-10.113-22.588-22.588c0-12.475,10.113-22.588,22.588-22.588s22.588,10.113,22.588,22.588C278.588,170.593,268.475,180.706,256,180.706z" />
                </svg>
                <h6 class="mb-2">Your search results will appear here</h6>
                <p class="fs-sm mb-0">Start typing in the search field above to see instant search results.</p>
            </div>
        </div>
    </div>

    <div class="alert alert-dismissible bg-dark text-white rounded-0 py-2 px-0 m-0 fade show" data-bs-theme="dark">
        <div class="container position-relative d-flex min-w-0">
            <div class="d-flex flex-nowrap align-items-center g-2 w-100 min-w-0 mx-auto mt-n1" style="max-width: 458px">
                <div class="nav me-2">
                    <button type="button" class="nav-link fs-lg p-0" id="topbarPrev" aria-label="Prev">
                        <i class="ci-chevron-left"></i>
                    </button>
                </div>
                <div class="swiper fs-sm text-white"
                    data-swiper='{
            "spaceBetween": 24,
            "loop": true,
            "autoplay": {
              "delay": 5000,
              "disableOnInteraction": false
            },
            "navigation": {
              "prevEl": "#topbarPrev",
              "nextEl": "#topbarNext"
            }
          }'>
                    <div class="swiper-wrapper min-w-0">
                        <div class="swiper-slide text-truncate text-center">🎉 Free Shipping on orders over $250. <span
                                class="d-none d-sm-inline">Don't miss a discount!</span></div>
                        <div class="swiper-slide text-truncate text-center">💰 Money back guarantee. <span
                                class="d-none d-sm-inline">We return money within 30 days.</span></div>
                        <div class="swiper-slide text-truncate text-center">💪 Friendly 24/7 customer support. <span
                                class="d-none d-sm-inline">We've got you covered!</span></div>
                    </div>
                </div>
                <div class="nav ms-2">
                    <button type="button" class="nav-link fs-lg p-0" id="topbarNext" aria-label="Next">
                        <i class="ci-chevron-right"></i>
                    </button>
                </div>
            </div>
            <button type="button" class="btn-close position-static flex-shrink-0 p-1 ms-3 ms-md-n4"
                data-bs-dismiss="alert" aria-label="Close"></button>
        </div>
    </div>

    <x-layout.header />

    <main class="content-wrapper">

        <!-- Breadcrumb -->
        <nav class="container pt-2 pt-xxl-3 my-3 my-md-4" aria-label="breadcrumb">
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="{{ route('second', ['home', 'fashion-v1']) }}">Home</a></li>
                <li class="breadcrumb-item active" aria-current="page">Catalog with sidebar filters</li>
            </ol>
        </nav>


        <!-- Page title -->
        <h1 class="h3 container pb-3 pb-lg-4">Shop catalog</h1>


        <!-- Products grid + Sidebar with filters -->
        <section class="container">
            <div class="row">

                <!-- Filter sidebar that turns into offcanvas on screens < 992px wide (lg breakpoint) -->
                <aside class="col-lg-3">
                    <div class="offcanvas-lg offcanvas-start pe-lg-4" id="filterSidebar">
                        <div class="offcanvas-header py-3">
                            <h5 class="offcanvas-title">Filter products</h5>
                            <button type="button" class="btn-close" data-bs-dismiss="offcanvas"
                                data-bs-target="#filterSidebar" aria-label="Close"></button>
                        </div>

                        <div class="offcanvas-body flex-column pt-2 py-lg-0">
                            @if (count($filters) > 0)
                                <!-- Selected filters + Sorting -->
                                <div class="pb-4 mb-2 mb-xl-3">
                                    <div class="d-flex align-items-center justify-content-between mb-3">
                                        <h4 class="h6 mb-0">Filter</h4>
                                        <a type="button" href="{{ route('product.index') }}"
                                            class="btn btn-sm btn-secondary bg-transparent border-0 text-decoration-underline p-0 ms-2">
                                            Clear all
                                        </a>
                                    </div>
                                    <div class="d-flex flex-wrap gap-2">
                                        @foreach ($filters as $key => $filter)
                                            <button type="button" class="btn btn-sm btn-secondary">
                                                <i class="ci-close fs-sm ms-n1 me-1"></i>
                                                {{ $filter }}
                                            </button>
                                        @endforeach

                                    </div>
                                </div>
                            @endif

                            <div class="accordion">

                                <!-- Genders -->
                                <div class="accordion-item border-0 pb-1 pb-xl-2">
                                    <h4 class="accordion-header" id="headingGenders">
                                        <button type="button" class="accordion-button p-0 pb-3"
                                            data-bs-toggle="collapse" data-bs-target="#genders" aria-expanded="true"
                                            aria-controls="genders">
                                            {{ __('catalog_fashion.genders') }}
                                        </button>
                                    </h4>
                                    <div class="accordion-collapse collapse show" id="genders"
                                        aria-labelledby="headingGenders">
                                        <div class="accordion-body p-0 pb-4 mb-1 mb-xl-2">
                                            <div style="height: 220px" data-simplebar data-simplebar-auto-hide="false">
                                                <ul class="nav flex-column gap-2 pe-3">
                                                    @foreach ($genders as $gender)
                                                        <li class="nav-item mb-1">
                                                            <a class="nav-link d-block fw-normal p-0" href="{{ route('product.index', array_merge(request()->except('filter[gender]'), ['filter[gender]' => $gender->name])) }}">
                                                                {{ $gender->name }}
                                                            </a>
                                                        </li>
                                                    @endforeach
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!-- Categories -->
                                <div class="accordion-item border-0 pb-1 pb-xl-2">
                                    <h4 class="accordion-header" id="headingCategories">
                                        <button type="button" class="accordion-button p-0 pb-3"
                                            data-bs-toggle="collapse" data-bs-target="#categories" aria-expanded="true"
                                            aria-controls="categories">
                                            {{ __('catalog_fashion.categories') }}
                                        </button>
                                    </h4>
                                    <div class="accordion-collapse collapse show" id="categories"
                                        aria-labelledby="headingCategories">
                                        <div class="accordion-body p-0 pb-4 mb-1 mb-xl-2">
                                            <div style="height: 220px" data-simplebar data-simplebar-auto-hide="false">
                                                <ul class="nav flex-column gap-2 pe-3">
                                                    @foreach ($categories as $category)
                                                        <li class="nav-item mb-1">
                                                            <a class="nav-link d-block fw-normal p-0" href="{{ route('product.index', array_merge(request()->except('filter[category]'), ['filter[category]' => $category->name])) }}">
                                                                {{ $category->name }}
                                                            </a>
                                                        </li>
                                                    @endforeach
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <!-- Price -->
                                <div class="accordion-item border-0 pb-1 pb-xl-2">
                                    <h4 class="accordion-header" id="headingPrice">
                                        <button type="button" class="accordion-button p-0 pb-3"
                                            data-bs-toggle="collapse" data-bs-target="#price" aria-expanded="true"
                                            aria-controls="price">
                                            Price
                                        </button>
                                    </h4>
                                    <div class="accordion-collapse collapse show" id="price"
                                        aria-labelledby="headingPrice">
                                        <div class="accordion-body p-0 pb-4 mb-1 mb-xl-2">
                                            <div class="range-slider"
                                                data-range-slider='{"startMin": 40, "startMax": 150, "min": 0, "max": 200, "step": 1, "tooltipPrefix": "$"}'
                                                aria-labelledby="headingPrice">
                                                <div class="range-slider-ui"></div>
                                                <div class="d-flex align-items-center">
                                                    <div class="position-relative w-50">
                                                        <i
                                                            class="ci-dollar-sign position-absolute top-50 start-0 translate-middle-y ms-3"></i>
                                                        <input type="number" class="form-control form-icon-start"
                                                            min="0" data-range-slider-min>
                                                    </div>
                                                    <i class="ci-minus text-body-emphasis mx-2"></i>
                                                    <div class="position-relative w-50">
                                                        <i
                                                            class="ci-dollar-sign position-absolute top-50 start-0 translate-middle-y ms-3"></i>
                                                        <input type="number" class="form-control form-icon-start"
                                                            min="0" data-range-slider-max>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <!-- Brands -->
                                {{-- <div class="accordion-item border-0 pb-1 pb-xl-2">
                                    <h4 class="accordion-header" id="headingBrands">
                                        <button type="button" class="accordion-button p-0 pb-3"
                                            data-bs-toggle="collapse" data-bs-target="#brands" aria-expanded="true"
                                            aria-controls="brands">
                                            Brands
                                        </button>
                                    </h4>
                                    <div class="accordion-collapse collapse show" id="brands"
                                        aria-labelledby="headingBrands">
                                        <div class="accordion-body p-0 pb-4 mb-1 mb-xl-2"
                                            data-filter-list='{"searchClass": "brands-search", "listClass": "brands-list", "valueNames": ["form-check-label"]}'>
                                            <div class="position-relative mb-3">
                                                <i
                                                    class="ci-search position-absolute top-50 start-0 translate-middle-y ms-3"></i>
                                                <input type="search" class="brands-search form-control form-icon-start"
                                                    placeholder="Search">
                                            </div>
                                            <div style="height: 210px" data-simplebar data-simplebar-auto-hide="false">
                                                <div class="brands-list d-flex flex-column gap-2">
                                                    <div class="form-check mb-0">
                                                        <input type="checkbox" class="form-check-input" id="adidas"
                                                            checked>
                                                        <label for="adidas" class="form-check-label text-body-emphasis">
                                                            Adidas<span class="fs-xs text-body-secondary ms-1">(425)</span>
                                                        </label>
                                                    </div>
                                                    <div class="form-check mb-0">
                                                        <input type="checkbox" class="form-check-input" id="taylor">
                                                        <label for="taylor" class="form-check-label text-body-emphasis">
                                                            Ann Taylor<span
                                                                class="fs-xs text-body-secondary ms-1">(15)</span>
                                                        </label>
                                                    </div>
                                                    <div class="form-check mb-0">
                                                        <input type="checkbox" class="form-check-input" id="armani">
                                                        <label for="armani" class="form-check-label text-body-emphasis">
                                                            Armani<span class="fs-xs text-body-secondary ms-1">(18)</span>
                                                        </label>
                                                    </div>
                                                    <div class="form-check mb-0">
                                                        <input type="checkbox" class="form-check-input" id="banana">
                                                        <label for="banana" class="form-check-label text-body-emphasis">
                                                            Banana Republic<span
                                                                class="fs-xs text-body-secondary ms-1">(103)</span>
                                                        </label>
                                                    </div>
                                                    <div class="form-check mb-0">
                                                        <input type="checkbox" class="form-check-input" id="bilabong"
                                                            checked>
                                                        <label for="bilabong" class="form-check-label text-body-emphasis">
                                                            Bilabong<span
                                                                class="fs-xs text-body-secondary ms-1">(27)</span>
                                                        </label>
                                                    </div>
                                                    <div class="form-check mb-0">
                                                        <input type="checkbox" class="form-check-input" id="birkenstock">
                                                        <label for="birkenstock"
                                                            class="form-check-label text-body-emphasis">
                                                            Birkenstock<span
                                                                class="fs-xs text-body-secondary ms-1">(10)</span>
                                                        </label>
                                                    </div>
                                                    <div class="form-check mb-0">
                                                        <input type="checkbox" class="form-check-input" id="klein">
                                                        <label for="klein" class="form-check-label text-body-emphasis">
                                                            Calvin Klein<span
                                                                class="fs-xs text-body-secondary ms-1">(365)</span>
                                                        </label>
                                                    </div>
                                                    <div class="form-check mb-0">
                                                        <input type="checkbox" class="form-check-input" id="columbia">
                                                        <label for="columbia" class="form-check-label text-body-emphasis">
                                                            Columbia<span
                                                                class="fs-xs text-body-secondary ms-1">(508)</span>
                                                        </label>
                                                    </div>
                                                    <div class="form-check mb-0">
                                                        <input type="checkbox" class="form-check-input" id="converse">
                                                        <label for="converse" class="form-check-label text-body-emphasis">
                                                            Converse<span
                                                                class="fs-xs text-body-secondary ms-1">(176)</span>
                                                        </label>
                                                    </div>
                                                    <div class="form-check mb-0">
                                                        <input type="checkbox" class="form-check-input" id="dockers">
                                                        <label for="dockers" class="form-check-label text-body-emphasis">
                                                            Dockers<span class="fs-xs text-body-secondary ms-1">(54)</span>
                                                        </label>
                                                    </div>
                                                    <div class="form-check mb-0">
                                                        <input type="checkbox" class="form-check-input" id="fruit">
                                                        <label for="fruit" class="form-check-label text-body-emphasis">
                                                            Fruit of the Loom<span
                                                                class="fs-xs text-body-secondary ms-1">(739)</span>
                                                        </label>
                                                    </div>
                                                    <div class="form-check mb-0">
                                                        <input type="checkbox" class="form-check-input" id="hanes">
                                                        <label for="hanes" class="form-check-label text-body-emphasis">
                                                            Hanes<span class="fs-xs text-body-secondary ms-1">(92)</span>
                                                        </label>
                                                    </div>
                                                    <div class="form-check mb-0">
                                                        <input type="checkbox" class="form-check-input" id="choo">
                                                        <label for="choo" class="form-check-label text-body-emphasis">
                                                            Jimmy Choo<span
                                                                class="fs-xs text-body-secondary ms-1">(17)</span>
                                                        </label>
                                                    </div>
                                                    <div class="form-check mb-0">
                                                        <input type="checkbox" class="form-check-input" id="levis">
                                                        <label for="levis" class="form-check-label text-body-emphasis">
                                                            Levi's<span class="fs-xs text-body-secondary ms-1">(361)</span>
                                                        </label>
                                                    </div>
                                                    <div class="form-check mb-0">
                                                        <input type="checkbox" class="form-check-input" id="wearhouse">
                                                        <label for="wearhouse"
                                                            class="form-check-label text-body-emphasis">
                                                            Men's Wearhouse<span
                                                                class="fs-xs text-body-secondary ms-1">(75)</span>
                                                        </label>
                                                    </div>
                                                    <div class="form-check mb-0">
                                                        <input type="checkbox" class="form-check-input" id="newbalance">
                                                        <label for="newbalance"
                                                            class="form-check-label text-body-emphasis">
                                                            New Balance<span
                                                                class="fs-xs text-body-secondary ms-1">(218)</span>
                                                        </label>
                                                    </div>
                                                    <div class="form-check mb-0">
                                                        <input type="checkbox" class="form-check-input" id="nike">
                                                        <label for="nike" class="form-check-label text-body-emphasis">
                                                            Nike<span class="fs-xs text-body-secondary ms-1">(810)</span>
                                                        </label>
                                                    </div>
                                                    <div class="form-check mb-0">
                                                        <input type="checkbox" class="form-check-input" id="navy">
                                                        <label for="navy" class="form-check-label text-body-emphasis">
                                                            Old Navy<span
                                                                class="fs-xs text-body-secondary ms-1">(147)</span>
                                                        </label>
                                                    </div>
                                                    <div class="form-check mb-0">
                                                        <input type="checkbox" class="form-check-input" id="puma">
                                                        <label for="puma" class="form-check-label text-body-emphasis">
                                                            Puma<span class="fs-xs text-body-secondary ms-1">(370)</span>
                                                        </label>
                                                    </div>
                                                    <div class="form-check mb-0">
                                                        <input type="checkbox" class="form-check-input" id="skechers">
                                                        <label for="skechers" class="form-check-label text-body-emphasis">
                                                            Skechers<span
                                                                class="fs-xs text-body-secondary ms-1">(209)</span>
                                                        </label>
                                                    </div>
                                                    <div class="form-check mb-0">
                                                        <input type="checkbox" class="form-check-input" id="hilfiger">
                                                        <label for="hilfiger" class="form-check-label text-body-emphasis">
                                                            Tommy Hilfiger<span
                                                                class="fs-xs text-body-secondary ms-1">(487)</span>
                                                        </label>
                                                    </div>
                                                    <div class="form-check mb-0">
                                                        <input type="checkbox" class="form-check-input" id="armour">
                                                        <label for="armour" class="form-check-label text-body-emphasis">
                                                            Under Armour<span
                                                                class="fs-xs text-body-secondary ms-1">(90)</span>
                                                        </label>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div> --}}

                                <!-- Size -->
                                {{-- <div class="accordion-item border-0 pb-1 pb-xl-2">
                                    <h4 class="accordion-header" id="headingSize">
                                        <button type="button" class="accordion-button p-0 pb-3"
                                            data-bs-toggle="collapse" data-bs-target="#size" aria-expanded="true"
                                            aria-controls="size">
                                            Size
                                        </button>
                                    </h4>
                                    <div class="accordion-collapse collapse show" id="size"
                                        aria-labelledby="headingSize">
                                        <div class="accordion-body p-0 pb-4 mb-1 mb-xl-2">
                                            <div class="d-flex flex-wrap gap-2">
                                                <input type="checkbox" class="btn-check" id="size-xxs" checked>
                                                <label for="size-xxs" class="btn btn-sm btn-outline-secondary">XXS</label>
                                                <input type="checkbox" class="btn-check" id="size-xs">
                                                <label for="size-xs" class="btn btn-sm btn-outline-secondary">XS</label>
                                                <input type="checkbox" class="btn-check" id="size-s">
                                                <label for="size-s" class="btn btn-sm btn-outline-secondary">S</label>
                                                <input type="checkbox" class="btn-check" id="size-m">
                                                <label for="size-m" class="btn btn-sm btn-outline-secondary">M</label>
                                                <input type="checkbox" class="btn-check" id="size-l">
                                                <label for="size-l" class="btn btn-sm btn-outline-secondary">L</label>
                                                <input type="checkbox" class="btn-check" id="size-xl">
                                                <label for="size-xl" class="btn btn-sm btn-outline-secondary"><span
                                                        class="mx-n1">XL</span></label>
                                                <input type="checkbox" class="btn-check" id="size-2xl">
                                                <label for="size-2xl" class="btn btn-sm btn-outline-secondary">2XL</label>
                                                <input type="checkbox" class="btn-check" id="size-40">
                                                <label for="size-40" class="btn btn-sm btn-outline-secondary">40</label>
                                                <input type="checkbox" class="btn-check" id="size-42">
                                                <label for="size-42" class="btn btn-sm btn-outline-secondary">42</label>
                                                <input type="checkbox" class="btn-check" id="size-44">
                                                <label for="size-44" class="btn btn-sm btn-outline-secondary">44</label>
                                                <input type="checkbox" class="btn-check" id="size-45">
                                                <label for="size-45" class="btn btn-sm btn-outline-secondary">45</label>
                                                <input type="checkbox" class="btn-check" id="size-46">
                                                <label for="size-46" class="btn btn-sm btn-outline-secondary">46</label>
                                                <input type="checkbox" class="btn-check" id="size-48">
                                                <label for="size-48" class="btn btn-sm btn-outline-secondary">48</label>
                                                <input type="checkbox" class="btn-check" id="size-50">
                                                <label for="size-50" class="btn btn-sm btn-outline-secondary">50</label>
                                                <input type="checkbox" class="btn-check" id="size-52">
                                                <label for="size-52" class="btn btn-sm btn-outline-secondary">52</label>
                                            </div>
                                        </div>
                                    </div>
                                </div> --}}

                                <!-- Color -->
                                {{-- <div class="accordion-item border-0 pb-1 pb-xl-2">
                                    <h4 class="accordion-header" id="headingColor">
                                        <button type="button" class="accordion-button p-0 pb-3"
                                            data-bs-toggle="collapse" data-bs-target="#color" aria-expanded="true"
                                            aria-controls="color">
                                            Color
                                        </button>
                                    </h4>
                                    <div class="accordion-collapse collapse show" id="color"
                                        aria-labelledby="headingColor">
                                        <div class="accordion-body p-0 pb-4 mb-1 mb-xl-2">
                                            <div class="d-flex flex-column gap-2">
                                                <div class="d-flex align-items-center mb-1">
                                                    <input type="checkbox" class="btn-check" id="green">
                                                    <label for="green" class="btn btn-color fs-xl"
                                                        style="color: #8bc4ab"></label>
                                                    <label for="green" class="fs-sm ms-2">Green</label>
                                                </div>
                                                <div class="d-flex align-items-center mb-1">
                                                    <input type="checkbox" class="btn-check" id="red">
                                                    <label for="red" class="btn btn-color fs-xl"
                                                        style="color: #ee7976"></label>
                                                    <label for="red" class="fs-sm ms-2">Coral red</label>
                                                </div>
                                                <div class="d-flex align-items-center mb-1">
                                                    <input type="checkbox" class="btn-check" id="pink">
                                                    <label for="pink" class="btn btn-color fs-xl"
                                                        style="color: #df8fbf"></label>
                                                    <label for="pink" class="fs-sm ms-2">Pink</label>
                                                </div>
                                                <div class="d-flex align-items-center mb-1">
                                                    <input type="checkbox" class="btn-check" id="blue">
                                                    <label for="blue" class="btn btn-color fs-xl"
                                                        style="color: #9acbf1"></label>
                                                    <label for="blue" class="fs-sm ms-2">Sky blue</label>
                                                </div>
                                                <div class="d-flex align-items-center mb-1">
                                                    <input type="checkbox" class="btn-check" id="black">
                                                    <label for="black" class="btn btn-color fs-xl"
                                                        style="color: #364254"></label>
                                                    <label for="black" class="fs-sm ms-2">Black</label>
                                                </div>
                                                <div class="d-flex align-items-center mb-1">
                                                    <input type="checkbox" class="btn-check" id="white">
                                                    <label for="white" class="btn btn-color fs-xl"
                                                        style="color: #e0e5eb"></label>
                                                    <label for="white" class="fs-sm ms-2">White</label>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div> --}}

                                <!-- Status -->
                                <div class="accordion-item border-0">
                                    <h4 class="accordion-header" id="headingStatus">
                                        <button type="button" class="accordion-button p-0 pb-3"
                                            data-bs-toggle="collapse" data-bs-target="#status" aria-expanded="true"
                                            aria-controls="status">
                                            Status
                                        </button>
                                    </h4>
                                    <div class="accordion-collapse collapse show" id="status"
                                        aria-labelledby="headingStatus">
                                        <div class="accordion-body p-0 pb-2 pb-lg-0">
                                            <div class="d-flex flex-column gap-2">
                                                <div class="form-check mb-0">
                                                    <input type="checkbox" class="form-check-input" id="instock">
                                                    <label for="instock" class="form-check-label text-body-emphasis">In
                                                        stock</label>
                                                </div>
                                                <div class="form-check mb-0">
                                                    <input type="checkbox" class="form-check-input" id="sale"
                                                        checked>
                                                    <label for="sale" class="form-check-label text-body-emphasis">%
                                                        Sale</label>
                                                </div>
                                                <div class="form-check mb-0">
                                                    <input type="checkbox" class="form-check-input" id="delivery">
                                                    <label for="delivery" class="form-check-label text-body-emphasis">Free
                                                        delivery</label>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </aside>


                <!-- Product grid -->
                <div class="col-lg-9">

                    <!-- Sorting -->
                    <div class="d-sm-flex align-items-center justify-content-between mt-n2 mb-3 mb-sm-4">
                        <div class="fs-sm text-body-emphasis text-nowrap">Found <span class="fw-semibold">{{ count($products) }}</span>
                            items
                        </div>
                        <div class="d-flex align-items-center text-nowrap">
                            <label class="form-label fw-semibold mb-0 me-2">{{ __('catalog_fashion.sort_by') }}:</label>
                            <div style="width: 190px">
                                <select class="form-select border-0 rounded-0 px-1"
                                    data-select='{
                    "removeItemButton": false,
                    "classNames": {
                      "containerInner": ["form-select", "border-0", "rounded-0", "px-1"]
                    }
                  }'
                                  onchange="window.location.href='{{ route('product.index') }}?sort_by='+this.value+'&{{ http_build_query(request()->except('sort_by')) }}'">
                                    <option value="relevance" {{ request('sort_by') == 'relevance' ? 'selected' : '' }}>{{ __('catalog_fashion.sort_relevance') }}</option>
                                    <option value="popularity" {{ request('sort_by') == 'popularity' ? 'selected' : '' }}>{{ __('catalog_fashion.sort_popularity') }}</option>
                                    <option value="price_low_to_high" {{ request('sort_by') == 'price_low_to_high' ? 'selected' : '' }}>{{ __('catalog_fashion.sort_price_low_to_high') }}</option>
                                    <option value="price_high_to_low" {{ request('sort_by') == 'price_high_to_low' ? 'selected' : '' }}>{{ __('catalog_fashion.sort_price_high_to_low') }}</option>
                                    <option value="newest_arrivals" {{ request('sort_by') == 'newest_arrivals' ? 'selected' : '' }}>{{ __('catalog_fashion.sort_newest_arrivals') }}</option>
                                </select>
                            </div>
                        </div>
                    </div>

                    <div class="row gy-4 gy-md-5 pb-4 pb-md-5">

                        @foreach ($products as $key => $value)
                            <!-- Item -->
                            <div class="col-6 col-md-4 mb-2 mb-sm-3 mb-md-0">
                                <x-home.product-card :product="$value" />
                            </div>
                        @endforeach



                        <!-- Banner -->
                        {{-- <div class="col-12 col-md-8 mb-2 mb-sm-3 mb-md-0">
                            <div
                                class="position-relative bg-body-tertiary text-center rounded-4 p-4 p-sm-5 py-md-4 py-xl-5">
                                <p class="fs-xs text-body-secondary mb-1">Sweatshirts</p>
                                <h2 class="h4 mb-4">Colors for your mood</h2>
                                <div class="swiper user-select-none mb-4"
                                    data-swiper='{
                    "allowTouchMove": false,
                    "loop": true,
                    "effect": "fade",
                    "autoplay": {
                      "delay": 1500,
                      "disableOnInteraction": false
                    }
                  }'
                                    style="max-width: 342px">
                                    <div class="swiper-wrapper">
                                        <div class="swiper-slide">
                                            <div class="ratio" style="--cz-aspect-ratio: calc(230 / 342 * 100%)">
                                                <img src="/img/shop/fashion/banner01.png" alt="Image">
                                            </div>
                                        </div>
                                        <div class="swiper-slide">
                                            <div class="ratio" style="--cz-aspect-ratio: calc(230 / 342 * 100%)">
                                                <img src="/img/shop/fashion/banner02.png" alt="Image">
                                            </div>
                                        </div>
                                        <div class="swiper-slide">
                                            <div class="ratio" style="--cz-aspect-ratio: calc(230 / 342 * 100%)">
                                                <img src="/img/shop/fashion/banner03.png" alt="Image">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <a class="btn btn-sm btn-dark stretched-link"
                                    href="{{ route('second', ['shop', 'product-fashion']) }}">Shop
                                    now</a>
                            </div>
                        </div> --}}

                        
                    </div>

                    <!-- Show more button -->
                    <a href="{{ route('product.index', array_merge(request()->except('page'), ['page' => $page + 1])) }}" type="button" class="btn btn-lg btn-outline-secondary w-100">
                        Show more
                        <i class="ci-chevron-down fs-xl ms-2 me-n1"></i>
                    </a>
                </div>
            </div>
        </section>


        <!-- Instagram feed -->
        <section class="container pt-5 mt-2 mt-sm-3 mt-lg-4 mt-xl-5">
            <div class="text-center pb-2 pb-md-3">
                <h2 class="pb-2 mb-1">
                    <span class="animate-underline">
                        <a class="animate-target text-dark-emphasis text-decoration-none" href="#!">#cartzilla</a>
                    </span>
                </h2>
                <p>Find more inspiration on our Instagram</p>
            </div>
            <div class="overflow-x-auto pb-3 mb-n3" data-simplebar>
                <div class="d-flex gap-2 gap-md-3 gap-lg-4" style="min-width: 700px">
                    <a class="hover-effect-scale hover-effect-opacity position-relative w-100 overflow-hidden"
                        href="#!">
                        <span
                            class="hover-effect-target position-absolute top-0 start-0 w-100 h-100 bg-black bg-opacity-25 opacity-0 z-1"></span>
                        <i
                            class="ci-instagram hover-effect-target fs-4 text-white position-absolute top-50 start-50 translate-middle opacity-0 z-2"></i>
                        <div class="hover-effect-target ratio ratio-1x1">
                            <img src="/img/instagram/01.jpg" alt="Instagram image">
                        </div>
                    </a>
                    <a class="hover-effect-scale hover-effect-opacity position-relative w-100 overflow-hidden"
                        href="#!">
                        <span
                            class="hover-effect-target position-absolute top-0 start-0 w-100 h-100 bg-black bg-opacity-25 opacity-0 z-1"></span>
                        <i
                            class="ci-instagram hover-effect-target fs-4 text-white position-absolute top-50 start-50 translate-middle opacity-0 z-2"></i>
                        <div class="hover-effect-target ratio ratio-1x1">
                            <img src="/img/instagram/02.jpg" alt="Instagram image">
                        </div>
                    </a>
                    <a class="hover-effect-scale hover-effect-opacity position-relative w-100 overflow-hidden"
                        href="#!">
                        <span
                            class="hover-effect-target position-absolute top-0 start-0 w-100 h-100 bg-black bg-opacity-25 opacity-0 z-1"></span>
                        <i
                            class="ci-instagram hover-effect-target fs-4 text-white position-absolute top-50 start-50 translate-middle opacity-0 z-2"></i>
                        <div class="hover-effect-target ratio ratio-1x1">
                            <img src="/img/instagram/03.jpg" alt="Instagram image">
                        </div>
                    </a>
                    <a class="hover-effect-scale hover-effect-opacity position-relative w-100 overflow-hidden"
                        href="#!">
                        <span
                            class="hover-effect-target position-absolute top-0 start-0 w-100 h-100 bg-black bg-opacity-25 opacity-0 z-1"></span>
                        <i
                            class="ci-instagram hover-effect-target fs-4 text-white position-absolute top-50 start-50 translate-middle opacity-0 z-2"></i>
                        <div class="hover-effect-target ratio ratio-1x1">
                            <img src="/img/instagram/04.jpg" alt="Instagram image">
                        </div>
                    </a>
                    <a class="hover-effect-scale hover-effect-opacity position-relative w-100 overflow-hidden"
                        href="#!">
                        <span
                            class="hover-effect-target position-absolute top-0 start-0 w-100 h-100 bg-black bg-opacity-25 opacity-0 z-1"></span>
                        <i
                            class="ci-instagram hover-effect-target fs-4 text-white position-absolute top-50 start-50 translate-middle opacity-0 z-2"></i>
                        <div class="hover-effect-target ratio ratio-1x1">
                            <img src="/img/instagram/05.jpg" alt="Instagram image">
                        </div>
                    </a>
                </div>
            </div>
        </section>
    </main>

    @include('layouts.partials/footer2')

    <button type="button"
        class="fixed-bottom z-sticky w-100 btn btn-lg btn-dark border-0 border-top border-light border-opacity-10 rounded-0 pb-4 d-lg-none"
        data-bs-toggle="offcanvas" data-bs-target="#filterSidebar" aria-controls="filterSidebar" data-bs-theme="light">
        <i class="ci-filter fs-base me-2"></i>
        Filters
    </button>
@endsection

@section('scripts')
@endsection
