/* Product card (shared component)
 *
 * Used by the shop / category / search grid, the PDP "Andere capaciteiten"
 * slider and the cart suggestions. The base card is a vertical slider card
 * (fixed basis); the shop grid and other contexts override flex/max-width.
 */

.bollaert-product-card {
	scroll-snap-align: start;
	flex: 0 0 280px;
	max-width: 85vw;
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: var(--wp--preset--shadow--subtle);
	transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.bollaert-product-card:hover {
	border-color: #d7e3ec;
	box-shadow: var(--wp--preset--shadow--elevated, var(--wp--preset--shadow--medium));
	transform: translateY(-4px);
}

.bollaert-product-card__media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--brand);
	overflow: hidden;
}

.bollaert-product-card__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: var(--wp--preset--spacing--3);
	transition: transform 0.3s ease;
}

.bollaert-product-card:hover .bollaert-product-card__media img {
	transform: scale(1.04);
}

.bollaert-product-card__badge {
	position: absolute;
	top: 0.6rem;
	left: 0.6rem;
	background: var(--wp--preset--color--brand-dark);
	color: var(--wp--preset--color--white);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
	padding: 0.25em 0.6em;
	border-radius: 999px;
}

.bollaert-product-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	padding: var(--wp--preset--spacing--3) var(--wp--preset--spacing--4) var(--wp--preset--spacing--4);
	flex-grow: 1;
}

.bollaert-product-card__rating {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 600;
	color: var(--wp--preset--color--muted);
}

.bollaert-product-card__rating svg {
	color: #f5a623;
}

.bollaert-product-card__name {
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 500;
	line-height: 1.35;
	color: var(--wp--preset--color--text);
	text-decoration: none;
}

.bollaert-product-card__name:hover {
	color: var(--wp--preset--color--brand);
}

.bollaert-product-card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--2);
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--2);
}

.bollaert-product-card__price {
	font-size: var(--wp--preset--font-size--lg);
	font-weight: 700;
	color: var(--wp--preset--color--text);
}

.bollaert-product-card__price del {
	margin-left: 0.35em;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 400;
	color: var(--wp--preset--color--muted);
}

/* WooCommerce price_html wraps the sale price in <ins> (underlined by
 * default) and may add a tax suffix — normalise to match the card. */
.bollaert-product-card__price ins {
	text-decoration: none;
	background: none;
}

.bollaert-product-card__price .woocommerce-Price-amount {
	white-space: nowrap;
}

.bollaert-product-card__price small {
	display: none;
}

.bollaert-product-card__add {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	flex-shrink: 0;
	border: none;
	border-radius: 10px;
	background: var(--wp--preset--color--success, #2e9b5b);
	color: var(--wp--preset--color--white);
	cursor: pointer;
	transition: filter 0.15s ease;
}

.bollaert-product-card__add:hover {
	filter: brightness(0.92);
}
