${escapeHtml(product.name)}
${escapeHtml(product.short || '')}
/* ============================================================ PRODUCT ITEM VIEWS — HTML con Tailwind, sin CSS custom ============================================================ */ /* ── TIENDA ─────────────────────────────────────────────── */ function renderStoreProductCard(product, options = {}) { const { index = 0, activeIndex = -1, quantity = 1, onOpen = 'openStoreProduct', onQtyChange = 'changeStoreQty', onAdd = 'addToCart' } = options; const discount = product.badge ? calculateDiscount(product.price, product.sale) : 0; const outOfStock = Number(product.stock || 0) <= 0; const isActive = index === activeIndex; const articleCls = [ 'group flex flex-col bg-white rounded-2xl border overflow-hidden', 'transition-all duration-200 select-none', outOfStock ? 'opacity-60 cursor-not-allowed border-gray-200 grayscale' : 'cursor-pointer border-gray-200 hover:-translate-y-1 hover:shadow-xl hover:border-blue-300', isActive ? 'ring-2 ring-blue-500 border-blue-400' : '' ].join(' '); const badge = product.badge ? ` ${discount}% OFF ` : ''; const stockOverlay = outOfStock ? `
${escapeHtml(product.short || '')}
${escapeHtml(product.name)}
SKU: ${escapeHtml(product.sku || '—')}
Stock: ${product.stock}
${fmt(displayPrice)}