/* Homepage WooCommerce storefront carousel. */
.mwp-storefront {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(circle at 88% 12%, color-mix(in srgb, var(--primary) 8%, transparent), transparent 30%),
		linear-gradient(180deg, var(--surface), var(--surface-sunken));
	border-block: 1px solid var(--border);
}

.mwp-storefront__head {
	max-width: 800px;
}

.mwp-storefront__head h2 {
	max-width: 24ch;
}

.mwp-storefront__head p {
	max-width: 720px;
	margin-block-start: var(--sp-3);
	color: var(--text-secondary);
	line-height: 1.85;
}

.mwp-storefront__categories {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-2);
	margin: var(--sp-6) 0 var(--sp-4);
}

.mwp-storefront__categories a {
	display: inline-flex;
	align-items: center;
	min-height: 38px;
	padding: 7px 14px;
	background: color-mix(in srgb, var(--surface) 92%, transparent);
	border: 1px solid var(--border);
	border-radius: var(--radius-pill);
	color: var(--primary);
	font-size: var(--fs-sm);
	font-weight: 700;
	transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}

.mwp-storefront__categories a:hover,
.mwp-storefront__categories a:focus-visible {
	transform: translateY(-1px);
	background: var(--primary-soft);
	border-color: var(--primary);
}

.mwp-storefront__assurance {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	margin-block-end: var(--sp-7);
	color: var(--text-secondary);
	font-size: .78rem;
	font-weight: 700;
}

.mwp-storefront__assurance span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.mwp-storefront__assurance svg {
	color: var(--primary);
}

.mwp-storefront__carousel {
	position: relative;
}

.mwp-storefront__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sp-5);
	margin-block-end: var(--sp-5);
}

.mwp-storefront__bar-copy {
	display: grid;
	gap: 3px;
}

.mwp-storefront__bar-copy strong {
	color: var(--text-primary);
	font-size: 1.08rem;
}

.mwp-storefront__bar-copy span {
	color: var(--text-secondary);
	font-size: .82rem;
}

.mwp-storefront__actions {
	display: flex;
	align-items: center;
	gap: var(--sp-4);
}

.mwp-storefront__all,
.mwp-store-product__cta {
	color: var(--primary);
	font-weight: 800;
}

.mwp-storefront__all {
	white-space: nowrap;
}

.mwp-carousel-controls {
	display: flex;
	gap: var(--sp-2);
}

.mwp-carousel-btn {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: var(--surface);
	border: 1px solid var(--border-strong);
	border-radius: 50%;
	box-shadow: var(--shadow-sm);
	color: var(--text-primary);
	font: inherit;
	font-size: 1.65rem;
	line-height: 1;
	cursor: pointer;
	transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}

.mwp-carousel-btn:hover,
.mwp-carousel-btn:focus-visible {
	transform: translateY(-2px);
	background: var(--primary);
	border-color: var(--primary);
	color: var(--on-primary);
}

.mwp-carousel-btn:active {
	transform: translateY(0);
}

.mwp-storefront__viewport {
	overflow-x: auto;
	overflow-y: hidden;
	padding: 8px 3px 18px;
	scroll-snap-type: inline mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	overscroll-behavior-inline: contain;
	-webkit-overflow-scrolling: touch;
}

.mwp-storefront__viewport::-webkit-scrollbar {
	display: none;
}

.mwp-storefront__viewport:focus-visible {
	outline: 2px solid var(--primary);
	outline-offset: 5px;
	border-radius: var(--radius-md);
}

.mwp-storefront__track {
	--mwp-store-gap: 18px;
	display: flex;
	gap: var(--mwp-store-gap);
	width: max-content;
	min-width: 100%;
}

.mwp-store-product {
	position: relative;
	display: flex;
	flex: 0 0 calc((min(100vw - 48px, var(--container)) - (var(--mwp-store-gap) * 3)) / 4);
	min-width: 0;
	overflow: hidden;
	flex-direction: column;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 20px;
	box-shadow: 0 10px 28px rgba(12, 40, 75, .08);
	transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}

.mwp-store-product:hover {
	transform: translateY(-4px);
	border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
	box-shadow: 0 18px 42px rgba(12, 40, 75, .13);
}

.mwp-store-product__image {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: var(--surface-sunken);
	border-block-end: 1px solid var(--border);
}

.mwp-store-product__image::after {
	position: absolute;
	inset-inline: 0;
	inset-block-end: 0;
	height: 22%;
	background: linear-gradient(to top, rgba(7, 17, 32, .06), transparent);
	content: '';
	pointer-events: none;
}

.mwp-store-product__image img {
	width: 100%;
	height: 100%;
	padding: 12px;
	object-fit: contain;
	transition: transform .35s var(--ease);
}

