<template>
  <div class="product-list-skeleton px-2 pt-3">
    <div class="row g-3 justify-content-center">
        <div v-for="i in parseInt(count)" :key="i" class="col-6 col-sm-4 col-md-3">
            <div class="glass-card rounded-xl overflow-hidden mb-3 border border-light-5 text-start">
                <SkeletonBlock width="100%" height="140px" borderRadius="0" :noShimmer="false" />
                <div class="p-3">
                    <SkeletonBlock width="85%" height="14px" margin="0 0 8px 0" borderRadius="3px" />
                    <SkeletonBlock width="60%" height="10px" margin="0 0 16px 0" borderRadius="2px" />
                    <div class="d-flex justify-content-between align-items-center">
                        <SkeletonBlock width="50px" height="12px" borderRadius="3px" />
                        <SkeletonBlock width="36px" height="36px" borderRadius="12px" />
                    </div>
                </div>
            </div>
        </div>
    </div>
  </div>
</template>

<script setup>
import SkeletonBlock from './SkeletonBlock.vue';

defineProps({
    count: { type: [Number, String], default: 8 }
})
</script>

<style scoped>
.glass-card {
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.rounded-xl {
    border-radius: 20px;
}
.border-light-5 {
    border-color: rgba(0, 0, 0, 0.03) !important;
}
:global(.dark-mode) .glass-card {
    background: #1f2228 !important;
}
</style>
