/*
Theme Name: Naturfreunde
Theme URI: https://naturfreunde-shop.at
Description: Child-Theme für den Naturfreunde-Shop. Design „Markierter Weg": Tannengrün/Stein/Anthrazit mit rot-weiß-roter Wegmarke als Signatur, Bricolage Grotesque + Hanken Grotesk. Basis: Twenty Twenty-Five.
Author: Naturfreunde / Claude Code
Template: twentytwentyfive
Version: 2.0.1
Requires at least: 6.6
Tested up to: 7.0
Text Domain: naturfreunde
*/

/* Schriften: client-seitig laden (kein Font-Upload nötig, host-robust) */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,600;12..96,700;12..96,800&family=Hanken+Grotesk:wght@400;500;600;700;800&display=swap');

:root {
  --nf-pine:   #1C4D34;
  --nf-pine-d: #143A27;
  --nf-moss:   #3E7B43;
  --nf-blaze:  #C8362A;
  --nf-ink:    #1A1C19;
  --nf-grau:   #5B6159;
  --nf-stein:  #EDEAE0;
  --nf-papier: #F7F8F4;
  --nf-line:   #DAD7CB;
  --nf-shadow: 28px 28px 60px -36px rgba(20,28,18,.45);
  --nf-radius: 18px;
}

/* ---------------------------------------------------------------------------
   Grundlagen
   --------------------------------------------------------------------------- */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

::selection { background: var(--nf-pine); color: #fff; }

/* sichtbarer Fokus (Quality-Floor) */
a:focus-visible,
button:focus-visible,
.wp-element-button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--nf-blaze);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Wiederkehrende Signatur: rot-weiß-rote Wegmarke ---------------------------- */
.nf-blaze {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
}
.nf-blaze::before,
.nf-blaze::after { content: ""; width: 9px; height: 18px; border-radius: 2px; }
.nf-blaze::before { background: var(--nf-blaze); }
.nf-blaze::after  { background: var(--nf-blaze); }
.nf-blaze i { width: 9px; height: 18px; background: #fff; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }

/* ---------------------------------------------------------------------------
   Kopfzeile (sticky, zentrierte Identität)
   --------------------------------------------------------------------------- */
.nf-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247,248,244,.82);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--nf-line);
}
.nf-site-header .wp-block-site-title { line-height: 1; }
.nf-site-header .wp-block-site-title a {
  text-decoration: none;
  color: var(--nf-pine);
}
.nf-eyebrow {
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--nf-grau);
}

/* Kategorien-Navigation */
.nf-cat-nav a {
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--nf-ink);
  text-decoration: none;
  position: relative;
  padding-bottom: 3px;
}
.nf-cat-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--nf-blaze);
  transition: right .25s ease;
}
.nf-cat-nav a:hover,
.nf-cat-nav .current-menu-item a { color: var(--nf-pine); }
.nf-cat-nav a:hover::after { right: 0; }

/* Mini-Warenkorb im Header */
.nf-cart a { color: var(--nf-pine); text-decoration: none; font-weight: 600; }

/* Von WooCommerce auto-injizierten Mini-Cart/Konto-Block ausblenden
   (eigener „Warenkorb"-Link ist in der Navigation) */
.nf-site-header .wp-block-woocommerce-mini-cart,
.nf-site-header .wp-block-woocommerce-customer-account { display: none !important; }

/* ---------------------------------------------------------------------------
   Hero — Tannengrün + Höhenlinien-Textur
   --------------------------------------------------------------------------- */
