/**
 * @ownership product-card
 * DSP Product Card — single source of truth for all product listings.
 *
 * product-card.css
 * ----------------
 * Allowed selectors:
 *   .dsp-product-card
 *   .dsp-product-card__*
 *   .dsp-product-card--*
 *   body.dsp-has-product-cards--*
 *   .woocommerce ul.products li.product.dsp-product-card
 *   .woocommerce ul.products li.product.dsp-product-card *
 *
 * Forbidden:
 *   body
 *   html
 *   main
 *   section
 *   article
 *   img
 *   a
 *   button
 *   .woocommerce *
 *   .dsp-product-grid
 *   .dsp-home*
 *   .dsp-shop*
 *   .dsp-container
 *   .dsp-page
 */

/* Reset WC loop item wrapper — inner card owns the shell */
.woocommerce ul.products li.product.dsp-product-card {
	display: flex !important;
	flex-direction: column;
	width: 100% !important;
	max-width: none !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	clear: none !important;
	background: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	transform: none !important;
}

.woocommerce ul.products li.product.dsp-product-card:hover {
	transform: none !important;
	border-color: transparent !important;
	box-shadow: none !important;
}

/* Hide default WooCommerce sale flash on DSP product cards only */
.woocommerce ul.products li.product.dsp-product-card .onsale,
.woocommerce ul.products li.product.dsp-product-card span.onsale,
.dsp-product-card .onsale,
.dsp-product-card span.onsale {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.dsp-product-card__inner {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--dsp-elevation-1-bg);
	border: 1px solid var(--dsp-color-border-subtle);
	border-radius: var(--dsp-radius-xl);
	overflow: hidden;
	box-shadow: var(--dsp-elevation-1-shadow);
	transition:
		transform var(--dsp-transition-normal),
		border-color var(--dsp-transition-normal),
		box-shadow var(--dsp-transition-normal);
}

.dsp-product-card:hover .dsp-product-card__inner,
.dsp-product-card:focus-within .dsp-product-card__inner {
	transform: translateY(calc(var(--dsp-space-1) * -1));
	border-color: var(--dsp-color-border-default);
	box-shadow: var(--dsp-elevation-2-shadow);
}

.dsp-product-card__media {
	position: relative;
	flex-shrink: 0;
}

.dsp-product-card__image-link {
	display: block;
	overflow: hidden;
	color: inherit;
	text-decoration: none;
}

.dsp-product-card__image,
.dsp-product-card__media img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	margin: 0;
	border-radius: 0;
	background:
		radial-gradient(circle at 50% 35%, var(--dsp-color-accent-subtle) 0%, transparent 55%),
		var(--dsp-color-bg-elevated);
	transition: transform var(--dsp-transition-normal);
}

.dsp-product-card:hover .dsp-product-card__image,
.dsp-product-card:hover .dsp-product-card__media img {
	transform: scale(1.03);
}

.dsp-product-card__badge {
	position: absolute;
	top: var(--dsp-space-3);
	left: var(--dsp-space-3);
	right: auto;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 3.25rem;
	min-height: 1.5rem;
	margin: 0;
	padding: var(--dsp-space-1) var(--dsp-space-3);
	font-family: var(--dsp-font-family-heading);
	font-size: var(--dsp-font-size-xs);
	font-weight: var(--dsp-font-weight-bold);
	line-height: 1;
	letter-spacing: var(--dsp-letter-spacing-wide);
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--dsp-color-text-on-accent);
	background: var(--dsp-color-accent);
	border: none;
	border-radius: var(--dsp-radius-sm);
}

.dsp-product-card__placeholders {
	position: absolute;
	top: var(--dsp-space-3);
	right: var(--dsp-space-3);
	display: flex;
	gap: var(--dsp-space-2);
	opacity: 0;
	transition: opacity 0.15s ease;
}

.dsp-product-card:hover .dsp-product-card__placeholders,
.dsp-product-card:focus-within .dsp-product-card__placeholders {
	opacity: 1;
}

.dsp-product-card__placeholder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border: 1px solid var(--dsp-color-border-subtle);
	border-radius: 999px;
	background: color-mix(in srgb, var(--dsp-elevation-1-bg) 92%, transparent);
	color: var(--dsp-color-text-muted);
	cursor: not-allowed;
}

.dsp-product-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: stretch;
	gap: var(--dsp-space-2);
	padding: var(--dsp-space-5);
	min-height: 0;
	box-sizing: border-box;
}

.dsp-product-card__title,
.dsp-product-card__title.woocommerce-loop-product__title {
	margin: 0;
	min-height: 2.875rem;
	font-family: var(--dsp-font-family-heading);
	font-size: var(--dsp-font-size-md);
	font-weight: var(--dsp-font-weight-semibold);
	line-height: var(--dsp-line-height-snug);
	color: var(--dsp-color-text-primary);
}

