/*
Theme Name: FINNLIO
Theme URI: https://finnlio.de
Author: development4u
Description: Block-Theme für FINNLIO – hochwertiges Spielzeug, Kleidung und Möbel für Kinder. Skandinavisch-ruhige Gestaltung mit dem Sonnen- und Horizontmotiv der Bildmarke, lokal eingebundenen Schriften und WooCommerce-Unterstützung.
Version: 1.1.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: finnlio
Tags: e-commerce, block-theme, full-site-editing, accessibility-ready
*/

/* Farben, Typografie und Abstände stehen in theme.json – hier keine Hex-Werte
   doppeln. Diese Datei ergänzt, was theme.json nicht abbilden kann: Bewegung,
   das Horizontmotiv, WooCommerce-Feinschliff.

   FINNLIO ist bewusst einfarbig hell. Keine Dunkelfassung – die Marke steht auf
   Cream-Grund, eine Invertierung würde sie verfälschen. */

:root{
  --fl-kurve: cubic-bezier(.22,.8,.28,1);
  --fl-schnell: .22s;
  --fl-mittel: .4s;
  --fl-langsam: .7s;
  --fl-sperr: .22em;
  --fl-schatten: rgba(74,65,57,.09);
  --fl-schatten-tief: rgba(74,65,57,.14);
}

/* ══ Grundlagen ══ */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible{
  outline: 3px solid var(--wp--preset--color--sonne);
  outline-offset: 3px;
  border-radius: 6px;
}

.finnlio-skip-link{
  position:absolute; left:-9999px; top:0; z-index:999;
  padding:12px 20px;
  background:var(--wp--preset--color--ink-dunkel);
  color:var(--wp--preset--color--cream);
  text-decoration:none;
}
.finnlio-skip-link:focus{ left:8px; top:8px; }

/* ══ Sonnenmotiv ══
   Ein Lichtschein, der beim Scrollen gegenläufig über die Seite wandert.
   Wird von assets/js/finnlio.js eingesetzt und bewegt. */

/* Schneidet den Überstand der Sonne ab, ohne die Seite breiter zu machen. */
.finnlio-sonnenfeld{
  position:absolute; inset:0;
  overflow:hidden; pointer-events:none; z-index:0;
}
.finnlio-sonne{
  position:absolute; top:180px; right:-90px;
  width:min(38vw, 380px); aspect-ratio:1;
  border-radius:50%;
  background:radial-gradient(circle at 50% 50%,
    rgba(195,132,50,.20), rgba(195,132,50,.07) 46%, transparent 70%);
  pointer-events:none; z-index:0;
  will-change:transform;
}
/* Die Sonne darf seitlich hinausragen, ohne eine Querleiste zu erzeugen.
   „clip" statt „hidden", weil „hidden" am body sonst position:sticky im Kopf
   aushebelt – der body würde zum Scroll-Behälter. */
body{ position:relative; overflow-x:hidden; }
@supports (overflow-x:clip){
  body{ overflow-x:clip; }
}
.wp-site-blocks{ position:relative; z-index:1; }

/* Strahlen der Bildmarke drehen langsam – im Kopf, im Fuß, in Mustern */
.finnlio-strahlen{
  transform-origin:168px 34px;
  animation:finnlio-drehen var(--fl-strahlen-dauer, 72s) linear infinite;
}
@keyframes finnlio-drehen{ to{ transform:rotate(360deg); } }

/* ══ Horizont ══
   Die geschwungene Doppellinie der Bildmarke als Abschnittstrenner.
   Als Block-Muster „Horizontlinie" einsetzbar. */

