/* GartenDiagnose Header – 20.25 */
.gdcr-main-nav-zimmerpflanzen,
    .gdcr-main-nav-zimmerpflanzen > a{
      white-space:nowrap;
    }
    @media (min-width:901px) and (max-width:1250px){
      .gdcr-main-nav-zimmerpflanzen > a{
        letter-spacing:-.01em;
      }
    }

/* 20.25: First-paint Desktop-Layout ohne JS-Klassen. */
@supports selector(:has(*)){
  @media (min-width:1181px){
    header :where(div,.wp-block-group,.wp-block-row):has(> .gdcr-primary-navigation):has(> .gdcr-header-search-desktop-slot),
    .site-header :where(div,.wp-block-group,.wp-block-row):has(> .gdcr-primary-navigation):has(> .gdcr-header-search-desktop-slot),
    #masthead :where(div,.wp-block-group,.wp-block-row):has(> .gdcr-primary-navigation):has(> .gdcr-header-search-desktop-slot){
      display:grid !important;
      grid-template-columns:max-content minmax(0,1fr) max-content !important;
      align-items:center !important;
      column-gap:clamp(20px,2.5vw,44px) !important;
      width:100% !important;
      overflow:visible !important;
      position:relative !important;
    }
    header :where(div,.wp-block-group,.wp-block-row):has(> .gdcr-primary-navigation):has(> .gdcr-header-search-desktop-slot) > .gdcr-primary-navigation,
    .site-header :where(div,.wp-block-group,.wp-block-row):has(> .gdcr-primary-navigation):has(> .gdcr-header-search-desktop-slot) > .gdcr-primary-navigation,
    #masthead :where(div,.wp-block-group,.wp-block-row):has(> .gdcr-primary-navigation):has(> .gdcr-header-search-desktop-slot) > .gdcr-primary-navigation{
      grid-column:2 !important;
      justify-self:center !important;
      width:max-content !important;
      max-width:100% !important;
      min-width:0 !important;
      margin:0 !important;
    }
    header :where(div,.wp-block-group,.wp-block-row):has(> .gdcr-primary-navigation):has(> .gdcr-header-search-desktop-slot) > .gdcr-header-search-desktop-slot,
    .site-header :where(div,.wp-block-group,.wp-block-row):has(> .gdcr-primary-navigation):has(> .gdcr-header-search-desktop-slot) > .gdcr-header-search-desktop-slot,
    #masthead :where(div,.wp-block-group,.wp-block-row):has(> .gdcr-primary-navigation):has(> .gdcr-header-search-desktop-slot) > .gdcr-header-search-desktop-slot{
      grid-column:3 !important;
      justify-self:end !important;
      align-self:center !important;
    }
  }
}

