/**
 * MTW Archive Category Slider v3
 * Product archive / Shop / Product Category archive
 *
 * Small-screen rules intentionally add NO horizontal offset.
 * Bricks can control the outer section/container spacing.
 */

.mtw-archive-category-slider {
	--mtw-category-slider-card: #FFF9F1;
	--mtw-category-slider-text: #1E1E1E;
	--mtw-category-slider-control: #1E1E1E;
	--mtw-category-slider-muted: #D4CFC5;

	position: relative;
	width: 100%;
	/* padding: 28px 0 26px; */
	background: transparent;
	overflow: hidden;
	box-sizing: border-box;
}

.mtw-archive-category-slider *,
.mtw-archive-category-slider *::before,
.mtw-archive-category-slider *::after {
	box-sizing: border-box;
}

/* =========================================================
   VIEWPORT
========================================================= */

.mtw-archive-category-slider__viewport {
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	cursor: grab;

	/* Desktop alignment only. */
	padding-inline: max(60px, calc((100vw - 1320px) / 2));
	scroll-padding-inline: max(60px, calc((100vw - 1320px) / 2));
}

.mtw-archive-category-slider__viewport::-webkit-scrollbar {
	display: none;
}

.mtw-archive-category-slider__viewport.is-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
	user-select: none;
}

/* =========================================================
   TRACK
========================================================= */

.mtw-archive-category-slider__track {
	display: flex;
	align-items: flex-start;
	width: max-content;
	gap: 20px;
}

/* =========================================================
   CATEGORY CARD
========================================================= */

.mtw-archive-category-slider__card {
	display: flex;
	flex-direction: column;
	flex: 0 0 clamp(270px, 28vw, 390px);
	min-width: 0;
	scroll-snap-align: start;
	color: var(--mtw-category-slider-text);
	text-decoration: none;
	position: relative;
	z-index: 1;
	pointer-events: auto;
}


.mtw-archive-category-slider__media {
	display: grid;
	place-items: center;
	width: 100%;
	aspect-ratio: 1 / 1;
	padding: 18px;
	border-radius: 18px;
	background: var(--mtw-category-slider-card);
	overflow: hidden;
}

.mtw-archive-category-slider__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform .28s ease;
}

.mtw-archive-category-slider__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 14px;
	background: rgba(255,255,255,.45);
}

.mtw-archive-category-slider__name {
	display: block;
	padding: 18px 8px 0;
	text-align: center;
	font-family: Roboto, Arial, sans-serif;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--mtw-category-slider-text);
}

/* =========================================================
   DESKTOP OVERLAY ARROWS
========================================================= */

.mtw-archive-category-slider__nav {
	position: absolute;
	top: 50%;
	z-index: 4;
	width: 50px;
	height: 50px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(43, 51, 41, .58);
	color: #fff;
	cursor: pointer;
	transform: translateY(-80%);
	transition: opacity .2s ease, background .2s ease;
}

.mtw-archive-category-slider__nav {
    border: 1px solid #fff;
}

.mtw-archive-category-slider__nav i {
	display: block;
	font-size: 28px;
	line-height: 1;
	color: currentColor;
}

.mtw-archive-category-slider__nav--prev { left: 8px; }
.mtw-archive-category-slider__nav--next { right: 8px; }

.mtw-archive-category-slider__nav:hover {
	/* background: rgba(43, 51, 41, .78); */
}

.mtw-archive-category-slider__nav[disabled] {
	opacity: 0;
	pointer-events: none;
}

/* =========================================================
   MOBILE/TABLET REFERENCE CONTROLS
========================================================= */

.mtw-archive-category-slider__mobile-controls {
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	width: 100%;
	margin-top: 28px;
}

.mtw-archive-category-slider__mobile-nav {
	display: flex;
	align-items: center;
	gap: 14px;
}

.mtw-archive-category-slider__mobile-nav-button {
	width: 50px;
	height: 50px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 1px solid var(--mtw-category-slider-control);
	border-radius: 999px;
	background: transparent;
	color: var(--mtw-category-slider-control);
	cursor: pointer;
	transition: opacity .2s ease, background .2s ease;
}

.mtw-archive-category-slider__mobile-nav-button i {
	font-size: 22px;
	line-height: 1;
}

.mtw-archive-category-slider__mobile-nav-button[disabled] {
	opacity: .28;
	cursor: default;
}

.mtw-archive-category-slider__pagination {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 9px;
	min-width: 56px;
}

