/**
 * Product styles.
 *
 * @package AMSHOV_Theme
 */

.homepage-product-showcase {
	min-width: 0;
	background: var(--amshov-white);
}

.homepage-product-heading {
	margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.homepage-product-heading .section-heading {
	max-width: 52rem;
}

.homepage-product-heading-actions {
	display: flex;
	justify-content: flex-end;
}

.homepage-product-slider {
	min-width: 0;
}

.homepage-product-controls {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 1rem;
	margin-bottom: 1rem;
}

.homepage-product-status {
	min-width: 3.5rem;
	margin: 0;
	color: var(--amshov-text-muted);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-align: right;
}

.homepage-product-control-group {
	display: flex;
	gap: 0.625rem;
}

.homepage-product-control {
	width: 2.75rem;
	height: 2.75rem;
	display: grid;
	place-items: center;
	padding: 0;
	color: var(--amshov-white);
	background: var(--amshov-black);
	border: 1px solid var(--amshov-black);
	border-radius: var(--amshov-radius-sm);
	transition: color var(--amshov-transition), background-color var(--amshov-transition), border-color var(--amshov-transition), opacity var(--amshov-transition);
}

.homepage-product-control span {
	font-size: 1.125rem;
	line-height: 1;
}

.homepage-product-control:not(:disabled):hover,
.homepage-product-control:not(:disabled):focus-visible {
	background: var(--amshov-brand-red);
	border-color: var(--amshov-brand-red);
}

.homepage-product-control:disabled {
	cursor: not-allowed;
	opacity: 0.32;
}

.homepage-product-track {
	width: 100%;
	min-width: 0;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 4.5rem) / 4);
	gap: 1.5rem;
	padding: 0.25rem 0.125rem 0.75rem;
	margin: 0;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-inline: contain;
	scroll-behavior: smooth;
	scroll-snap-type: inline mandatory;
	scrollbar-width: none;
	touch-action: pan-x pan-y;
}

.homepage-product-track--static {
	grid-auto-flow: row;
	grid-template-columns: minmax(17.5rem, 22rem);
	padding-bottom: 0;
	overflow: visible;
	scroll-behavior: auto;
	scroll-snap-type: none;
}

.homepage-product-track::-webkit-scrollbar {
	display: none;
}

.homepage-product-track:focus-visible {
	outline: 3px solid rgb(180 35 44 / 35%);
	outline-offset: 3px;
}

.homepage-product-card {
	min-width: 0;
	height: 100%;
	display: flex;
	flex-direction: column;
	background: var(--amshov-white);
	border: 1px solid var(--amshov-border);
	border-radius: var(--amshov-radius);
	box-shadow: var(--amshov-shadow-sm);
	overflow: hidden;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	transition: border-color var(--amshov-transition), box-shadow var(--amshov-transition), transform var(--amshov-transition);
}

.homepage-product-card:hover {
	border-color: rgb(180 35 44 / 34%);
	box-shadow: var(--amshov-shadow-md);
	transform: translateY(-0.1875rem);
}

.homepage-product-media {
	position: relative;
	aspect-ratio: 4 / 3;
	display: grid;
	place-items: center;
	padding: clamp(1.25rem, 3vw, 2rem);
	color: var(--amshov-text);
	background: var(--amshov-background-light);
	border-bottom: 1px solid var(--amshov-border);
	overflow: hidden;
	text-decoration: none;
}

.homepage-product-image {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform var(--amshov-transition);
}

.homepage-product-card:hover .homepage-product-image,
.homepage-product-media:focus-visible .homepage-product-image {
	transform: scale(1.025);
}

.homepage-product-image-fallback,
.homepage-product-placeholder-media span {
	color: var(--amshov-text-muted);
	font-size: 0.8125rem;
	font-weight: 800;
	letter-spacing: 0.16em;
}

.homepage-product-card-body {
	min-width: 0;
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	padding: 1.125rem 1.25rem 1.25rem;
}

.homepage-product-categories {
	margin-bottom: 0.625rem;
	color: var(--amshov-brand-red);
	font-size: 0.6875rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	line-height: 1.5;
	text-transform: uppercase;
}

