/**
 * Custom Header Styles - Natur-Luftballons
 * Destilliert v3 (10.03.2026)
 *
 * Konsolidiert aus drei Experten-Entwuerfen (Claude, Gemini, Codex).
 * Benchmark-basiert: Kein Foto-BG im Header (kein Oeko-Shop macht das).
 *
 * Desktop (>= 1200px):
 *   Trust-Bar ~36px: Drei USPs mit Icons
 *   Main Header ~100px: Flex L-S-C (Logo | Suche | Cart+Total)
 *   (Nav = UberMenu, separate Komponente, nur Farb-Override hier)
 *
 * Mobile (< 1200px):
 *   Hamburger | Logo | Cart (Row 1)
 *   Suche volle Breite (Row 2)
 *   Trust-Hint (Row 3)
 *   Trust-Bar ausgeblendet (Nav = ShiftNav, nicht Teil dieses CSS)
 *
 * Breakpoint: 1200px (ShiftNav)
 * Brand-Gruen: #62BC66
 * Font: Nunito
 */

/* ===================================================================
   CSS VARIABLES
   =================================================================== */

:root {
    --natur-brand-green: #62BC66;
    --natur-brand-green-dark: #4fa853;
    --natur-bar-green: #2e7d32;
    --natur-element-height: 44px;
    --natur-text-dark: #2f3d33;
    --natur-text-muted: #617066;
    --natur-border-subtle: 1px solid #dde8df;
}

/* ===================================================================
   HEADER CONTAINER
   =================================================================== */

.natur-custom-header {
    font-family: 'Nunito', sans-serif;
    line-height: 1.5;
    margin: 0;
}

.natur-custom-header .natur-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===================================================================
   ZONE 1: TRUST-BAR
   =================================================================== */

.natur-header-infobar {
    background-color: var(--natur-bar-green);
    font-size: 13px;
    line-height: 1.3;
}

.natur-header-infobar .natur-header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 7px;
    padding-bottom: 7px;
}

.natur-header-trust-items {
    display: flex;
    align-items: center;
    gap: 0;
    color: #ffffff;
}

.natur-header-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
}

a.natur-header-trust-link {
    text-decoration: underline;
    text-underline-offset: 2px;
}

a.natur-header-trust-link:hover {
    text-decoration-thickness: 2px;
}

.natur-header-trust-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.natur-header-trust-divider {
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, 0.35);
    margin: 0 16px;
    flex-shrink: 0;
}

/* ===================================================================
   ZONE 2: MAIN HEADER
   Kein Wald-BG. Weiss mit dezentem Gruen-Ton.
   Benchmark: Kein Oeko-Shop nutzt Foto-BG im Header.
   =================================================================== */

.natur-header-logo-area {
    background-color: #f8fdf8;
    border-bottom: 2px solid #e0f0e1;
}

.natur-header-logo-area .natur-header-inner {
    display: flex;
    align-items: center;
}

/* ===================================================================
   LOGO
   =================================================================== */

.natur-header-logo {
    display: block;
    flex-shrink: 0;
    min-width: 0;
}

.natur-header-logo img {
    display: block;
    height: auto;
}

/* ===================================================================
   PRODUKTSUCHE
   =================================================================== */

.natur-header-search {
    display: flex;
    align-items: center;
}

.natur-header-search .woocommerce-product-search {
    display: flex;
    width: 100%;
}

.natur-header-search .search-field {
    flex: 1;
    padding: 0 16px;
    border: var(--natur-border-subtle);
    border-right: none;
    font-size: 15px;
    font-family: 'Nunito', sans-serif;
    outline: none;
    min-width: 0;
    color: var(--natur-text-dark);
    box-sizing: border-box;
}

.natur-header-search .search-field::placeholder {
    color: var(--natur-text-muted);
}

.natur-header-search .search-field:focus {
    border-color: var(--natur-brand-green);
    box-shadow: 0 0 0 2px rgba(98, 188, 102, 0.15);
}

.natur-header-search button[type="submit"] {
    background: var(--natur-brand-green);
    color: #ffffff;
    border: 1px solid var(--natur-brand-green);
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    white-space: nowrap;
    font-size: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px;
}

.natur-header-search button[type="submit"]:hover {
    background-color: var(--natur-brand-green-dark);
    border-color: var(--natur-brand-green-dark);
}

/* ===================================================================
   WARENKORB (mit Total auf Desktop, Codex-Idee)
   =================================================================== */

.natur-header-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--natur-text-dark) !important;
    text-decoration: none;
    flex-shrink: 0;
    gap: 8px;
}

.natur-header-cart:hover {
    color: #1a2e1d !important;
}

.natur-header-cart svg {
    width: 22px;
    height: 22px;
}

.natur-header-cart-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.natur-header-cart-count {
    position: absolute;
    top: -7px;
    right: -7px;
    background: #e74c3c;
    color: #ffffff;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 0 0 2px #f8fdf8;
}

.natur-header-cart-count.is-empty {
    display: none !important;
}

.natur-header-cart-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.15;
}

.natur-header-cart-label {
    font-size: 15px;
    font-weight: 700;
}

.natur-header-cart-total {
    font-size: 12px;
    font-weight: 600;
    color: var(--natur-text-muted);
}

