{% doc %}
Renders a product card.
@param {product} [card_product] - The product to display. When blank, a placeholder card is rendered.
@param {string} [media_aspect_ratio] - The product image aspect ratio. Allowed values are `adapt`, `portrait`, and `square`. Defaults to `square`.
@param {string} [image_shape] - The product image mask. Allowed values are `default`, `arch`, `blob`, `chevronleft`, `chevronright`, `diamond`, `parallelogram`, and `round`. Defaults to `default`.
@param {boolean} [show_secondary_image] - Whether to show the second product image on hover. Defaults to `false`.
@param {boolean} [show_vendor] - Whether to show the product vendor. Defaults to `false`.
@param {boolean} [show_rating] - Whether to show the product rating. Defaults to `false`.
@param {boolean} [extend_height] - Whether the card fills its available container space. Defaults to `false`.
@param {boolean} [lazy_load] - Whether to lazy-load product images. Defaults to `true`.
@param {boolean} [skip_styles] - Whether to omit the component styles. Defaults to `false`.
@param {string} [quick_add] - The quick-add behavior. Allowed values are `none`, `standard`, and `bulk`. Defaults to `none`.
@param {string} [section_id] - The section ID used to namespace card and quick-add element IDs.
@param {boolean} [horizontal_class] - Whether to add the `card--horizontal` class. Defaults to `false`.
@param {boolean} [horizontal_quick_add] - Whether to use horizontal quick-add styles. Defaults to `false`.
@param {string} [placeholder_image] - The placeholder SVG name. Defaults to `product-apparel-2`.
@param {string} [product_view_context] - The analytics context for the product-card view event, such as `collection`, `search`, or `recommendation`.
@param {block} [block] - The current section block, used for optional card description content.
@param {object} [section] - The current section context, supplied implicitly when rendered from a section and used by quick-add controls.
@example
{% render 'card-product', card_product: product, media_aspect_ratio: 'adapt', show_secondary_image: true, section_id: section.id, quick_add: 'standard', product_view_context: 'collection' %}
{% enddoc %}
{%- unless skip_styles -%}
{{ 'component-rating.css' | asset_url | stylesheet_tag }}
{{ 'component-volume-pricing.css' | asset_url | stylesheet_tag }}
{{ 'component-price.css' | asset_url | stylesheet_tag }}
{{ 'quick-order-list.css' | asset_url | stylesheet_tag }}
{{ 'quantity-popover.css' | asset_url | stylesheet_tag }}
{%- endunless -%}
{%- if card_product and card_product != empty -%}
{%- liquid
assign ratio = 1
if card_product.featured_media and media_aspect_ratio == 'portrait'
assign ratio = 0.8
elsif card_product.featured_media and media_aspect_ratio == 'adapt'
assign ratio = card_product.featured_media.aspect_ratio
endif
if ratio == 0 or ratio == null
assign ratio = 1
endif
-%}
{% comment %}theme-check-enable ImgLazyLoading{% endcomment %}
{%- if card_product.media[1] != null and show_secondary_image -%}
{%- endif -%}
{{ card_product.title | escape }}
{% comment %}theme-check-enable ImgLazyLoading{% endcomment %}
{{ card_product.title | escape }}
{% render 'price', product: card_product, price_class: '', show_compare_at_price: true %}
{%- if card_product.quantity_price_breaks_configured? -%}
{{ card_product.title | escape }}
{% render 'price', product: card_product, price_class: '', show_compare_at_price: true %}
{%- if card_product.quantity_price_breaks_configured? -%}