/**
 * Shared product card body: price → name → specification/short description.
 * Add to Cart is pinned to the card (li) bottom — homepage carousel parity.
 */

/* Card frame: positioning context for the bottom-pinned button */
.wc-block-product-template > li.wc-block-product,
.woocommerce-page .wc-block-product-template > li.wc-block-product,
.wp-block-shop-catalog .wc-block-product-template > li.wc-block-product,
body.sophia-shop-archive .wc-block-product-template > li.wc-block-product,
body.tax-product_cat .wc-block-product-template > li.wc-block-product,
body.tax-product_tag .wc-block-product-template > li.wc-block-product,
.sophia-related-products .wc-block-product-template > li.wc-block-product {
	position: relative !important;
	overflow: hidden !important;
	display: flex !important;
	flex-direction: column !important;
	padding-bottom: 50px !important;
	box-sizing: border-box !important;
}

.wc-block-product-template .shop-product-card-body,
.sophia-related-products .shop-product-card-body,
.wp-block-woocommerce-product-collection .shop-product-card-body {
	display: flex !important;
	flex: 1 1 auto !important;
	flex-direction: column !important;
	gap: 4px !important;
	/* Must NOT be position:relative — that traps the button above the card padding */
	position: static !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding-top: 10px !important;
	padding-bottom: 0 !important;
	padding-inline: 18px !important;
	box-sizing: border-box;
}

.wc-block-product-template .shop-product-card-body .wp-block-woocommerce-product-price,
.sophia-related-products .shop-product-card-body .wp-block-woocommerce-product-price,
.wp-block-woocommerce-product-collection .shop-product-card-body .wp-block-woocommerce-product-price {
	font-size: 16px !important;
	font-weight: 500 !important;
	line-height: 1.2 !important;
	margin: 0 !important;
	text-align: left !important;
}