body.gd-site .gdcr-header-search-row,
    .gdcr-header-search-row{
      gap:16px;
      row-gap:8px;
      align-items:center;
    }

    /* Header muss als eigener hoher Stacking-Kontext über dem Seiteninhalt liegen.
       Sonst können Theme-/Content-Rahmen das Such-Popover optisch überdecken. */
    body.gd-site .gdcr-header-has-search,
    .gdcr-header-has-search{
      position:relative !important;
      z-index:10000 !important;
      overflow:visible !important;
    }

    body.gd-site .gdcr-header-search,
    .gdcr-header-search{
      box-sizing:border-box;
      display:flex;
      align-items:center;
      min-width:260px;
      width:100%;
      max-width:380px;
      flex:0 1 360px;
      margin-left:auto;
      margin-right:auto;
      border:1px solid rgba(29,122,58,.22);
      border-radius:999px;
      background:
        radial-gradient(220px 80px at 90% 10%, rgba(57,179,107,.20), transparent 72%),
        linear-gradient(135deg, rgba(255,255,255,.92), rgba(239,250,244,.92));
      box-shadow:0 12px 34px rgba(16,80,43,.12), inset 0 1px 0 rgba(255,255,255,.70);
      overflow:hidden;
      position:relative;
      z-index:40;
    }

    body.gd-site .gdcr-header-search__input,
    .gdcr-header-search__input{
      box-sizing:border-box;
      display:block;
      flex:1 1 auto;
      min-width:0;
      height:42px;
      min-height:42px;
      border:0;
      outline:0;
      background:transparent;
      color:#111;
      padding:0 13px 0 15px;
      font-size:14px;
      font-weight:850;
      line-height:42px;
      vertical-align:middle;
      appearance:none;
      -webkit-appearance:none;
    }

    body.gd-site .gdcr-header-search__input::placeholder,
    .gdcr-header-search__input::placeholder{
      color:rgba(17,17,17,.58);
      opacity:1;
      font-weight:800;
    }

    body.gd-site .gdcr-header-search__button,
    .gdcr-header-search__button{
      flex:0 0 auto;
      border:0;
      border-radius:999px;
      margin:4px;
      padding:10px 15px;
      min-height:36px;
      cursor:pointer;
      background:linear-gradient(135deg, #137a38, #39b36b);
      color:#fff;
      font-weight:950;
      font-size:14px;
      line-height:1;
      box-shadow:0 8px 18px rgba(19,122,56,.24);
      white-space:nowrap;
    }

    body.gd-site .gdcr-header-search:focus-within,
    .gdcr-header-search:focus-within{
      border-color:rgba(19,122,56,.42);
      box-shadow:0 14px 38px rgba(16,80,43,.16), 0 0 0 4px rgba(57,179,107,.11);
    }

    body.gd-site .gdcr-header-search__button:hover,
    .gdcr-header-search__button:hover{
      transform:translateY(-1px);
      filter:saturate(1.05);
    }

    .gdcr-header-search--shortcode{
      max-width:680px;
      margin:12px 0;
    }

    @media (min-width: 901px){
      .gdcr-header-primary-row{
        position:relative !important;
        overflow:visible !important;
      }

      body.gd-site .gdcr-primary-navigation,
      .gdcr-primary-navigation{
        white-space:nowrap;
        overflow:visible !important;
      }

      body.gd-site .gdcr-primary-navigation .current-menu-item > a,
      body.gd-site .gdcr-primary-navigation .current_page_item > a,
      .gdcr-primary-navigation .current-menu-item > a,
      .gdcr-primary-navigation .current_page_item > a{
        background:rgba(57,179,107,.075) !important;
        border-radius:13px !important;
        box-shadow:inset 0 -2px 0 rgba(19,122,56,.60) !important;
      }

      body.gd-site .gdcr-header-search-desktop-slot,
      .gdcr-header-search-desktop-slot{
        box-sizing:border-box;
        display:flex !important;
        align-items:center !important;
        justify-content:center !important;
        position:relative !important;
        z-index:220 !important;
        width:max-content !important;
        min-width:0 !important;
        flex:0 0 auto !important;
        margin:0 !important;
        padding:0 !important;
        overflow:visible !important;
      }

      body.gd-site .gdcr-header-search-toggle,
      .gdcr-header-search-toggle{
        box-sizing:border-box;
        display:inline-flex;
        align-items:center;
        justify-content:center;
        gap:7px;
        width:auto;
        height:42px;
        min-width:0;
        min-height:42px;
        margin:0;
        padding:0 12px;
        border:1px solid transparent;
        border-radius:14px;
        background:transparent;
        color:#202522;
        cursor:pointer;
        box-shadow:none;
        font:inherit;
        font-weight:800;
        line-height:1;
        white-space:nowrap;
        transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease;
      }

      body.gd-site .gdcr-header-search-toggle:hover,
      .gdcr-header-search-toggle:hover,
      body.gd-site .gdcr-header-search-desktop-slot.is-open .gdcr-header-search-toggle,
      .gdcr-header-search-desktop-slot.is-open .gdcr-header-search-toggle,
      body.gd-site .gdcr-header-search-desktop-slot:focus-within .gdcr-header-search-toggle,
      .gdcr-header-search-desktop-slot:focus-within .gdcr-header-search-toggle{
        background:rgba(57,179,107,.09);
        border-color:rgba(19,122,56,.14);
        box-shadow:0 7px 20px rgba(16,80,43,.08);
      }

      body.gd-site .gdcr-header-search-toggle:focus-visible,
      .gdcr-header-search-toggle:focus-visible{
        outline:0;
        box-shadow:0 0 0 4px rgba(57,179,107,.15);
      }

      .gdcr-header-search-toggle__icons{
        display:inline-flex;
        width:19px;
        height:19px;
        align-items:center;
        justify-content:center;
        flex:0 0 19px;
      }

      .gdcr-header-search-toggle__icon{
        width:19px;
        height:19px;
        fill:currentColor;
      }

      .gdcr-header-search-toggle__label{
        display:inline-block;
        font-size:inherit;
        font-weight:inherit;
        line-height:1;
      }

      .gdcr-header-search-toggle__icon--close{display:none;}
      .gdcr-header-search-desktop-slot.is-open .gdcr-header-search-toggle__icon--search,
      .gdcr-header-search-desktop-slot:focus-within .gdcr-header-search-toggle__icon--search{display:none;}
      .gdcr-header-search-desktop-slot.is-open .gdcr-header-search-toggle__icon--close,
      .gdcr-header-search-desktop-slot:focus-within .gdcr-header-search-toggle__icon--close{display:block;}

      body.gd-site .gdcr-header-search-popover,
      .gdcr-header-search-popover{
        box-sizing:border-box;
        position:absolute;
        top:calc(100% + 9px);
        right:0;
        z-index:10020 !important;
        width:372px;
        max-width:min(372px, calc(100vw - 32px));
        padding:9px;
        border:1px solid rgba(29,122,58,.14);
        border-radius:22px;
        background:rgba(255,255,255,.985);
        box-shadow:0 20px 52px rgba(16,55,31,.16);
        opacity:0;
        visibility:hidden;
        pointer-events:none;
        transform:translateY(-6px) scale(.988);
        transform-origin:top right;
        transition:opacity .22s ease, transform .24s cubic-bezier(.22,.8,.3,1), visibility 0s linear .24s;
      }

      /* Unsichtbare Hover-Bruecke zwischen Menuepunkt und Popover. */
      .gdcr-header-search-popover::before{
        content:"";
        position:absolute;
        left:0;
        right:0;
        top:-12px;
        height:12px;
      }

      /* Fokus ist der harte Fallback: Auch wenn irgendein Theme-JS Klassen
         entfernt, bleibt das Feld waehrend der Eingabe sichtbar und klickbar. */
      body.gd-site .gdcr-header-search-desktop-slot.is-open .gdcr-header-search-popover,
      .gdcr-header-search-desktop-slot.is-open .gdcr-header-search-popover,
      body.gd-site .gdcr-header-search-desktop-slot.is-pinned .gdcr-header-search-popover,
      .gdcr-header-search-desktop-slot.is-pinned .gdcr-header-search-popover,
      body.gd-site .gdcr-header-search-desktop-slot:focus-within .gdcr-header-search-popover,
      .gdcr-header-search-desktop-slot:focus-within .gdcr-header-search-popover{
        opacity:1;
        visibility:visible;
        pointer-events:auto;
        transform:translateY(0) scale(1);
        transition-delay:0s;
      }

      body.gd-site .gdcr-header-search--desktop-menu,
      .gdcr-header-search--desktop-menu{
        width:100%;
        max-width:none;
        min-width:0;
        flex:1 1 auto;
        margin:0 !important;
      }

      body.gd-site .gdcr-header-search--desktop-menu .gdcr-header-search__input,
      .gdcr-header-search--desktop-menu .gdcr-header-search__input{
        height:42px !important;
        min-height:42px !important;
        font-size:14px;
        line-height:42px !important;
        padding:0 10px 0 14px !important;
      }

      body.gd-site .gdcr-header-search--desktop-menu .gdcr-header-search__button,
      .gdcr-header-search--desktop-menu .gdcr-header-search__button{
        padding:9px 14px;
        min-height:34px;
      }

      body.gd-site .gdcr-header-search--mobile,
      .gdcr-header-search--mobile{
        display:none !important;
      }
    }

    @media (min-width: 1181px){
      /* Exakte Struktur: Logo | freier Raum mit zentriertem Menue | Suche.
         Damit ist nicht das Gesamtpaket zentriert, sondern das Menue wirklich
         zwischen der rechten Logo-Kante und der linken Such-Kante. */
      body.gd-site .gdcr-header-primary-row,
      .gdcr-header-primary-row{
        display:grid !important;
        grid-template-columns:max-content minmax(0,1fr) max-content !important;
        align-items:center !important;
        column-gap:clamp(20px,2.5vw,44px) !important;
        width:100% !important;
      }

      body.gd-site .gdcr-header-primary-row > .gdcr-header-branding,
      .gdcr-header-primary-row > .gdcr-header-branding{
        grid-column:1 !important;
        justify-self:start !important;
        margin:0 !important;
      }

      body.gd-site .gdcr-header-primary-row > .gdcr-primary-navigation,
      .gdcr-header-primary-row > .gdcr-primary-navigation{
        grid-column:2 !important;
        justify-self:center !important;
        position:relative !important;
        inset:auto !important;
        transform:none !important;
        width:max-content !important;
        max-width:100% !important;
        min-width:0 !important;
        margin:0 !important;
        z-index:110 !important;
      }

      body.gd-site .gdcr-header-primary-row > .gdcr-header-search-desktop-slot,
      .gdcr-header-primary-row > .gdcr-header-search-desktop-slot{
        grid-column:3 !important;
        justify-self:end !important;
        align-self:center !important;
      }

      body.gd-site .gdcr-primary-navigation > ul,
      body.gd-site .gdcr-primary-navigation > ol,
      body.gd-site .gdcr-primary-navigation > .wp-block-navigation__container,
      .gdcr-primary-navigation > ul,
      .gdcr-primary-navigation > ol,
      .gdcr-primary-navigation > .wp-block-navigation__container{
        display:flex !important;
        align-items:center !important;
        justify-content:center !important;
        width:max-content !important;
        max-width:100% !important;
        padding-right:0 !important;
        margin:0 !important;
      }
    }

    @media (min-width: 901px) and (max-width: 1180px){
      body.gd-site .gdcr-header-primary-row,
      .gdcr-header-primary-row{
        display:flex !important;
        align-items:center !important;
        width:100% !important;
        gap:clamp(10px,1.3vw,18px) !important;
      }

      body.gd-site .gdcr-primary-navigation,
      .gdcr-primary-navigation{
        margin-left:auto !important;
      }

      body.gd-site .gdcr-header-search-desktop-slot,
      .gdcr-header-search-desktop-slot{
        margin-left:4px !important;
      }

      body.gd-site .gdcr-primary-navigation ul,
      .gdcr-primary-navigation ul{
        gap:clamp(8px,1.1vw,14px) !important;
      }

      body.gd-site .gdcr-primary-navigation a,
      body.gd-site .gdcr-header-search-toggle,
      .gdcr-primary-navigation a,
      .gdcr-header-search-toggle{
        font-size:14px !important;
      }
    }

    @media (max-width: 900px){
      body.gd-site .gdcr-header-search-desktop-slot,
      .gdcr-header-search-desktop-slot,
      body.gd-site .gdcr-header-search--desktop-menu,
      .gdcr-header-search--desktop-menu{
        display:none !important;
      }

      body.gd-site .gdcr-header-search-row,
      .gdcr-header-search-row{
        gap:8px 14px !important;
        row-gap:8px !important;
        align-content:flex-start;
      }

      body.gd-site .gdcr-header-search--mobile,
      .gdcr-header-search--mobile{
        order:99;
        flex:0 0 calc(100% - 32px);
        width:calc(100% - 32px);
        max-width:640px;
        min-width:0;
        margin:-8px auto 0 auto;
      }

      body.gd-site .gdcr-header-has-search,
      .gdcr-header-has-search{
        padding-bottom:10px !important;
      }

      body.gd-site .gdcr-header-search__input,
      .gdcr-header-search__input{
        height:46px;
        min-height:46px;
        font-size:16px;
        line-height:46px;
        padding:0 12px 0 15px;
      }

      body.gd-site .gdcr-header-search__button,
      .gdcr-header-search__button{
        padding:10px 13px;
      }
    }

    @media (max-width: 420px){
      body.gd-site .gdcr-header-search__input::placeholder,
      .gdcr-header-search__input::placeholder{
        font-size:13px;
      }

      body.gd-site .gdcr-header-search__button,
      .gdcr-header-search__button{
        font-size:13px;
        padding-left:12px;
        padding-right:12px;
      }
    }