.mtw-archive-category-slider__pagination-dot {
	appearance: none;
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--mtw-category-slider-muted);
	cursor: pointer;
	transition: width .22s ease, background .22s ease;
}

.mtw-archive-category-slider__pagination-dot.is-active {
	width: 42px;
	background: var(--mtw-category-slider-control);
}

/* =========================================================
   HOVER + FOCUS
========================================================= */

@media (hover:hover) and (pointer:fine) {
	.mtw-archive-category-slider__card:hover .mtw-archive-category-slider__image {
		transform: scale(1.035);
	}

	.mtw-archive-category-slider__card:hover .mtw-archive-category-slider__name {
		text-decoration: underline;
		text-underline-offset: 4px;
	}
}

.mtw-archive-category-slider__card:focus-visible,
.mtw-archive-category-slider__mobile-nav-button:focus-visible,
.mtw-archive-category-slider__pagination-dot:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

/* =========================================================
   LARGE DESKTOP
========================================================= */

@media (min-width:1600px) {
	.mtw-archive-category-slider__card {
		flex-basis: 310px;
	}
}

/* =========================================================
   SMALL LAPTOP / TABLET
   IMPORTANT: no coded left/right offset below 1200px.
========================================================= */

@media (max-width:1199px) {
	.mtw-archive-category-slider__viewport {
		padding-inline: 0;
		scroll-padding-inline: 0;
	}

	.mtw-archive-category-slider__card {
		flex-basis: 31vw;
		min-width: 270px;
	}

	.mtw-archive-category-slider__nav--prev { left: 8px; }
	.mtw-archive-category-slider__nav--next { right: 8px; }
}