.homepage-product-title {
	min-height: 2.5em;
	margin-bottom: 1rem;
	font-size: clamp(1.1875rem, 1.7vw, 1.375rem);
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.homepage-product-title a {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	color: var(--amshov-black);
	text-decoration: none;
}

.homepage-product-title a:hover,
.homepage-product-title a:focus-visible {
	color: var(--amshov-brand-red);
}

.homepage-product-card-footer {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 0.875rem;
	margin-top: auto;
	border-top: 1px solid var(--amshov-border);
}

.homepage-product-price {
	color: var(--amshov-black);
	font-size: 1rem;
	font-weight: 800;
}

.homepage-product-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0;
	color: var(--amshov-black);
	font-size: 0.875rem;
	font-weight: 750;
	text-decoration: none;
}

.homepage-product-link span {
	color: var(--amshov-brand-red);
	transition: transform var(--amshov-transition);
}

.homepage-product-link:hover,
.homepage-product-link:focus-visible {
	color: var(--amshov-brand-red);
}

.homepage-product-link:hover span,
.homepage-product-link:focus-visible span {
	transform: translateX(0.2rem);
}

.homepage-product-empty {
	margin: 0;
	padding: 1.25rem 0;
	color: var(--amshov-text-muted);
}

@media (min-width: 992px) and (max-width: 1399.98px) {
	.homepage-product-track {
		grid-auto-columns: calc((100% - 2.5rem) / 3);
		gap: 1.25rem;
	}
}

@media (min-width: 768px) and (max-width: 991.98px) {
	.homepage-product-track {
		grid-auto-columns: calc((100% - 1.25rem) / 2.25);
		gap: 1.25rem;
	}
}

@media (max-width: 991.98px) {
	.homepage-product-heading-actions {
		justify-content: flex-start;
	}
}

@media (max-width: 767.98px) {
	.homepage-product-heading {
		margin-bottom: 1.75rem;
	}

	.homepage-product-controls {
		justify-content: space-between;
	}

	.homepage-product-track {
		grid-auto-columns: 86%;
		gap: 1rem;
	}

	.homepage-product-track--static {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.homepage-product-track {
		scroll-behavior: auto;
	}

	.homepage-product-card,
	.homepage-product-image,
	.homepage-product-link span {
		transition: none;
	}
}

/* Product archive and reusable product cards. */
.product-archive-main,
.product-archive-content,
.product-card-grid,
.amshov-product-card {
	min-width: 0;
}

.product-archive-hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: clamp(24rem, 39vw, 32rem);
	overflow: hidden;
	isolation: isolate;
	padding-block: clamp(4.5rem, 8vw, 7rem);
	color: rgb(255 255 255 / 76%);
	background-color: var(--amshov-black);
	background-image:
		linear-gradient(90deg, rgb(8 15 20 / 92%) 0%, rgb(8 15 20 / 76%) 34%, rgb(8 15 20 / 26%) 64%, rgb(8 15 20 / 8%) 100%),
		var(--amshov-product-hero-image);
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}

.product-archive-hero::after {
	position: absolute;
	inset: 0;
	z-index: -1;
	content: '';
	background: linear-gradient(180deg, rgb(8 15 20 / 20%), transparent 38%, rgb(8 15 20 / 30%));
}

.product-archive-hero .container {
	position: relative;
	z-index: 1;
}

.product-archive-hero h1 {
	max-width: 58rem;
	margin-bottom: 1rem;
	color: var(--amshov-white);
}

.product-archive-description {
	max-width: 48rem;
	font-size: var(--amshov-body-large);
}

.product-archive-description > :last-child {
	margin-bottom: 0;
}

@media (max-width: 767.98px) {
	.product-archive-hero {
		min-height: 27rem;
		padding-block: 4rem;
		background-position: 62% center;
		background-image:
			linear-gradient(90deg, rgb(8 15 20 / 92%) 0%, rgb(8 15 20 / 70%) 55%, rgb(8 15 20 / 22%) 100%),
			var(--amshov-product-hero-image);
	}
}

.product-archive-layout {
	align-items: flex-start;
}

