/**
 * Canonical product-card presentation.
 *
 * All storefront surfaces (Home, shop, search, related products and Astra
 * compatibility mode) finish their card styling here. Route styles may define
 * surrounding page layout, but must not redefine the visual card component.
 */

:root {
	--vs-card-surface: #fff;
	--vs-card-border: #dce7ee;
	--vs-card-border-hover: #91c9b9;
	--vs-card-title: #0d8a6f;
	--vs-card-text: #1e293b;
	--vs-card-muted: #647786;
	--vs-card-accent: #0d8a6f;
	--vs-card-accent-hover: #0a725e;
	--vs-card-sale: #d9424e;
	--vs-card-star: #d99016;
	--vs-card-radius: 14px;
	--vs-card-gutter: 14px;
}

/* Grid: 2 phone, 3 tablet, 5 desktop. */
body.home .products-grid,
body.home .products-grid-2,
body.home .vs-home-products-grid,
body.woocommerce-shop .wc-block-product-template,
body.post-type-archive-product .wc-block-product-template,
body.tax-product_cat .wc-block-product-template,
body.tax-product_tag .wc-block-product-template,
body.single-product .wp-block-woocommerce-product-template,
body.woocommerce ul.products,
body.woocommerce-page ul.products {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 12px !important;
	align-items: stretch;
	grid-auto-rows: 1fr;
}

body.home .products-grid-2 {
	margin-top: 12px;
}

body.home .products-section {
	padding-block: 48px;
}

body.home .products-section .section-desc {
	margin-bottom: 28px;
}

body.home .products-all {
	margin-top: 26px !important;
}

/* Treat both legacy Home product wrappers as one responsive catalogue grid. */
body.home #cia-home .inner:has(> .products-grid) {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

body.home #cia-home .inner:has(> .products-grid) > .section-label,
body.home #cia-home .inner:has(> .products-grid) > .section-title,
body.home #cia-home .inner:has(> .products-grid) > div:last-child {
	grid-column: 1 / -1;
}

body.home #cia-home .inner:has(> .products-grid) > .products-grid,
body.home #cia-home .inner:has(> .products-grid) > .products-grid-2 {
	display: contents !important;
	margin: 0 !important;
}

/* Card roots. */
body.home .product-card-link,
body.home .product-card,
body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .wc-block-product,
body.single-product .wp-block-woocommerce-product-template > .wc-block-product,
body.search .vs-global-search__grid > .wp-block-post.product,
body.search .vs-search-card--product,
body.woocommerce ul.products > li.product,
body.woocommerce-page ul.products > li.product,
.wc-block-grid__product {
	box-sizing: border-box;
	min-width: 0;
	max-width: 100%;
	height: 100%;
}

body.home .product-card-link {
	display: flex;
	color: inherit;
	text-decoration: none;
}

