/* =========================================================================
   WMAV KAPP – Base (Reset, Layout, Typo, Buttons, Header, Footer)
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }

body.wmav {
  margin: 0;
  font-family: var(--wmav-font);
  font-size: var(--wmav-fs-400);
  line-height: var(--wmav-lh);
  color: var(--wmav-ink);
  background: var(--wmav-bg);
  -webkit-font-smoothing: antialiased;
  /* Elementor-Vollbreite-Sektionen nutzen 100vw → horizontaler Überlauf.
     clip kappt ihn, ohne position:sticky (Header) zu beeinträchtigen. */
  overflow-x: clip;
}

img { max-width: 100%; height: auto; }

a { color: var(--wmav-green-dark); text-decoration: none; transition: color var(--wmav-transition); }
a:hover { color: var(--wmav-green); }

h1, h2, h3, h4 { font-weight: var(--wmav-weight-black); line-height: 1.2; color: var(--wmav-ink); }

.wmav-container {
  width: 100%;
  max-width: var(--wmav-container);
  margin-inline: auto;
  padding-inline: var(--wmav-gutter);
}

.wmav-site-content { min-height: 40vh; }

/* --- Buttons -------------------------------------------------------------- */
.wmav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--wmav-space-2);
  min-height: var(--wmav-tap);
  padding: 0.65em 1.4em;
  font-family: inherit;
  font-size: var(--wmav-fs-400);
  font-weight: var(--wmav-weight-bold);
  line-height: 1.1;
  text-align: center;
  border: 1px solid transparent;
  border-radius: var(--wmav-radius);
  cursor: pointer;
  transition: background var(--wmav-transition), color var(--wmav-transition), border-color var(--wmav-transition);
}
/* Farben + Hover mit !important – Elementor stylt sonst Buttons/Links global um */
.wmav-btn--primary { background: var(--wmav-green-dark) !important; color: #fff !important; }
.wmav-btn--primary:hover,
.wmav-btn--primary:focus { background: var(--wmav-green) !important; color: #fff !important; }
.wmav-btn--outline { background: #fff !important; color: var(--wmav-green-dark) !important; border-color: var(--wmav-green-dark) !important; }
.wmav-btn--outline:hover,
.wmav-btn--outline:focus { background: var(--wmav-green-dark) !important; color: #fff !important; border-color: var(--wmav-green-dark) !important; }
.wmav-btn--block { width: 100%; }
.wmav-btn:disabled, .wmav-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
/* Produktkarte: Button reagiert beim Hover über die ganze Karte mit */
.wmav-card:hover .wmav-btn--primary { background: var(--wmav-green) !important; }

/* =========================================================================
   HEADER
   ========================================================================= */
.wmav-topbar {
  background: var(--wmav-green-bar);
  color: #fff;
  font-size: 0.9375rem; /* etwas größer als fs-300 */
}
.wmav-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wmav-space-3);
  padding-block: 0.4rem;
  flex-wrap: wrap;
}
.wmav-topbar,
.wmav-topbar a,
.wmav-topbar a:link,
.wmav-topbar a:visited { color: #fff; text-decoration: none !important; }
.wmav-topbar a:hover,
.wmav-topbar a:focus { color: #fff !important; text-decoration: underline !important; }
/* Keine Hover-Unterstreichung in Navigation & Footer (Elementor-Global) */
.wmav-header .wmav-nav a,
.wmav-footer a { text-decoration: none !important; }
.wmav-topbar__contact { display: flex; gap: var(--wmav-space-4); flex-wrap: wrap; }

.wmav-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--wmav-border);
}
.wmav-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wmav-space-5);
  padding-block: var(--wmav-space-3);
}
.wmav-logo { display: inline-flex; flex: 0 0 auto; }
.wmav-logo img { max-height: 56px; width: auto; }

/* Drei-Zonen-Layout: Logo links, Nav mittig, Tools (Suche/Warenkorb) rechts.
   Über justify-content:space-between am __inner (drei sichtbare Flex-Kinder) –
   robust gegen das Elementor-Kit, das auto-Margins auf <nav> zurücksetzte und
   so die Nav nach links rutschen ließ. */
