/* ============================================================
   Endor Elements — Product Cards widget
   ============================================================ */

/* Grid container */
.endor-product-cards {
	display: grid !important;
	list-style: none;
	margin: 0 !important;
	padding: 0 !important;
	gap: 24px;
}

.endor-product-cards.endor-cols-2 { grid-template-columns: repeat( 2, 1fr ); }
.endor-product-cards.endor-cols-3 { grid-template-columns: repeat( 3, 1fr ); }
.endor-product-cards.endor-cols-4 { grid-template-columns: repeat( 4, 1fr ); }

/* Suppress WC/theme clearfix ghost cells */
.endor-product-cards::before,
.endor-product-cards::after {
	display: none !important;
}

/* Card */
.endor-product-cards li.product {
	margin: 0 !important;
	float: none !important;
	width: auto !important;
	display: flex !important;
	flex-direction: column;
}

/* Hide phantom cards (no title) */
.endor-product-cards li.product:not(:has( .woocommerce-loop-product__title )) {
	display: none !important;
}

/* Product link fills space, pushing button to bottom */
.endor-product-cards li.product > a:not(.button) {
	flex: 1 1 auto;
}

/* Image */
.endor-product-cards li.product a img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: #f8f8f8;
	border-radius: 4px;
	display: block;
}

/* No underlines on links */
.endor-product-cards li.product a,
.endor-product-cards li.product a:hover {
	text-decoration: none !important;
}

/* Hide sale badge */
.endor-product-cards li.product .onsale {
	display: none !important;
}

/* Title */
.endor-product-cards li.product .woocommerce-loop-product__title {
	font-size: 14px;
	font-weight: 600;
	color: #111 !important;
	margin-top: 10px;
	margin-bottom: 6px;
	text-align: center;
}

.endor-product-cards li.product a:hover .woocommerce-loop-product__title {
	color: #8E579F !important;
}

/* Price */
.endor-product-cards li.product .price {
	color: #8E579F !important;
	font-size: 13px;
	font-weight: 500;
	display: block;
	margin-bottom: 12px;
	text-align: center;
	text-decoration: none !important;
}

.endor-product-cards li.product .price .amount,
.endor-product-cards li.product .price ins .amount {
	color: #8E579F !important;
	text-decoration: none !important;
}

/* Hide strikethrough original price */
.endor-product-cards li.product .price del {
	display: none !important;
}

/* Remove the "–" separator left behind when del is hidden */
.endor-product-cards li.product .price ins {
	text-decoration: none !important;
	font-weight: 500;
}

/* Euro price on its own line — lighter */
.endor-product-cards li.product .price .emc-eur-price {
	display: block;
	font-size: 12px;
	font-weight: 400;
	color: #aaa !important;
}

/* Button */
.endor-product-cards li.product > a.button,
.endor-product-cards li.product > .button {
	display: block !important;
	width: fit-content !important;
	align-self: center;
	padding: 10px 22px;
	background: #111 !important;
	color: #fff !important;
	border: none;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none !important;
	cursor: pointer;
	transition: background 0.2s ease;
}

.endor-product-cards li.product > a.button:hover,
.endor-product-cards li.product > .button:hover {
	background: #8E579F !important;
	color: #fff !important;
}

/* ── Responsive ── */
@media ( max-width: 900px ) {
	.endor-product-cards.endor-cols-3,
	.endor-product-cards.endor-cols-4 {
		grid-template-columns: repeat( 2, 1fr );
	}
}

@media ( max-width: 480px ) {
	.endor-product-cards {
		grid-template-columns: 1fr !important;
	}
}