.finnlio-horizont{
  display:block; width:100%; height:52px;
  color:var(--wp--preset--color--linie-stark);
}
.finnlio-horizont--sage{ color:#CDD3BE; }

/* Untere Kante als Horizontbogen – für Bühnenbilder und Kategoriekacheln */
.finnlio-bogen,
.finnlio-bogen img{
  border-radius:22px 22px 46% 46% / 22px 22px 13% 13%;
}
.finnlio-bogen{
  overflow:hidden;
  background:var(--wp--preset--color--stein);
  box-shadow:0 20px 54px var(--fl-schatten);
}

/* ══ Marke ══ */

.finnlio-wortmarke,
.wp-block-site-title{
  font-family:var(--wp--preset--font-family--heading);
  letter-spacing:var(--fl-sperr);
  text-transform:uppercase;
  font-weight:400;
}

.finnlio-eyebrow{
  font-family:var(--wp--preset--font-family--heading);
  font-size:var(--wp--preset--font-size--xs);
  letter-spacing:var(--fl-sperr);
  text-transform:uppercase;
  font-weight:500;
  color:var(--wp--preset--color--sonne-text);
  display:flex; align-items:center; gap:10px;
}
.finnlio-eyebrow::before{
  content:""; width:26px; height:1.5px; flex:none;
  background:currentColor;
}
.has-text-align-center.finnlio-eyebrow{ justify-content:center; }

/* ══ Vertrauensleiste ══ */

.finnlio-vertrauen{
  border-bottom:1px solid var(--wp--preset--color--linie);
}
.finnlio-trust{
  display:flex; flex-wrap:wrap; gap:0 4px; justify-content:center;
  margin:0;
  font-family:var(--wp--preset--font-family--heading);
  font-size:var(--wp--preset--font-size--xs);
  letter-spacing:.1em; text-transform:uppercase;
}
.finnlio-trust > *{ position:relative; padding:0 14px; }
.finnlio-trust > * + *::before{
  content:""; position:absolute; left:-2px; top:50%;
  width:3px; height:3px; border-radius:50%;
  background:var(--wp--preset--color--sonne);
  transform:translateY(-50%);
}

/* ══ Navigation ══ */

.wp-block-navigation .wp-block-navigation-item__content{
  position:relative; padding-bottom:4px; text-decoration:none;
}
.wp-block-navigation .wp-block-navigation-item__content::after{
  content:""; position:absolute; left:0; right:100%; bottom:0; height:1.5px;
  background:var(--wp--preset--color--sonne);
  transition:right .32s var(--fl-kurve);
}
.wp-block-navigation .wp-block-navigation-item__content:hover::after,
.wp-block-navigation .current-menu-item .wp-block-navigation-item__content::after{ right:0; }

/* ══ Knöpfe ══ */

.wp-element-button, .wp-block-button__link{
  transition:transform var(--fl-schnell) var(--fl-kurve),
             background-color var(--fl-schnell),
             color var(--fl-schnell),
             border-color var(--fl-schnell),
             box-shadow var(--fl-schnell);
  box-shadow:0 4px 14px var(--fl-schatten);
}
.wp-element-button:hover, .wp-block-button__link:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 22px var(--fl-schatten-tief);
}
.is-style-outline .wp-block-button__link{ box-shadow:none; }
.is-style-outline .wp-block-button__link:hover{ box-shadow:0 4px 14px var(--fl-schatten); }

/* ══ WooCommerce: Produktkacheln ══ */

.woocommerce ul.products li.product,
.wc-block-product-template__responsive li,
.wc-block-grid__product{ text-align:left; }