.wmav-nav ul { display: flex; gap: var(--wmav-space-5); margin: 0; padding: 0; list-style: none; }
/* color !important: Elementor-Kit (Startseite) setzt sonst global grüne Link-Farbe */
.wmav-header .wmav-nav a,
.wmav-header .wmav-nav a:link,
.wmav-header .wmav-nav a:visited {
  display: inline-flex;
  align-items: center;
  min-height: var(--wmav-tap);
  font-weight: var(--wmav-weight-medium);
  color: var(--wmav-ink) !important;
}
.wmav-header .wmav-nav a:hover,
.wmav-header .wmav-nav .current-menu-item > a { color: var(--wmav-green-dark) !important; }

/* Mobile-Overlay-Teile auf Desktop ausblenden */
.wmav-nav__head, .wmav-nav__contact, .wmav-nav-backdrop { display: none; }

.wmav-header__tools { display: flex; align-items: center; gap: var(--wmav-space-3); }
.wmav-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--wmav-tap);
  height: var(--wmav-tap);
  background: none !important;     /* Elementor stylt sonst alle <button> grün */
  border: none !important;
  box-shadow: none !important;
  color: var(--wmav-green-dark);
  cursor: pointer;
  border-radius: var(--wmav-radius);
  padding: 0;
}
.wmav-icon-btn:hover { background: var(--wmav-green-soft) !important; }
.wmav-icon-btn svg { width: 24px; height: 24px; }
.wmav-ic { display: block; flex: 0 0 auto; }

/* Cart-Button */
.wmav-cart { position: relative; display: inline-flex; align-items: center; gap: var(--wmav-space-2); color: var(--wmav-ink); padding: 6px; border-radius: var(--wmav-radius); }
.wmav-cart:hover { color: var(--wmav-green-dark); }
/* Subtotal-Text im Header ausblenden (Shopify zeigt nur Icon + Zähler;
   die Summe steht im Drawer/Warenkorb). */
.wmav-cart__subtotal { display: none; }
/* Icon-Span umschließt das 24px-SVG eng → Badge liegt sauber über dem Icon */
.wmav-cart__icon { position: relative; display: inline-flex; align-items: center; justify-content: center; color: var(--wmav-green-dark); }
.wmav-cart__count {
  position: absolute;
  top: -8px; right: -10px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--wmav-green);
  color: #fff;
  font-size: 11px; font-weight: var(--wmav-weight-bold);
  line-height: 1;
  border: 2px solid #fff;
  border-radius: var(--wmav-radius-pill);
}
.wmav-cart__count[data-count="0"] { display: none; } /* leer → kein Badge */

/* Burger (mobil) */
.wmav-burger { display: none; }

/* --- Spotlight-Suche (Overlay, macOS-Stil) ------------------------------- */
.wmav-spotlight {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 14vh var(--wmav-space-4) var(--wmav-space-4);
  background: rgba(20, 28, 24, 0.45);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .2s ease;
}
.wmav-spotlight.is-open { opacity: 1; visibility: visible; }
.wmav-spotlight__box {
  width: 100%; max-width: 640px;
  transform: translateY(-12px) scale(.98);
  transition: transform .22s cubic-bezier(.4,0,.2,1);
}
.wmav-spotlight.is-open .wmav-spotlight__box { transform: none; }
.wmav-spotlight__form {
  display: flex; align-items: center; gap: var(--wmav-space-3);
  background: #fff;
  border-radius: var(--wmav-radius-lg);
  box-shadow: var(--wmav-shadow-lg);
  padding: var(--wmav-space-3) var(--wmav-space-4);
}
.wmav-spotlight__icon { display: inline-flex; color: var(--wmav-muted); flex: 0 0 auto; }
.wmav-spotlight__icon svg { width: 26px; height: 26px; }
.wmav-spotlight__input {
  flex: 1 1 auto; min-width: 0;
  border: none !important; outline: none; background: none;
  font-family: var(--wmav-font); font-size: var(--wmav-fs-500); color: var(--wmav-ink);
  padding: var(--wmav-space-2) 0;
  text-overflow: ellipsis;
}
.wmav-spotlight__input::placeholder {
  color: var(--wmav-muted); font-size: var(--wmav-fs-400);
  /* langer Placeholder darf nicht umbrechen/überlaufen */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Natives Browser-„×" im Suchfeld ausblenden (sah unschön aus) */
.wmav-spotlight__input::-webkit-search-cancel-button,
.wmav-spotlight__input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }

