/*
 * Front-page section styles — enqueued only on the front page
 * (see inc/assets.php). Split out of global.css so every other template
 * stops downloading CSS it never uses.
 *
 * Shared components (buttons, section headings) stay in global.css.
 */

/* Front page: editor content below the hero gets the standard column. */
.front-page-content {
	max-width: var(--fk-max-width);
	margin: 0 auto;
	padding: calc(var(--fk-space) * 2) var(--fk-space);
}

/* ---------- "Entdecken" tiles section (front page) ---------- */

.tiles-section {
	max-width: var(--fk-max-width);
	margin: 0 auto;
	padding: 4.5rem var(--fk-space);
}

.tiles {
	display: grid;
	gap: 1.75rem;
	margin-top: 3rem;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

/* Card: white image area on top, greige body below. The hover highlight
   (lift + deeper shadow) uses the same compositor-friendly pattern as the
   hero panel: shadow on a pseudo-element, only opacity is animated. */
.tile {
	position: relative;
	display: block;
	color: inherit;
	text-decoration: none;
	background: var(--fk-color-bg);
	border-radius: 0.75rem;
	box-shadow: 0 2px 10px rgba(31, 31, 31, 0.06);
	transition: transform 0.3s ease;
}

.tile::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: 0 20px 40px rgba(31, 31, 31, 0.16);
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

a.tile:hover,
a.tile:focus-visible {
	transform: translateY(-6px);
}

a.tile:hover::after,
a.tile:focus-visible::after {
	opacity: 1;
}

/* Media area: fills the whole upper part of the tile, edge to edge.
   aspect-ratio reserves the space before the lazy image arrives (no CLS);
   overflow clips both the rounded corners and the hover zoom. */
.tile-media {
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 0.75rem 0.75rem 0 0;
}

.tile-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

a.tile:hover .tile-image,
a.tile:focus-visible .tile-image {
	transform: scale(1.03);
}

.tile-body {
	background: var(--fk-color-greige);
	border-radius: 0 0 0.75rem 0.75rem;
	padding: 1.5rem;
	min-height: 10rem;
}

.tile-title {
	font-family: var(--fk-font-sans);
	font-weight: 600;
	font-size: 1.25rem;
	margin: 0 0 0.75rem;
}

.tile-body p {
	margin: 0;
	font-size: 1rem;
}

/* ---------- Product showcase section (front page) ---------- */

/* Full-bleed greige band; the inner wrapper keeps the content column. */
.products-section {
	background: var(--fk-color-greige);
	padding: 4.5rem var(--fk-space);
}

.products-inner {
	max-width: var(--fk-max-width);
	margin: 0 auto;
}

/* WooCommerce renders <ul class="products"><li class="product">. The
   theme styles those classes itself: WooCommerce's own stylesheets stay
   dequeued on the front page (it is not a shop page), so this section
   costs no extra CSS request. */
.products-section ul.products {
	list-style: none;
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
	margin: 2.5rem 0 0;
	padding: 0;
}

/* Flex column + equal-height grid cells: title takes the remaining space,
   so price and button line up across all cards regardless of how many
   lines the product name needs. */
.products-section li.product {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--fk-color-bg);
	border-radius: 0.75rem;
	padding: 1.25rem;
	text-align: center;
	box-shadow: 0 8px 24px rgba(31, 31, 31, 0.12);
	transition: transform 0.3s ease;
}

.products-section li.product > a:not(.button) {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.products-section .woocommerce-loop-product__title {
	flex: 1;
}

/* Hover highlight: same compositor-only pattern as the category tiles. */
.products-section li.product::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: 0 28px 56px rgba(31, 31, 31, 0.28);
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.products-section li.product:hover {
	transform: translateY(-6px);
}

.products-section li.product:hover::after {
	opacity: 1;
}

.products-section li.product a {
	color: inherit;
	text-decoration: none;
}

/* Product shots keep their own margins: contain instead of cover, so
   bottles and baskets are never cropped. aspect-ratio still reserves the
   space (no layout shift while the lazy image loads). */
/* Rounded corners sit on the image box itself — the card's own padding
   already keeps the shot away from the card edges, so no extra inset
   (which would push the radius off the visible photo). */
.products-section li.product img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	border-radius: 0.5rem;
	margin-bottom: 1rem;
}

