
/*
 * Masterclic Productos en Portada
 * Los colores se heredan deliberadamente del tema activo/WooCommerce.
 */

.mcpp-showcase {
	--mcpp-columns: 4;
	--mcpp-tablet-columns: 2;
	--mcpp-mobile-columns: 1;
	--mcpp-image-height: 235px;
	--mcpp-image-fit: contain;
	--mcpp-gap: 20px;
	width: 100%;
	margin: 1.5rem 0;
}

.mcpp-showcase,
.mcpp-showcase * {
	box-sizing: border-box;
}

.mcpp-heading-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 18px;
}

.mcpp-heading {
	margin: 0;
	font: inherit;
	font-size: clamp(1.15rem, 1.5vw, 1.5rem);
	font-weight: 700;
	line-height: 1.2;
	color: inherit;
}

.mcpp-grid {
	display: grid;
	grid-template-columns: repeat(var(--mcpp-columns), minmax(0, 1fr));
	gap: var(--mcpp-gap);
	align-items: stretch;
}

.mcpp-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	background: var(--wp--preset--color--base, var(--global-palette9, var(--theme-palette-color-8, #fff)));
	color: inherit;
	border: 1px solid rgba(0, 0, 0, .08);
	border-radius: 18px;
	box-shadow: 0 8px 22px rgba(0, 0, 0, .05);
	transition: transform .2s ease, box-shadow .2s ease;
}

.mcpp-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, .09);
}

.mcpp-media {
	position: relative;
	flex: 0 0 auto;
	overflow: hidden;
	background: #fff;
}

.mcpp-image-link {
	display: flex;
	background: #fff;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: var(--mcpp-image-height);
	overflow: hidden;
	padding: 8px;
	text-decoration: none;
}

.mcpp-image,
.mcpp-card img.mcpp-image,
.mcpp-card .woocommerce-placeholder {
	display: block;
	background: #fff;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	object-fit: var(--mcpp-image-fit, contain);
	object-position: center;
	transition: transform .3s ease;
}

.mcpp-card:hover .mcpp-image {
	transform: none;
}

.mcpp-discount {
	position: absolute;
	z-index: 2;
	top: 12px;
	right: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 30px;
	padding: 5px 11px;
	border-radius: 999px;
	background: var(--wp--preset--color--primary, var(--global-palette1, var(--theme-palette-color-1, #d63670)));
	color: var(--wp--preset--color--base, #fff);
	font-size: .83rem;
	font-weight: 800;
	line-height: 1;
	box-shadow: 0 3px 10px rgba(0, 0, 0, .10);
}

.mcpp-category {
	position: absolute;
	z-index: 2;
	left: 12px;
	bottom: 12px;
	max-width: calc(100% - 24px);
	padding: 5px 9px;
	overflow: hidden;
	border-radius: 999px;
	background: rgba(255, 255, 255, .9);
	color: currentColor;
	font-size: .68rem;
	font-weight: 700;
	line-height: 1;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
	backdrop-filter: blur(5px);
}

.mcpp-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
	padding: 16px;
}

.mcpp-title {
	display: -webkit-box;
	min-height: calc(1.35em * 2);
	margin: 0 0 8px;
	overflow: hidden;
	font: inherit;
	font-size: var(--mcpp-product-title-size, 1rem);
	font-weight: 700;
	line-height: 1.35;
	color: var(--mcpp-product-title-color, inherit);
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	text-overflow: ellipsis;
}

.mcpp-title a {
	color: inherit;
	text-decoration: none;
}

.mcpp-title a:hover {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.mcpp-excerpt {
	display: -webkit-box;
	min-height: calc(1.45em * 3);
	margin: 0;
	overflow: hidden;
	color: inherit;
	opacity: .72;
	font-size: .86rem;
	line-height: 1.45;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	text-overflow: ellipsis;
}

.mcpp-spacer {
	flex: 1 1 auto;
	min-height: 16px;
}

.mcpp-footer {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	padding-top: 13px;
	border-top: 1px solid rgba(0, 0, 0, .06);
}

.mcpp-price {
	min-width: 0;
	font-size: var(--mcpp-price-size, 1rem);
	font-weight: 700;
	color: var(--mcpp-price-color, inherit);
	line-height: 1.25;
}

.mcpp-price .price,
.mcpp-price ins,
.mcpp-price del {
	font: inherit;
}

.mcpp-price del {
	display: block;
	font-size: .72rem;
	font-weight: 400;
	opacity: .55;
}

.mcpp-price ins {
	display: block;
	background: transparent;
	text-decoration: none;
}

.mcpp-buy-button.button {
	flex: 0 0 auto;
	margin: 0 !important;
	white-space: nowrap;
	border-radius: 999px;
	background-color: var(--mcpp-button-bg, var(--wp--preset--color--primary, var(--global-palette1, var(--theme-palette-color-1, initial)))) !important;
	color: var(--mcpp-button-text, inherit) !important;
	font-size: .84rem;
	line-height: 1;
	text-align: center;
}

@media (max-width: 1024px) {
	.mcpp-grid {
		grid-template-columns: repeat(var(--mcpp-tablet-columns), minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.mcpp-showcase {
		--mcpp-gap: 14px;
	}

	.mcpp-grid {
		grid-template-columns: repeat(var(--mcpp-mobile-columns), minmax(0, 1fr));
	}

	.mcpp-body {
		padding: 14px;
	}

	.mcpp-footer {
		align-items: stretch;
		flex-direction: column;
	}

	.mcpp-buy-button.button {
		width: 100%;
	}
}

/* Si el usuario elige 2 columnas móviles, compactamos ligeramente. */
@media (max-width: 600px) {
	.mcpp-showcase[style*="--mcpp-mobile-columns:2"] .mcpp-title {
		font-size: .9rem;
	}
}


.mcpp-buy-button.button:hover,
.mcpp-buy-button.button:focus {
	filter: brightness(.94);
	color: var(--mcpp-button-text, inherit) !important;
}