.woocommerce ul.products li.product a img,
.wc-block-grid__product-image img,
.wc-block-components-product-image img{
  border-radius:14px;
  background:var(--wp--preset--color--stein);
  transition:transform .65s var(--fl-kurve);
}
.woocommerce ul.products li.product:hover a img,
.wc-block-grid__product:hover .wc-block-grid__product-image img{ transform:scale(1.055); }

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.wc-block-grid__product-title{
  font-family:var(--wp--preset--font-family--body);
  font-size:var(--wp--preset--font-size--base);
  font-weight:400;
  color:var(--wp--preset--color--ink-dunkel);
  position:relative; display:inline-block; width:fit-content;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title::after,
.wc-block-grid__product-title::after{
  content:""; position:absolute; left:0; right:100%; bottom:-3px; height:1.5px;
  background:var(--wp--preset--color--sonne);
  transition:right .38s var(--fl-kurve);
}
.woocommerce ul.products li.product:hover .woocommerce-loop-product__title::after,
.wc-block-grid__product:hover .wc-block-grid__product-title::after{ right:0; }

.woocommerce ul.products li.product .price,
.wc-block-grid__product-price,
.wc-block-components-product-price{
  font-family:var(--wp--preset--font-family--heading);
  font-weight:500;
  font-variant-numeric:tabular-nums;
  color:var(--wp--preset--color--ink-dunkel);
}
.woocommerce ul.products li.product .price del{
  opacity:.6; font-weight:300; font-size:.88em;
}
.woocommerce ul.products li.product .price ins{
  text-decoration:none; color:var(--wp--preset--color--sonne-text);
}

/* Marke über dem Titel (von functions.php ausgegeben) */
.finnlio-loop-marke{
  display:block;
  font-family:var(--wp--preset--font-family--heading);
  font-size:11px; letter-spacing:.15em; text-transform:uppercase;
  color:var(--wp--preset--color--sonne-text);
  margin-top:14px;
}

/* Abzeichen */
.woocommerce span.onsale,
.wc-block-grid__product-onsale{
  position:absolute; top:12px; left:12px; right:auto;
  min-width:0; min-height:0; line-height:1; padding:6px 12px;
  border-radius:999px;
  font-family:var(--wp--preset--font-family--heading);
  font-size:10px; font-weight:500; letter-spacing:.12em; text-transform:uppercase;
  background:var(--wp--preset--color--sonne-hell);
  color:var(--wp--preset--color--sonne-text);
  backdrop-filter:blur(4px);
}

/* Pflichtangaben zum Preis (PAngV) – nie ausblenden */
.finnlio-preisangaben{
  font-size:var(--wp--preset--font-size--xs);
  color:var(--wp--preset--color--taupe);
  line-height:1.5;
  margin-top:3px;
}
.finnlio-preisangaben a{
  color:inherit;
  text-decoration-color:var(--wp--preset--color--linie-stark);
  text-underline-offset:2px;
}
.finnlio-preisangaben--lager b{
  color:var(--wp--preset--color--sage-text); font-weight:600;
  display:inline-flex; align-items:center; gap:6px;
}
.finnlio-preisangaben--lager b::before{
  content:""; width:7px; height:7px; border-radius:50%;
  background:var(--wp--preset--color--sage);
}

/* ══ Produktseite ══ */

.finnlio-warnhinweis{
  background:var(--wp--preset--color--sonne-hell);
  border-left:3px solid var(--wp--preset--color--sonne);
  border-radius:0 11px 11px 0;
  padding:15px 19px;
  margin:var(--wp--preset--spacing--30) 0;
  font-size:var(--wp--preset--font-size--sm);
}
.finnlio-warnhinweis strong{
  color:var(--wp--preset--color--sonne-text);
  display:block; margin-bottom:4px;
}

.finnlio-produktdetails{
  border-top:1px solid var(--wp--preset--color--linie);
  margin-top:var(--wp--preset--spacing--30);
  padding-top:var(--wp--preset--spacing--30);
}
.finnlio-produktdetails dl{
  display:grid; grid-template-columns:minmax(9.5rem,auto) 1fr;
  gap:12px 28px; margin:0;
}
.finnlio-produktdetails dt{ font-weight:600; color:var(--wp--preset--color--ink-dunkel); }
.finnlio-produktdetails dd{ margin:0; }

.finnlio-gpsr{
  margin-top:var(--wp--preset--spacing--30);
  background:var(--wp--preset--color--cream-tief);
  border:1px solid var(--wp--preset--color--linie);
  border-radius:12px;
  padding:16px 19px;
  font-size:var(--wp--preset--font-size--sm);
  color:var(--wp--preset--color--taupe);
}
.finnlio-gpsr strong{
  display:block; color:var(--wp--preset--color--ink-dunkel); margin-bottom:5px;
}

/* Galerie */
.woocommerce div.product div.images img{
  border-radius:18px;
  box-shadow:0 14px 40px var(--fl-schatten);
}
.woocommerce div.product div.images .flex-control-thumbs li img{
  border-radius:11px; box-shadow:none;
  border:1.5px solid var(--wp--preset--color--linie);
  transition:border-color var(--fl-schnell), transform var(--fl-schnell) var(--fl-kurve);
}
.woocommerce div.product div.images .flex-control-thumbs li img:hover{ transform:translateY(-2px); }
.woocommerce div.product div.images .flex-control-thumbs li img.flex-active{
  border-color:var(--wp--preset--color--sonne);
}

/* ══ Ziehbares Regal ══
   Klasse „finnlio-rail" im Block-Editor unter „Zusätzliche CSS-Klasse" an eine
   Produktliste vergeben. assets/js/finnlio.js macht sie mit der Maus ziehbar. */

.finnlio-rail ul.products,
.finnlio-rail .wp-block-post-template,
.finnlio-rail .wc-block-product-template,
.finnlio-rail .wc-block-grid__products{
  display:flex !important;
  flex-wrap:nowrap !important;
  gap:22px;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  padding-bottom:14px;
  cursor:grab;
  scrollbar-width:thin;
  scrollbar-color:var(--wp--preset--color--linie-stark) transparent;
}
.finnlio-rail ul.products::-webkit-scrollbar,
.finnlio-rail .wc-block-grid__products::-webkit-scrollbar,
.finnlio-rail .wp-block-post-template::-webkit-scrollbar{ height:5px; }
.finnlio-rail ul.products::-webkit-scrollbar-thumb,
.finnlio-rail .wc-block-grid__products::-webkit-scrollbar-thumb,
.finnlio-rail .wp-block-post-template::-webkit-scrollbar-thumb{
  background:var(--wp--preset--color--linie-stark); border-radius:9px;
}
.finnlio-rail li,
.finnlio-rail .wc-block-grid__product{
  flex:0 0 252px !important; scroll-snap-align:start; margin:0 !important;
}
.finnlio-rail.finnlio-zieht ul.products,
.finnlio-rail.finnlio-zieht .wc-block-grid__products,
.finnlio-rail.finnlio-zieht .wp-block-post-template{ cursor:grabbing; scroll-snap-type:none; }
.finnlio-rail.finnlio-zieht img{ pointer-events:none; }

/* ══ Altersfilter (Markup aus dem Plugin FINNLIO Core) ══ */

.finnlio-altersfilter{
  display:flex; align-items:center; gap:14px; flex-wrap:wrap;
  padding:var(--wp--preset--spacing--20) 0;
  border-top:1px solid var(--wp--preset--color--linie);
  border-bottom:1px solid var(--wp--preset--color--linie);
  margin-bottom:var(--wp--preset--spacing--40);
}
.finnlio-altersfilter label{
  font-family:var(--wp--preset--font-family--heading);
  font-size:11.5px; letter-spacing:.13em; text-transform:uppercase;
  color:var(--wp--preset--color--taupe); white-space:nowrap;
}
.finnlio-altersfilter output{
  font-family:var(--wp--preset--font-family--heading);
  font-weight:500; font-size:13.5px; white-space:nowrap;
  color:var(--wp--preset--color--sonne-text);
  font-variant-numeric:tabular-nums;
}
.finnlio-altersfilter input[type=range]{
  -webkit-appearance:none; appearance:none; background:none;
  flex:1; min-width:130px; max-width:260px; height:22px; cursor:pointer;
}
.finnlio-altersfilter input[type=range]::-webkit-slider-runnable-track{
  height:3px; border-radius:9px; background:var(--wp--preset--color--linie-stark);
}
.finnlio-altersfilter input[type=range]::-moz-range-track{
  height:3px; border-radius:9px; background:var(--wp--preset--color--linie-stark);
}
.finnlio-altersfilter input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none; width:17px; height:17px; border-radius:50%;
  background:var(--wp--preset--color--sonne); margin-top:-7px;
  border:2.5px solid var(--wp--preset--color--cream);
  box-shadow:0 1px 5px rgba(195,132,50,.5);
  transition:transform .18s var(--fl-kurve);
}
.finnlio-altersfilter input[type=range]:hover::-webkit-slider-thumb{ transform:scale(1.16); }
.finnlio-altersfilter input[type=range]::-moz-range-thumb{
  width:17px; height:17px; border-radius:50%;
  background:var(--wp--preset--color--sonne);
  border:2.5px solid var(--wp--preset--color--cream);
  box-shadow:0 1px 5px rgba(195,132,50,.5);
}
/* Ohne JavaScript bleibt der Absenden-Knopf sichtbar und der Filter benutzbar */
.finnlio-altersfilter button[type=submit]{
  font-family:var(--wp--preset--font-family--heading);
  font-size:13px; letter-spacing:.04em;
  border:1px solid var(--wp--preset--color--linie-stark);
  background:var(--wp--preset--color--weiss);
  color:var(--wp--preset--color--ink);
  border-radius:999px; padding:9px 18px; cursor:pointer;
  transition:border-color var(--fl-schnell), transform var(--fl-schnell) var(--fl-kurve);
}
.finnlio-altersfilter button[type=submit]:hover{
  border-color:var(--wp--preset--color--taupe); transform:translateY(-1px);
}
.finnlio-hat-js .finnlio-altersfilter button[type=submit]{ display:none; }
.finnlio-altersfilter .finnlio-treffer{
  margin-left:auto; font-size:12.5px; color:var(--wp--preset--color--taupe);
  font-variant-numeric:tabular-nums;
}
li.finnlio-ausgefiltert{ display:none !important; }
li.finnlio-eingeblendet{ animation:finnlio-rein .42s var(--fl-kurve) both; }
@keyframes finnlio-rein{
  from{ opacity:.45; transform:translateY(9px); }
  to{ opacity:1; transform:none; }
}

