/* Tu Felix Austria – Gwandkastl und Produktsammlung (WooCommerce-Block). Wird nur auf Seiten mit Produktsammlung geladen. */

.tfa-chips {
	gap: 0.75rem;
}

.tfa-chips .wp-block-button.is-style-outline > .wp-block-button__link.wp-element-button {
	padding: 0.5rem 1.25rem;
	border: var(--wp--custom--hairline) solid var(--wp--preset--color--textgruen);
	border-radius: 0;
	color: var(--wp--preset--color--textgruen);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 400;
	letter-spacing: 0.02em;
	text-transform: none;
}

.tfa-chips .wp-block-button.is-style-outline > .wp-block-button__link.wp-element-button:hover,
.tfa-chips .wp-block-button.is-style-outline > .wp-block-button__link.wp-element-button:focus-visible {
	background-color: var(--wp--preset--color--textgruen);
	color: var(--wp--preset--color--creme-hell);
}

/* Kopfzeile je Kategorie: Titel links, Beschreibung rechts */
.tfa-category__head {
	align-items: flex-end;
	gap: 0.5rem 2rem;
	margin-block-end: 2rem;
	padding-block-end: 1rem;
	border-bottom: var(--wp--custom--hairline) solid rgb(47 58 42 / 0.2);
}

.tfa-category__head > * {
	margin: 0;
}

.tfa-category__head p {
	font-size: var(--wp--preset--font-size--x-small);
	opacity: 0.8;
}

/* Produktsammlung (WooCommerce-Block): Raster 2 Spalten, ab 48rem 4 Spalten */
.tfa-collection .wc-block-product-template.wc-block-product-template {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 2.5rem 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 48rem) {
	.tfa-collection .wc-block-product-template.wc-block-product-template {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 5rem 3rem;
	}
}

.tfa-collection .wc-block-product {
	position: relative;
	width: auto;
	margin: 0;
	padding: 0;
}

.tfa-collection .wc-block-product > * {
	margin-block: 0;
}

/* Bild: 4:5, Salbei als Grund, ganz leichter Zoom beim Hover */
.tfa-collection .wc-block-components-product-image {
	overflow: hidden;
	margin: 0;
	background: var(--wp--preset--color--salbei);
}

.tfa-collection .wc-block-components-product-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.8s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.tfa-collection .wc-block-product:hover .wc-block-components-product-image img,
.tfa-collection .wc-block-product:has(.wp-block-post-title a:focus-visible) .wc-block-components-product-image img {
	transform: scale(1.04);
}

/* Titel links, Preis rechts */
.tfa-collection .tfa-product__head {
	align-items: baseline;
	gap: 0.25rem 1rem;
	margin-block-start: 0.75rem;
}

.tfa-collection .tfa-product__head .wp-block-post-title {
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
	font-weight: 400;
	line-height: 1.4;
}

.tfa-collection .tfa-product__head .wp-block-post-title a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: transparent;
	text-underline-offset: 0.25em;
	transition: text-decoration-color 0.3s ease, text-underline-offset 0.3s ease;
}

/* ganze Kachel klickbar (Titel-Link), Fokusring um die Kachel */
.tfa-collection .tfa-product__head .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.tfa-collection .tfa-product__head .wp-block-post-title a:focus-visible {
	outline: none;
}

.tfa-collection .wc-block-product:hover .wp-block-post-title a,
.tfa-collection .wp-block-post-title a:focus-visible {
	text-decoration-color: currentColor;
	text-underline-offset: 0.4em;
}

.tfa-collection .wc-block-product:has(.wp-block-post-title a:focus-visible) {
	outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--rot);
	outline-offset: var(--wp--custom--focus--offset);
}

.tfa-collection .wp-block-woocommerce-product-price {
	flex: 0 0 auto;
	margin: 0;
	white-space: nowrap;
}

.tfa-collection .wc-block-components-product-price del {
	opacity: 0.6;
}

.tfa-collection .wc-block-components-product-price ins {
	text-decoration: none;
}

/* Kurzbeschreibung als Zeile unter dem Titel */
.tfa-collection .tfa-product__meta {
	margin: 0.25rem 0 0;
	opacity: 0.8;
}

.tfa-collection .tfa-product__meta p {
	margin: 0;
}

@media (prefers-reduced-motion: reduce) {
	.tfa-collection .wc-block-components-product-image img {
		transition: none;
	}

	.tfa-collection .wc-block-product:hover .wc-block-components-product-image img,
	.tfa-collection .wc-block-product:has(.wp-block-post-title a:focus-visible) .wc-block-components-product-image img {
		transform: none;
	}
}
