/*
Theme Name: Apferl
Theme URI: https://apferl.at
Description: Grünes Apferl-Theme für generalüberholte iPhones. Kind-Theme von Storefront – WooCommerce-optimiert, DSGVO-konform (Cookie-Banner + Google Consent Mode v2), mit eingebauten Fixes für Varianten (Farbe ↔ Produktbild, Kapazitäts-Reihenfolge), Vertrauens-Badges, Versand-Countdown und österreichischem Footer/Impressum.
Author: Apferl
Version: 1.0.0
Template: storefront
Requires PHP: 7.4
Text Domain: apferl
*/

/* ===================== APFERL – FARBEN / BRANDING ===================== */
:root{
  --apferl-green:#1E8E3E;      /* Hauptgrün (Apfel) */
  --apferl-green-dark:#14672C;
  --apferl-green-2:#3CB44A;    /* Akzent hell */
  --apferl-leaf:#7AC943;
  --apferl-ink:#12211A;
  --apferl-soft:#EAF7EE;
  --apferl-line:#D6EBDC;
  --apferl-muted:#5C6B62;
}

body{ color:var(--apferl-ink); }
a{ color:var(--apferl-green-dark); }
a:hover{ color:var(--apferl-green); }

/* Buttons */
button, .button, input[type="submit"], .woocommerce a.button, .woocommerce button.button,
.woocommerce .single_add_to_cart_button, .woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt{
  background:var(--apferl-green) !important; color:#fff !important; border-radius:8px !important;
  border:none !important; font-weight:700 !important;
}
button:hover, .button:hover, .woocommerce a.button:hover, .woocommerce button.button:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover{
  background:var(--apferl-green-dark) !important; color:#fff !important;
}

/* Header */
.site-header{ background:#fff; border-bottom:3px solid var(--apferl-green); }
.storefront-primary-navigation{ background:var(--apferl-green); }
.main-navigation ul li a, .site-header-cart .cart-contents{ color:#fff; }
.main-navigation ul li a:hover, .main-navigation ul li:hover > a{ color:#eafff0; }

/* Logo / Wordmark (Site-Title als Marke) */
.site-branding .site-title, .site-title a{
  font-weight:800; letter-spacing:-.5px; color:var(--apferl-green-dark) !important;
}
.site-title a::before{ content:"🍏 "; }

/* Preis / Sale */
.woocommerce ins, .price ins .amount{ color:var(--apferl-green-dark); text-decoration:none; }
.woocommerce span.onsale{ background:var(--apferl-green) !important; border-radius:100px; }

/* ===================== SHOP-LAYOUT (zwei Spalten mit Filter) ===================== */
.woocommerce-page.archive .site-content .col-full,
.woocommerce-page.post-type-archive-product .site-content .col-full{ }
@media (min-width: 992px){
  .apferl-shop-grid{ display:grid; grid-template-columns:250px 1fr; gap:32px; align-items:start; }
}
.apferl-shop-sidebar h3{ color:var(--apferl-green-dark); font-size:1rem; border-bottom:2px solid var(--apferl-line); padding-bottom:6px; }

/* Produktkarten */
ul.products li.product .button{ margin-top:.4em; }
ul.products li.product{ text-align:center; }

/* ===================== HERO (Startseite ohne Karte) ===================== */
.apferl-hero{
  background:linear-gradient(135deg,var(--apferl-green) 0%,var(--apferl-green-2) 100%);
  color:#fff; border-radius:0; padding:56px 24px; text-align:center; margin:0 0 28px;
}
.apferl-hero h1{ color:#fff; font-size:2.4rem; margin:0 0 8px; font-weight:800; }
.apferl-hero p{ color:#eafff0; font-size:1.1rem; margin:0 0 18px; }
.apferl-hero .apferl-cta{ display:inline-block; background:#fff; color:var(--apferl-green-dark);
  padding:14px 28px; border-radius:100px; font-weight:800; text-decoration:none; }
.apferl-hero .apferl-badges{ margin-top:16px; color:#eafff0; font-size:.95rem; }

/* ===================== VERTRAUENS-BADGES (Produktseite) ===================== */
.apferl-trust{ display:flex; flex-wrap:wrap; gap:10px; margin:14px 0; }
.apferl-trust span{ background:var(--apferl-soft); color:var(--apferl-green-dark);
  border:1px solid var(--apferl-line); border-radius:100px; padding:6px 14px; font-size:.85rem; font-weight:700; }

/* Zustand-Legende */
.apferl-zustand{ background:var(--apferl-soft); border:1px solid var(--apferl-line); border-radius:10px;
  padding:10px 14px; margin:12px 0; font-size:.85rem; color:var(--apferl-muted); }
.apferl-zustand b{ color:var(--apferl-green-dark); }

/* Versand-Countdown */
.apferl-dispatch{ display:flex; align-items:center; gap:8px; background:var(--apferl-soft);
  border-left:4px solid var(--apferl-green); border-radius:8px; padding:10px 14px; margin:12px 0;
  font-size:.9rem; color:var(--apferl-ink); }
.apferl-dispatch b{ color:var(--apferl-green-dark); }

/* Varianten – Kapazitäts-/Farb-Buttons (falls Swatches genutzt werden) */
.variations td.value ul{ display:flex; flex-wrap:wrap; gap:8px; padding:0; margin:0; list-style:none; }
.variations td.value select{ border-radius:8px; }

/* ===================== FOOTER (österreichisch) ===================== */
.apferl-footer{ background:var(--apferl-green-dark); color:#dff3e5; padding:36px 0 10px; }
.apferl-footer .col-full{ display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:24px; }
.apferl-footer h4{ color:#fff; margin:0 0 10px; font-size:1rem; }
.apferl-footer a{ color:#dff3e5; text-decoration:none; display:block; padding:3px 0; }
.apferl-footer a:hover{ color:#fff; text-decoration:underline; }
.apferl-footer .apferl-legal-note{ grid-column:1/-1; border-top:1px solid rgba(255,255,255,.2);
  margin-top:14px; padding-top:12px; font-size:.8rem; color:#bfe6cd; }
.storefront-handheld-footer-bar{ background:var(--apferl-green-dark); }

/* ===================== COOKIE-BANNER (DSGVO) ===================== */
#apferl-cookie{ position:fixed; left:0; right:0; bottom:0; z-index:99999; background:#fff;
  border-top:3px solid var(--apferl-green); box-shadow:0 -8px 30px rgba(0,0,0,.15);
  padding:16px 18px; display:none; }
#apferl-cookie.show{ display:block; }
#apferl-cookie .inner{ max-width:1100px; margin:0 auto; }
#apferl-cookie p{ margin:0 0 10px; color:var(--apferl-ink); font-size:.9rem; }
#apferl-cookie a{ color:var(--apferl-green-dark); }
#apferl-cookie .apferl-c-btns{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
#apferl-cookie button{ border-radius:8px; padding:10px 18px; font-weight:700; cursor:pointer; border:none; }
#apferl-cookie .c-accept{ background:var(--apferl-green); color:#fff; }
#apferl-cookie .c-reject{ background:#e6e6e6; color:#222; }
#apferl-cookie .c-settings{ background:transparent; color:var(--apferl-green-dark); text-decoration:underline; }
#apferl-cookie .apferl-c-cats{ display:none; margin:10px 0; font-size:.85rem; color:var(--apferl-muted); }
#apferl-cookie .apferl-c-cats.show{ display:block; }
#apferl-cookie .apferl-c-cats label{ display:block; margin:4px 0; }

/* Kleinigkeiten */
.apferl-hidden{ display:none !important; }