/* ══ Fuß ══ */

.wp-block-site-title a{ text-decoration:none; }

/* ══ Kategoriekacheln (Muster „Kategoriekacheln") ══
   Ersetzen die Kategorieliste von WooCommerce. Kein Beitragsbild nötig, damit
   nie ein grauer WooCommerce-Platzhalter erscheint. */

.finnlio-kacheln{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(min(152px, 100%), 1fr));
  gap:clamp(10px, 2vw, 18px);
}
.finnlio-kachel{
  position:relative; display:flex; flex-direction:column; justify-content:flex-end;
  min-height:clamp(168px, 27vw, 250px);
  padding:16px 17px;
  border-radius:20px 20px 34% 34% / 20px 20px 11% 11%;
  background:var(--wp--preset--color--cream-tief);
  color:var(--wp--preset--color--ink-dunkel);
  text-decoration:none; overflow:hidden; isolation:isolate;
  transition:transform var(--fl-mittel) var(--fl-kurve),
             box-shadow var(--fl-mittel) var(--fl-kurve),
             background-color var(--fl-mittel);
}
.finnlio-kachel:nth-child(2n){ background:var(--wp--preset--color--stein); }
.finnlio-kachel:nth-child(4n){ background:var(--wp--preset--color--sage-hell); }
.finnlio-kachel:hover{
  transform:translateY(-4px);
  box-shadow:0 16px 38px var(--fl-schatten);
}
.finnlio-kachel__motiv{
  position:absolute; top:-6%; right:-4%; width:60%; height:auto; z-index:-1;
  color:var(--wp--preset--color--taupe); opacity:.28;
  transition:transform var(--fl-langsam) var(--fl-kurve), opacity var(--fl-mittel);
}
.finnlio-kachel:hover .finnlio-kachel__motiv{ transform:scale(1.09) rotate(-3deg); opacity:.42; }
.finnlio-kachel__text{ display:block; }
.finnlio-kachel__titel{
  display:block;
  font-family:var(--wp--preset--font-family--heading);
  font-size:clamp(1.05rem, 2.6vw, 1.4rem);
  font-weight:400; line-height:1.2;
}
.finnlio-kachel__unter{
  display:block; margin-top:3px;
  font-size:var(--wp--preset--font-size--xs);
  color:var(--wp--preset--color--taupe);
}
.finnlio-kachel__pfeil{
  position:absolute; top:15px; right:15px;
  width:30px; height:30px; border-radius:50%;
  display:grid; place-items:center;
  background:var(--wp--preset--color--weiss);
  color:var(--wp--preset--color--sonne-text);
  box-shadow:0 2px 8px var(--fl-schatten);
  transition:transform var(--fl-mittel) var(--fl-kurve);
}
.finnlio-kachel__pfeil svg{ width:16px; height:16px; }
.finnlio-kachel:hover .finnlio-kachel__pfeil{ transform:translateX(3px); }

