/* Keep shared product-card imagery in a bounded media row, with all copy below it. */
.po-product-card {
	align-items: stretch !important;
	min-width: 0 !important;
	max-width: 100%;
	overflow: hidden !important;
}

.po-product-card > .po-product-card__image,
.po-product-detail .po-related-products__item .po-product-card > .po-product-card__image {
	position: relative !important;
	display: grid !important;
	flex: 0 0 auto !important;
	place-items: center !important;
	width: 100% !important;
	height: auto !important;
	min-width: 0 !important;
	min-height: 0 !important;
	max-height: none !important;
	aspect-ratio: 1 / 1 !important;
	padding: clamp(8px, 1.7vw, 15px) !important;
	overflow: hidden !important;
	contain: layout paint;
	isolation: isolate;
}

.po-product-card > .po-product-card__image > picture,
.po-product-detail .po-related-products__item .po-product-card > .po-product-card__image > picture {
	display: grid !important;
	place-items: center !important;
	width: 100% !important;
	height: 100% !important;
	min-width: 0 !important;
	min-height: 0 !important;
	overflow: hidden !important;
}

.po-product-card > .po-product-card__image img,
.po-product-detail .po-related-products__item .po-product-card > .po-product-card__image img {
	position: static !important;
	inset: auto !important;
	display: block !important;
	flex: none !important;
	align-self: center !important;
	justify-self: center !important;
	width: 100% !important;
	height: 100% !important;
	min-width: 0 !important;
	min-height: 0 !important;
	max-width: 100% !important;
	max-height: 100% !important;
	object-fit: contain !important;
	object-position: center center !important;
	transform: none !important;
}

.po-product-card > .po-product-card__body,
.po-product-detail .po-related-products__item .po-product-card > .po-product-card__body {
	position: relative !important;
	z-index: 1;
	display: flex !important;
	flex: 1 0 auto !important;
	flex-direction: column !important;
	align-items: stretch !important;
	width: 100% !important;
	min-width: 0 !important;
	margin: 0 !important;
	background: #fff;
}

.po-product-card .po-product-card__brand {
	max-width: 100%;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.po-product-card .po-product-card__title {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin-right: 0 !important;
	overflow-wrap: anywhere;
}

.po-product-card .po-product-card__title a {
	display: block;
	max-width: 100%;
	overflow: visible;
	word-break: normal;
}

/* Wishlist cards are rendered separately from the shared Woo product-card markup. */
.po-wishlist-card {
	grid-template-columns: minmax(0, 145px) minmax(0, 1fr) !important;
	align-items: start;
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
}

.po-wishlist-card__image {
	position: relative;
	display: grid !important;
	place-items: center;
	width: 100%;
	height: auto !important;
	min-width: 0;
	min-height: 0 !important;
	aspect-ratio: 1 / 1;
	padding: 7px;
	overflow: hidden;
	contain: layout paint;
}

.po-wishlist-card__image img {
	position: static !important;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	min-width: 0;
	min-height: 0;
	max-width: 100% !important;
	max-height: 100% !important;
	object-fit: contain !important;
	object-position: center center !important;
}

.po-wishlist-card__content {
	position: relative;
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
}

.po-wishlist-card__content h2 {
	max-width: 100%;
	min-width: 0;
	display: block;
	overflow: visible;
}

@media (max-width: 767px) {
	.po-product-card .po-card-quick { min-height: 44px; font-size: 12px; }
	.po-product-card .po-card-heart { width: 44px; height: 44px; }
	.po-product-card > .po-product-card__image,
	.po-product-detail .po-related-products__item .po-product-card > .po-product-card__image {
		padding: 7px !important;
	}

	.po-product-card > .po-product-card__body,
	.po-product-detail .po-related-products__item .po-product-card > .po-product-card__body {
		padding: 9px !important;
	}

	.po-wishlist-card {
		grid-template-columns: minmax(0, 108px) minmax(0, 1fr) !important;
	}
}