.products-section .woocommerce-loop-product__title {
	font-family: var(--fk-font-sans);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.4;
	margin: 0 0 0.75rem;
	color: var(--fk-color-text);
}

.products-section .price {
	display: block;
	font-weight: 700;
	color: var(--fk-color-text);
	margin: 0 0 1rem;
}

.products-section .price del {
	font-weight: 400;
	color: var(--fk-color-muted);
	margin-right: 0.5ch;
}

.products-section .price ins {
	background: none;
	color: var(--fk-color-text);
}

/* German Market legal notices (Grundpreis, Lieferzeit, MwSt.) render
   through the native loop hooks — keep them readable but secondary. */
.products-section .wgm-info,
.products-section .delivery-time-info,
.products-section .price-unit,
.products-section .product_unit_price,
.products-section .woocommerce-de_price_taxrate {
	display: block;
	font-size: 0.75rem;
	font-weight: 400;
	line-height: 1.5;
	color: var(--fk-color-muted);
}

/* Sale flash ("Angebot!") comes from WooCommerce itself. */
.products-section .onsale {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 1;
	background: var(--fk-color-sage-text); /* WCAG AA with white label. */
	color: #fff;
	font-size: 0.8125rem;
	padding: 0.25rem 0.75rem;
	border-radius: 0.25rem;
}

/* Selector must outweigh ".products-section li.product a { color: inherit }"
   above — otherwise the label inherits the dark body color and disappears
   on the dark button. */
/* Product card button: dark, compact, inside the WooCommerce loop. */
.products-section li.product a.button {
	display: inline-block;
	align-self: center; /* Flex child: keep the button at its natural width. */
	background: var(--fk-color-text);
	color: #fff;
	padding: 0.5rem 1rem;
	border-radius: 0.5rem;
	font-size: 0.9375rem;
	text-decoration: none;
	border: 1px solid var(--fk-color-text);
	transition: opacity 0.2s ease;
}

.products-section li.product a.button:hover,
.products-section li.product a.button:focus-visible {
	opacity: 0.85;
}

/* ---------- Occasions section (front page) ---------- */

.occasions-section {
	max-width: var(--fk-max-width);
	margin: 0 auto;
	padding: 4.5rem var(--fk-space);
}

/* Fixed 3x3 layout on desktop (auto-fit would fit four columns into the
   content width); 2 columns on tablet, 1 on phones. */
.occasions {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: 1fr;
	margin-top: 2.5rem;
}

@media (min-width: 40em) {
	.occasions {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 64em) {
	.occasions {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Tile: image fills the card, text sits on top of a gradient scrim.
   aspect-ratio holds the space before the lazy image arrives (no CLS). */
.occasion {
	position: relative;
	display: flex;
	align-items: flex-end;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 0.75rem;
	color: #fff;
	text-decoration: none;
	background: var(--fk-color-sage-dark);
}

/* Paint order inside the tile is set explicitly: the ::before scrim is a
   pseudo-element BEFORE the image in DOM order, so without a z-index the
   image would cover it and the text would lose its contrast backdrop. */
.occasion-image {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.45s ease;
}

/* Permanent scrim: keeps the white text readable on any photo. */
.occasion::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		to top,
		rgba(31, 31, 31, 0.78) 0%,
		rgba(31, 31, 31, 0.35) 45%,
		rgba(31, 31, 31, 0) 75%
	);
}

/* Hover darkening: a solid overlay faded in via opacity only, so the
   effect runs on the compositor instead of repainting a gradient. */
.occasion::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: rgba(31, 31, 31, 0.4);
	opacity: 0;
	transition: opacity 0.35s ease;
}

a.occasion:hover::after,
a.occasion:focus-visible::after {
	opacity: 1;
}

a.occasion:hover .occasion-image,
a.occasion:focus-visible .occasion-image {
	transform: scale(1.05);
}

.occasion-body {
	position: relative; /* Above image and both overlays. */
	z-index: 2;
	padding: 1.5rem;
}