/* ══ Produktraster ══
   WooCommerce rechnet Spaltenbreiten in Prozent mit Float aus und fällt auf dem
   Handy auf eine Spalte mit übergroßen Bildern zurück. Stattdessen ein Gitter,
   das sich an der Kachelbreite orientiert – zwei Spalten auf dem Handy. */

.woocommerce ul.products,
.wc-block-grid__products{
  /* !important, weil WooCommerce seine Blockstile erst beim Rendern des Blocks
     einreiht - also weiter unten im Dokument als dieses Stylesheet. Ohne das
     gewinnt dort display:flex und die Kacheln stehen wieder einspaltig. */
  display:grid !important;
  grid-template-columns:repeat(auto-fill, minmax(min(212px, 47%), 1fr));
  gap:clamp(16px, 2.4vw, 30px) clamp(11px, 2vw, 26px);
  margin:0; padding:0; list-style:none;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after{ content:none; display:none; }
.woocommerce ul.products li.product,
.wc-block-grid__products .wc-block-grid__product{
  float:none !important; clear:none !important;
  width:auto !important; max-width:none !important; min-width:0;
  margin:0 !important; padding:0;
}
.woocommerce ul.products li.product::before,
.woocommerce ul.products li.product::after{ content:none; }
.woocommerce ul.products li.product a img,
.wc-block-grid__product-image img{
  width:100%; height:auto; margin:0;
  aspect-ratio:1; object-fit:cover;
}

/* Kacheln einer Zeile gleich hoch, Kaufknopf immer unten. Ohne das stehen die
   Knöpfe je nach Titellänge auf drei verschiedenen Höhen nebeneinander. */
.woocommerce ul.products li.product,
.wc-block-grid__products .wc-block-grid__product{
  display:flex; flex-direction:column; align-items:stretch;
}
.woocommerce ul.products li.product .button,
.wc-block-grid__product-add-to-cart{
  /* !important gegen die spät eingereihten Blockstile von WooCommerce, die
     hier margin:0 setzen – sonst steht der Knopf wieder direkt unter dem Preis
     statt am unteren Kachelrand. */
  margin-top:auto !important;
}
.wc-block-grid__product-price,
.wc-block-grid__product-title{
  justify-content:flex-start !important;
  text-align:left !important;
}
.woocommerce ul.products li.product .button,
.wc-block-grid__product-add-to-cart .wp-block-button__link{
  /* WooCommerce rechnet seine Knöpfe mit content-box – width:100% plus Polster
     ergibt sonst eine Kachel, die 30 px über ihre Gitterzelle hinausragt. */
  box-sizing:border-box;
  display:block; width:100%; text-align:center;
  margin-bottom:0; padding:11px 14px;
  font-family:var(--wp--preset--font-family--heading);
  font-size:14px; letter-spacing:.02em; line-height:1.25;
  border-radius:999px;
}
.wc-block-grid__product-add-to-cart{ width:100%; }

/* Abzeichen gehört nach links oben – WooCommerce setzt es rechts, und zwar
   aus einem Stylesheet, das erst beim Rendern des Blocks eingereiht wird. */
.woocommerce span.onsale,
.wc-block-grid__product-onsale{
  left:12px !important; right:auto !important;
  top:12px !important; margin:0 !important;
}

/* ══ Ziehbares Regal auf dem Handy ══ */

@media (max-width:781px){
  .finnlio-rail li,
  .finnlio-rail .wc-block-grid__product{ flex:0 0 68vw !important; }
}

/* ══ Kopf ══
   Bleibt beim Scrollen oben stehen und schrumpft dabei. Das gibt auf dem Handy
   den Warenkorb zurück, ohne dass man nach oben scrollen muss. */

/* Der Blockeditor legt um jedes Vorlagenteil ein eigenes <div>. Das ist genau
   so hoch wie der Kopf, deshalb hat position:sticky am Kopf selbst keinen Weg
   zum Kleben – der Wert gehört an dieses <div>, dessen umgebender Block
   .wp-site-blocks über die ganze Seite reicht. */
.wp-block-template-part:has(> .finnlio-kopf-huelle){
  position:sticky; top:0; z-index:90;
}
.finnlio-kopf-huelle{ position:relative; }
.finnlio-kopf-huelle > header{
  transition:padding-top var(--fl-mittel) var(--fl-kurve),
             padding-bottom var(--fl-mittel) var(--fl-kurve),
             box-shadow var(--fl-mittel);
}
.finnlio-kopf-huelle.finnlio-geschrumpft > header{
  padding-top:7px; padding-bottom:7px;
  box-shadow:0 6px 24px var(--fl-schatten);
}
.finnlio-kopf-huelle.finnlio-geschrumpft .finnlio-logo svg{ height:27px; }
.finnlio-logo svg{ transition:height var(--fl-mittel) var(--fl-kurve); }

/* Die Vertrauensleiste rollt beim Scrollen weg, damit der Kopf flach wird. */
.finnlio-vertrauen{
  transition:max-height var(--fl-mittel) var(--fl-kurve),
             opacity var(--fl-schnell),
             padding var(--fl-mittel) var(--fl-kurve);
  max-height:4rem; overflow:hidden;
}
.finnlio-geschrumpft .finnlio-vertrauen{
  /* Die Polsterwerte stehen inline im Blockmarkup – daher hier !important. */
  max-height:0; opacity:0; border-bottom-color:transparent;
  padding-top:0 !important; padding-bottom:0 !important;
}

/* Tippziele im Kopf mindestens 44 px – Suchknopf, Konto, Warenkorb */
.finnlio-kopf-icons .wp-block-search__button,
.finnlio-kopf-icons .wc-block-mini-cart__button,
.finnlio-kopf-icons .wp-block-woocommerce-customer-account a{
  min-width:44px; min-height:44px;
  display:inline-flex; align-items:center; justify-content:center;
}
.finnlio-kopf-icons .wp-block-search__button{
  background:none; border:none; color:var(--wp--preset--color--ink-dunkel); padding:0;
}

/* ══ Bühne ══ */

.finnlio-buehne__bild figure{ margin:0; }
.finnlio-szene{
  display:block; background:var(--wp--preset--color--cream-tief);
}
.finnlio-szene svg{ display:block; width:100%; height:auto; }

/* ══ Tabellen in den Rechtstexten ══
   Dürfen schmal scrollen, statt die ganze Seite breiter zu machen. */

.wp-block-table{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
.wp-block-table table{ min-width:26rem; }

/* ══ Reaktionsfähig ══ */

@media (max-width:600px){
  .finnlio-logo .finnlio-wortmarke{
    position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%);
  }
  .finnlio-kopf-icons{ gap:0 !important; }
  .finnlio-kopf-huelle .wp-block-navigation__responsive-container-open{ padding:0 4px; }
}

@media (max-width:781px){
  .finnlio-horizont{ height:30px; }
  .finnlio-sonne{ width:230px; right:-70px; top:90px; }
  .finnlio-produktdetails dl{ grid-template-columns:1fr; gap:3px 0; }
  .finnlio-produktdetails dd{ margin-bottom:13px; }
  .finnlio-altersfilter .finnlio-treffer{ margin-left:0; width:100%; }

  /* Bühne: erst Text, dann Bild – und das Bild flach halten, damit die
     Überschrift und die Knöpfe ohne Scrollen sichtbar sind. */
  .finnlio-buehne .wp-block-columns{ gap:var(--wp--preset--spacing--30); }
  .finnlio-buehne__bild{ order:2; }
  .finnlio-buehne__bild img{
    aspect-ratio:16/9; object-fit:cover; width:100%;
  }

  /* Vertrauensleiste: eine Zeile, notfalls seitlich schiebbar */
  .finnlio-trust{
    flex-wrap:nowrap; justify-content:flex-start;
    overflow-x:auto; scrollbar-width:none;
    font-size:11px; letter-spacing:.07em;
    margin:0; padding-bottom:1px;
  }
  .finnlio-trust::-webkit-scrollbar{ display:none; }
  .finnlio-trust > *{ padding:0 11px; white-space:nowrap; }
  .finnlio-trust > *:first-child{ padding-left:0; }

  /* Fuß: Service und Rechtliches nebeneinander statt vier Blöcke untereinander */
  footer.wp-block-group > .wp-block-columns{
    display:grid; grid-template-columns:1fr 1fr;
    gap:var(--wp--preset--spacing--30) var(--wp--preset--spacing--20);
  }
  footer.wp-block-group > .wp-block-columns > .wp-block-column{
    flex-basis:auto !important; min-width:0;
  }
  footer.wp-block-group > .wp-block-columns > .wp-block-column:first-child,
  footer.wp-block-group > .wp-block-columns > .wp-block-column:last-child{
    grid-column:1 / -1;
  }
  /* Fußlinks mit genug Luft zum Antippen */
  footer .wp-block-navigation__container{ gap:2px; }
  footer .wp-block-navigation-item__content{
    display:block; padding:8px 0 7px;
  }

  /* Knöpfe füllen die Zeile – auf dem Handy leichter zu treffen */
  .finnlio-buehne .wp-block-buttons{ gap:10px; }
  .finnlio-buehne .wp-block-button{ flex:1 1 46%; }
  .finnlio-buehne .wp-block-button__link{ width:100%; text-align:center; }

  /* Warenkorb-Schublade über die ganze Breite */
  .wc-block-components-drawer{ max-width:100%; }
  .wc-block-mini-cart__drawer .wc-block-components-drawer__screen-overlay{ backdrop-filter:blur(2px); }

  /* Produktseite: Galerie und Angaben ohne Seitenrand-Verlust */
  .woocommerce div.product div.images,
  .woocommerce div.product div.summary{ float:none; width:100%; margin-bottom:var(--wp--preset--spacing--30); }
}

@media (max-width:480px){
  /* Drei Angaben passen nicht mehr in eine Zeile. Die Versandkosten sind die
     wichtigste Angabe, die Herkunft steht auch im Fuß. */
  .finnlio-trust > *:first-child{ display:none; }
  .finnlio-trust > *:nth-child(2)::before{ content:none; }

  /* Beide Knöpfe der Bühne über die volle Breite – „Bestseller ansehen"
     brach sonst um und die Knöpfe standen unterschiedlich hoch. */
  .finnlio-buehne .wp-block-button{ flex:1 1 100%; }

  /* Zwei Spalten bleiben, aber die Kachelinnereien werden kompakter */
  .woocommerce ul.products,
  .wc-block-grid__products{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .woocommerce ul.products li.product .woocommerce-loop-product__title,
  .wc-block-grid__product-title{ font-size:var(--wp--preset--font-size--sm); }
  .finnlio-loop-marke{ margin-top:10px; font-size:10px; }
  .finnlio-preisangaben{ font-size:11.5px; }
  .woocommerce ul.products li.product .button,
  .wc-block-grid__product-add-to-cart .wp-block-button__link{
    font-size:13px; padding:10px 12px;
  }
  .finnlio-bogen,
  .finnlio-bogen img{ border-radius:16px 16px 34% 34% / 16px 16px 9% 9%; }
  .finnlio-kachel{ padding:13px 14px; border-radius:16px 16px 30% 30% / 16px 16px 9% 9%; }
}

/* ══ Einblenden beim Scrollen ══
   Wird von assets/js/finnlio.js gesetzt. Ohne JavaScript bleibt alles sichtbar. */

.finnlio-hat-js .finnlio-aufdecken{
  opacity:0; transform:translateY(18px);
  transition:opacity var(--fl-langsam) var(--fl-kurve),
             transform var(--fl-langsam) var(--fl-kurve);
}
.finnlio-hat-js .finnlio-aufdecken.finnlio-sichtbar{ opacity:1; transform:none; }

/* ══ Klebender Kaufknopf auf der Produktseite (nur Handy) ══ */

.finnlio-kaufleiste{
  position:fixed; left:0; right:0; bottom:0; z-index:80;
  display:none; align-items:center; gap:12px;
  padding:10px 16px calc(10px + env(safe-area-inset-bottom));
  background:color-mix(in srgb, var(--wp--preset--color--weiss) 94%, transparent);
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
  border-top:1px solid var(--wp--preset--color--linie);
  transform:translateY(105%);
  transition:transform var(--fl-mittel) var(--fl-kurve);
}
.finnlio-kaufleiste.finnlio-sichtbar{ transform:none; }
.finnlio-kaufleiste__preis{
  font-family:var(--wp--preset--font-family--heading);
  font-weight:500; font-variant-numeric:tabular-nums;
  line-height:1.2; white-space:nowrap;
}
.finnlio-kaufleiste__preis small{
  display:block; font-size:10.5px; font-weight:400;
  letter-spacing:.02em; color:var(--wp--preset--color--taupe);
}
.finnlio-kaufleiste button{
  flex:1; min-height:46px;
  font-family:var(--wp--preset--font-family--heading);
  font-size:15px; letter-spacing:.03em;
  border:none; border-radius:999px; cursor:pointer;
  background:var(--wp--preset--color--ink-dunkel);
  color:var(--wp--preset--color--cream);
}
@media (max-width:781px){
  .woocommerce-page.single-product .finnlio-kaufleiste{ display:flex; }
  /* Platz, damit die Leiste den Fuß nicht verdeckt */
  .single-product footer.wp-block-group{ padding-bottom:82px; }
}

@media (prefers-reduced-motion:reduce){
  *, *::before, *::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
    scroll-behavior:auto !important;
  }
  .finnlio-sonne{ transform:none !important; }
}
