/*
Theme Name: GrowerMagazin
Theme URI: https://growermagazin.de
Author: GrowerMagazin
Description: Helles, freundliches Editorial-Theme mit WooCommerce-Produktvergleich und KI-Widget.
Version: 2.0.0
License: GNU General Public License v2 or later
Text Domain: growermagazin
*/

:root {
  --bg:          #f7f5f0;
  --bg-white:    #ffffff;
  --bg-light:    #f0f7e8;
  --dark:        #1a2a0e;
  --dark2:       #2d5016;
  --green:       #5c9e2a;
  --green-light: #8ecb42;
  --green-pale:  #edf7e0;
  --text:        #2a2a1e;
  --text-mid:    #6a6650;
  --text-muted:  #9a9680;
  --border:      #e8e4d8;
  --border-mid:  #d0ccbc;
  --cream:       #f0ead6;
  --font-serif:  'Playfair Display', Georgia, serif;
  --font-sans:   'DM Sans', system-ui, sans-serif;
  --radius:      4px;
  --radius-md:   8px;
  --radius-lg:   10px;
  --shadow-sm:   0 2px 8px rgba(0,0,0,.06);
  --shadow-md:   0 4px 20px rgba(92,158,42,.1);
  --shadow-hover:0 8px 32px rgba(92,158,42,.14);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font-sans); font-weight: 300; font-size: 16px; line-height: 1.7; overflow-x: hidden; }
img  { max-width: 100%; height: auto; display: block; }
a    { color: var(--green); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .8; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-serif); font-weight: 400; color: var(--dark); line-height: 1.2; }

/* ── Layout ── */
.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.site-main    { flex: 1; }
.container    { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* ── Navigation ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: 1200px; margin: 0 auto; padding: 0 32px;
}
.site-logo { font-family: var(--font-serif); font-size: 20px; font-weight: 700; color: var(--dark); letter-spacing: .02em; }
.site-logo span { color: var(--green); }
.main-nav ul { display: flex; gap: 32px; list-style: none; }
.main-nav a  { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.main-nav a:hover, .main-nav .current-menu-item a { color: var(--text); opacity: 1; }
.nav-cta { background: var(--green); color: #fff !important; padding: 8px 20px; border-radius: var(--radius); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; transition: background .2s; }
.nav-cta:hover { background: var(--green-light); opacity: 1; }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--cream) 0%, #e8f5d8 100%);
  padding: 80px 0;
}
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.hero-tag { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--green); margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.hero-tag::before { content: ''; width: 28px; height: 1px; background: var(--green); }
.hero-title { font-size: clamp(38px, 5vw, 56px); line-height: 1.1; color: var(--dark); margin-bottom: 20px; }
.hero-title em { color: var(--green); font-style: italic; }
.hero-text { font-size: 15px; color: var(--text-mid); line-height: 1.7; margin-bottom: 32px; max-width: 420px; }
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary { background: var(--green); color: #fff; padding: 13px 28px; border-radius: var(--radius); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; display: inline-block; transition: background .2s; }
.btn-primary:hover { background: var(--green-light); opacity: 1; color: #fff; }
.btn-outline { border: 1.5px solid var(--green); color: var(--green); padding: 13px 28px; border-radius: var(--radius); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; display: inline-block; }
.btn-outline:hover { background: var(--green-pale); opacity: 1; }
.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.stat-card { background: var(--bg-white); border-radius: var(--radius-md); padding: 20px; text-align: center; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.stat-num   { font-size: 28px; font-weight: 500; color: var(--green); font-family: var(--font-serif); }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ── Section ── */
.section { padding: 64px 0; }
.section-white { background: var(--bg-white); }
.section-light { background: var(--bg-light); }
.section-dark  { background: var(--dark); }
.section-header { display: flex; align-items: center; gap: 16px; margin-bottom: 36px; }
.section-label  { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--green); white-space: nowrap; }
.section-title  { font-size: 28px; color: var(--dark); white-space: nowrap; }
.section-title.light { color: #e8f5d8; }
.section-line   { flex: 1; height: 1px; background: var(--border); }
.section-line.dark { background: rgba(255,255,255,.1); }
.section-all    { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--green); white-space: nowrap; }

/* ── Blog Karten ── */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.blog-card {
  background: var(--bg-white); border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden;
  transition: box-shadow .2s, transform .2s; cursor: pointer;
  display: flex; flex-direction: column;
}
.blog-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }

.blog-card-thumb {
  width: 100%; height: 180px; overflow: hidden;
  background: linear-gradient(135deg, #d4edba, #a8d880);
  display: flex; align-items: center; justify-content: center;
}
.blog-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.blog-card:hover .blog-card-thumb img { transform: scale(1.04); }
.blog-card-thumb-placeholder { font-size: 48px; }

.blog-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.blog-cat {
  display: inline-block; background: var(--green-pale); color: #3d7a12;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 20px; margin-bottom: 10px; font-weight: 500;
}
.blog-title   { font-family: var(--font-serif); font-size: 17px; color: var(--dark); margin-bottom: 8px; line-height: 1.3; }
.blog-excerpt { font-size: 12px; color: var(--text-mid); line-height: 1.6; margin-bottom: 14px; flex: 1; }
.blog-meta    { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--text-muted); }
.blog-read    { color: var(--green); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; }

/* ── Produkt Karten (WooCommerce) ── */
.woo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.gm-prod-card {
  background: var(--bg-white); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: border-color .2s, box-shadow .2s; cursor: pointer;
}
.gm-prod-card:hover   { border-color: var(--green); box-shadow: var(--shadow-md); }
.gm-prod-card.winner  { border-color: var(--green); }

.gm-prod-img-wrap {
  position: relative; background: var(--bg);
  height: 180px; display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.gm-prod-img-wrap img { height: 150px; width: 100%; object-fit: contain; padding: 12px; transition: transform .3s; }
.gm-prod-card:hover .gm-prod-img-wrap img { transform: scale(1.05); }
.gm-prod-winner-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--green); color: #fff;
  font-size: 10px; padding: 3px 10px; border-radius: 20px;
  font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
}
.gm-prod-compare-check {
  position: absolute; top: 10px; right: 10px;
  width: 24px; height: 24px; border: 1.5px solid var(--border-mid);
  border-radius: 4px; background: var(--bg-white); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, background .2s;
}
.gm-prod-compare-check.checked,
.gm-prod-compare-check:hover { border-color: var(--green); background: var(--green-pale); }
.gm-prod-compare-check.checked::after { content: '✓'; color: var(--green); font-size: 12px; font-weight: 700; }