.mwp-store-product:hover .mwp-store-product__image img {
	transform: scale(1.02);
}

.mwp-store-product__badge {
	position: absolute;
	z-index: 2;
	inset-block-start: 14px;
	inset-inline-start: 14px;
	display: inline-flex;
	align-items: center;
	min-height: 30px;
	padding: 4px 11px;
	background: var(--primary);
	border-radius: var(--radius-pill);
	box-shadow: var(--shadow-sm);
	color: var(--on-primary);
	font-size: .75rem;
	font-weight: 800;
}

.mwp-store-product__body {
	display: flex;
	min-height: 210px;
	padding: 18px;
	flex-direction: column;
}

.mwp-store-product__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sp-2);
	margin-block-end: 10px;
	color: var(--text-secondary);
	font-size: .72rem;
	font-weight: 700;
}

.mwp-store-product__meta > span:first-child {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mwp-store-product__stock {
	position: relative;
	flex: none;
	padding-inline-start: 13px;
	color: #15803d;
}

.mwp-store-product__stock::before {
	position: absolute;
	inset-inline-start: 0;
	inset-block-start: 50%;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #22c55e;
	content: '';
	transform: translateY(-50%);
}

.mwp-store-product h3 {
	display: -webkit-box;
	overflow: hidden;
	margin: 0 0 12px;
	font-size: .98rem;
	line-height: 1.65;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.mwp-store-product h3 a {
	color: var(--text-primary);
}

.mwp-store-product h3 a:hover {
	color: var(--primary);
}

.mwp-store-product__price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px;
	margin-block-end: 16px;
	color: var(--text-primary);
	font-size: 1.08rem;
	font-weight: 900;
}

.mwp-store-product__price del {
	color: var(--text-secondary);
	font-size: .84rem;
	font-weight: 600;
	opacity: .72;
}

.mwp-store-product__price ins {
	color: var(--primary);
	text-decoration: none;
}

.mwp-store-product__cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-block-start: auto;
	padding-block-start: 14px;
	border-block-start: 1px solid var(--border);
}

.mwp-store-product__cta:hover {
	color: var(--primary-hover);
}

.mwp-carousel-footer {
	display: flex;
	align-items: center;
	gap: var(--sp-4);
	margin-block-start: 2px;
}

.mwp-carousel-progress {
	position: relative;
	overflow: hidden;
	flex: 1;
	height: 4px;
	background: var(--border);
	border-radius: 999px;
}

.mwp-carousel-progress span {
	display: block;
	width: 10%;
	height: 100%;
	background: var(--primary);
	border-radius: inherit;
	transform-origin: right center;
	transition: width .28s var(--ease);
}

.mwp-carousel-status {
	min-width: 54px;
	margin: 0;
	color: var(--text-secondary);
	font-size: .78rem;
	font-variant-numeric: tabular-nums;
	text-align: end;
}

@media (max-width: 1100px) {
	.mwp-store-product {
		flex-basis: calc((min(100vw - 48px, var(--container)) - (var(--mwp-store-gap) * 2)) / 3);
	}
}

@media (max-width: 820px) {
	.mwp-storefront__bar {
		align-items: flex-start;
		flex-direction: column;
	}

	.mwp-storefront__actions {
		width: 100%;
		justify-content: space-between;
	}

	.mwp-store-product {
		flex-basis: calc((100vw - 58px - var(--mwp-store-gap)) / 2);
	}
}

@media (max-width: 560px) {
	.mwp-storefront__categories {
		margin-block-end: var(--sp-4);
		flex-wrap: nowrap;
		overflow-x: auto;
		padding-block-end: 4px;
		scrollbar-width: none;
	}

	.mwp-storefront__categories::-webkit-scrollbar {
		display: none;
	}

	.mwp-storefront__categories a {
		flex: none;
	}

	.mwp-storefront__bar-copy span {
		display: none;
	}

	.mwp-storefront__actions {
		align-items: center;
	}

	.mwp-storefront__all {
		font-size: .9rem;
	}

	.mwp-carousel-btn {
		width: 40px;
		height: 40px;
	}

	.mwp-storefront__viewport {
		margin-inline: -4px;
		padding-inline: 4px;
	}

	.mwp-store-product {
		flex-basis: min(86vw, 340px);
		border-radius: 18px;
	}

	.mwp-store-product__body {
		min-height: 190px;
	}
}

@media (max-width: 380px) {
	.mwp-storefront__actions {
		align-items: flex-start;
		flex-direction: column;
	}

	.mwp-store-product {
		flex-basis: 91vw;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mwp-storefront__viewport {
		scroll-behavior: auto;
	}

	.mwp-store-product,
	.mwp-store-product__image img,
	.mwp-storefront__categories a,
	.mwp-carousel-btn,
	.mwp-carousel-progress span {
		transition: none;
	}
}