/**
 * @package ProMart
 */

.promart-home-latest-products {
	--promart-latest-navy: #0d3155;
	--promart-latest-gold: #d39d2b;
	--promart-latest-gold-dark: #b88725;
	--promart-latest-muted: #717171;
	--promart-latest-surface: #f5f6f7;
	padding: 2rem 0;
	background: #fff;
}

.promart-home-latest-products__header {
	display: none;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.875rem;
}

.promart-home-latest-products__box {
	display: flex;
	align-items: stretch;
	gap: 0;
	border: 3px solid var(--promart-latest-gold);
	border-radius: 20px;
	background: #fff;
	overflow: hidden;
	min-height: 0;
}

.promart-home-latest-products__products-col {
	flex: 1;
	min-width: 0;
	padding: 1rem 0.75rem 1rem 1rem;
}

.promart-home-latest-products__scroller-wrap {
	position: relative;
	min-width: 0;
}

.promart-home-latest-products__scroller {
	overflow-x: auto;
	overflow-y: visible;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	direction: rtl;
	scroll-snap-type: x proximity;
}

.promart-home-latest-products__track {
	display: flex;
	align-items: stretch;
	gap: var(--promart-home-catalog-gap);
	width: max-content;
	direction: rtl;
}


.promart-home-latest-products__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 4;
	width: 36px;
	height: 36px;
	border: 1px solid #e2e5ea;
	border-radius: 999px;
	background: #fff;
	color: var(--promart-latest-navy);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(13, 49, 85, 0.12);
	transition: border-color 0.2s, background-color 0.2s, color 0.2s, opacity 0.25s, visibility 0.25s;
}

.promart-home-latest-products__nav--next {
	left: 0.25rem;
	right: auto;
}

.promart-home-latest-products__nav--prev {
	right: 0.25rem;
	left: auto;
}

.promart-home-latest-products__nav:hover {
	border-color: var(--promart-latest-navy);
	background: var(--promart-latest-navy);
	color: #fff;
}

.promart-home-latest-products__nav.is-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.promart-home-latest-products__nav .material-symbols-outlined {
	font-size: 22px;
}

.promart-home-latest-products__sidebar {
	flex-shrink: 0;
	width: 168px;
	padding: 1rem 0.75rem;
	border-left: 1px solid #f0f1f3;
	background: #fff;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	align-self: stretch;
	min-height: 100%;
}

.promart-home-latest-products__tabs {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	justify-content: flex-start;
}

.promart-home-latest-products__mobile-tabs {
	display: none;
	flex-wrap: wrap;
	gap: 0.375rem;
}

.promart-home-latest-products__panel {
	display: none;
}

.promart-home-latest-products__panel.is-active {
	display: block;
}

.promart-home-latest-products__tab {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 0.5rem 0.75rem;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--promart-latest-muted);
	text-align: center;
	border: none;
	border-radius: 0.5rem;
	background: transparent;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.promart-home-latest-products__tab.is-active {
	background: var(--promart-latest-gold);
	/* Was #fff, ~2.4:1 on the gold background. Switched to navy for a
	   ~5.4:1 contrast ratio. */
	color: var(--promart-latest-navy);
}

@media (min-width: 640px) {
	.promart-home-latest-products__products-col {
		padding: 1.125rem 1rem 1.125rem 1.25rem;
	}

	.promart-home-latest-products__sidebar {
		width: 184px;
		padding: 1.125rem 1rem;
	}
}

@media (min-width: 1024px) {
	.promart-home-latest-products__products-col {
		padding: 1.25rem 1.25rem 1.25rem 1.5rem;
	}

	.promart-home-latest-products__sidebar {
		width: 196px;
		padding: 1.25rem 1rem;
	}

	.promart-home-latest-products__tab {
		font-size: 0.8125rem;
		padding: 0.5rem 0.75rem;
	}

	.promart-home-latest-products__scroller {
		overflow-y: hidden;
		scroll-snap-type: none;
	}
}

@media (max-width: 639px) {
	.promart-home-latest-products {
		padding: 1.25rem 0 1.5rem;
	}

	.promart-home-latest-products__header {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
	}

	.promart-home-latest-products__mobile-tabs {
		display: flex;
		flex-wrap: nowrap;
		width: 100%;
		gap: 0.5rem;
	}

	.promart-home-latest-products__tab--mobile {
		width: auto;
		flex: 1 1 auto;
		min-width: 0;
		min-height: auto;
		padding: 0.5rem 0.625rem;
		font-size: 0.6875rem;
		color: var(--promart-latest-muted);
		background: #fff;
		border: 1px solid #e5e7eb;
		border-right-color: #cfd3d8;
		border-bottom-width: 2px;
		border-bottom-color: #cfd3d8;
		box-shadow: 2px 3px 0 rgba(13, 49, 85, 0.06), 2px 4px 6px rgba(13, 49, 85, 0.08);
	}

	.promart-home-latest-products__tab--mobile.is-active {
		/* Was #fff, ~2.4:1 on the gold background. Switched to navy for a
		   ~5.4:1 contrast ratio. */
		color: var(--promart-latest-navy);
		background: var(--promart-latest-gold);
		border-color: #c08e26;
		border-right-color: #9e751c;
		border-bottom-color: #9e751c;
		box-shadow: 2px 3px 0 rgba(158, 117, 28, 0.42), 2px 4px 7px rgba(13, 49, 85, 0.12);
	}

	.promart-home-latest-products__box {
		flex-direction: column;
		border: none;
		border-radius: 0.875rem;
		background: var(--promart-latest-gold);
		box-shadow: none;
	}

	.promart-home-latest-products__products-col {
		order: 1;
		padding: 0.875rem 0.625rem;
	}

	.promart-home-latest-products__scroller-wrap {
		padding-inline: 0.125rem;
	}

	.promart-home-latest-products__scroller {
		margin-inline: -0.125rem;
		padding-inline: 0.125rem;
		scroll-padding-inline: 0.125rem;
	}

	.promart-home-latest-products__track {
		padding-block: 0.125rem;
	}

	.promart-home-latest-products__nav {
		width: 2rem;
		height: 2rem;
		background: rgba(255, 255, 255, 0.96);
		backdrop-filter: blur(6px);
		-webkit-backdrop-filter: blur(6px);
		box-shadow: 0 2px 10px rgba(13, 49, 85, 0.1);
	}

	.promart-home-latest-products__nav .material-symbols-outlined {
		font-size: 1.125rem;
	}

	.promart-home-latest-products__nav--next {
		left: 0;
	}

	.promart-home-latest-products__nav--prev {
		right: 0;
	}

	.promart-home-latest-products__sidebar {
		display: none;
	}
}
