/* ETM Amazon Sync - dynamic product catalog */

.etm-product-catalog {
	--etm-catalog-accent: var(--e-global-color-accent, #f36f35);
	--etm-catalog-text: currentColor;
	--etm-catalog-muted: color-mix(in srgb, currentColor 62%, transparent);
	--etm-catalog-border: color-mix(in srgb, currentColor 12%, transparent);
	--etm-catalog-surface: #fff;
	--etm-catalog-soft: color-mix(in srgb, var(--etm-catalog-accent) 8%, Canvas);
	--etm-catalog-shadow: 0 12px 28px color-mix(in srgb, currentColor 10%, transparent);
	width: 100%;
	max-width: min(1180px, 100%);
	min-width: 0;
	margin: 0 auto 48px;
	color: var(--etm-catalog-text);
	font-family: inherit;
}

.etm-product-catalog *,
.etm-product-catalog *::before,
.etm-product-catalog *::after {
	box-sizing: border-box;
	min-width: 0;
}

.etm-product-catalog__hero,
.etm-product-catalog__guide,
.etm-product-catalog__featured {
	border: 1px solid var(--etm-catalog-border);
	border-radius: 8px;
	background: var(--etm-catalog-surface);
	box-shadow: var(--etm-catalog-shadow);
}

.etm-product-catalog__hero {
	display: grid;
	gap: 12px;
	margin-bottom: 18px;
	padding: clamp(20px, 4vw, 34px);
	background: var(--etm-catalog-soft);
}

.etm-product-catalog__hero span,
.etm-product-catalog__section-head span,
.etm-product-catalog__guide span {
	display: inline-flex;
	margin-bottom: 6px;
	color: color-mix(in srgb, var(--etm-catalog-accent) 74%, currentColor);
	font-size: .78rem;
	font-weight: 800;
	letter-spacing: 0;
	text-transform: uppercase;
}

.etm-product-catalog__hero h1,
.etm-product-catalog__hero p,
.etm-product-catalog__section-head h2,
.etm-product-catalog__guide h2 {
	margin: 0;
}

.etm-product-catalog__hero h1 {
	max-width: 16ch;
	font-size: clamp(2rem, 5vw, 3.25rem);
	line-height: 1.04;
	letter-spacing: 0;
}

.etm-product-catalog__hero p,
.etm-product-catalog__guide li {
	max-width: 70ch;
	color: var(--etm-catalog-muted);
	line-height: 1.6;
}

.etm-product-catalog__quick {
	display: flex;
	gap: 9px;
	margin: 0 0 20px;
	padding: 1px 2px 8px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: thin;
}

.etm-product-catalog__quick a {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	min-height: 36px;
	padding: 8px 13px;
	border: 1px solid var(--etm-catalog-border);
	border-radius: 999px;
	color: inherit;
	font-weight: 700;
	line-height: 1.15;
	text-decoration: none;
	background: color-mix(in srgb, Canvas 94%, currentColor 6%);
	scroll-snap-align: start;
}

.etm-product-catalog__quick a:hover {
	border-color: var(--etm-catalog-accent);
	color: inherit;
}

.etm-product-catalog__featured {
	display: grid;
	gap: 16px;
	margin: 0 0 24px;
	padding: clamp(16px, 3vw, 24px);
}

.etm-product-catalog__section-head h2,
.etm-product-catalog__guide h2 {
	font-size: clamp(1.2rem, 2.2vw, 1.55rem);
	line-height: 1.2;
}

.etm-product-catalog__featured-grid,
.etm-product-catalog__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
	gap: clamp(14px, 2vw, 20px);
}

.etm-product-catalog__guide {
	display: grid;
	grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr);
	gap: 18px;
	align-items: start;
	margin: 0 0 24px;
	padding: clamp(16px, 3vw, 24px);
}

.etm-product-catalog__guide ul {
	margin: 0;
	padding-left: 18px;
}

.etm-product-catalog__toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 14px;
	align-items: baseline;
	justify-content: space-between;
	margin: 0 0 14px;
	color: var(--etm-catalog-muted);
}

.etm-product-catalog__toolbar strong {
	color: currentColor;
}

.etm-product-catalog__card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	min-width: 0;
	border: 1px solid var(--etm-catalog-border);
	border-radius: 8px;
	background: var(--etm-catalog-surface);
	box-shadow: var(--etm-catalog-shadow);
	transition: border-color .15s ease, transform .15s ease;
}

.etm-product-catalog__card:hover {
	border-color: var(--etm-catalog-accent);
	transform: translateY(-1px);
}

.etm-product-catalog__image {
	position: relative;
	display: grid;
	place-items: center;
	aspect-ratio: 1 / 1;
	padding: clamp(14px, 3vw, 24px);
	background: #fff;
}

.etm-product-catalog__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.etm-product-catalog__badges {
	position: absolute;
	top: 10px;
	left: 10px;
	display: grid;
	gap: 5px;
}