.nf-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
}
.nf-hero::before {            /* Höhenlinien (Topo) */
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  background:
    repeating-radial-gradient(circle at 82% 18%, transparent 0 46px, rgba(255,255,255,.055) 46px 48px),
    repeating-radial-gradient(circle at 12% 92%, transparent 0 60px, rgba(255,255,255,.04) 60px 62px);
  -webkit-mask-image: radial-gradient(120% 120% at 70% 20%, #000 40%, transparent 100%);
  mask-image: radial-gradient(120% 120% at 70% 20%, #000 40%, transparent 100%);
  pointer-events: none;
}
.nf-hero::after {            /* feiner Lichtschein oben rechts */
  content: "";
  position: absolute;
  z-index: -1;
  width: 60vw; height: 60vw;
  top: -28vw; right: -16vw;
  background: radial-gradient(closest-side, rgba(120,190,130,.22), transparent 70%);
  pointer-events: none;
}
.nf-hero .wp-block-heading,
.nf-hero h1 { color: #fff; max-width: 16ch; }
.nf-hero .nf-eyebrow { color: rgba(255,255,255,.85); }
.nf-hero p { color: rgba(255,255,255,.9); max-width: 46ch; }
.nf-hero .nf-blaze i { box-shadow: none; }

/* Hero-Buttons */
.nf-hero .wp-block-button.is-style-fill .wp-block-button__link {
  background: #fff; color: var(--nf-pine);
  box-shadow: 0 14px 30px -14px rgba(0,0,0,.5);
}
.nf-hero .wp-block-button.is-style-fill .wp-block-button__link:hover {
  background: var(--nf-stein); color: var(--nf-pine-d);
}
.nf-hero .wp-block-button.is-style-outline .wp-block-button__link {
  border: 2px solid rgba(255,255,255,.55); color: #fff; background: transparent;
}
.nf-hero .wp-block-button.is-style-outline .wp-block-button__link:hover {
  border-color: #fff; background: rgba(255,255,255,.1);
}

/* ---------------------------------------------------------------------------
   Abschnitts-Überschrift mit Wegmarke
   --------------------------------------------------------------------------- */
.nf-kicker {
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--nf-blaze);
  margin: 0 0 .35rem;
}
.nf-section-title { position: relative; }
.nf-section-title::after {
  content: "";
  display: block;
  width: 46px; height: 5px;
  margin: .85rem auto 0;
  border-radius: 3px;
  background:
    linear-gradient(90deg, var(--nf-blaze) 0 33.33%, #fff 33.33% 66.66%, var(--nf-blaze) 66.66% 100%);
  box-shadow: 0 0 0 1px var(--nf-line);
}
.nf-lead {
  max-width: 52ch; margin-left: auto; margin-right: auto;
  color: var(--nf-grau); font-size: 1.08rem;
}

/* ---------------------------------------------------------------------------
   Kategorien als Wegweiser-Tafeln
   --------------------------------------------------------------------------- */
.nf-cat-grid.wp-block-buttons { gap: .9rem; }
.nf-cat-grid .wp-block-button { flex: 0 1 auto; }
.nf-cat-grid .wp-block-button__link {
  background: var(--nf-weiss, #fff);
  color: var(--nf-ink);
  border: 1px solid var(--nf-line);
  border-radius: 12px;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: .01em;
  padding: .7em 1.15em .7em 1.15em;
  box-shadow: 0 1px 0 rgba(20,28,18,.04);
  transition: transform .18s ease, box-shadow .18s ease, color .18s ease, border-color .18s ease;
}
.nf-cat-grid .wp-block-button__link::after {
  content: "→";
  margin-left: .55em;
  color: var(--nf-blaze);
  font-weight: 700;
  transition: transform .18s ease;
  display: inline-block;
}
.nf-cat-grid .wp-block-button__link:hover {
  color: var(--nf-pine);
  border-color: var(--nf-pine);
  transform: translateY(-3px);
  box-shadow: var(--nf-shadow);
}
.nf-cat-grid .wp-block-button__link:hover::after { transform: translateX(4px); }

/* ---------------------------------------------------------------------------
   Produkt-Grid (WooCommerce [products] Shortcode) — komplett neu gerahmt
   --------------------------------------------------------------------------- */
.woocommerce ul.products,
.wc-block-grid__products,
ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.6rem;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}
.woocommerce ul.products li.product,
ul.products li.product {
  width: auto !important;
  margin: 0 !important;
  float: none !important;
  background: #fff;
  border: 1px solid var(--nf-line);
  border-radius: var(--nf-radius);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: left;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.woocommerce ul.products li.product:hover,
ul.products li.product:hover {
  transform: translateY(-5px);
  box-shadow: var(--nf-shadow);
  border-color: #cfd2c6;
}

/* Bildrahmen mit fixem Seitenverhältnis (bricht nicht bei fehlendem Bild) */
.woocommerce ul.products li.product > a,
ul.products li.product > a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.woocommerce ul.products li.product a img,
ul.products li.product img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  margin: 0 !important;
  background:
    linear-gradient(135deg, var(--nf-stein), #e3e0d3);
  border-radius: 0;
}
/* Platzhalter, falls Bild 403/fehlt */
.woocommerce ul.products li.product a img[src=""],
ul.products li.product img[src=""] { visibility: hidden; }

/* Titel + Preis */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2,
ul.products li.product h2 {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.06rem;
  line-height: 1.2;
  color: var(--nf-ink);
  padding: 1rem 1.1rem 0;
  margin: 0;
}
.woocommerce ul.products li.product .price,
ul.products li.product .price {
  color: var(--nf-pine) !important;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  padding: .35rem 1.1rem 0;
  margin: 0;
}
.woocommerce ul.products li.product .price del { color: var(--nf-grau) !important; opacity: .7; font-weight: 500; }
.woocommerce ul.products li.product .price ins { text-decoration: none; }
.woocommerce ul.products li.product .price .woocommerce-price-suffix {
  display: block;
  font-size: .72rem;
  font-weight: 500;
  color: var(--nf-grau);
  margin-top: .1rem;
}

/* Sterne-Bewertung dezent */
.woocommerce ul.products li.product .star-rating { margin: .5rem 1.1rem 0; font-size: .8rem; color: var(--nf-blaze); }

/* „In den Warenkorb"-Button am Kartenfuß */
.woocommerce ul.products li.product .button,
ul.products li.product .button,
.woocommerce ul.products li.product .added_to_cart {
  margin: auto 1.1rem 1.1rem;
  margin-top: auto;
  background: var(--nf-pine);
  color: #fff;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: .92rem;
  border: 0;
  border-radius: 999px;
  padding: .7em 1.2em;
  text-align: center;
  text-decoration: none;
  transition: background .18s ease, transform .12s ease;
  display: inline-block;
}
.woocommerce ul.products li.product .button { margin-top: 1rem; }
.woocommerce ul.products li.product .button:hover,
ul.products li.product .button:hover { background: var(--nf-moss); }
.woocommerce ul.products li.product .button:active { transform: translateY(1px); }
.woocommerce ul.products li.product .added_to_cart {
  background: transparent; color: var(--nf-pine);
  border: 1px solid var(--nf-line); margin-top: .4rem;
}

/* Sale-Badge */
.woocommerce ul.products li.product .onsale {
  position: absolute;
  margin: 0;
  top: .8rem; left: .8rem;
  background: var(--nf-blaze);
  color: #fff;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-weight: 700; font-size: .7rem;
  letter-spacing: .06em; text-transform: uppercase;
  border-radius: 999px;
  padding: .3em .7em;
  min-height: 0; min-width: 0; line-height: 1.2;
}
.woocommerce ul.products li.product { position: relative; }

/* ---------------------------------------------------------------------------
   Werte-Streifen
   --------------------------------------------------------------------------- */
.nf-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.nf-values .nf-value {
  background: #fff; border: 1px solid var(--nf-line);
  border-radius: var(--nf-radius); padding: 1.6rem 1.5rem;
}
.nf-values .nf-value strong {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  display: block; font-size: 1.05rem; margin-bottom: .25rem;
}
.nf-values .nf-value p { color: var(--nf-grau); margin: 0; font-size: .96rem; }
.nf-values .nf-value .nf-num {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  color: var(--nf-blaze); font-weight: 800; font-size: .8rem;
  letter-spacing: .12em; display: block; margin-bottom: .6rem;
}

/* ---------------------------------------------------------------------------
   Fußzeile
   --------------------------------------------------------------------------- */
.nf-footer {
  background: var(--nf-ink);
  color: rgba(255,255,255,.72);
}
.nf-footer a { color: rgba(255,255,255,.72); text-decoration: none; }
.nf-footer a:hover { color: #fff; }
.nf-footer .wp-block-site-title a { color: #fff; }
.nf-footer h2, .nf-footer h3, .nf-footer strong { color: #fff; }
.nf-footer .nf-eyebrow { color: rgba(255,255,255,.5); }

/* ---------------------------------------------------------------------------
   Standard-Shop/Archiv-Seiten in dasselbe Gewand bringen
   --------------------------------------------------------------------------- */
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering { color: var(--nf-grau); }

/* ---------------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .woocommerce ul.products, ul.products { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 781px) {
  .woocommerce ul.products, ul.products { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
  .nf-values { grid-template-columns: 1fr; }
  .nf-hero .wp-block-heading, .nf-hero h1 { max-width: 100%; }
}
@media (max-width: 480px) {
  .woocommerce ul.products, ul.products { grid-template-columns: 1fr; }
}

/* Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
