/* 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;
}

/* 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);
}

/* WooCommerce price HTML includes screen-reader-only text (e.g. "Original price was: …")
   Hidden here too, in case the theme doesn't define this class. */
.cmc-carousel-m .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* Filmstrip turned off: the thumbnails stay in the HTML (they carry each
   product's data for the script) but are not shown, so their images are
   never downloaded. */
.cmc-no-strip .cmc-m-thumb-wrap {
	display: none !important;
}
