/* Marmore Tech – Category Nav v2.3.3 */

/* Row 2 auto-hide */
.mtcn-hidden {
	display: none !important;
}

/* Swipe hint — fade the edge that still has more categories */
.wd-nav-product-cat.mtcn-more-right {
	-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
	mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
}
.wd-nav-product-cat.mtcn-more-left {
	-webkit-mask-image: linear-gradient(to left, #000 calc(100% - 32px), transparent);
	mask-image: linear-gradient(to left, #000 calc(100% - 32px), transparent);
}
.wd-nav-product-cat.mtcn-more-left.mtcn-more-right {
	-webkit-mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent);
	mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent);
}

/* Sticky bar */
.mtcn-ph {
	flex-shrink: 0;
}
.mtcn-sticky.mtcn-fixed {
	position: fixed !important;
	z-index: 300;
	margin: 0 !important;
	box-sizing: border-box;
	background: var(--mtcn-sticky-bg, #fff);
}
.mtcn-sticky.mtcn-fixed.mtcn-shadow {
	box-shadow: 0 8px 18px -12px rgba(0, 0, 0, 0.3);
}

/* Card / carousel design — active category highlight (class on <html> picks the style) */
.wd-cat .wd-cat-thumb { transition: opacity .25s ease, filter .25s ease; }
html[class*="mtcn-hl--"] .wd-cat.mtcn-current :is(.wd-entities-title, .wd-cat-title, h3) { font-weight: 700; }

/* ring: frame drawn on the image box itself, inside it — never covered, never clipped by the carousel */
.mtcn-hl--ring .wd-cat.mtcn-current .wd-cat-thumb { position: relative; }
.mtcn-hl--ring .wd-cat.mtcn-current .wd-cat-thumb::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	border: 2.5px solid var(--mtcn-active, #222);
	border-radius: inherit;
	pointer-events: none;
}

/* underline: a short bar under the active name */
.mtcn-hl--underline .wd-cat.mtcn-current :is(.wd-entities-title, .wd-cat-title, h3) {
	text-decoration: underline;
	text-decoration-color: var(--mtcn-active, #222);
	text-decoration-thickness: 2px;
	text-underline-offset: 6px;
	text-decoration-skip-ink: none;
}

/* dim: the other categories fade back, the active one stays full colour */
.mtcn-hl--dim .elementor-widget:has(.wd-cat.mtcn-current) .wd-cat:not(.mtcn-current) .wd-cat-thumb {
	opacity: .45;
	filter: grayscale(.35);
}
.mtcn-hl--dim .elementor-widget:has(.wd-cat.mtcn-current) .wd-cat:not(.mtcn-current):hover .wd-cat-thumb {
	opacity: .85;
	filter: none;
}

/* While a freshly loaded row is being placed (after AJAX navigation) */
.mtcn-placing .wd-carousel {
	visibility: hidden;
}

/* ---------- compact sticky bar (pills / mini) ---------- */
.mtcn-bar {
	position: fixed;
	left: 0;
	right: 0;
	top: 0;
	z-index: 299;
	padding: 5px 0;
	background: var(--mtcn-sticky-bg, #fff);
	transform: translateY(-120%);
	opacity: 0;
	visibility: hidden;
	transition: transform .28s ease, opacity .2s ease, visibility 0s linear .28s;
}
.mtcn-bar.mtcn-bar--show {
	transform: none;
	opacity: 1;
	visibility: visible;
	transition: transform .28s ease, opacity .2s ease;
}
.mtcn-bar.mtcn-shadow { box-shadow: 0 8px 18px -12px rgba(17, 24, 39, .35); border-bottom: 1px solid rgba(17, 24, 39, .06); }
.mtcn-bar {
	--mtcn-ac: var(--mtcn-pill-active-bg, #1f2937);
	--mtcn-ac-soft: #eef0f3;
	--mtcn-ac-soft: color-mix(in srgb, var(--mtcn-pill-active-bg, #1f2937) 9%, transparent);
	padding: 8px 0 7px;
}
.mtcn-bar__row {
	display: flex;
	align-items: center;
	gap: 8px;
	overflow-x: auto;
	padding: 0 12px;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.mtcn-bar__row::-webkit-scrollbar { display: none; }
.mtcn-bar__row + .mtcn-bar__row { margin-top: 8px; }
.mtcn-bar--fade .mtcn-bar__row {
	-webkit-mask-image: linear-gradient(to right, transparent, #000 18px, #000 calc(100% - 18px), transparent);
	mask-image: linear-gradient(to right, transparent, #000 18px, #000 calc(100% - 18px), transparent);
}
.mtcn-bar--track.mtcn-bar--fade .mtcn-bar__row--main { -webkit-mask-image: none; mask-image: none; }
.mtcn-chip {
	box-sizing: border-box;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: calc(7px * var(--mtcn-sm, 1));
	height: calc(36px * var(--mtcn-sm, 1));
	padding: 0 calc(16px * var(--mtcn-sm, 1));
	margin: 0;
	border: 1px solid transparent;
	border-radius: 999px;
	background: var(--mtcn-pill-bg, #f3f4f6);
	color: var(--mtcn-pill-text, #1f2937) !important;
	font-size: calc(14px * var(--mtcn-sm, 1));
	font-weight: 500;
	letter-spacing: .1px;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none !important;
	-webkit-tap-highlight-color: transparent;
	transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.mtcn-chip.is-on { font-weight: 600; }

/* 1 — pills (soft) */
.mtcn-bar--pills .mtcn-chip.is-on {
	background: var(--mtcn-pill-active-bg, #1f2937);
	color: var(--mtcn-pill-active-text, #fff) !important;
}
.mtcn-bar--pills .mtcn-bar__row--sub .mtcn-chip,
.mtcn-bar--thumbs .mtcn-bar__row--sub .mtcn-chip {
	height: calc(30px * var(--mtcn-ss, 1));
	padding: 0 calc(13px * var(--mtcn-ss, 1));
	gap: calc(6px * var(--mtcn-ss, 1));
	font-size: calc(13px * var(--mtcn-ss, 1));
	background: transparent;
	border-color: #e5e7eb;
}
.mtcn-bar--pills .mtcn-bar__row--sub .mtcn-chip.is-on,
.mtcn-bar--thumbs .mtcn-bar__row--sub .mtcn-chip.is-on {
	background: var(--mtcn-ac-soft);
	border-color: var(--mtcn-ac);
	color: var(--mtcn-ac) !important;
}

/* 4 — track (segmented, iOS-like) */
.mtcn-bar--track .mtcn-bar__row--main {
	margin: 0 12px;
	padding: 4px;
	gap: 2px;
	border-radius: 12px;
	background: var(--mtcn-pill-bg, #f3f4f6);
}
.mtcn-bar--track .mtcn-bar__row--sub { gap: 4px; padding: 0 16px; }
.mtcn-bar--track .mtcn-chip {
	height: calc(32px * var(--mtcn-sm, 1));
	padding: 0 calc(14px * var(--mtcn-sm, 1));
	border-radius: 9px;
	background: transparent;
	opacity: .78;
}
.mtcn-bar--track .mtcn-chip.is-on {
	opacity: 1;
	background: var(--mtcn-sticky-bg, #fff);
	font-weight: 700;
	box-shadow: 0 1px 3px rgba(17, 24, 39, .14), 0 0 0 .5px rgba(17, 24, 39, .05);
}
.mtcn-bar--track .mtcn-bar__row--sub .mtcn-chip {
	height: calc(28px * var(--mtcn-ss, 1));
	padding: 0 calc(12px * var(--mtcn-ss, 1));
	border-radius: 8px;
	font-size: calc(12.5px * var(--mtcn-ss, 1));
}
.mtcn-bar--track .mtcn-bar__row--sub .mtcn-chip.is-on {
	background: var(--mtcn-ac-soft);
	color: var(--mtcn-ac) !important;
	box-shadow: none;
}

/* 6 — thumbs (pill + category image) */
.mtcn-bar--thumbs .mtcn-chip {
	height: calc(38px * var(--mtcn-sm, 1));
	padding-inline: calc(4px * var(--mtcn-sm, 1)) calc(15px * var(--mtcn-sm, 1));
}
.mtcn-bar--thumbs .mtcn-chip.is-on {
	background: var(--mtcn-pill-active-bg, #1f2937);
	color: var(--mtcn-pill-active-text, #fff) !important;
}
.mtcn-bar--thumbs .mtcn-chip img,
.mtcn-bar--thumbs .mtcn-bar__ph {
	display: block;
	flex: 0 0 auto;
	box-sizing: border-box;
	width: calc(30px * var(--mtcn-sm, 1));
	height: calc(30px * var(--mtcn-sm, 1));
	margin: 0;
	border-radius: 50%;
	border: 2px solid #fff;
	object-fit: cover;
	background: #e9eaec;
}
.mtcn-bar--thumbs .mtcn-chip.is-on img,
.mtcn-bar--thumbs .mtcn-chip.is-on .mtcn-bar__ph { border-color: rgba(255, 255, 255, .35); }
.mtcn-bar--thumbs .mtcn-bar__row--sub .mtcn-chip {
	height: calc(32px * var(--mtcn-ss, 1));
	padding-inline: calc(3px * var(--mtcn-ss, 1)) calc(12px * var(--mtcn-ss, 1));
}
.mtcn-bar--thumbs .mtcn-bar__row--sub img,
.mtcn-bar--thumbs .mtcn-bar__row--sub .mtcn-bar__ph {
	width: calc(24px * var(--mtcn-ss, 1));
	height: calc(24px * var(--mtcn-ss, 1));
	border-width: 0;
}

/* mini: small round images */
.mtcn-bar--mini .mtcn-bar__row { gap: 8px; padding-top: 5px; padding-bottom: 2px; }
.mtcn-bar--mini .mtcn-chip {
	--mtcn-s: var(--mtcn-sm, 1);
	flex-direction: column;
	gap: 4px;
	width: calc(66px * var(--mtcn-s));
	height: auto;
	padding: 2px 0;
	border: 0 !important;
	border-radius: 0;
	background: transparent !important;
	color: var(--mtcn-pill-text, #1f2937) !important;
	font-size: calc(11px * var(--mtcn-s));
}
.mtcn-bar--mini .mtcn-bar__row--sub .mtcn-chip { --mtcn-s: var(--mtcn-ss, 1); }
.mtcn-bar--mini .mtcn-chip img,
.mtcn-bar--mini .mtcn-bar__ph {
	display: block;
	width: calc(44px * var(--mtcn-s));
	height: calc(44px * var(--mtcn-s));
	border-radius: 50%;
	object-fit: cover;
	background: #eee;
	box-shadow: 0 0 0 2px transparent;
}
.mtcn-bar--mini .mtcn-chip.is-on img,
.mtcn-bar--mini .mtcn-chip.is-on .mtcn-bar__ph {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--mtcn-pill-active-bg, #1f2937);
}
.mtcn-bar--mini .mtcn-chip__l {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
}
.mtcn-bar--mini .mtcn-chip.is-on .mtcn-chip__l { font-weight: 800; }

/* full rows style: optional size per row while stuck */
.mtcn-sticky.mtcn-fixed [data-mtcn-row="main"] { zoom: var(--mtcn-sm, 1); }
.mtcn-sticky.mtcn-fixed [data-mtcn-row="sub"] { zoom: var(--mtcn-ss, 1); }