@media (max-width:899px) {
	.mtw-archive-category-slider {
		padding: 24px 0 22px;
	}

	.mtw-archive-category-slider__viewport {
		padding-inline: 0;
		scroll-padding-inline: 0;
	}

	.mtw-archive-category-slider__track {
		gap: 16px;
	}

	.mtw-archive-category-slider__card {
		flex-basis: 44vw;
		min-width: 240px;
	}

	/* Hide overlay arrows and use the reference controls below. */
	.mtw-archive-category-slider__nav {
		display: none;
	}

	.mtw-archive-category-slider__mobile-controls {
		display: flex;
	}
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width:639px) {
	.mtw-archive-category-slider {
		padding: 20px 0 18px;
	}

	.mtw-archive-category-slider__viewport {
		padding-inline: 0;
		scroll-padding-inline: 0;
		cursor: auto;
	}

	.mtw-archive-category-slider__track {
		gap: 14px;
	}

	.mtw-archive-category-slider__card {
		/* One large card with a controlled peek of the next card. */
		flex: 0 0 82vw;
		min-width: 0;
	}

	.mtw-archive-category-slider__media {
		padding: 14px;
		border-radius: 16px;
	}

	.mtw-archive-category-slider__name {
		padding-top: 12px;
		font-size: 15px;
	}

	.mtw-archive-category-slider__mobile-controls {
		margin-top: 26px;
	}

	.mtw-archive-category-slider__mobile-nav-button {
		width: 40px;
		height: 40px;
	}

	.mtw-archive-category-slider__mobile-nav-button i {
		font-size: 20px;
	}

	.mtw-archive-category-slider__pagination-dot.is-active {
		width: 40px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mtw-archive-category-slider__viewport {
		scroll-behavior: auto;
	}

	.mtw-archive-category-slider__image,
	.mtw-archive-category-slider__pagination-dot {
		transition: none !important;
	}
}

/* =========================================================
   MTW ARCHIVE CATEGORY SLIDER
   NAVIGATION MATCH HOMEPAGE "OUR COLLECTIONS"
========================================================= */

/* ---------------------------------------------------------
   DESKTOP OVERLAY ARROWS
   Keep arrows aligned to the 1440px content area,
   instead of the extreme browser edges.
--------------------------------------------------------- */

@media (min-width: 900px) {

	.mtw-archive-category-slider__nav {
		display: grid;

		position: absolute;
		top: 50%;
		z-index: 5;

		width: 50px;
		height: 50px;

		padding: 0;

		border: 1px solid #fff;
		border-radius: 50%;

		/* background: rgba(43, 51, 41, .58); */
		background: rgb(233 93 31 / 58%);
		color: #fff;

		place-items: center;

		cursor: pointer;

		transform: translateY(-80%);

		transition:
			opacity .2s ease,
			background .2s ease;
	}

	.mtw-archive-category-slider__nav i {
		display: block;

		font-size: 28px;
		line-height: 1;

		color: currentColor;
	}

	/*
	 * Match homepage collections:
	 * arrows stay within the central 1440px area.
	 *
	 * On screens <= 1440px this automatically falls back
	 * to 8px from the slider edge.
	 */
	.mtw-archive-category-slider__nav--prev {
		left: max(
			8px,
			calc((100% - 1440px) / 2 + 8px)
		);
	}

	.mtw-archive-category-slider__nav--next {
		right: max(
			8px,
			calc((100% - 1440px) / 2 + 8px)
		);
	}

	.mtw-archive-category-slider__nav:hover {
		/* background: rgba(43, 51, 41, .78); */
	}

	.mtw-archive-category-slider__nav[disabled] {
		opacity: 0;
		pointer-events: none;
	}


	/*
	 * Desktop does not need the separate
	 * mobile controls underneath.
	 */
	.mtw-archive-category-slider__mobile-controls {
		display: none !important;
	}
}


/* =========================================================
   TABLET + MOBILE
   MATCH HOMEPAGE COLLECTION NAVIGATION + PAGINATION
========================================================= */

@media (max-width: 899px) {

	/*
	 * IMPORTANT:
	 * Previously your CSS hides the overlay arrows here.
	 * We now show them again so they behave exactly like
	 * the homepage collection slider.
	 */
	.mtw-archive-category-slider__nav {
		display: grid !important;

		position: absolute;
		z-index: 5;

		width: 46px;
		height: 46px;

		padding: 0;

		border: 1px solid #fff;
		border-radius: 50%;

		background: rgba(43, 51, 41, .58);
		color: #fff;

		place-items: center;

		cursor: pointer;

		/*
		 * Position approximately at the vertical centre
		 * of the category card/media area.
		 */
		top: 45%;

		transform: translateY(-50%);
	}

	.mtw-archive-category-slider__nav i {
		display: block;

		font-size: 22px;
		line-height: 1;

		color: currentColor;
	}

	.mtw-archive-category-slider__nav--prev {
		left: 6px;
	}

	.mtw-archive-category-slider__nav--next {
		right: 6px;
	}

	.mtw-archive-category-slider__nav:hover {
		/* background: rgba(43, 51, 41, .78); */
	}

	.mtw-archive-category-slider__nav[disabled] {
		opacity: 0;
		pointer-events: none;
	}


	/* -----------------------------------------------------
	   MOBILE CONTROL AREA
	   Keep ONLY pagination here.
	   The old outlined bottom arrows are removed.
	----------------------------------------------------- */

	.mtw-archive-category-slider__mobile-controls {
		display: flex !important;

		align-items: center;
		justify-content: center;

		width: 100%;

		margin-top: 28px;

		padding: 0;
	}


	/*
	 * Hide the old bottom-left mobile arrows.
	 * We are now using the overlay arrows instead.
	 */
	.mtw-archive-category-slider__mobile-nav {
		display: none !important;
	}


	/* -----------------------------------------------------
	   PAGINATION
	   Same style as homepage Our Collections
	----------------------------------------------------- */

	.mtw-archive-category-slider__pagination {
		display: flex;

		align-items: center;
		justify-content: center;

		gap: 4px;

		width: auto;
		min-width: 0;

		margin: 0;
	}


	.mtw-archive-category-slider__pagination-dot {
		appearance: none;

		width: 18px;
		height: 4px;

		margin: 0;
		padding: 0;

		border: 0;
		border-radius: 999px;

		background: #F5D7BA;

		cursor: pointer;

		transition:
			width .2s ease,
			background .2s ease;
	}


	.mtw-archive-category-slider__pagination-dot.is-active {
		width: 42px;

		background: #FE6901;
	}
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 639px) {

	.mtw-archive-category-slider__nav {
		width: 46px;
		height: 46px;

		/*
		 * Slightly higher than mathematical centre because
		 * the category name sits underneath the image.
		 */
		top: 43%;
	}

	.mtw-archive-category-slider__nav i {
		font-size: 22px;
	}

	.mtw-archive-category-slider__nav--prev {
		left: 6px;
	}

	.mtw-archive-category-slider__nav--next {
		right: 6px;
	}

	.mtw-archive-category-slider__mobile-controls {
		margin-top: 26px;
	}

	.mtw-archive-category-slider__pagination-dot {
		width: 18px;
		height: 4px;
	}

	.mtw-archive-category-slider__pagination-dot.is-active {
		width: 42px;
		background: #FE6901;
	}
}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

	.mtw-archive-category-slider__nav {
		width: 44px;
		height: 44px;
	}

	.mtw-archive-category-slider__nav i {
		font-size: 21px;
	}
}

