.magicbar-slider {
	--slider-columns: 4;
	--slider-gap: 20px;
	min-width: 0;
}

.magicbar-slider--curated { --slider-gap: 15px; }
.magicbar-slider-viewport { overflow: hidden; touch-action: pan-y pinch-zoom; }
.magicbar-slider .swiper-wrapper { align-items: stretch; }
.magicbar-slider-viewport:not(.swiper-initialized) { overflow-x: auto; }
.magicbar-slider-viewport:not(.swiper-initialized) .swiper-wrapper { gap: var(--slider-gap); }

.magicbar-slider .magicbar-slider-card {
	position: relative;
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	width: calc((100% - (var(--slider-columns) - 1) * var(--slider-gap)) / var(--slider-columns));
	height: auto;
	min-width: 0;
	overflow: hidden;
	border-radius: 25px;
	background: #ebe3e3;
	text-align: center;
}

.magicbar-slider-image { display: block; background: #fff; }
.magicbar-slider .magicbar-slider-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	margin: 0;
	object-fit: contain;
}

.magicbar-slider-details {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	gap: 15px;
	padding: 24px 15px 15px;
}

.magicbar-slider h3.woocommerce-loop-product__title {
	margin: 0;
	font-family: inherit;
	font-size: 18px;
	font-weight: 800;
	line-height: 25px;
	overflow-wrap: anywhere;
}

.magicbar-slider .price { margin: 0; color: #151515; font-size: 18px; font-weight: 800; }
.magicbar-slider .magicbar-slider-details .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	margin-top: auto;
	padding: 10px 15px;
	border: 0;
	border-radius: 25px;
	background: #716887;
	color: #fff;
	font-family: Tahoma, sans-serif;
	font-size: 16px;
	line-height: 1.4;
}

.magicbar-slider-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 5px 10px;
	border-radius: 4px;
	background: #31274b;
	color: #fff;
	font-size: 14px;
}

.magicbar-slider-controls:not([hidden]) { display: flex; justify-content: center; gap: 12px; margin-top: 20px; }
.magicbar-slider-controls button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 8px 14px;
	border: 1px solid #716887;
	border-radius: 24px;
	background: transparent;
	color: #31274b;
	font: inherit;
	cursor: pointer;
	touch-action: manipulation;
}
.magicbar-slider-controls svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.magicbar-slider-controls button:disabled { opacity: .4; cursor: default; }
.magicbar-slider-pagination:not([hidden]) { display: flex; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.magicbar-slider-pagination button {
	display: grid;
	place-items: center;
	width: 28px;
	min-height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	touch-action: manipulation;
}
.magicbar-slider-pagination button::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #716887; }
.magicbar-slider-pagination button[aria-current="true"]::before { width: 12px; height: 12px; background: #31274b; }
.magicbar-slider :is(a, button, [tabindex]):focus-visible { outline: 3px solid #31274b; outline-offset: -3px; }

@media (hover: hover) and (pointer: fine) {
	.magicbar-slider--bestsellers .swiper-initialized .magicbar-slider-details {
		position: absolute;
		inset: 0;
		justify-content: center;
		gap: 15px;
		padding: 20px;
		overflow: auto;
		background: rgb(49 39 75 / 94%);
		color: #fff;
		opacity: 0;
		pointer-events: none;
		transition: opacity .2s ease-out;
	}
	.magicbar-slider--bestsellers .magicbar-slider-card:is(:hover, :focus-within) .magicbar-slider-details { opacity: 1; pointer-events: auto; }
	.magicbar-slider--bestsellers .magicbar-slider-details :is(a, .price) { color: #fff; }
	.magicbar-slider--bestsellers .magicbar-slider-details h3 { font-weight: 700; }
	.magicbar-slider--bestsellers .magicbar-slider-details .button { margin-top: 10px; }
	.magicbar-slider--bestsellers .magicbar-slider-details a:focus-visible { outline-color: #fff; }
	.magicbar-slider .magicbar-slider-details .button:hover { background: #625b7b; }
}

@media (max-width: 1024px) { .magicbar-slider { --slider-columns: 3; } }
@media (max-width: 768px) { .magicbar-slider { --slider-columns: 2; } }
@media (max-width: 680px) { .magicbar-slider { --slider-columns: 1; } }
@media (prefers-reduced-motion: reduce) { .magicbar-slider .magicbar-slider-details { transition: none; } }
