/*
 * Le scroll + les pseudo ::-webkit-scrollbar doivent être sur le même élément.
 * Wrapper interne : évite les cas où grid + overflow sur un seul nœud ne stylent pas la barre.
 */
.bm-product-cards {
	min-width: 0;
	width: 100%;
	border: 0 !important;
	outline: none !important;
	box-shadow: none !important;
}

.bm-product-cards__scroller {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(var(--bm-product-cards-min-width, 260px), 1fr);
	gap: var(--bm-product-cards-gap, 16px);
	min-width: 0;
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	padding-bottom: max(12px, calc(8px + 8px));
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
}

/* Wrapper Beaver : bordure souvent sur .fl-module-content, pas sur .bm-product-cards */
.fl-module-content:has(.bm-product-cards) {
	border: 0 !important;
	outline: none !important;
	box-shadow: none !important;
}

/* WebKit : même rendu partout (équivalent .div-principale : $white, $primary → #e1a110). */
.bm-product-cards__scroller::-webkit-scrollbar {
	height: 7px;
}

.bm-product-cards__scroller::-webkit-scrollbar-track {
	background: var(--bm-product-cards-scrollbar-track, #ffffff);
	border: 2px solid transparent;
	background-clip: padding-box;
}

.bm-product-cards__scroller::-webkit-scrollbar-thumb {
	background: var(--bm-product-cards-scrollbar-thumb, #e1a110);
	max-width: 100px;
}

.bm-product-cards__item {
	min-width: 0;
	background: var(--bm-product-cards-bg, #fff);
	border: var(--bm-product-cards-border-width, 1px) solid var(--bm-product-cards-border-color, #e5e7eb);
	border-radius: var(--bm-product-cards-radius, 8px);
	overflow: hidden;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	color: var(--bm-product-cards-text-color, #4b5563);
}

a.bm-product-cards__item--whole {
	text-decoration: none;
	color: inherit;
	cursor: pointer;
}

a.bm-product-cards__item--whole:focus-visible {
	outline: 2px solid var(--bm-product-cards-title-color, #111827);
	outline-offset: 2px;
}

.bm-product-cards__media {
	position: relative;
	height: var(--bm-product-cards-image-height, 160px);
	background: var(--bm-product-cards-bg, #ffffff);
}

.bm-product-cards__media-link {
	display: block;
	width: 100%;
	height: 100%;
	line-height: 0;
	text-decoration: none;
	color: inherit;
}

.bm-product-cards__media-link:focus-visible {
	outline: 2px solid var(--bm-product-cards-title-color, #111827);
	outline-offset: -2px;
}

.bm-product-cards__media[style*="--bm-product-cards-image-ratio"] {
	height: auto;
	aspect-ratio: var(--bm-product-cards-image-ratio, auto);
}

.bm-product-cards__img {
	width: 100%;
	height: 100%;
	object-fit: var(--bm-product-cards-image-fit, cover);
	display: block;
}

.bm-product-cards__img img {
	width: 100%;
	height: 100%;
	object-fit: var(--bm-product-cards-image-fit, cover);
	display: block;
}

.bm-product-cards__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 8px;
	border-radius: 0;
	font-size: var(--bm-product-cards-label-font-size, 15px);
	line-height: 1.15;
	font-weight: 700;
	color: var(--bm-product-cards-label-text-color, #ffffff) !important;
	background-color: var(--bm-product-cards-label-bg-color, #111827) !important;
}

.bm-product-cards__badge--inline {
	position: static;
	align-self: flex-start;
}

.bm-product-cards__content {
	padding: var(--bm-product-cards-padding, 16px);
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.bm-product-cards__title {
	margin: 0;
	font-size: 1rem;
	line-height: 1.3;
	color: var(--bm-product-cards-title-color, #111827) !important;
}

.bm-product-cards__title-link {
	color: var(--bm-product-cards-title-color, #111827) !important;
	text-decoration: none;
}

.bm-product-cards__title-link:hover,
.bm-product-cards__title-link:focus-visible {
	text-decoration: underline;
}

.bm-product-cards__prices {
	margin: 0;
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.bm-product-cards__old-price {
	color: var(--bm-product-cards-old-price-color, #6b7280) !important;
	text-decoration: line-through;
	font-size: 0.88rem;
}

.bm-product-cards__price {
	margin: 0;
	font-weight: 700;
	color: var(--bm-product-cards-price-color, #111827) !important;
}

.bm-product-cards__text {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.45;
	color: var(--bm-product-cards-text-color, #4b5563) !important;
}

.bm-product-cards__button {
	margin-top: 4px;
	align-self: flex-start;
	display: inline-flex;
	text-decoration: none;
	padding: 8px 12px;
	border-radius: 6px;
	background: #111827;
	color: #fff;
	font-size: 0.85rem;
	line-height: 1.2;
}