.product-category-sidebar-inner {
	padding: 1.5rem;
	background: var(--amshov-background-light);
	border: 1px solid var(--amshov-border);
	border-radius: var(--amshov-radius);
}

.product-category-sidebar h2 {
	padding-bottom: 1rem;
	margin-bottom: 1rem;
	border-bottom: 1px solid var(--amshov-border);
	font-size: 1.125rem;
	letter-spacing: 0;
}

@media (min-width: 992px) {
	.product-category-sidebar-inner {
		position: sticky;
		top: calc(var(--amshov-header-height) + 2rem);
	}
}

.product-archive-toolbar {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1.5rem;
	padding-bottom: 1.5rem;
	margin-bottom: 2.5rem;
	border-bottom: 1px solid var(--amshov-border);
}

.product-category-filter {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
}

.product-category-filter-link {
	width: 100%;
	min-height: 2.75rem;
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.55rem 1rem;
	color: var(--amshov-text);
	background: var(--amshov-white);
	border: 1px solid var(--amshov-border);
	border-radius: var(--amshov-radius-sm);
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	transition: color var(--amshov-transition), background-color var(--amshov-transition), border-color var(--amshov-transition);
}

.product-category-filter-link > span:first-child {
	min-width: 0;
	overflow-wrap: anywhere;
}

.product-category-filter-count {
	min-width: 1.75rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.1rem 0.4rem;
	color: var(--amshov-text-muted);
	background: var(--amshov-white);
	border-radius: 999px;
	font-size: 0.6875rem;
	line-height: 1.4;
}

.product-category-filter-link:hover,
.product-category-filter-link:focus-visible,
.product-category-filter-link.is-active {
	color: var(--amshov-white);
	background: var(--amshov-brand-red);
	border-color: var(--amshov-brand-red);
}

.product-category-filter-link:hover .product-category-filter-count,
.product-category-filter-link:focus-visible .product-category-filter-count,
.product-category-filter-link.is-active .product-category-filter-count {
	color: var(--amshov-brand-red);
}

.product-results-heading {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	padding-bottom: 1.25rem;
	margin-bottom: 2rem;
	border-bottom: 1px solid var(--amshov-border);
}