.gm-prod-body { padding: 16px; }
.gm-prod-name { font-size: 14px; font-weight: 500; color: var(--dark); margin-bottom: 4px; line-height: 1.3; }
.gm-prod-sub  { font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }
.gm-prod-stars { display: flex; align-items: center; gap: 2px; margin-bottom: 10px; }
.gm-prod-star  { width: 13px; height: 13px; }
.gm-prod-score { font-size: 11px; color: var(--text-mid); margin-left: 4px; }
.gm-prod-bars  { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.gm-prod-bar-row   { display: flex; align-items: center; gap: 8px; }
.gm-prod-bar-label { font-size: 10px; color: var(--text-muted); width: 54px; flex-shrink: 0; }
.gm-prod-bar-track { flex: 1; height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.gm-prod-bar-fill  { height: 100%; border-radius: 2px; background: var(--green); }
.gm-prod-pros  { list-style: none; margin: 0 0 12px; padding: 0; }
.gm-prod-pros li {
  font-size: 11px; color: var(--text-mid);
  display: flex; align-items: flex-start; gap: 6px; margin-bottom: 4px; line-height: 1.4;
}
.gm-prod-pros li::before { content: ''; display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--green); flex-shrink: 0; margin-top: 4px; }
.gm-prod-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--border); }
.gm-prod-price     { font-size: 18px; font-weight: 500; color: var(--dark); }
.gm-prod-price-sub { font-size: 10px; color: var(--text-muted); }
.gm-prod-btn { display: inline-block; padding: 8px 14px; border-radius: var(--radius); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; text-decoration: none; transition: opacity .15s; white-space: nowrap; }
.gm-prod-btn.primary { background: var(--green); color: #fff; }
.gm-prod-btn.ghost   { border: 1px solid var(--border-mid); color: var(--text-mid); }
.gm-prod-btn:hover   { opacity: .82; }

/* ── Vergleichstabelle ── */
.compare-bar {
  background: var(--dark); color: #e8f5d8;
  padding: 12px 32px; display: flex; align-items: center;
  gap: 16px; font-size: 13px; justify-content: space-between;
  position: sticky; bottom: 0; z-index: 50;
  transform: translateY(100%); transition: transform .3s;
}
.compare-bar.visible { transform: translateY(0); }
.compare-bar-items   { display: flex; gap: 12px; align-items: center; }
.compare-bar-item    { background: rgba(255,255,255,.1); padding: 4px 12px; border-radius: 20px; font-size: 12px; }
.compare-bar-btn     { background: var(--green); color: #fff; padding: 8px 20px; border-radius: var(--radius); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; cursor: pointer; border: none; }

.compare-table-wrap { overflow-x: auto; margin-top: 32px; }
.compare-table { width: 100%; border-collapse: collapse; background: var(--bg-white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.compare-table th {
  background: var(--dark); color: #e8f5d8;
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  padding: 14px 16px; text-align: left; font-weight: 500;
}
.compare-table td { padding: 11px 16px; font-size: 13px; color: var(--text); border-bottom: 1px solid var(--border); }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:hover td { background: #fafaf5; }
.compare-table .col-winner { background: var(--bg-light); }
.compare-table .check { color: var(--green); }
.compare-table .cross { color: var(--border-mid); }
.compare-table .winner-label { color: var(--green); font-weight: 500; }

/* ── Produkt-Widget in Posts ── */
.gm-product-widget {
  margin: 48px 0; background: var(--bg-white);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px; box-shadow: var(--shadow-sm);
}
.gm-widget-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.gm-widget-title  { font-family: var(--font-serif); font-size: 20px; color: var(--dark); }
.gm-widget-badge  { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; background: var(--green-pale); color: #3d7a12; padding: 4px 10px; border-radius: 20px; border: 1px solid #c0e09a; }
.gm-product-grid  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gm-product-card  { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; position: relative; transition: border-color .2s; }
.gm-product-card:hover  { border-color: var(--green); }
.gm-product-card.winner { border-color: var(--green); }
.gm-winner-badge  { position: absolute; top: 10px; left: 10px; background: var(--green); color: #fff; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 10px; border-radius: 20px; font-weight: 500; z-index: 2; }
.gm-product-img   { width: 100%; height: 140px; object-fit: contain; background: var(--bg-white); padding: 12px; }
.gm-product-img-placeholder { width: 100%; height: 140px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 36px; }
.gm-product-body  { padding: 16px; }
.gm-product-rank  { font-size: 10px; color: var(--text-muted); margin-bottom: 4px; }
.gm-product-name  { font-size: 13px; font-weight: 500; color: var(--dark); margin-bottom: 4px; line-height: 1.3; }
.gm-product-sub   { font-size: 11px; color: var(--text-muted); margin-bottom: 12px; }
.gm-stars         { display: flex; gap: 2px; margin-bottom: 10px; }
.gm-star          { width: 12px; height: 12px; }
.gm-bars          { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.gm-bar-row       { display: flex; align-items: center; gap: 6px; }
.gm-bar-label     { font-size: 10px; color: var(--text-muted); width: 52px; flex-shrink: 0; }
.gm-bar-track     { flex: 1; height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.gm-bar-fill      { height: 100%; border-radius: 2px; background: var(--green); }
.gm-pros          { list-style: none; margin: 0 0 12px; padding: 0; }
.gm-pros li       { font-size: 11px; color: var(--text-mid); display: flex; align-items: flex-start; gap: 6px; margin-bottom: 4px; line-height: 1.4; }
.gm-pros li::before { content: ''; display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--green); flex-shrink: 0; margin-top: 4px; }
.gm-divider       { height: 1px; background: var(--border); margin: 0 0 12px; }
.gm-product-bottom { display: flex; align-items: center; justify-content: space-between; }
.gm-price         { font-size: 16px; font-weight: 500; color: var(--dark); }
.gm-price-sub     { font-size: 10px; color: var(--text-muted); }
.gm-buy-btn       { display: inline-block; padding: 8px 14px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; border-radius: var(--radius); text-decoration: none; transition: opacity .15s; }
.gm-buy-btn.primary { background: var(--green); color: #fff; }
.gm-buy-btn.ghost   { border: 1px solid var(--border-mid); color: var(--text-mid); }
.gm-buy-btn:hover   { opacity: .82; }
.gm-widget-footer { margin-top: 16px; font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.gm-widget-footer::before { content: ''; display: block; width: 20px; height: 1px; background: var(--border); }

/* ── Single Post ── */
.post-hero { background: linear-gradient(135deg, var(--cream), #e8f5d8); padding: 64px 0 48px; }
.post-tag  { font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--green); margin-bottom: 14px; }
.post-title { font-size: clamp(26px, 4vw, 48px); max-width: 800px; margin-bottom: 20px; }
.post-meta  { display: flex; gap: 20px; font-size: 12px; color: var(--text-muted); }
.post-content { max-width: 740px; margin: 0 auto; padding: 56px 0; }
.post-content p   { margin-bottom: 1.5rem; color: var(--text-mid); }
.post-content h2  { font-size: 24px; margin: 2.5rem 0 1rem; color: var(--dark); }
.post-content h3  { font-size: 19px; margin: 2rem 0 .8rem; color: var(--dark); }
.post-content ul, .post-content ol { margin: 0 0 1.5rem 1.5rem; }
.post-content li  { margin-bottom: .4rem; color: var(--text-mid); }
.post-content img { border-radius: var(--radius-md); margin: 2rem 0; }
.post-content blockquote { border-left: 3px solid var(--green); padding: 16px 24px; margin: 2rem 0; background: var(--green-pale); border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; color: var(--text-mid); }

/* ── Newsletter ── */
.newsletter-section { background: var(--dark); padding: 64px 0; }
.newsletter-inner   { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.nl-label { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: #8ab870; margin-bottom: 12px; }
.nl-title { font-size: 30px; color: #e8f5d8; margin-bottom: 10px; }
.nl-sub   { font-size: 14px; color: #8ab870; line-height: 1.6; }
.nl-form  { display: flex; }
.nl-input { flex: 1; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-right: none; padding: 13px 18px; font-size: 14px; color: #e8f5d8; font-family: var(--font-sans); outline: none; border-radius: var(--radius) 0 0 var(--radius); }
.nl-input::placeholder { color: rgba(255,255,255,.3); }
.nl-btn { padding: 13px 24px; background: var(--green); color: #fff; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; border: none; cursor: pointer; font-family: var(--font-sans); border-radius: 0 var(--radius) var(--radius) 0; transition: background .2s; }
.nl-btn:hover { background: var(--green-light); }
.nl-note { font-size: 11px; color: rgba(255,255,255,.3); margin-top: 10px; }

/* ── Footer ── */
.site-footer { background: var(--dark); border-top: 1px solid rgba(255,255,255,.06); padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
.footer-logo { font-family: var(--font-serif); font-size: 20px; font-weight: 700; color: #e8f5d8; display: inline-block; margin-bottom: 14px; }
.footer-logo span { color: var(--green-light); }
.footer-desc { font-size: 12px; color: #6a8a50; line-height: 1.7; max-width: 200px; }
.footer-col-title { font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--green-light); margin-bottom: 18px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { font-size: 13px; color: #6a8a50; }
.footer-links a:hover { color: #e8f5d8; opacity: 1; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.06); margin-top: 48px; padding: 22px 32px; display: flex; justify-content: space-between; font-size: 11px; color: #5a7a40; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .blog-grid  { grid-template-columns: repeat(2, 1fr); }
  .woo-grid   { grid-template-columns: repeat(2, 1fr); }
  .gm-product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .newsletter-inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-toggle  { display: block; }
  .main-nav    { display: none; }
  .main-nav.open { display: block; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-white); border-bottom: 1px solid var(--border); padding: 20px 32px; }
  .main-nav.open ul { flex-direction: column; gap: 16px; }
  .blog-grid   { grid-template-columns: 1fr; }
  .woo-grid    { grid-template-columns: 1fr; }
  .gm-product-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 0; }
  .section { padding: 48px 0; }
}

/* ── Produkt-Kategorie-Karten (Startseite) ── */
.cats-product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.prod-cat-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: block;
  position: relative;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  cursor: pointer;
  text-decoration: none;
}
.prod-cat-card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  opacity: 1;
}
.prod-cat-icon  { font-size: 32px; margin-bottom: 14px; }
.prod-cat-name  { font-family: var(--font-serif); font-size: 17px; color: var(--dark); margin-bottom: 6px; }
.prod-cat-count { font-size: 11px; color: var(--text-muted); }
.prod-cat-arrow {
  position: absolute; bottom: 24px; right: 24px;
  font-size: 18px; color: var(--green);
  opacity: 0; transition: opacity .2s, transform .2s;
}
.prod-cat-card:hover .prod-cat-arrow { opacity: 1; transform: translateX(4px); }

/* ── Blog Pagination ── */
.page-numbers {
  display: inline-flex; gap: 6px; list-style: none;
  justify-content: center; flex-wrap: wrap; padding: 0;
}
.page-numbers li a,
.page-numbers li span {
  display: inline-block; padding: 8px 14px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; color: var(--text-mid); text-decoration: none; transition: .15s;
}
.page-numbers li .current,
.page-numbers li a:hover {
  background: var(--green); color: #fff; border-color: var(--green);
}

@media (max-width: 1024px) {
  .cats-product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .cats-product-grid { grid-template-columns: 1fr 1fr; }
}