.wc-block-product-template .shop-product-card-body .wp-block-post-title,
.sophia-related-products .shop-product-card-body .wp-block-post-title,
.wp-block-woocommerce-product-collection .shop-product-card-body .wp-block-post-title {
	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	margin: 8px 0 0 !important;
	text-align: left !important;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.wc-block-product-template .shop-product-card-body .wp-block-post-title a,
.sophia-related-products .shop-product-card-body .wp-block-post-title a,
.wp-block-woocommerce-product-collection .shop-product-card-body .wp-block-post-title a {
	font-size: inherit !important;
	font-weight: inherit !important;
	line-height: inherit !important;
	text-decoration: none !important;
}

.wc-block-product-template .shop-product-card-body .wc-block-components-product-summary,
.sophia-related-products .shop-product-card-body .wc-block-components-product-summary,
.wp-block-woocommerce-product-collection .shop-product-card-body .wc-block-components-product-summary,
.wc-block-product-template .shop-product-card-body .sophia-product-card-third-line,
.sophia-related-products .shop-product-card-body .sophia-product-card-third-line,
.wp-block-woocommerce-product-collection .shop-product-card-body .sophia-product-card-third-line {
	font-size: 13px !important;
	line-height: 1.35 !important;
	margin: 4px 0 0 !important;
	padding: 0 !important;
	min-height: 2.7em;
	color: var(--wp--preset--color--secondary-text, #6b6b6b);
}

.wc-block-product-template .shop-product-card-body .sophia-product-card-third-line p,
.sophia-related-products .shop-product-card-body .sophia-product-card-third-line p,
.wp-block-woocommerce-product-collection .shop-product-card-body .sophia-product-card-third-line p,
.wc-block-product-template .shop-product-card-body .wc-block-components-product-summary p,
.sophia-related-products .shop-product-card-body .wc-block-components-product-summary p,
.wp-block-woocommerce-product-collection .shop-product-card-body .wc-block-components-product-summary p {
	margin: 0 !important;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

/* Pin Add to Cart to the card bottom (li), flush with the card edge */
.wc-block-product-template > li.wc-block-product .wp-block-button.wc-block-components-product-button,
.woocommerce-page .wc-block-product-template > li.wc-block-product .wp-block-button.wc-block-components-product-button,
.wp-block-shop-catalog .wc-block-product-template > li.wc-block-product .wp-block-button.wc-block-components-product-button,
body.sophia-shop-archive .wc-block-product-template > li.wc-block-product .wp-block-button.wc-block-components-product-button,
body.tax-product_cat .wc-block-product-template > li.wc-block-product .wp-block-button.wc-block-components-product-button,
body.tax-product_tag .wc-block-product-template > li.wc-block-product .wp-block-button.wc-block-components-product-button,
.sophia-related-products .wc-block-product-template > li.wc-block-product .wp-block-button.wc-block-components-product-button,
.wp-block-woocommerce-product-collection .shop-product-card-body .wp-block-button.wc-block-components-product-button {
	position: absolute !important;
	bottom: 0 !important;
	left: 0 !important;
	right: 0 !important;
	width: 100% !important;
	height: 50px !important;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 0 !important;
	z-index: 2;
}

.wc-block-product-template > li.wc-block-product .wc-block-components-product-button__button,
.woocommerce-page .wc-block-product-template > li.wc-block-product .wc-block-components-product-button__button,
.wp-block-shop-catalog .wc-block-product-template > li.wc-block-product .wc-block-components-product-button__button,
body.sophia-shop-archive .wc-block-product-template > li.wc-block-product .wc-block-components-product-button__button,
body.tax-product_cat .wc-block-product-template > li.wc-block-product .wc-block-components-product-button__button,
body.tax-product_tag .wc-block-product-template > li.wc-block-product .wc-block-components-product-button__button,
.sophia-related-products .wc-block-product-template > li.wc-block-product .wc-block-components-product-button__button,
.wc-block-product-template > li.wc-block-product .wp-block-button.wc-block-components-product-button .wp-block-button__link {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	height: 50px !important;
	min-height: 50px !important;
	margin: 0 !important;
	border-radius: 0 !important;
	box-sizing: border-box !important;
}

/* SALE badge — solid brand pill matching Add to Cart */
.wc-block-product-template .wc-block-components-product-sale-badge,
.woocommerce-page .wc-block-product-template .wc-block-components-product-sale-badge,
.wp-block-shop-catalog .wc-block-product-template .wc-block-components-product-sale-badge,
body.sophia-shop-archive .wc-block-product-template .wc-block-components-product-sale-badge,
body.tax-product_cat .wc-block-product-template .wc-block-components-product-sale-badge,
body.tax-product_tag .wc-block-product-template .wc-block-components-product-sale-badge,
.sophia-related-products .wc-block-product-template .wc-block-components-product-sale-badge,
.wp-block-woocommerce-product-collection .wc-block-components-product-sale-badge {
	background-color: var(--wp--preset--color--button-color, #954e26) !important;
	background-image: none !important;
	border: none !important;
	border-radius: 10px !important;
	box-shadow: none !important;
	color: #fff !important;
	font-size: 0.875em !important;
	font-weight: 500 !important;
	letter-spacing: 0.02em;
	line-height: 1 !important;
	min-height: 0 !important;
	outline: none !important;
	padding: 6px 12px !important;
	text-transform: uppercase !important;
	z-index: 5;
}

.wc-block-product-template .wc-block-components-product-image .wc-block-components-product-sale-badge,
.woocommerce-page .wc-block-product-template .wc-block-components-product-image .wc-block-components-product-sale-badge,
body.sophia-shop-archive .wc-block-product-template .wc-block-components-product-image .wc-block-components-product-sale-badge,
body.tax-product_cat .wc-block-product-template .wc-block-components-product-image .wc-block-components-product-sale-badge,
body.tax-product_tag .wc-block-product-template .wc-block-components-product-image .wc-block-components-product-sale-badge,
.sophia-related-products .wc-block-product-template .wc-block-components-product-image .wc-block-components-product-sale-badge {
	position: absolute !important;
	top: 16px !important;
	left: 14px !important;
	right: auto !important;
	bottom: auto !important;
}

.wc-block-product-template .wc-block-components-product-sale-badge .wc-block-components-product-sale-badge__text,
.woocommerce-page .wc-block-product-template .wc-block-components-product-sale-badge .wc-block-components-product-sale-badge__text,
.sophia-related-products .wc-block-product-template .wc-block-components-product-sale-badge .wc-block-components-product-sale-badge__text {
	color: inherit !important;
	font-size: inherit !important;
	font-weight: inherit !important;
	line-height: inherit !important;
}

/* Drop decorative dashes; keep a single trailing ! */
.wc-block-product-template .wc-block-components-product-sale-badge .wc-block-components-product-sale-badge__text::before,
.woocommerce-page .wc-block-product-template .wc-block-components-product-sale-badge .wc-block-components-product-sale-badge__text::before {
	content: none !important;
	display: none !important;
}

.wc-block-product-template .wc-block-components-product-sale-badge .wc-block-components-product-sale-badge__text::after,
.woocommerce-page .wc-block-product-template .wc-block-components-product-sale-badge .wc-block-components-product-sale-badge__text::after,
body.sophia-shop-archive .wc-block-product-template .wc-block-components-product-sale-badge .wc-block-components-product-sale-badge__text::after {
	content: "!" !important;
	color: inherit !important;
	margin: 0 !important;
}
