/* Single product page. */

.product-single__layout {
	display: grid;
	gap: var(--myco-space-2xl);
}

.product-single__media {
	overflow: hidden;
	padding: var(--myco-space-lg);
	border: 1px solid var(--myco-color-border);
	border-radius: var(--myco-radius-xl);
	background: var(--myco-color-white);
}

/* Cut-out product photography: show the whole mechanism rather than cropping
 * it to fill a box. See the same reasoning on .card-product in layout.css. */
.product-single__image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: contain;
}

/* Secondary views. Deliberately static images rather than a swap-on-click
 * gallery: a viewer would be the first script dependency on this page, and two
 * or three angles shown at once is the faster read anyway. */
.product-single__thumbs {
	display: grid;
	gap: var(--myco-space-sm);
	margin: var(--myco-space-sm) 0 0;
	padding: 0;
	/* Fixed 3 columns rather than auto-fill: with one extra view auto-fill
	 * leaves a lone stamp-sized tile, and most products here have exactly one. */
	grid-template-columns: repeat(3, 1fr);
	list-style: none;
}

.product-single__thumb {
	display: grid;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	box-sizing: border-box;
	padding: var(--myco-space-sm);
	border: 1px solid var(--myco-color-border);
	border-radius: var(--myco-radius-lg);
	background: var(--myco-color-white);
}

/* Same `min-height: 0` reasoning as the product card in layout.css. */
.product-single__thumb-image {
	width: 100%;
	height: 100%;
	min-width: 0;
	min-height: 0;
	object-fit: contain;
}

.product-single__title {
	margin-bottom: var(--myco-space-md);
}

/* Catalogue-wide terms, filling the column the missing price would have. */
.product-assurances {
	display: grid;
	gap: var(--myco-space-md);
	margin: var(--myco-space-xl) 0 0;
	padding: var(--myco-space-lg) 0 0;
	border-top: 1px solid var(--myco-color-border);
	list-style: none;
}

.product-assurance {
	display: flex;
	gap: var(--myco-space-md);
	align-items: flex-start;
}

.product-assurance__icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: var(--myco-radius-md);
	background: var(--myco-color-surface-strong);
	color: var(--myco-color-accent-ink);
}

.product-assurance__icon .myco-icon {
	width: 1.25rem;
	height: 1.25rem;
}

.product-assurance__body {
	display: grid;
	gap: 0.1rem;
}

.product-assurance__label {
	color: var(--myco-color-primary);
	font-size: var(--myco-font-size-sm);
}

.product-assurance__text {
	color: var(--myco-color-muted);
	font-size: var(--myco-font-size-sm);
}

.product-single__lead {
	color: var(--myco-color-muted);
	font-size: var(--myco-font-size-lg);
}

.product-single__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--myco-space-md);
	margin-top: var(--myco-space-xl);
}

.product-single__content {
	max-width: var(--myco-container-content);
	margin-top: var(--myco-space-3xl);
}

@media (min-width: 820px) {
	.product-single__layout {
		align-items: start;
		grid-template-columns: 1fr 1fr;
	}
}

/* Category filter strip, shared by the archive and taxonomy templates. */

/* The header is sticky at z-index 50. Without its own stacking position the
 * filter strip's chips scroll up *behind* it and show through the header's
 * background, so give the strip a position and a layer below the header. */
.product-filters {
	position: relative;
	z-index: 1;
	border-bottom: 1px solid var(--myco-color-border);
	background: var(--myco-color-bg);
}

.product-filters__inner {
	display: flex;
	flex-wrap: wrap;
	gap: var(--myco-space-xs);
	padding: var(--myco-space-md) 0;
}

.product-filter {
	display: inline-flex;
	align-items: center;
	min-height: 2.4rem;
	padding: 0.35rem 0.9rem;
	border: 1px solid var(--myco-color-border);
	border-radius: 999px;
	color: var(--myco-color-primary);
	font-size: var(--myco-font-size-sm);
	font-weight: 600;
	text-decoration: none;
	transition: background var(--myco-transition), border-color var(--myco-transition);
}

.product-filter:hover {
	border-color: var(--myco-color-accent-ink);
	color: var(--myco-color-accent-ink);
}

.product-filter.is-current {
	background: var(--myco-color-primary);
	border-color: var(--myco-color-primary);
	color: var(--myco-color-white);
}
