/* ─── Wrapper ─────────────────────────────────────────────────────────────── */

.maksimer-alternative-products {
	display: flex;
	flex-wrap: wrap;
	width: fit-content;
	max-width: 100%;
	margin: 0 0 18px;
}

.maksimer-alternative-products p {
	width: 100%;
}

/* Card box on single product page */
.single-product .maksimer-alternative-products {
	padding: 14px 16px !important;
	background: #ffffff;
	border: 1px solid #ececec;
	border-radius: 8px;
}

/* ─── Grid (width set dynamically by JS) ─────────────────────────────────── */

.maksimer-alternative-products-grid {
	position: relative;
}

/* ─── Splide core overrides ───────────────────────────────────────────────── */

/* Splide hides itself until JS runs. Force-show for low (static) mode. */
.maksimer-alternative-products.low .splide {
	visibility: visible;
}

.maksimer-alternative-products .splide__track {
	overflow: hidden;
}

.maksimer-alternative-products .splide__list {
	display: flex !important;
	align-items: flex-start !important;
	margin: 0 !important;
	padding: 0 !important;
	gap: 12px !important;
	list-style: none !important;
}

/* ─── Slides ─────────────────────────────────────────────────────────────── */

.maksimer-alternative-products .splide__slide {
	flex-shrink: 0 !important;
	width: 94px !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.maksimer-alternative-products .splide__slide > a {
	display: block;
	width: 100%;
	text-align: center;
	text-decoration: none;
	color: #222222;
}

.maksimer-alternative-products .splide__slide img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	margin: 0 0 7px;
	padding: 8px;
	background: #f7f7f7;
	border: 1px solid #ececec;
	border-radius: 8px;
	box-sizing: border-box;
	max-width: 94px;
	max-height: 94px;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.maksimer-alternative-products .splide__slide span {
	display: block;
	font-family: Inter, Arial, sans-serif;
	font-size: 11px;
	line-height: 1.35;
	font-weight: 500;
	color: #444444;
	white-space: normal;
	text-wrap: balance;
}

/* ─── Arrows ─────────────────────────────────────────────────────────────── */

.maksimer-alternative-products .splide__arrows {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	pointer-events: none;
}

.maksimer-alternative-products .splide__arrow {
	position: absolute;
	top: 47px; /* center on the 94px image */
	transform: translateY(-50%);
	width: 28px !important;
	height: 28px !important;
	padding: 0 !important;
	background: #ffffff !important;
	color: #333333 !important;
	border: 1px solid #e0e0e0 !important;
	border-radius: 50% !important;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
	cursor: pointer;
	pointer-events: all;
	display: flex !important;
	align-items: center;
	justify-content: center;
	transition: background .2s ease, color .2s ease, border-color .2s ease;
	z-index: 2;
}

.maksimer-alternative-products .splide__arrow:hover {
	background: #333333 !important;
	color: #ffffff !important;
	border-color: #333333 !important;
}

.maksimer-alternative-products .splide__arrow svg {
	width: 14px;
	height: 14px;
	fill: currentColor;
}

.maksimer-alternative-products .splide__arrow--prev {
	left: -14px !important;
	right: auto !important;
}

.maksimer-alternative-products .splide__arrow--next {
	right: -14px !important;
	left: auto !important;
}

.maksimer-alternative-products .splide__arrow:disabled {
	opacity: 0 !important;
	pointer-events: none;
}

@media screen and (max-width: 599px) {
	.maksimer-alternative-products .splide__arrow--prev { left: -8px !important; }
	.maksimer-alternative-products .splide__arrow--next { right: -8px !important; }
}

/* ─── Peek gradient (hints there are more slides) ────────────────────────── */

.maksimer-alternative-products[data-mode="carousel"]
.maksimer-alternative-products-grid::after {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 28px;
	background: linear-gradient(to right, transparent, #fff);
	pointer-events: none;
}

/* ─── Loop (shop grid thumbnails — no carousel) ───────────────────────────── */

.maksimer-alternative-products-loop {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 6px;
	margin: 6px 0 0;
}

.maksimer-alternative-products-loop a {
	display: block;
	width: 50px;
	height: 50px;
	line-height: 0;
}

.maksimer-alternative-products-loop img,
.astra-shop-summary-wrap .maksimer-alternative-products-loop img {
	width: 50px !important;
	height: 50px !important;
	max-width: 50px !important;
	object-fit: contain;
	border: 1px solid #ececec;
	border-radius: 6px;
	box-sizing: border-box;
}

.maksimer-alternative-products-loop .maksimer-alternative-products-more {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	font-size: 13px;
	font-weight: 600;
	color: #444444;
	background: #f7f7f7;
	border: 1px solid #ececec;
	border-radius: 6px;
	box-sizing: border-box;
}