.etm-product-catalog__badges span {
	display: inline-flex;
	width: max-content;
	max-width: 150px;
	padding: 5px 8px;
	border-radius: 999px;
	background: var(--etm-catalog-soft);
	color: #111;
	font-size: .75rem;
	font-weight: 800;
	line-height: 1.1;
}

.etm-product-catalog__card-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 9px;
	padding: 0 clamp(14px, 2vw, 18px) clamp(14px, 2vw, 18px);
}

.etm-product-catalog__card h3 {
	display: -webkit-box;
	min-height: 3.75em;
	margin: 0;
	overflow: hidden;
	font-size: 1rem;
	line-height: 1.25;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow-wrap: anywhere;
}

.etm-product-catalog__card h3 a {
	color: inherit;
	text-decoration: none;
}

.etm-product-catalog__rating,
.etm-product-catalog__facts,
.etm-product-catalog__microcopy,
.etm-product-catalog__actions span {
	color: var(--etm-catalog-muted);
	font-size: .86rem;
	line-height: 1.45;
}

.etm-product-catalog__facts,
.etm-product-catalog__microcopy {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.etm-product-catalog__price {
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.15;
}

.etm-product-catalog__price del {
	color: var(--etm-catalog-muted);
	font-size: .8em;
}

.etm-product-catalog__microcopy {
	margin: 0;
}

.etm-product-catalog__actions {
	display: grid;
	gap: 6px;
	margin-top: auto;
}

.etm-product-catalog .etm-product-catalog__button,
.etm-product-catalog .etm-product-catalog__list-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	max-width: 100%;
	padding: 9px 14px;
	border: 0;
	border-radius: 999px;
	background: var(--etm-catalog-accent);
	color: #111 !important;
	font: inherit;
	font-weight: 800;
	line-height: 1.15;
	text-align: center;
	text-decoration: none;
	white-space: normal;
	cursor: pointer;
}

.etm-product-catalog .etm-product-catalog__list-button {
	background: color-mix(in srgb, var(--etm-catalog-accent) 20%, #fff);
}

.etm-product-catalog .etm-product-catalog__button:hover,
.etm-product-catalog .etm-product-catalog__button:focus,
.etm-product-catalog .etm-product-catalog__button:visited,
.etm-product-catalog .etm-product-catalog__button:active,
.etm-product-catalog .etm-product-catalog__list-button:hover,
.etm-product-catalog .etm-product-catalog__list-button:focus,
.etm-product-catalog .etm-product-catalog__list-button:visited,
.etm-product-catalog .etm-product-catalog__list-button:active {
	filter: brightness(.96);
	color: #111 !important;
}

.etm-product-catalog__mobile-bar {
	display: none;
}

@media (max-width: 900px) {
	.etm-product-catalog__guide {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 680px) {
	.etm-product-catalog {
		margin-bottom: 82px;
	}

	.etm-product-catalog__featured-grid {
		display: flex;
		gap: 14px;
		overflow-x: auto;
		overscroll-behavior-inline: contain;
		padding: 2px 2px 18px;
		scroll-snap-type: x mandatory;
		scrollbar-width: thin;
	}

	.etm-product-catalog__featured-grid .etm-product-catalog__card {
		flex: 0 0 min(78vw, 300px);
		scroll-snap-align: start;
	}

	.etm-product-catalog__grid {
		grid-template-columns: 1fr;
	}

	.etm-product-catalog__hero,
	.etm-product-catalog__guide,
	.etm-product-catalog__featured,
	.etm-product-catalog__card {
		border-radius: 8px;
	}

	.etm-product-catalog__mobile-bar {
		position: fixed;
		right: 10px;
		bottom: 10px;
		left: 10px;
		z-index: 40;
		display: grid;
		grid-template-columns: minmax(0, .8fr) minmax(128px, 1fr);
		gap: 8px;
		align-items: center;
		padding: 10px;
		border: 1px solid var(--etm-catalog-border);
		border-radius: 8px;
		background: Canvas;
		box-shadow: 0 12px 34px color-mix(in srgb, currentColor 18%, transparent);
	}

	.etm-product-catalog__mobile-bar span {
		font-weight: 800;
	}

	.etm-product-catalog .etm-product-catalog__mobile-bar a {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-height: 42px;
		padding: 10px 12px;
		border-radius: 999px;
		background: var(--etm-catalog-accent);
		color: #111 !important;
		font-weight: 800;
		line-height: 1.15;
		text-align: center;
		text-decoration: none;
	}

	.etm-product-catalog .etm-product-catalog__mobile-bar a:hover,
	.etm-product-catalog .etm-product-catalog__mobile-bar a:focus,
	.etm-product-catalog .etm-product-catalog__mobile-bar a:visited,
	.etm-product-catalog .etm-product-catalog__mobile-bar a:active {
		color: #111 !important;
	}
}
