/* Product specifications sheet
 *
 * Generated from assets/scss/product-specs.scss — edit the SCSS source, not this file.
 * Markup: snippets/custom/product_specs.html.twig
 */

.product-specs {
	/* --- Design tokens: change these first --- */
	--specs-border-color: rgba(0, 0, 0, .09);
	--specs-label-color: var(--bs-gray-600, #6c757d);
	--specs-value-color: var(--bs-body-color, #212529);
	--specs-group-color: var(--bs-gray-800, #343a40);
	--specs-link-color: #d23436;
	--specs-focus-color: var(--bs-primary, #3f546f);
	--specs-hover-bg: rgba(0, 0, 0, .022);
	--specs-row-padding: .625rem;
	--specs-label-width: 13.75rem;
	--specs-collapsed-height: 17rem;
	--specs-fade-height: 4rem;

	position: relative;
	margin-bottom: 1rem;
	color: var(--specs-value-color);
}

.product-specs__section + .product-specs__section {
	margin-top: 1.5rem;
}

.product-specs__group {
	margin: 0 0 .5rem;
	padding-bottom: .5rem;
	border-bottom: 2px solid var(--specs-border-color);
	color: var(--specs-group-color);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .08em;
	line-height: 1.3;
	text-transform: uppercase;
}

.product-specs__list {
	margin: 0;
	padding: 0;
}

.product-specs__row {
	display: block;
	padding: var(--specs-row-padding) 0;
	border-bottom: 1px solid var(--specs-border-color);
}

.product-specs__row:last-child {
	border-bottom: 0;
}

.product-specs__label {
	margin: 0 0 .125rem;
	color: var(--specs-label-color);
	font-size: .8125rem;
	font-weight: 400;
	line-height: 1.35;
}

.product-specs__value {
	margin: 0;
	font-weight: 500;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

.product-specs__value a {
	color: var(--specs-link-color);
	font-weight: 600;
	text-decoration: none;
	transition: opacity .2s ease;
}

.product-specs__value a:hover {
	opacity: .75;
	text-decoration: underline;
}

.product-specs__value img {
	max-width: 100%;
	height: auto;
}

.product-specs__value table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}

/* --- Tags rendered as chips --- */

.product-specs__row--tags .product-specs__value {
	display: flex;
	flex-wrap: wrap;
	gap: .375rem;
}

.product-specs__value a.product-specs__tag {
	display: inline-block;
	padding: .25rem .625rem;
	border: 1px solid var(--specs-border-color);
	border-radius: 999px;
	color: var(--specs-label-color);
	font-size: .8125rem;
	font-weight: 500;
	text-decoration: none;
}

.product-specs__value a.product-specs__tag:hover {
	background-color: var(--specs-hover-bg);
	color: var(--specs-value-color);
	opacity: 1;
	text-decoration: none;
}

/* --- Collapse: CSS only, no JavaScript --- */

/* Same pattern as the theme's text-expand inputs: hidden but still focusable,
   so the toggle stays reachable with the keyboard. */
.product-specs__expand-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.product-specs--collapse .product-specs__body,
.product-specs--collapse-mobile .product-specs__body {
	max-height: var(--specs-collapsed-height);
	overflow: hidden;
	-webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--specs-fade-height)), transparent 100%);
	mask-image: linear-gradient(to bottom, #000 calc(100% - var(--specs-fade-height)), transparent 100%);
}

.product-specs__expand-input:checked ~ .product-specs__body {
	max-height: none;
	-webkit-mask-image: none;
	mask-image: none;
}

.product-specs__expand {
	display: inline-flex;
	align-items: center;
	gap: .375rem;
	margin-top: .75rem;
	padding: .5rem .875rem;
	border: 1px solid var(--specs-border-color);
	border-radius: 999px;
	background-color: transparent;
	color: var(--specs-group-color);
	cursor: pointer;
	font-size: .875rem;
	font-weight: 600;
	line-height: 1;
	transition: background-color .2s ease, border-color .2s ease;
	user-select: none;
}

.product-specs__expand:hover {
	background-color: var(--specs-hover-bg);
	border-color: var(--specs-label-color);
}

.product-specs__expand::after {
	content: '';
	width: .5rem;
	height: .5rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-.15em) rotate(45deg);
	transition: transform .2s ease;
}

.product-specs__expand-text--less {
	display: none;
}

.product-specs__expand-input:checked ~ .product-specs__expand::after {
	transform: translateY(.1em) rotate(-135deg);
}

.product-specs__expand-input:checked ~ .product-specs__expand .product-specs__expand-text--more {
	display: none;
}

.product-specs__expand-input:checked ~ .product-specs__expand .product-specs__expand-text--less {
	display: inline;
}

.product-specs__expand-input:focus-visible ~ .product-specs__expand {
	outline: 2px solid var(--specs-focus-color);
	outline-offset: 2px;
}

/* --- Two column layout, tabs variant only --- */

@media (min-width: 768px) {
	.product-specs:not(.product-specs--summary) .product-specs__row {
		display: grid;
		grid-template-columns: minmax(8rem, var(--specs-label-width)) minmax(0, 1fr);
		gap: 1.25rem;
		align-items: baseline;
		padding-right: .5rem;
		padding-left: .5rem;
		border-radius: .25rem;
	}

	.product-specs:not(.product-specs--summary) .product-specs__row:hover {
		background-color: var(--specs-hover-bg);
	}

	.product-specs:not(.product-specs--summary) .product-specs__label {
		margin-bottom: 0;
		font-size: .875rem;
	}
}

/* Enough room on desktop: the tabs variant shows everything */

@media (min-width: 992px) {
	.product-specs--collapse-mobile .product-specs__body {
		max-height: none;
		-webkit-mask-image: none;
		mask-image: none;
	}

	.product-specs--collapse-mobile .product-specs__expand {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.product-specs__expand,
	.product-specs__expand::after,
	.product-specs__value a {
		transition: none;
	}
}
