/* BTW Carousel for WooCommerce — Mobile
 * Loaded only when the "Dedicated Mobile Layout" setting is on and the
 * visitor is on a mobile device. Same custom-property theming approach
 * as the desktop file, sized for narrow viewports.
 */

.cmc-carousel-m {
	--cmc-accent: #2c3e50;
	--cmc-radius: 8px;
	--cmc-thumb-count: 4;
	--cmc-stage-aspect: 2 / 1; /* match this to your banners' real width÷height */
	--cmc-thumb-height: 70px;
	width: 100%;
	max-width: 100%;
	margin: 0 auto 30px;
	font-family: inherit;
	box-sizing: border-box;
}

.cmc-carousel-m *,
.cmc-carousel-m *::before,
.cmc-carousel-m *::after {
	box-sizing: inherit;
}

/* Full-width stage — the stage IS the tap target, no separate CTA */
.cmc-m-stage {
	display: block;
	width: 100%;
	aspect-ratio: var(--cmc-stage-aspect);
	background-size: cover;
	background-position: center;
	border-radius: var(--cmc-radius);
	position: relative;
	text-decoration: none;
	color: inherit;
	overflow: hidden;
}
.cmc-m-stage-info {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 12px 14px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
	color: #fff;
}

.cmc-m-stage-name {
	display: block;
	font-size: 1rem;
	font-weight: 600;
}

.cmc-m-stage-price-row {
	display: flex;
	align-items: baseline;
	gap: 8px;
	flex-wrap: wrap;
	width: 100%;
}

.cmc-m-stage-price {
	font-size: 0.85rem;
	opacity: 0.9;
}

.cmc-m-stage-message {
	margin-left: auto;
	text-align: right;
	font-size: 0.78rem;
	font-style: italic;
	opacity: 0.85;
}

.cmc-m-sub-message {
	margin: 8px 0 0;
	font-size: 0.85rem;
	color: var(--cmc-accent);
	text-align: center;
}

/* Group dropdown */
.cmc-m-group-nav {
	margin-top: 10px;
}

.cmc-m-group-select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d5d5d5;
	border-radius: var(--cmc-radius);
	background: #fff;
	font-size: 0.95rem;
}

/* Continuous-scroll thumbnail strip */
.cmc-m-thumb-wrap {
	position: relative;
	margin-top: 10px;
}

.cmc-m-thumb-strip {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: smooth;
	padding-bottom: 4px;
}

.cmc-m-thumb-strip::-webkit-scrollbar {
	height: 4px;
}

.cmc-m-thumb-strip::-webkit-scrollbar-track {
	background: rgba(0, 0, 0, 0.08);
	border-radius: 2px;
}

.cmc-m-thumb-strip::-webkit-scrollbar-thumb {
	background: var(--cmc-accent);
	border-radius: 2px;
}

.cmc-m-thumb-strip {
	scrollbar-width: thin;
	scrollbar-color: var(--cmc-accent) rgba(0, 0, 0, 0.08);
}

.cmc-m-thumb {
	flex: 0 0 calc((100% - (var(--cmc-thumb-count) - 1) * 8px) / var(--cmc-thumb-count));
	height: var(--cmc-thumb-height);
	border: 2px solid transparent;
	border-radius: var(--cmc-radius);
	background-size: cover;
	background-position: center;
	scroll-snap-align: start;
	cursor: pointer;
	padding: 0;
}

.cmc-m-thumb.cmc-active {
	border-color: var(--cmc-accent);
}

/* Arrows layered directly over the leftmost/rightmost thumbnail */
.cmc-m-arrow {
	position: absolute;
	top: 0;
	bottom: 4px;
	width: 34px;
	border: none;
	background: rgba(0, 0, 0, 0.4);
	color: #fff;
	font-size: 1.2rem;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cmc-m-arrow-left {
	left: 0;
	border-radius: var(--cmc-radius) 0 0 var(--cmc-radius);
}

.cmc-m-arrow-right {
	right: 0;
	border-radius: 0 var(--cmc-radius) var(--cmc-radius) 0;
}