.dsp-product-card__title-link,
.dsp-product-card__title a,
.dsp-product-card__title.woocommerce-loop-product__title a,
.woocommerce ul.products li.product.dsp-product-card .woocommerce-loop-product__title a {
	display: -webkit-box;
	overflow: hidden;
	font-family: inherit;
	font-size: inherit;
	font-weight: var(--dsp-font-weight-semibold);
	line-height: inherit;
	color: var(--dsp-color-text-primary) !important;
	text-decoration: none !important;
	transition: color var(--dsp-transition-normal);
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

.dsp-product-card__title-link:link,
.dsp-product-card__title-link:visited,
.dsp-product-card__title a:link,
.dsp-product-card__title a:visited,
.woocommerce ul.products li.product.dsp-product-card .woocommerce-loop-product__title a:link,
.woocommerce ul.products li.product.dsp-product-card .woocommerce-loop-product__title a:visited {
	color: var(--dsp-color-text-primary) !important;
	text-decoration: none !important;
}

.dsp-product-card:hover .dsp-product-card__title-link,
.dsp-product-card:hover .dsp-product-card__title a,
.dsp-product-card:focus-within .dsp-product-card__title-link,
.dsp-product-card:focus-within .dsp-product-card__title a,
.dsp-product-card__title-link:hover,
.dsp-product-card__title-link:focus-visible,
.dsp-product-card__title a:hover,
.dsp-product-card__title a:focus-visible {
	color: var(--dsp-color-accent) !important;
	text-decoration: none !important;
}

.dsp-product-card__excerpt {
	margin: 0;
	min-height: 2.75rem;
	font-size: var(--dsp-font-size-sm);
	line-height: var(--dsp-line-height-relaxed);
	color: var(--dsp-color-text-secondary);
	display: -webkit-box;
	overflow: hidden;
	text-overflow: ellipsis;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

.dsp-product-card__excerpt--empty {
	visibility: hidden;
}

.dsp-product-card__rating {
	display: flex;
	align-items: center;
	min-height: 1.25rem;
}

.dsp-product-card__rating .star-rating {
	margin: 0;
	font-size: 0.85rem;
}

.dsp-product-card__rating-label {
	font-size: var(--dsp-font-size-xs);
	color: var(--dsp-color-text-muted);
}

.dsp-product-card__price {
	display: flex;
	align-items: center;
	min-height: 1.75rem;
}

.dsp-product-card__price .price {
	margin: 0;
	font-family: var(--dsp-font-family-heading);
	font-size: var(--dsp-font-size-md);
	font-weight: var(--dsp-font-weight-bold);
	color: var(--dsp-color-accent);
	white-space: nowrap;
}

.dsp-product-card__price .price del {
	margin-right: var(--dsp-space-2);
	font-size: var(--dsp-font-size-sm);
	font-weight: var(--dsp-font-weight-medium);
	color: var(--dsp-color-text-muted);
	opacity: 0.85;
}

.dsp-product-card__price .price ins {
	text-decoration: none;
}

body.dsp-has-product-cards--hide-old-price .dsp-product-card__price .price del {
	display: none;
}

.dsp-product-card__footer {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	margin-top: auto;
	padding-top: var(--dsp-space-2);
}

.dsp-product-card__actions {
	display: flex;
	width: 100%;
	align-items: stretch;
	justify-content: center;
}

.dsp-product-card__actions .button,
.dsp-product-card__actions .add_to_cart_button,
.dsp-product-card__actions a.button {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	max-width: 100% !important;
	min-height: 2.75rem;
	margin: 0 !important;
	padding: var(--dsp-space-3) var(--dsp-space-4) !important;
	box-sizing: border-box !important;
	font-family: var(--dsp-font-family-heading) !important;
	font-size: var(--dsp-font-size-sm) !important;
	font-weight: var(--dsp-font-weight-semibold) !important;
	text-align: center !important;
	text-decoration: none !important;
	white-space: nowrap;
	color: var(--dsp-color-text-on-accent) !important;
	background-color: var(--dsp-color-accent) !important;
	border: none !important;
	border-radius: var(--dsp-radius-lg) !important;
	box-shadow: var(--dsp-elevation-1-shadow);
	transition:
		background-color var(--dsp-transition-normal),
		transform var(--dsp-transition-fast);
}

.dsp-product-card__actions .button:hover,
.dsp-product-card__actions .add_to_cart_button:hover,
.dsp-product-card__actions a.button:hover,
.dsp-product-card__actions .button:focus-visible,
.dsp-product-card__actions .add_to_cart_button:focus-visible,
.dsp-product-card__actions a.button:focus-visible {
	color: var(--dsp-color-text-on-accent) !important;
	background-color: var(--dsp-color-accent-hover) !important;
	transform: translateY(-1px);
}

.dsp-product-card__title-link:focus-visible,
.dsp-product-card__actions .button:focus-visible {
	outline: 2px solid var(--dsp-color-accent);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.dsp-product-card:hover .dsp-product-card__inner,
	.dsp-product-card:hover .dsp-product-card__image,
	.dsp-product-card:hover .dsp-product-card__media img,
	.dsp-product-card__actions .button:hover {
		transform: none;
	}
}