.product-results-heading h2 {
	margin-bottom: 0;
	font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.product-result-count {
	flex: 0 0 auto;
	margin: 0;
	color: var(--amshov-text-muted);
	font-size: 0.875rem;
	font-weight: 700;
	white-space: nowrap;
}

.amshov-product-card {
	height: 100%;
	display: flex;
	flex-direction: column;
	background: var(--amshov-white);
	border: 1px solid var(--amshov-border);
	border-radius: var(--amshov-radius);
	box-shadow: 0 0.65rem 1.8rem rgb(13 15 18 / 11%);
	overflow: hidden;
	transition: border-color var(--amshov-transition), box-shadow var(--amshov-transition), transform var(--amshov-transition);
}

.amshov-product-card:hover {
	border-color: rgb(180 35 44 / 34%);
	box-shadow: 0 1.1rem 2.5rem rgb(13 15 18 / 17%);
	transform: translateY(-0.1875rem);
}

.amshov-product-card-media {
	aspect-ratio: 4 / 3;
	display: grid;
	place-items: center;
	padding: clamp(1rem, 2.25vw, 1.5rem);
	color: var(--amshov-text-muted);
	background: var(--amshov-background-light);
	border-bottom: 1px solid var(--amshov-border);
	overflow: hidden;
	text-decoration: none;
}

.amshov-product-card-image {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform var(--amshov-transition);
}

.amshov-product-card:hover .amshov-product-card-image,
.amshov-product-card-media:focus-visible .amshov-product-card-image {
	transform: scale(1.025);
}

.amshov-product-card-image-fallback {
	font-size: 0.8125rem;
	font-weight: 800;
	letter-spacing: 0.16em;
}

.amshov-product-card-body {
	min-width: 0;
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	padding: clamp(1rem, 1.8vw, 1.25rem);
}

.amshov-product-card-categories {
	margin-bottom: 0.45rem;
	color: var(--amshov-brand-red);
	font-size: 0.625rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	line-height: 1.5;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.amshov-product-card-title {
	display: -webkit-box;
	margin-bottom: 0.85rem;
	font-size: clamp(1.1rem, 1.45vw, 1.3rem);
	line-height: 1.25;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow-wrap: anywhere;
	overflow: hidden;
}

.amshov-product-card-title a {
	color: var(--amshov-black);
	text-decoration: none;
}

.amshov-product-card-title a:hover,
.amshov-product-card-title a:focus-visible {
	color: var(--amshov-brand-red);
}

.amshov-product-card-footer {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: auto;
	padding-top: 0.75rem;
	border-top: 1px solid var(--amshov-border);
}

.amshov-product-card-price {
	min-width: 0;
	color: var(--amshov-black);
	font-size: 1rem;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.amshov-product-card-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--amshov-brand-red);
	font-size: 0.8125rem;
	font-weight: 750;
	text-decoration: none;
	white-space: nowrap;
}

.amshov-product-card-link span {
	font-size: 1rem;
	transition: transform var(--amshov-transition);
}

.amshov-product-card-link:hover span,
.amshov-product-card-link:focus-visible span {
	transform: translateX(0.2rem);
}

.product-empty-state {
	max-width: 46rem;
	padding: clamp(2rem, 5vw, 4rem);
	background: var(--amshov-background-light);
	border: 1px solid var(--amshov-border);
	border-radius: var(--amshov-radius);
}

.product-empty-state h2 {
	font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.product-empty-state p {
	color: var(--amshov-text-muted);
}

.product-archive-content .navigation.pagination {
	margin-top: clamp(2.5rem, 5vw, 4rem);
}

.product-archive-content .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.product-archive-content .page-numbers {
	min-width: 2.75rem;
	min-height: 2.75rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem 0.75rem;
	color: var(--amshov-text);
	background: var(--amshov-white);
	border: 1px solid var(--amshov-border);
	border-radius: var(--amshov-radius-sm);
	font-weight: 700;
	text-decoration: none;
}

.product-archive-content .page-numbers.current,
.product-archive-content a.page-numbers:hover,
.product-archive-content a.page-numbers:focus-visible {
	color: var(--amshov-white);
	background: var(--amshov-brand-red);
	border-color: var(--amshov-brand-red);
}

.product-archive-inquiry {
	padding-block: clamp(3.5rem, 7vw, 6rem);
	color: rgb(255 255 255 / 76%);
	background: var(--amshov-background-light);
	border-top: 1px solid var(--amshov-border);
}

.product-archive-inquiry-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	padding: clamp(2.25rem, 5vw, 4.5rem);
	background: var(--amshov-black);
	border: 1px solid rgb(255 255 255 / 10%);
	border-radius: var(--amshov-radius);
	box-shadow: var(--amshov-shadow-md);
}

.product-archive-inquiry h2 {
	max-width: 48rem;
	margin-bottom: 0;
	color: var(--amshov-white);
	font-size: clamp(1.75rem, 4vw, 3rem);
}

.product-archive-inquiry .btn {
	flex: 0 0 auto;
}

/* Basic single product template for the archive-to-detail flow. */
.product-single-basic-article {
	padding-block: clamp(1.25rem, 3vw, 2.5rem) var(--amshov-section-space);
}

.product-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: clamp(2rem, 5vw, 4rem);
	color: var(--amshov-text-muted);
	font-size: 0.875rem;
}

.product-breadcrumb a {
	color: var(--amshov-text-muted);
}

.product-single-basic-media {
	aspect-ratio: 1 / 1;
	display: grid;
	place-items: center;
	padding: clamp(1.5rem, 5vw, 3.5rem);
	color: var(--amshov-text-muted);
	background: var(--amshov-background-light);
	border: 1px solid var(--amshov-border);
	border-radius: var(--amshov-radius);
	overflow: hidden;
}

