/*
 * Catalog grid cards, layout v2. Loaded only when body.wcuad-catalog-v2 is present
 * (see includes/frontend/class-catalog-cards.php). Palette and radii follow the product page.
 */

/* Photos and their backgrounds are left exactly as they are (no tint, no blending, no dimming).
   Sold out: no discount badge and no ribbon on the photo; the card button and the grey price say it. */
.wcuad-catalog-v2 .wd-product.outofstock .product-labels .onsale,
.wcuad-catalog-v2 .wd-product .product-labels .out-of-stock {
	display: none;
}

/* Text: title up to three lines, no repeated hints. */
.wcuad-catalog-v2 .wd-product .wd-entities-title {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wcuad-catalog-v2.wcuad-leaf-cat .wd-product .wd-product-cats,
.wcuad-catalog-v2 .wd-product .cvpd-catalog-hint {
	display: none;
}

.wcuad-catalog-v2 .wd-product.outofstock .price {
	color: #9aa293;
}

/* The card button replaces the one in the hover panel. */
.wcuad-catalog-v2 .wd-product .wd-bottom-actions .wd-add-btn {
	display: none;
}

/* Price and button: no extra theme gap; the bottom row sits at the card bottom in every row. */
.wcuad-catalog-v2 .wd-product .wrapp-product-price {
	gap: 0;
}

@media (max-width: 1024px) {
	.wcuad-catalog-v2 .wd-products[class*="wd-stretch-cont"] .wd-product-wrapper {
		height: 100%;
	}
}

/* Bottom row. */
.wcuad-catalog-v2 .wd-product .wcuad-card-cta {
	width: 100%;
	margin-top: 8px;
}

/* Wishlist heart on the photo. */
.wcuad-catalog-v2 .wd-product .wcuad-card-heart {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 6;
}

.wcuad-catalog-v2 .wd-product .wcuad-card-heart:empty {
	display: none;
}

.wcuad-catalog-v2 .wd-product .wcuad-card-heart .wd-action-btn {
	margin: 0;
}

.wcuad-catalog-v2 .wd-product .wcuad-card-heart .wd-action-btn > a {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 34px;
	height: 34px;
	padding: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
	color: #4a5340;
}

.wcuad-catalog-v2 .wd-product .wcuad-card-heart .wd-action-text {
	display: none;
}

.wcuad-catalog-v2 .wd-product .wcuad-card-cta .added_to_cart {
	display: none;
}

.wcuad-catalog-v2 .wd-product .wcuad-card-cta :is(.wcuad-btn, a.button) {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	width: 100%;
	min-height: 40px;
	margin: 0;
	padding: 8px 12px;
	border: 1px solid transparent;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.2px;
	text-align: center;
	text-transform: uppercase;
	text-decoration: none;
}

.wcuad-catalog-v2 .wd-product .wcuad-card-cta a.button {
	background: #83b735;
	color: #fff;
	box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.14);
}

.wcuad-catalog-v2 .wd-product .wcuad-card-cta a.button:hover {
	background: #74a32f;
	color: #fff;
}

.wcuad-catalog-v2 .wd-product .wcuad-card-cta a.button.loading {
	opacity: 0.6;
	pointer-events: none;
}

.wcuad-catalog-v2 .wd-product .wcuad-card-cta a.button .wd-action-icon {
	display: none;
}

.wcuad-catalog-v2 .wd-product .wcuad-card-cta .wcuad-btn--tint {
	background: #f4f8ee;
	border-color: #d1dfbf;
	color: #496d24;
}

.wcuad-catalog-v2 .wd-product .wcuad-card-cta .wcuad-btn--tint:hover {
	background: #eaf2df;
	border-color: #7eaa48;
	color: #35551b;
}

.wcuad-catalog-v2 .wd-product .wcuad-card-cta .wcuad-btn--off {
	background: #f1f2ee;
	border-color: #e4e6df;
	color: #8a9283;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
}

.wcuad-catalog-v2 .wd-product .wcuad-card-cta .wcuad-btn__arrow {
	font-size: 16px;
	font-weight: 400;
	line-height: 1;
}

@media (max-width: 768px) {
	.wcuad-catalog-v2 .wd-product .wcuad-card-heart .wd-action-btn > a {
		width: 30px;
		height: 30px;
	}

	.wcuad-catalog-v2 .wd-product .wd-entities-title {
		-webkit-line-clamp: 4;
		font-size: 13px;
		line-height: 1.35;
	}

	.wcuad-catalog-v2 .wd-product .wcuad-card-cta :is(.wcuad-btn, a.button) {
		min-height: 38px;
		padding: 7px 6px;
		font-size: 11px;
		letter-spacing: 0;
	}
}