body.home .product-card,
body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .wc-block-product,
body.single-product .wp-block-woocommerce-product-template > .wc-block-product,
body.search .vs-global-search__grid > .wp-block-post.product,
body.search .vs-search-card--product,
body.woocommerce ul.products > li.product,
body.woocommerce-page ul.products > li.product,
.wc-block-grid__product {
	position: relative;
	display: flex !important;
	overflow: hidden;
	flex-direction: column;
	border: 1px solid var(--vs-card-border) !important;
	border-radius: var(--vs-card-radius) !important;
	background: var(--vs-card-surface) !important;
	box-shadow: none !important;
	font-family: var(--wp--preset--font-family--body-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif) !important;
	text-align: center !important;
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

body.home .product-card:hover,
body.home .product-card:focus-within,
body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .wc-block-product:hover,
body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .wc-block-product:focus-within,
body.single-product .wp-block-woocommerce-product-template > .wc-block-product:hover,
body.single-product .wp-block-woocommerce-product-template > .wc-block-product:focus-within,
body.search .vs-global-search__grid > .wp-block-post.product:hover,
body.search .vs-global-search__grid > .wp-block-post.product:focus-within,
body.search .vs-search-card--product:hover,
body.search .vs-search-card--product:focus-within,
body.woocommerce ul.products > li.product:hover,
body.woocommerce ul.products > li.product:focus-within,
body.woocommerce-page ul.products > li.product:hover,
body.woocommerce-page ul.products > li.product:focus-within,
.wc-block-grid__product:hover,
.wc-block-grid__product:focus-within {
	border-color: var(--vs-card-border-hover) !important;
	box-shadow: 0 10px 26px rgba(13, 138, 111, .14) !important;
	transform: translateY(-2px);
}

/* White media area; always show the complete pack shot. */
body.home .product-card .img-wrap,
body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .wc-block-product .wp-block-woocommerce-product-image,
body.single-product .wp-block-woocommerce-product-template .wp-block-woocommerce-product-image,
body.search .product .vs-global-search-card__image,
body.search .vs-search-card--product .vs-search-card__media,
body.woocommerce ul.products > li.product .astra-shop-thumbnail-wrap,
body.woocommerce-page ul.products > li.product .astra-shop-thumbnail-wrap,
.wc-block-grid__product-image {
	position: relative;
	display: block;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	margin: 0 !important;
	padding: 14px;
	overflow: hidden;
	flex: 0 0 auto;
	aspect-ratio: 1 / 1;
	background: #fff !important;
}

body.home .product-card .img-wrap > img,
body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .wc-block-product .wp-block-woocommerce-product-image img,
body.single-product .wp-block-woocommerce-product-template .wp-block-woocommerce-product-image img,
body.search .product .vs-global-search-card__image img,
body.search .vs-search-card--product .vs-search-card__media img,
body.woocommerce ul.products > li.product .astra-shop-thumbnail-wrap img,
body.woocommerce-page ul.products > li.product .astra-shop-thumbnail-wrap img,
.wc-block-grid__product-image img {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	height: 100% !important;
	max-height: 100% !important;
	margin: 0 !important;
	object-fit: contain !important;
	object-position: center !important;
	transform: none !important;
}

/* Content containers. */
body.home .product-card .card-body,
body.search .product .vs-global-search-card__body,
body.search .vs-search-card--product .vs-search-card__body,
body.woocommerce ul.products > li.product .astra-shop-summary-wrap,
body.woocommerce-page ul.products > li.product .astra-shop-summary-wrap {
	display: flex !important;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	height: 100%;
	padding: 4px var(--vs-card-gutter) var(--vs-card-gutter) !important;
	flex: 1 1 auto;
	flex-direction: column;
	background: transparent !important;
	text-align: center;
}

body.home .product-card .brand,
body.search .vs-search-card--product .vs-search-card__type {
	display: none !important;
}

/* Product name: centered and capped at two lines. */
body.home .product-card h3,
body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .wc-block-product .wp-block-post-title,
body.single-product .wp-block-woocommerce-product-template .wp-block-post-title,
body.search .product .vs-global-search-card__title,
body.search .vs-search-card--product .vs-search-card__title,
body.woocommerce ul.products > li.product .woocommerce-loop-product__title,
body.woocommerce-page ul.products > li.product .woocommerce-loop-product__title,
.wc-block-grid__product-title {
	display: -webkit-box !important;
	box-sizing: border-box;
	height: 2.7em;
	min-height: 2.7em !important;
	max-height: 2.7em;
	margin: 0 0 9px !important;
	padding: 0 !important;
	overflow: hidden;
	color: var(--vs-card-title) !important;
	font-family: var(--wp--preset--font-family--body-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif) !important;
	font-size: clamp(13px, 1.15vw, 16px) !important;
	font-weight: 700 !important;
	line-height: 1.35 !important;
	text-align: center !important;
	text-wrap: balance;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .wc-block-product > .wp-block-post-title,
body.single-product .wp-block-woocommerce-product-template > .wc-block-product > .wp-block-post-title,
.wc-block-grid__product-title {
	margin-inline: var(--vs-card-gutter) !important;
}

body.home .product-card h3 a,
body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .wc-block-product .wp-block-post-title a,
body.single-product .wp-block-woocommerce-product-template .wp-block-post-title a,
body.search .product .vs-global-search-card__title a,
body.search .vs-search-card--product .vs-search-card__title a,
body.woocommerce ul.products > li.product .woocommerce-loop-product__title,
body.woocommerce-page ul.products > li.product .woocommerce-loop-product__title,
.wc-block-grid__product-title a {
	color: inherit !important;
	font: inherit !important;
	text-decoration: none !important;
}

/* Price hierarchy: old price first, current price clearly dominant. */
body.home .price-row,
body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .wc-block-product .wp-block-woocommerce-product-price,
body.single-product .wp-block-woocommerce-product-template .wp-block-woocommerce-product-price,
body.search .product .vs-global-search-card__price,
body.search .vs-search-card--product .vs-search-card__price,
body.woocommerce ul.products > li.product .price,
body.woocommerce-page ul.products > li.product .price,
.wc-block-grid__product-price {
	display: flex !important;
	box-sizing: border-box;
	width: 100%;
	min-height: 42px;
	margin: 0 0 5px !important;
	padding: 0 !important;
	align-items: center !important;
	flex-direction: column !important;
	justify-content: center !important;
	gap: 2px !important;
	color: var(--vs-card-text) !important;
	font-family: var(--wp--preset--font-family--body-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif) !important;
	font-size: clamp(17px, 1.45vw, 20px) !important;
	font-weight: 800 !important;
	line-height: 1.15 !important;
	text-align: center !important;
}

body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .wc-block-product > .wp-block-woocommerce-product-price,
body.single-product .wp-block-woocommerce-product-template > .wc-block-product > .wp-block-woocommerce-product-price {
	width: calc(100% - (2 * var(--vs-card-gutter))) !important;
	margin-right: var(--vs-card-gutter) !important;
	margin-left: var(--vs-card-gutter) !important;
}

body .wc-block-product .wp-block-woocommerce-product-price > .wc-block-grid__product-price {
	width: 100% !important;
	margin: 0 !important;
}

body.home .price-row .price-old {
	order: -1;
}

body.home .price-row del,
body.home .price-row .price-old,
body .wc-block-product .wp-block-woocommerce-product-price del,
body.search .product .vs-global-search-card__price del,
body.search .vs-search-card--product .vs-search-card__price del,
body.woocommerce ul.products > li.product .price del,
body.woocommerce-page ul.products > li.product .price del,
.wc-block-grid__product-price del {
	position: relative;
	display: inline-block !important;
	margin: 0 !important;
	color: var(--vs-card-muted) !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	line-height: 1.15 !important;
	text-decoration: none !important;
}

body.home .price-row del::after,
body.home .price-row .price-old::after,
body .wc-block-product .wp-block-woocommerce-product-price del::after,
body.search .product .vs-global-search-card__price del::after,
body.search .vs-search-card--product .vs-search-card__price del::after,
body.woocommerce ul.products > li.product .price del::after,
body.woocommerce-page ul.products > li.product .price del::after,
.wc-block-grid__product-price del::after {
	position: absolute;
	top: 50%;
	right: -1px;
	left: -1px;
	height: 1.25px;
	background: currentColor;
	content: '';
	pointer-events: none;
	transform: translateY(-50%);
}

body .wc-block-product .wp-block-woocommerce-product-price del *,
body.search .product .vs-global-search-card__price del *,
body.search .vs-search-card--product .vs-search-card__price del *,
body.woocommerce ul.products > li.product .price del *,
body.woocommerce-page ul.products > li.product .price del *,
.wc-block-grid__product-price del * {
	color: inherit !important;
	font: inherit !important;
	text-decoration: none !important;
}

body .wc-block-product .wp-block-woocommerce-product-price del .woocommerce-Price-amount::after,
body.search .product .vs-global-search-card__price del .woocommerce-Price-amount::after,
body.search .vs-search-card--product .vs-search-card__price del .woocommerce-Price-amount::after {
	display: none !important;
	content: none !important;
}

body.home .price-row ins,
body.home .price-row .price-now,
body .wc-block-product .wp-block-woocommerce-product-price ins,
body.search .product .vs-global-search-card__price ins,
body.search .vs-search-card--product .vs-search-card__price ins,
body.woocommerce ul.products > li.product .price ins,
body.woocommerce-page ul.products > li.product .price ins,
.wc-block-grid__product-price ins {
	display: inline-block !important;
	margin: 0 !important;
	color: var(--vs-card-text) !important;
	font-size: clamp(17px, 1.45vw, 20px) !important;
	font-weight: 800 !important;
	line-height: 1.15 !important;
	text-decoration: none !important;
}

body .wc-block-product .wp-block-woocommerce-product-price .woocommerce-Price-amount,
body.search .product .vs-global-search-card__price .woocommerce-Price-amount,
body.search .vs-search-card--product .vs-search-card__price .woocommerce-Price-amount,
body.woocommerce ul.products > li.product .price .woocommerce-Price-amount,
body.woocommerce-page ul.products > li.product .price .woocommerce-Price-amount {
	color: inherit !important;
	font: inherit !important;
}

/* Woo price HTML includes accessible helper spans; keep them available to
 * screen readers without allowing a missing theme utility to expose them. */
body.home .product-card .screen-reader-text,
body .wc-block-product .screen-reader-text,
body.search .product .screen-reader-text,
body.search .vs-search-card--product .screen-reader-text,
body.woocommerce ul.products > li.product .screen-reader-text,
body.woocommerce-page ul.products > li.product .screen-reader-text,
.wc-block-grid__product .screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	border: 0 !important;
	white-space: nowrap !important;
}

/* Reviews are deliberately compact and sit below the price. */
body.home .product-card .stars-row {
	display: flex !important;
	box-sizing: border-box;
	width: 100%;
	min-height: 18px;
	margin: 0 0 12px !important;
	padding: 0 !important;
	align-items: center;
	justify-content: center !important;
	gap: 6px;
	text-align: center !important;
}

body.home .product-card .stars-row .stars,
body.home .product-card .stars-row .count {
	text-align: center !important;
}

body.home .vs-card-rating,
body .wc-block-product > .vs-card-rating,
body.search .product .vs-card-rating,
body .wc-block-product .wp-block-woocommerce-product-rating,
body .wc-block-product .wc-block-components-product-rating,
body.search .product .star-rating,
body.search .vs-search-card--product .star-rating,
body.woocommerce ul.products > li.product .star-rating,
body.woocommerce-page ul.products > li.product .star-rating,
.wc-block-grid__product-rating {
	order: 4;
	min-height: 18px;
	margin: 0 0 12px !important;
	color: var(--vs-card-star) !important;
	font-size: 12px !important;
	line-height: 1 !important;
	text-align: center !important;
}

body.home .vs-card-rating {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

body .wc-block-product > .vs-card-rating,
body.search .product .vs-card-rating {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

body.home .vs-card-rating.is-empty,
body .wc-block-product > .vs-card-rating.is-empty,
body.search .product .vs-card-rating.is-empty {
	visibility: hidden;
}

body.home .vs-card-rating__stars,
body .wc-block-product > .vs-card-rating__stars,
body.search .product .vs-card-rating__stars,
body.search .vs-search-card--product .vs-card-rating__stars {
	display: inline-block;
	color: #d7dee7;
	background: linear-gradient(
		90deg,
		var(--vs-card-star) 0,
		var(--vs-card-star) var(--vs-rating-percent, 100%),
		#d7dee7 var(--vs-rating-percent, 100%),
		#d7dee7 100%
	);
	-webkit-background-clip: text;
	background-clip: text;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1px;
	line-height: 1;
	-webkit-text-fill-color: transparent;
	white-space: nowrap;
}

body.home .vs-card-rating__count,
body .wc-block-product > .vs-card-rating__count,
body.search .product .vs-card-rating__count {
	color: var(--vs-card-muted);
	font-size: 11px;
	font-weight: 600;
	white-space: nowrap;
}

/* Keep native Woo/Astra ratings semantic while never exposing their text span. */
body.search .product .star-rating,
body.search .vs-search-card--product .star-rating,
body.woocommerce ul.products > li.product .star-rating,
body.woocommerce-page ul.products > li.product .star-rating,
.wc-block-grid__product-rating .star-rating {
	position: relative !important;
	display: inline-block !important;
	width: 5.4em !important;
	height: 1em !important;
	margin-right: auto !important;
	margin-left: auto !important;
	overflow: hidden !important;
	color: transparent !important;
	font-family: Arial, sans-serif !important;
	font-size: 12px !important;
	line-height: 1 !important;
	letter-spacing: 1px;
	white-space: nowrap !important;
}

body.search .product .star-rating::before,
body.search .vs-search-card--product .star-rating::before,
body.woocommerce ul.products > li.product .star-rating::before,
body.woocommerce-page ul.products > li.product .star-rating::before,
.wc-block-grid__product-rating .star-rating::before {
	content: '☆☆☆☆☆' !important;
	display: block;
	color: #d2dce3 !important;
}

body.search .product .star-rating > span,
body.search .vs-search-card--product .star-rating > span,
body.woocommerce ul.products > li.product .star-rating > span,
body.woocommerce-page ul.products > li.product .star-rating > span,
.wc-block-grid__product-rating .star-rating > span {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	display: block !important;
	height: 1em !important;
	overflow: hidden !important;
	color: transparent !important;
	font-size: 0 !important;
	line-height: 1 !important;
	white-space: nowrap !important;
}

body.search .product .star-rating > span::before,
body.search .vs-search-card--product .star-rating > span::before,
body.woocommerce ul.products > li.product .star-rating > span::before,
body.woocommerce-page ul.products > li.product .star-rating > span::before,
.wc-block-grid__product-rating .star-rating > span::before {
	content: '★★★★★' !important;
	display: block;
	color: var(--vs-card-star) !important;
	font-size: 12px !important;
	line-height: 1 !important;
	letter-spacing: 1px;
}

body .wc-block-product > .vs-card-rating,
body.search .product .vs-card-rating,
body .wc-block-product > .wp-block-woocommerce-product-rating,
body .wc-block-product > .wc-block-components-product-rating,
.wc-block-grid__product-rating {
	margin-right: var(--vs-card-gutter) !important;
	margin-left: var(--vs-card-gutter) !important;
}

body.search .vs-search-card--product .star-rating {
	order: 4;
}

body.search .vs-search-card--product .vs-card-rating {
	display: flex;
	order: 4;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

body.search .vs-search-card--product .vs-search-card__price {
	order: 3;
}

body.search .vs-search-card--product .vs-search-card__button {
	order: 5;
	margin-top: auto !important;
}

/* Compact discount label, not a floating bubble. */
body.home .product-card .badge,
body.home .product-card .vs-catalog-discount-badge,
body .wc-block-product .vs-catalog-discount-badge,
body.search .product .vs-catalog-discount-badge,
body.search .vs-search-card--product .vs-search-card__sale,
body.woocommerce ul.products > li.product .onsale,
body.woocommerce-page ul.products > li.product .onsale,
.wc-block-grid__product-onsale {
	position: absolute !important;
	top: 10px !important;
	right: 10px !important;
	left: auto !important;
	z-index: 4;
	display: inline-flex !important;
	box-sizing: border-box;
	width: auto !important;
	min-width: 0 !important;
	min-height: 27px !important;
	margin: 0 !important;
	padding: 6px 8px !important;
	align-items: center;
	justify-content: center;
	border: 0 !important;
	border-radius: 7px !important;
	background: var(--vs-card-sale) !important;
	box-shadow: 0 4px 10px rgba(110, 27, 34, .16) !important;
	color: #fff !important;
	font-family: var(--wp--preset--font-family--body-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif) !important;
	font-size: 11px !important;
	font-weight: 800 !important;
	line-height: 1 !important;
	letter-spacing: .01em !important;
	pointer-events: none;
	white-space: nowrap;
}

/* CTA: inset from the card edges with a calmer, modern shape. */
body.home .product-card .wp-block-woocommerce-product-button,
body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .wc-block-product .wp-block-woocommerce-product-button,
body.single-product .wp-block-woocommerce-product-template .wp-block-woocommerce-product-button,
body.search .product .vs-global-search-card__product-button,
.wc-block-grid__product-add-to-cart {
	display: block;
	box-sizing: border-box;
	width: auto !important;
	margin: auto var(--vs-card-gutter) var(--vs-card-gutter) !important;
	padding: 0 !important;
	order: 5;
}

body.home .product-card .wp-block-woocommerce-product-button {
	width: 100% !important;
	margin: auto 0 0 !important;
}

body.home .btn-add,
body .wc-block-product .wp-block-woocommerce-product-button .wc-block-components-product-button__button,
body.search .product .vs-global-search-card__product-button .wc-block-components-product-button__button,
body.search .vs-search-card--product .vs-search-card__button,
body.woocommerce ul.products > li.product .button,
body.woocommerce-page ul.products > li.product .button,
.wc-block-grid__product-add-to-cart .wp-block-button__link {
	display: inline-flex !important;
	box-sizing: border-box;
	width: 100% !important;
	min-width: 0 !important;
	min-height: 42px !important;
	margin: 0 !important;
	padding: 9px 10px !important;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--vs-card-accent) !important;
	border-radius: 9px !important;
	background: var(--vs-card-accent) !important;
	box-shadow: none !important;
	color: #fff !important;
	font-family: var(--wp--preset--font-family--body-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif) !important;
	font-size: clamp(11px, 1vw, 13px) !important;
	font-weight: 750 !important;
	line-height: 1.15 !important;
	text-align: center;
	text-decoration: none !important;
	white-space: nowrap !important;
	transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

body.home .btn-add:hover,
body.home .product-card-link:hover .btn-add,
body .wc-block-product .wp-block-woocommerce-product-button .wc-block-components-product-button__button:hover,
body .wc-block-product .wp-block-woocommerce-product-button .wc-block-components-product-button__button:focus-visible,
body.search .vs-search-card--product .vs-search-card__button:hover,
body.search .vs-search-card--product .vs-search-card__button:focus-visible,
body.woocommerce ul.products > li.product .button:hover,
body.woocommerce ul.products > li.product .button:focus-visible,
body.woocommerce-page ul.products > li.product .button:hover,
body.woocommerce-page ul.products > li.product .button:focus-visible {
	border-color: var(--vs-card-accent-hover) !important;
	background: var(--vs-card-accent-hover) !important;
	color: #fff !important;
}

body .wc-block-product .added_to_cart,
body.search .product .added_to_cart {
	display: none !important;
}

/* Classic Woo/Astra content order. */
body.woocommerce ul.products > li.product .astra-shop-summary-wrap > .price,
body.woocommerce-page ul.products > li.product .astra-shop-summary-wrap > .price {
	order: 3;
}

body.woocommerce ul.products > li.product .astra-shop-summary-wrap > .star-rating,
body.woocommerce-page ul.products > li.product .astra-shop-summary-wrap > .star-rating {
	order: 4;
}

body.woocommerce ul.products > li.product .astra-shop-summary-wrap > .button,
body.woocommerce-page ul.products > li.product .astra-shop-summary-wrap > .button {
	order: 5;
	margin-top: auto !important;
}

/*
 * Canonical unavailable-product CTA.
 * This is intentionally route-independent so Home, Prodotti, search results,
 * related products and Astra loops all render the same stock state.
 */
html body .vs-product-button-disabled,
html body .vs-product-button-disabled:hover,
html body .vs-product-button-disabled:focus,
html body.home .product-card .btn-add.vs-product-button-disabled,
html body.home .product-card-link:hover .product-card .btn-add.vs-product-button-disabled,
html body.home .product-card.outofstock .btn-add,
html body.home .product-card-link:hover .product-card.outofstock .btn-add,
html body .wc-block-product.outofstock .wp-block-woocommerce-product-button .wc-block-components-product-button__button,
html body .wc-block-product.outofstock .wp-block-woocommerce-product-button .wc-block-components-product-button__button:hover,
html body .wc-block-product.outofstock .wp-block-woocommerce-product-button .wc-block-components-product-button__button:focus,
html body.woocommerce ul.products > li.product.outofstock .button,
html body.woocommerce ul.products > li.product.outofstock .button:hover,
html body.woocommerce ul.products > li.product.outofstock .button:focus,
html body.woocommerce-page ul.products > li.product.outofstock .button,
html body.woocommerce-page ul.products > li.product.outofstock .button:hover,
html body.woocommerce-page ul.products > li.product.outofstock .button:focus {
	border: 1.5px solid #d3e0e7 !important;
	background: #eaf1f5 !important;
	box-shadow: none !important;
	color: #738692 !important;
	cursor: not-allowed;
	font-weight: 750 !important;
	letter-spacing: 0.01em;
	opacity: 1 !important;
	pointer-events: none;
	transform: none !important;
}

/* WooCommerce renders the single-product stock state as a plain paragraph.
 * Present it as the same full-width unavailable CTA used by product cards. */
html body.single-product .wp-block-woocommerce-add-to-cart-form p.stock.out-of-stock,
html body.single-product .wc-block-add-to-cart-form p.stock.out-of-stock,
html body.single-product form.cart p.stock.out-of-stock,
html body.single-product .summary p.stock.out-of-stock {
	display: flex !important;
	box-sizing: border-box;
	width: 100% !important;
	min-height: 50px;
	margin: 0 !important;
	padding: 10px 14px !important;
	align-items: center;
	justify-content: center;
	border: 1.5px solid #d3e0e7 !important;
	border-radius: 12px;
	background: #eaf1f5 !important;
	box-shadow: none !important;
	color: #738692 !important;
	font-family: var(--wp--preset--font-family--body-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif) !important;
	font-size: 15px !important;
	font-weight: 750 !important;
	letter-spacing: 0.01em;
	line-height: 1.2 !important;
	text-align: center;
}

@media (min-width: 768px) {
	body.home #cia-home .inner:has(> .products-grid) {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 14px;
	}

	body.home .products-grid,
	body.home .products-grid-2,
	body.home .vs-home-products-grid,
	body.woocommerce-shop .wc-block-product-template,
	body.post-type-archive-product .wc-block-product-template,
	body.tax-product_cat .wc-block-product-template,
	body.tax-product_tag .wc-block-product-template,
	body.single-product .wp-block-woocommerce-product-template,
	body.woocommerce ul.products,
	body.woocommerce-page ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
		gap: 14px !important;
	}
}

@media (min-width: 1024px) {
	body.home #cia-home .inner:has(> .products-grid) {
		grid-template-columns: repeat(5, minmax(0, 1fr));
		gap: 16px;
	}

	body.home .products-grid,
	body.home .products-grid-2,
	body.home .vs-home-products-grid,
	body.woocommerce-shop .wc-block-product-template,
	body.post-type-archive-product .wc-block-product-template,
	body.tax-product_cat .wc-block-product-template,
	body.tax-product_tag .wc-block-product-template,
	body.single-product .wp-block-woocommerce-product-template,
	body.woocommerce ul.products,
	body.woocommerce-page ul.products {
		grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
		gap: 16px !important;
	}
}

@media (max-width: 767px) {
	:root {
		--vs-card-gutter: 10px;
		--vs-card-radius: 12px;
	}

	body.home .products-section {
		padding-block: 34px;
	}

	body.home .products-section .section-desc {
		margin-bottom: 20px;
	}

	body.home .products-all {
		margin-top: 20px !important;
	}

	body.home .product-card .img-wrap,
	body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .wc-block-product .wp-block-woocommerce-product-image,
	body.single-product .wp-block-woocommerce-product-template .wp-block-woocommerce-product-image,
	body.search .product .vs-global-search-card__image,
	body.search .vs-search-card--product .vs-search-card__media,
	body.woocommerce ul.products > li.product .astra-shop-thumbnail-wrap,
	body.woocommerce-page ul.products > li.product .astra-shop-thumbnail-wrap {
		padding: 9px;
	}

	body.home .product-card h3,
	body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .wc-block-product .wp-block-post-title,
	body.single-product .wp-block-woocommerce-product-template .wp-block-post-title,
	body.search .product .vs-global-search-card__title,
	body.search .vs-search-card--product .vs-search-card__title,
	body.woocommerce ul.products > li.product .woocommerce-loop-product__title,
	body.woocommerce-page ul.products > li.product .woocommerce-loop-product__title {
		font-size: 13px !important;
	}

	body.home .price-row,
	body .wc-block-product .wp-block-woocommerce-product-price,
	body.search .product .vs-global-search-card__price,
	body.search .vs-search-card--product .vs-search-card__price,
	body.woocommerce ul.products > li.product .price,
	body.woocommerce-page ul.products > li.product .price {
		font-size: 16px !important;
	}

	body.home .btn-add,
	body .wc-block-product .wp-block-woocommerce-product-button .wc-block-components-product-button__button,
	body.search .vs-search-card--product .vs-search-card__button,
	body.woocommerce ul.products > li.product .button,
	body.woocommerce-page ul.products > li.product .button {
		min-height: 40px !important;
		padding-inline: 7px !important;
		font-size: 11px !important;
	}
}

@media (max-width: 359px) {
	body.home .products-grid,
	body.home .products-grid-2,
	body.home .vs-home-products-grid,
	body.woocommerce-shop .wc-block-product-template,
	body.post-type-archive-product .wc-block-product-template,
	body.tax-product_cat .wc-block-product-template,
	body.tax-product_tag .wc-block-product-template,
	body.single-product .wp-block-woocommerce-product-template,
	body.woocommerce ul.products,
	body.woocommerce-page ul.products {
		gap: 8px !important;
	}

	body.home .product-card h3,
	body .wc-block-product .wp-block-post-title,
	body.search .product .vs-global-search-card__title,
	body.search .vs-search-card--product .vs-search-card__title,
	body.woocommerce ul.products > li.product .woocommerce-loop-product__title,
	body.woocommerce-page ul.products > li.product .woocommerce-loop-product__title {
		font-size: 12px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.home .product-card,
	body .wc-block-product,
	body.search .vs-global-search__grid > .wp-block-post.product,
	body.search .vs-search-card--product,
	body.woocommerce ul.products > li.product,
	body.woocommerce-page ul.products > li.product,
	.wc-block-grid__product {
		transition: none !important;
	}

	body.home .product-card:hover,
	body .wc-block-product:hover,
	body.search .vs-global-search__grid > .wp-block-post.product:hover,
	body.search .vs-search-card--product:hover,
	body.woocommerce ul.products > li.product:hover,
	body.woocommerce-page ul.products > li.product:hover,
	.wc-block-grid__product:hover {
		transform: none !important;
	}
}