/* =========================================================
   MTW ARCHIVE CATEGORY SLIDER
   FINAL CONTAINER ALIGNMENT
   ---------------------------------------------------------
   Desktop / laptop:
   - Maximum content guide: 1440px
   - Minimum left/right gutter: 80px

   Tablet / mobile:
   - Left/right gutter: 20px

   IMPORTANT:
   The slider itself stays full width so the cards can still
   peek outside the central content area.
========================================================= */

.mtw-archive-category-slider {
	--mtw-archive-max-width: 1295px;
	--mtw-archive-desktop-gutter: 80px;
	--mtw-archive-mobile-gutter: 0px;
}


/* =========================================================
   DESKTOP + LAPTOP
   900px and above
========================================================= */

@media (min-width: 900px) {

	.mtw-archive-category-slider__viewport {
		width: 100%;

		/*
		 * Example:
		 *
		 * 1920px screen:
		 * (1920 - 1440) / 2 = 240px
		 *
		 * 1440px screen:
		 * minimum gutter = 80px
		 *
		 * 1200px screen:
		 * minimum gutter = 80px
		 */
		padding-left: max(
			var(--mtw-archive-desktop-gutter),
			calc((100vw - var(--mtw-archive-max-width)) / 2)
		) !important;

		padding-right: max(
			var(--mtw-archive-desktop-gutter),
			calc((100vw - var(--mtw-archive-max-width)) / 2)
		) !important;

		scroll-padding-left: max(
			var(--mtw-archive-desktop-gutter),
			calc((100vw - var(--mtw-archive-max-width)) / 2)
		) !important;

		scroll-padding-right: max(
			var(--mtw-archive-desktop-gutter),
			calc((100vw - var(--mtw-archive-max-width)) / 2)
		) !important;
	}


	/* -----------------------------------------------------
	   Navigation arrows follow the same 1440px content guide
	----------------------------------------------------- */

	.mtw-archive-category-slider__nav--prev {
		left: max(
			var(--mtw-archive-desktop-gutter),
			calc((100vw - var(--mtw-archive-max-width)) / 2)
		) !important;
	}

	.mtw-archive-category-slider__nav--next {
		right: max(
			var(--mtw-archive-desktop-gutter),
			calc((100vw - var(--mtw-archive-max-width)) / 2)
		) !important;
	}
}


/* =========================================================
   TABLET + MOBILE
   899px and below
========================================================= */

@media (max-width: 899px) {

	.mtw-archive-category-slider__viewport {
		width: 100%;

		padding-left: var(--mtw-archive-mobile-gutter) !important;
		padding-right: var(--mtw-archive-mobile-gutter) !important;

		scroll-padding-left: var(--mtw-archive-mobile-gutter) !important;
		scroll-padding-right: var(--mtw-archive-mobile-gutter) !important;
	}


	/*
	 * Overlay arrows stay inside the same 20px gutter.
	 */
	.mtw-archive-category-slider__nav--prev {
		left: var(--mtw-archive-mobile-gutter) !important;
	}

	.mtw-archive-category-slider__nav--next {
		right: var(--mtw-archive-mobile-gutter) !important;
	}


	/*
	 * Pagination follows the same mobile content width.
	 */
	.mtw-archive-category-slider__mobile-controls {
		width: calc(
			100% - (var(--mtw-archive-mobile-gutter) * 2)
		) !important;

		margin-left: var(--mtw-archive-mobile-gutter) !important;
		margin-right: var(--mtw-archive-mobile-gutter) !important;
	}
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 639px) {

	.mtw-archive-category-slider__viewport {
		padding-left: 20px !important;
		padding-right: 20px !important;

		scroll-padding-left: 20px !important;
		scroll-padding-right: 20px !important;
	}

	.mtw-archive-category-slider__nav--prev {
		left: 20px !important;
	}

	.mtw-archive-category-slider__nav--next {
		right: 20px !important;
	}

	.mtw-archive-category-slider__mobile-controls {
		width: calc(100% - 40px) !important;
		margin-left: 20px !important;
		margin-right: 20px !important;
	}
}