/*
 * BM Real Estate — Carousel (shared: services + properties)
 * ==================================================================
 *   1. Theme reset (the track is a <ul>)
 *   2. Track + item widths (services sizes; other carousels override
 *      the widths with their own modifier class)
 *   3. Arrows (desktop; touch screens swipe)
 * The cards inside are styled by their own module.
 * Selectors are ".bm-rlst-wrap .x" (two classes) so theme / Elementor
 * kit rules for ul, li and button don't restyle them.
 * ================================================================== */

/* ==================================================================
   1. THEME RESET
   ================================================================== */
.bm-rlst-wrap .bm-rlst-carousel__track,
.bm-rlst-wrap .bm-rlst-carousel__item {
	margin: 0;
	padding: 0;
	list-style: none;
}
.bm-rlst-wrap .bm-rlst-carousel__item::before { content: none; }

/* ==================================================================
   2. TRACK
   ================================================================== */
.bm-rlst-wrap.bm-rlst-carousel {
	position: relative;
}
.bm-rlst-wrap .bm-rlst-carousel__track {
	display: flex;
	gap: 20px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding: 4px 2px 12px;
}
.bm-rlst-wrap .bm-rlst-carousel__track::-webkit-scrollbar { display: none; }
/* Phones: the next card peeks in, so it's clear the row swipes. */
.bm-rlst-wrap .bm-rlst-carousel__item {
	flex: 0 0 78%;
	scroll-snap-align: start;
}
@media (min-width: 600px) {
	.bm-rlst-wrap .bm-rlst-carousel__item { flex-basis: calc((100% - 40px) / 2.4); }
}
@media (min-width: 1024px) {
	.bm-rlst-wrap .bm-rlst-carousel__item { flex-basis: calc((100% - 60px) / 4); }
}

/* ==================================================================
   3. ARROWS
   ================================================================== */
.bm-rlst-wrap .bm-rlst-carousel__nav {
	-webkit-appearance: none;
	appearance: none;
	position: absolute;
	top: calc(50% - 26px);
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--bm-rlst-title);
	box-shadow: 0 4px 16px rgba(40, 30, 20, .2);
	cursor: pointer;
	transition: opacity .15s ease, transform .15s ease;
}
.bm-rlst-wrap .bm-rlst-carousel__nav[hidden] { display: none; }
.bm-rlst-wrap .bm-rlst-carousel__nav--prev { left: -16px; }
.bm-rlst-wrap .bm-rlst-carousel__nav--next { right: -16px; }
.bm-rlst-wrap .bm-rlst-carousel__nav:disabled {
	opacity: 0;
	pointer-events: none;
}
.bm-rlst-wrap .bm-rlst-carousel__nav:hover,
.bm-rlst-wrap .bm-rlst-carousel__nav:focus {
	background: #fff;
	color: var(--bm-rlst-title);
	outline: none;
}
.bm-rlst-wrap .bm-rlst-carousel__nav:focus-visible {
	outline: 2px solid var(--bm-rlst-accent);
	outline-offset: 2px;
}
.bm-rlst-wrap .bm-rlst-carousel__nav svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
@media (hover: none) {
	.bm-rlst-wrap .bm-rlst-carousel__nav { display: none !important; }
}
@media (hover: hover) {
	.bm-rlst-wrap .bm-rlst-carousel__nav:hover { transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
	.bm-rlst-wrap .bm-rlst-carousel__track { scroll-behavior: auto; }
}