.product-single-basic-image {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.product-single-basic-thumbnails {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	padding-top: 1rem;
}

.product-single-basic-thumbnail {
	width: 4.5rem;
	height: 4.5rem;
	padding: 0.2rem;
	background: var(--amshov-white);
	border: 1px solid var(--amshov-border);
	border-radius: var(--amshov-radius-sm);
	overflow: hidden;
	transition: border-color var(--amshov-transition), box-shadow var(--amshov-transition), transform var(--amshov-transition);
}

.product-single-basic-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.product-single-basic-thumbnail:hover,
.product-single-basic-thumbnail:focus-visible,
.product-single-basic-thumbnail.is-active {
	border-color: var(--amshov-brand-red);
	box-shadow: 0 0 0 2px rgb(180 35 44 / 14%);
}

.product-single-basic-thumbnail:hover {
	transform: translateY(-0.125rem);
}

.product-single-basic-categories {
	margin-bottom: 0.75rem;
	color: var(--amshov-brand-red);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.product-single-basic-summary h1 {
	max-width: 18ch;
	margin-bottom: 1rem;
	font-size: clamp(2.2rem, 3.5vw, 3.75rem);
	line-height: 1.08;
	letter-spacing: -0.04em;
}

.product-single-basic-excerpt {
	color: var(--amshov-text-muted);
	font-size: var(--amshov-body-large);
}

.product-single-basic-price {
	margin-block: 2rem;
}

.product-single-basic-price span,
.product-single-basic-price strong {
	display: block;
}

.product-single-basic-price span {
	color: var(--amshov-text-muted);
	font-size: 0.75rem;
	text-transform: uppercase;
}

.product-single-basic-price strong {
	color: var(--amshov-black);
	font-size: clamp(1.5rem, 3vw, 2rem);
}

.product-single-basic-content {
	max-width: 58rem;
	padding-top: clamp(2.5rem, 5vw, 4rem);
	margin-inline: auto;
}

.product-single-basic-content > :first-child {
	margin-top: 0;
}

.product-single-basic-content img {
	display: block;
	width: auto !important;
	max-width: 100%;
	height: auto !important;
	margin: clamp(1.5rem, 3vw, 2.5rem) auto;
	border: 1px solid var(--amshov-border);
	box-shadow: 0 1rem 2.5rem rgb(13 15 18 / 10%);
}

.product-single-basic-content figure,
.product-single-basic-content .wp-caption {
	max-width: 100% !important;
	margin: clamp(1.5rem, 3vw, 2.5rem) auto;
}

.product-single-basic-content figure img,
.product-single-basic-content .wp-caption img {
	margin: 0;
}

.product-single-basic-details {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(1.25rem, 3vw, 2.5rem);
	max-width: 58rem;
	padding-top: clamp(2.5rem, 5vw, 4.5rem);
	margin: clamp(2.5rem, 5vw, 4.5rem) auto 0;
	border-top: 1px solid var(--amshov-border);
}

.product-single-basic-detail-group {
	min-width: 0;
}

.product-single-basic-detail-group h2 {
	margin-bottom: 1.25rem;
	font-size: clamp(1.25rem, 2vw, 1.6rem);
}

.product-single-basic-detail-list {
	padding: 0;
	margin: 0;
	border-top: 1px solid var(--amshov-border);
}

.product-single-basic-detail-list > div {
	display: grid;
	grid-template-columns: minmax(7.5rem, 0.9fr) minmax(0, 1.1fr);
	gap: 1rem;
	padding: 0.85rem 0;
	border-bottom: 1px solid var(--amshov-border);
}

.product-single-basic-detail-list dt {
	color: var(--amshov-text-muted);
	font-size: 0.8125rem;
	font-weight: 700;
}

.product-single-basic-detail-list dd {
	min-width: 0;
	margin: 0;
	overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
	.product-archive-toolbar,
	.product-archive-inquiry-inner {
		align-items: flex-start;
		flex-direction: column;
	}

	.product-result-count {
		white-space: normal;
	}

	.product-category-filter {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.product-single-basic-details {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 575.98px) {
	.product-archive-inquiry-inner {
		padding: 2rem 1.25rem;
	}

	.product-category-filter {
		width: 100%;
		grid-template-columns: minmax(0, 1fr);
	}

	.product-category-filter-link {
		flex: none;
	}

	.product-results-heading {
		align-items: flex-start;
		flex-direction: column;
	}

	.product-archive-inquiry .btn,
	.product-single-basic-summary .btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.amshov-product-card,
	.amshov-product-card-image {
		transition: none;
	}
}