.occasion-title {
	font-family: var(--fk-font-serif);
	font-size: clamp(1.375rem, 2.2vw, 1.75rem);
	font-weight: 500;
	line-height: 1.2;
	color: #fff;
	margin: 0 0 0.25rem;
}

.occasion-text {
	margin: 0;
	font-size: 0.9375rem;
	color: rgba(255, 255, 255, 0.92);
}

/* ---------- Price-range section (front page) ---------- */

.prices-section {
	background: var(--fk-color-greige);
	padding: 4.5rem var(--fk-space);
}

.prices-inner {
	max-width: var(--fk-max-width);
	margin: 0 auto;
}

.prices {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: 1fr;
	margin-top: 2.5rem;
}

@media (min-width: 40em) {
	.prices {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 64em) {
	.prices {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* Card: heading and subtitle on top, product shot at the bottom.
   Flat at rest — the hover lift and shadow do the work. */
.price-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 27rem; /* Taller, portrait proportions read more elegantly. */
	background: var(--fk-color-bg);
	border-radius: 0.75rem;
	padding: 2.5rem 1.25rem 1.5rem;
	text-align: center;
	color: inherit;
	text-decoration: none;
	box-shadow: 0 1px 4px rgba(31, 31, 31, 0.05);
	transition: transform 0.3s ease;
}

.price-tile::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: 0 24px 48px rgba(31, 31, 31, 0.22);
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

a.price-tile:hover,
a.price-tile:focus-visible {
	transform: translateY(-6px);
}

a.price-tile:hover::after,
a.price-tile:focus-visible::after {
	opacity: 1;
}

/* Highlighted price band. align-self keeps the box hugging its text —
   as a flex item the heading would otherwise stretch full width. */
.price-tile-title {
	align-self: center;
	background: var(--fk-color-greige);
	border-radius: 0.25rem;
	padding: 0.3rem 1rem;
	font-family: var(--fk-font-serif);
	font-size: 1.5rem;
	font-weight: 500;
	margin: 0 0 0.75rem;
}

.price-tile-text {
	margin: 0;
	font-size: 1rem;
}

/* Image sits at the bottom of the card, pushed down so all four line up
   even when a subtitle wraps to two lines. */
.price-tile-image {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	margin-top: auto;
	padding-top: 1.5rem;
	transition: transform 0.3s ease;
}

a.price-tile:hover .price-tile-image,
a.price-tile:focus-visible .price-tile-image {
	transform: scale(1.03);
}

/* ---------- Corporate gifts / B2B section (front page) ---------- */

.b2b-section {
	max-width: var(--fk-max-width);
	margin: 0 auto;
	padding: 4.5rem var(--fk-space);
}

.b2b-inner {
	display: grid;
	gap: 2.5rem;
	align-items: center;
}

@media (min-width: 64em) {
	.b2b-inner {
		grid-template-columns: 1fr 1fr;
		gap: 4rem;
	}
}

.b2b-text {
	font-size: 1.0625rem;
	max-width: 34rem;
	margin: 0 0 1.25rem;
}

.b2b-features {
	list-style: none;
	margin: 2rem 0;
	padding: 0;
	display: grid;
	gap: 0.875rem;
}

.b2b-features li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0;
}

.b2b-features svg {
	flex: none;
	color: var(--fk-color-sage-dark);
}

/* Shared media styling for the two-column sections (B2B, about). */
.b2b-image,
.about-image {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: 0.75rem;
	box-shadow: 0 22px 48px rgba(31, 31, 31, 0.28);
}

/* ---------- About section (front page) ---------- */

.about-section {
	max-width: var(--fk-max-width);
	margin: 0 auto;
	padding: 4.5rem var(--fk-space);
}

.about-inner {
	display: grid;
	gap: 2.5rem;
	align-items: center;
}

@media (min-width: 64em) {
	.about-inner {
		grid-template-columns: 1fr 1fr;
		gap: 4rem;
	}
}

/* ---------- USP section (front page) ---------- */

.usps-section {
	background: var(--fk-color-greige);
	padding: 4.5rem var(--fk-space);
}

.usps-inner {
	max-width: var(--fk-max-width);
	margin: 0 auto;
}

.usps {
	list-style: none;
	display: grid;
	gap: 2.5rem 1.5rem;
	grid-template-columns: repeat(2, 1fr);
	margin: 3.5rem 0 0;
	padding: 0;
}

@media (min-width: 48em) {
	.usps {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 64em) {
	.usps {
		grid-template-columns: repeat(5, 1fr);
	}
}

.usp {
	text-align: center;
	margin: 0;
}

/* The CSS fill property overrides the SVG's fill="none" attribute, so the
   outline icon can fill on hover. Triggered from the whole column, not
   the 32px icon itself — far easier to hit. */
.usp-icon {
	color: var(--fk-color-text);
	fill: transparent;
	margin: 0 auto 1.25rem;
	transition: fill 0.3s ease, transform 0.3s ease;
}

.usp:hover .usp-icon,
.usp:focus-within .usp-icon {
	fill: var(--fk-color-sage);
	transform: translateY(-4px);
}

.usp-title {
	font-family: var(--fk-font-serif);
	font-size: 1.125rem;
	font-weight: 500;
	line-height: 1.3;
	margin: 0 0 1rem;
}

.usp-text {
	margin: 0;
	font-size: 0.875rem;
	color: var(--fk-color-muted);
}

/* ---------- Testimonials section (front page) ---------- */

.testimonials-section {
	padding: 4.5rem var(--fk-space);
	text-align: center;
}

.testimonials-inner {
	max-width: var(--fk-max-width);
	margin: 0 auto;
}

.testimonials-section .section-text {
	margin-inline: auto;
}

.testimonials {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: 1fr;
	margin-top: 3rem;
	text-align: left;
}

@media (min-width: 48em) {
	.testimonials {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Same hover language as the other card sections: lift plus a deeper
   shadow faded in via pseudo-element opacity (compositor-only). */
.testimonial {
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 2rem;
	background: var(--fk-color-greige);
	border-radius: 0.75rem;
	box-shadow: 0 8px 24px rgba(31, 31, 31, 0.1);
	transition: transform 0.3s ease;
}

.testimonial::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: 0 24px 48px rgba(31, 31, 31, 0.22);
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.testimonial:hover {
	transform: translateY(-6px);
}

.testimonial:hover::after {
	opacity: 1;
}

.testimonial-stars {
	display: flex;
	gap: 0.25rem;
	color: var(--fk-color-star);
	margin-bottom: 1.5rem;
}

.testimonial-quote {
	margin: 0 0 2rem;
}

.testimonial-quote p {
	margin: 0;
	line-height: 1.7;
}

.testimonial-author {
	margin-top: auto;
	font-size: 0.9375rem;
}

.testimonial-author cite {
	font-style: normal;
}

/* ---------- Closing CTA section (front page) ---------- */

.cta-section {
	background: var(--fk-color-greige);
	padding: 5.5rem var(--fk-space) 6rem;
	text-align: center;
}

.cta-inner {
	max-width: 46rem;
	margin: 0 auto;
}

.cta-title {
	font-family: var(--fk-font-serif);
	font-size: clamp(2rem, 4vw, 2.75rem);
	font-weight: 500;
	line-height: 1.15;
	margin: 0 0 1rem;
}

.cta-text {
	margin: 0 0 2rem;
	font-size: 1.0625rem;
}

.cta-section .button--solid {
	border-radius: 0.5rem;
	padding: 0.875rem 1.75rem;
}

.cta-link {
	margin: 1.5rem 0 0;
	font-size: 0.9375rem;
}

.cta-link a {
	color: var(--fk-color-muted);
	text-decoration: none;
}

.cta-link a:hover,
.cta-link a:focus-visible {
	text-decoration: underline;
}

/* Arrow nudges forward on hover — decorative, hidden from screen readers. */
.cta-arrow {
	display: inline-block;
	transition: transform 0.2s ease;
}

.cta-link a:hover .cta-arrow,
.cta-link a:focus-visible .cta-arrow {
	transform: translateX(0.25rem);
}