/* Schließen als sauberes Icon-Button */
.wmav-spotlight__close {
  flex: 0 0 auto; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
  background: var(--wmav-bg-soft) !important; border: 1px solid var(--wmav-border) !important;
  color: var(--wmav-muted); border-radius: 50%;
}
.wmav-spotlight__close:hover { color: var(--wmav-ink); background: #fff !important; }
.wmav-spotlight__close svg { width: 20px; height: 20px; }

/* Live-Ergebnisse */
.wmav-spotlight__results { display: none; margin-top: var(--wmav-space-3); }
.wmav-spotlight__results.is-visible {
  display: block;
  background: #fff; border-radius: var(--wmav-radius-lg); box-shadow: var(--wmav-shadow-lg);
  max-height: 56vh; overflow-y: auto;
  animation: wmav-toast-in .18s ease;
}
/* Lade-Spinner – zentriert im Ergebnisbereich. Erscheint nur beim ersten
   Laden (leere Ergebnisse); bei laufender Live-Suche tauschen die Produkte
   ohne störenden Overlay. */
.wmav-spotlight__results-wrap { position: relative; }
.wmav-spotlight__spinner {
  position: absolute; top: 28px; left: 50%; transform: translateX(-50%);
  z-index: 2;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 3px solid var(--wmav-border);
  border-top-color: var(--wmav-green-dark);
  animation: wmav-spin 0.7s linear infinite;
  display: none;
}
/* Beim ersten Laden trägt der WRAP selbst das Container-Aussehen (gleiche Box
   wie die Ergebnisliste), damit der Spinner sichtbar IM Ergebnis-Container sitzt.
   Spinner wird per Flexbox EXAKT mittig gehalten (statt absolut + translateX),
   damit er beim Übergang Laden→Treffer nicht seitlich „springt". */
.wmav-spotlight.is-loading .wmav-spotlight__results-wrap {
  min-height: 84px;
  margin-top: var(--wmav-space-3);
  background: #fff;
  border-radius: var(--wmav-radius-lg);
  box-shadow: var(--wmav-shadow-lg);
  display: flex; align-items: center; justify-content: center;
}
.wmav-spotlight.is-loading .wmav-spotlight__spinner {
  display: block;
  position: static; top: auto; left: auto; transform: none;
}
@keyframes wmav-spin { to { transform: rotate(360deg); } }

.wmav-sres-head {
  margin: 0; padding: var(--wmav-space-3) var(--wmav-space-3) var(--wmav-space-2);
  font-size: var(--wmav-fs-300); font-weight: var(--wmav-weight-bold);
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--wmav-muted);
}
.wmav-sres-list { list-style: none; margin: 0; padding: var(--wmav-space-2); }
.wmav-sres a {
  display: flex; align-items: center; gap: var(--wmav-space-3);
  padding: var(--wmav-space-2) var(--wmav-space-3); border-radius: var(--wmav-radius);
  color: var(--wmav-ink) !important; text-decoration: none !important;
}
.wmav-sres a:hover { background: var(--wmav-green-soft); }
.wmav-sres__media { flex: 0 0 46px; width: 46px; height: 46px; }
.wmav-sres__media img { width: 100% !important; height: 100% !important; max-width: none; object-fit: contain; background: #fff; border: 1px solid var(--wmav-border); border-radius: var(--wmav-radius); padding: 2px; display: block; }
.wmav-sres__info { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.wmav-sres__name {
  font-weight: var(--wmav-weight-medium); line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; /* eine Zeile, abgeschnitten */
}
.wmav-sres a { min-height: 62px; } /* alle Ergebnis-Zeilen gleich hoch */
.wmav-sres__price { color: var(--wmav-green-dark); font-size: var(--wmav-fs-300); font-weight: var(--wmav-weight-bold); }
/* Ganze Preiszeile EINE Farbe – WC/Elementor färbt sonst nur die Zahl (.amount) dunkel */
.wmav-sres__price .amount,
.wmav-sres__price .woocommerce-Price-amount,
.wmav-sres__price bdi { color: var(--wmav-green-dark) !important; }
.wmav-sres-all {
  display: block; text-align: center; padding: var(--wmav-space-3);
  border-top: 1px solid var(--wmav-border); color: var(--wmav-green-dark);
  font-weight: var(--wmav-weight-bold); text-decoration: none;
}
.wmav-sres-all:hover { background: var(--wmav-green-soft); }
.wmav-sres-empty { color: var(--wmav-muted); text-align: center; padding: var(--wmav-space-5); margin: 0; }

@media (max-width: 560px) {
  .wmav-spotlight { padding-top: 8vh; }
  .wmav-spotlight__input { font-size: var(--wmav-fs-500); }
}

/* --- Mini-Cart Slide-in --------------------------------------------------- */
.wmav-minicart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0; visibility: hidden;
  transition: opacity var(--wmav-transition);
  z-index: 200;
}
.wmav-minicart-overlay.is-open { opacity: 1; visibility: visible; }
.wmav-minicart {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 380px; max-width: 90vw;
  background: #fff;
  box-shadow: var(--wmav-shadow-lg);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  z-index: 201;
  display: flex; flex-direction: column;
}
.wmav-minicart.is-open { transform: translateX(0); }
.wmav-minicart__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--wmav-space-4) var(--wmav-space-5);
  border-bottom: 1px solid var(--wmav-border);
}
.wmav-minicart__head h2 { margin: 0; font-size: var(--wmav-fs-500); }
.wmav-minicart__body { flex: 1; overflow-y: auto; padding: var(--wmav-space-4) var(--wmav-space-5); }
.wmav-minicart__body .woocommerce-mini-cart__total { margin-top: var(--wmav-space-4); }
.wmav-minicart__body .buttons { display: flex; flex-direction: column; gap: var(--wmav-space-2); margin-top: var(--wmav-space-3); }
.wmav-minicart__body .buttons a { display: inline-flex; align-items: center; justify-content: center; min-height: var(--wmav-tap); padding: 0.6em 1.2em; border-radius: var(--wmav-radius); font-weight: var(--wmav-weight-bold); }
.wmav-minicart__body .buttons a:first-child { background: #fff; border: 1px solid var(--wmav-green-dark); color: var(--wmav-green-dark); }
.wmav-minicart__body .buttons a.checkout { background: var(--wmav-green-dark); color: #fff; }

/* =========================================================================
   PAGE-TITLE-BANNER (grün, schräg angeschnitten)
   ========================================================================= */
.wmav-page-banner {
  position: relative;
  background: var(--wmav-green);
  overflow: hidden;
}
.wmav-page-banner::after {
  content: "";
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 45%;
  background: rgba(255,255,255,0.12);
  clip-path: polygon(35% 0, 100% 0, 100% 100%, 0 100%);
}
.wmav-page-banner__title {
  position: relative; z-index: 1;
  margin: 0;
  padding-block: 2.75rem;
  color: #fff;
  font-size: var(--wmav-fs-700);
}
/* Kategorie-Breadcrumb unter dem Titel (nur Produkt-Einzelseite). Negativer
   margin-top zieht ihn in die untere Titel-Polsterung – Banner ohne Breadcrumb
   bleiben dadurch unverändert. */
.wmav-page-banner__crumbs {
  position: relative; z-index: 1;
  margin-top: -1.75rem; padding-bottom: 2rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem;
  font-size: var(--wmav-fs-300); font-weight: var(--wmav-weight-medium);
}
.wmav-page-banner__crumbs a { color: rgba(255, 255, 255, 0.92); text-decoration: none; }
.wmav-page-banner__crumbs a:hover { color: #fff; text-decoration: underline; }
.wmav-page-banner__crumbs .wmav-crumb-sep { color: rgba(255, 255, 255, 0.6); }

/* =========================================================================
   FOOTER
   ========================================================================= */
.wmav-footer {
  background: var(--wmav-green-bar);
  color: #fff;
  font-size: var(--wmav-fs-300);
}
.wmav-footer__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--wmav-space-4); flex-wrap: wrap;
  padding-block: var(--wmav-space-4);
}
.wmav-footer a,
.wmav-footer__legal a,
.wmav-footer a:link,
.wmav-footer a:visited { color: #fff !important; text-decoration: none; }
.wmav-footer a:hover,
.wmav-footer a:focus { color: #fff !important; text-decoration: underline !important; }
.wmav-footer__legal { display: flex; gap: var(--wmav-space-4); flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 900px) {
  /* Top-Bar wird mobil nicht gebraucht */
  .wmav-topbar { display: none; }

  .wmav-burger { display: inline-flex; }
  .wmav-cart__subtotal { display: none; }
  .wmav-header__inner { gap: var(--wmav-space-3); }
  .wmav-page-banner__title { font-size: var(--wmav-fs-600); }

  /* Abgedunkelter Hintergrund hinter dem Menü */
  .wmav-nav-backdrop {
    display: block;
    position: fixed; inset: 0;
    background: rgba(20, 28, 24, 0.55);
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    opacity: 0; visibility: hidden; transition: opacity .28s ease;
    z-index: 200;
  }
  .wmav-nav-backdrop.is-open { opacity: 1; visibility: visible; }

  /* Menü-Overlay als Slide-in-Panel von rechts */
  .wmav-nav {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(380px, 88vw);
    margin: 0; padding: 0;
    background: #fff;
    box-shadow: var(--wmav-shadow-lg);
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
    z-index: 201;
    display: flex; flex-direction: column;
    overflow-y: auto;
  }
  .wmav-nav.is-open { transform: translateX(0); }

  .wmav-nav__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--wmav-space-4) var(--wmav-space-5);
    border-bottom: 1px solid var(--wmav-border);
  }
  .wmav-nav__brand { font-weight: var(--wmav-weight-black); font-size: var(--wmav-fs-500); color: var(--wmav-green-dark); }

  .wmav-nav ul { flex-direction: column; gap: 0; margin: 0; padding: var(--wmav-space-2) 0; flex: 1 0 auto; }
  .wmav-nav li { width: 100%; }
  .wmav-nav a {
    width: 100%; min-height: 52px;
    padding: var(--wmav-space-3) var(--wmav-space-5);
    font-size: var(--wmav-fs-500); font-weight: var(--wmav-weight-medium);
    border-bottom: 1px solid var(--wmav-border);
    justify-content: flex-start;
  }
  .wmav-nav a:active { background: var(--wmav-green-soft); }
  .wmav-nav .current-menu-item > a { color: var(--wmav-green-dark); background: var(--wmav-green-soft); }

  .wmav-nav__contact {
    display: flex; flex-direction: column; gap: var(--wmav-space-2);
    padding: var(--wmav-space-5);
    margin-top: auto;
    background: var(--wmav-bg-soft);
    border-top: 1px solid var(--wmav-border);
  }
  .wmav-nav__contact a {
    display: inline-flex; align-items: center; gap: var(--wmav-space-2);
    min-height: 40px; color: var(--wmav-green-dark); font-weight: var(--wmav-weight-medium);
  }
  .wmav-nav__contact a .wmav-ic { color: var(--wmav-green); }
}

@media (max-width: 560px) {
  .wmav-topbar__inner { justify-content: center; text-align: center; }
  .wmav-logo img { max-height: 44px; }
}

/* Body-Scroll-Lock bei offenem Panel */
body.wmav-no-scroll { overflow: hidden; }