/* ===================================================================
   UBERMENU FARB-OVERRIDE (separate Komponente, nicht Teil des Headers)
   Einzige Schnittstelle: Hintergrundfarbe muss zum Header passen.
   =================================================================== */

/* Nav-Container: Wrapper fuer UberMenu (Desktop) */
.natur-header-nav {
    background-color: #62BC66;
}

.natur-header-nav .natur-header-inner {
    padding-top: 0;
    padding-bottom: 0;
}

.ubermenu-main {
    background-color: #62BC66 !important;
}

/* ===================================================================
   DESKTOP (>= 1200px)
   =================================================================== */

@media (min-width: 1200px) {

    /* Nav sticky auf Desktop */
    .natur-header-nav {
        position: sticky;
        top: 0;
        z-index: 999;
    }

    /* Mobile-Logo ausblenden */
    .natur-header-logo .natur-header-logo-mobile {
        display: none;
    }

    /* Flex L-S-C: Logo | Suche | Cart */
    .natur-header-logo-area .natur-header-inner {
        display: flex;
        align-items: center;
        gap: 16px;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    /* Logo: links, max 260px breit */
    .natur-header-logo {
        flex-shrink: 0;
    }

    .natur-header-logo img {
        max-width: 320px;
        width: 100%;
    }

    /* Suche: zentriert, nimmt verfuegbaren Raum */
    .natur-header-search {
        flex: 1;
        max-width: 480px;
    }

    .natur-header-search .search-field {
        height: var(--natur-element-height);
        border-radius: 6px 0 0 6px;
        background: #ffffff;
    }

    .natur-header-search button[type="submit"] {
        width: var(--natur-element-height);
        height: var(--natur-element-height);
        padding: 0;
        border-radius: 0 6px 6px 0;
    }

    /* Cart: rechts, mit Label + Total */
    .natur-header-cart {
        height: var(--natur-element-height);
        padding: 0 18px;
        border-radius: 6px;
        background: #ffffff;
        border: var(--natur-border-subtle);
    }

    .natur-header-cart:hover {
        background: #f0f8f0;
        border-color: var(--natur-brand-green);
    }
}

/* ===================================================================
   MOBILE / TABLET (< 1200px)
   =================================================================== */

@media (max-width: 1199px) {

    /* Trust-Bar auf Mobile ausblenden */
    .natur-header-infobar {
        display: none;
    }

    /* Nav auf Mobile ausblenden (ShiftNav uebernimmt) */
    .natur-header-nav {
        display: none;
    }

    /* Desktop-Logo ausblenden */
    .natur-header-logo .natur-header-logo-desktop {
        display: none;
    }

    /* Leicht getönt, kein Wald */
    .natur-header-logo-area {
        background-color: #f4faf4;
        border-bottom: none;
    }

    /* Grid: Hamburger | Logo | Cart (Row 1), Suche (Row 2) */
    .natur-header-logo-area .natur-header-inner {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto;
        align-items: center;
        row-gap: 8px;
        column-gap: 8px;
        padding: 8px 12px;
    }

    .natur-header-logo {
        grid-row: 1;
        grid-column: 2;
    }

    .natur-header-logo img {
        max-width: 180px;
    }

    /* Cart Mobile: nur Icon + Badge */
    .natur-header-cart {
        grid-row: 1;
        grid-column: 3;
        width: 44px;
        height: 44px;
        border: none;
        background-color: transparent;
        justify-content: center;
        color: var(--natur-text-dark) !important;
    }

    .natur-header-cart svg {
        width: 26px;
        height: 26px;
    }

    .natur-header-cart-copy,
    .natur-header-cart-total {
        display: none;
    }

    .natur-header-cart-count {
        box-shadow: 0 0 0 2px #ffffff;
    }

    /* Suche: eigene Zeile */
    .natur-header-search {
        grid-row: 2;
        grid-column: 1 / -1;
    }

    .natur-header-search .search-field {
        height: 42px;
        padding: 0 12px;
        border: 1px solid #cccccc;
        border-right: none;
        border-radius: 6px 0 0 6px;
        background: #ffffff;
        box-sizing: border-box;
    }

    .natur-header-search button[type="submit"] {
        width: 42px;
        height: 42px;
        padding: 0;
        border-radius: 0 6px 6px 0;
    }
}

/* ===================================================================
   MOBILE TRUST-HINT (Ersatz fuer versteckte Trust-Bar)
   =================================================================== */

.natur-header-mobile-trust {
    display: none;
}

@media (max-width: 1199px) {
    .natur-header-mobile-trust {
        display: block;
        grid-row: 3;
        grid-column: 1 / -1;
        text-align: center;
        font-size: 12px;
        font-weight: 600;
        color: var(--natur-bar-green);
        padding: 6px 0 8px;
        line-height: 1.3;
        border-bottom: 1px solid #c8e6c9;
    }
}

/* Mobile: Menu-Toggle im Grid */
@media (max-width: 1199px) {
    #shiftnav-toggle-main,
    .ubermenu-responsive-toggle-main {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: static !important;
        top: auto !important;
        left: auto !important;
        grid-row: 1;
        grid-column: 1;
        align-self: center;
        flex-shrink: 0;
        min-width: 44px;
        min-height: 44px;
        width: auto !important;
        height: auto !important;
        box-sizing: border-box;
    }
}
