.ais-SearchBox-form::before{
    content: "";
    height: 50px;
    left: 1rem;
    margin-top: -0.5rem;
    position: absolute;
    top: 50%;
    width: 50px;
    background-repeat: no-repeat;  
    display: none;
}

#mega-menu-wrap-topmenu #mega-menu-topmenu div#searchbox {
    width: 0;
   /* opacity: 0;*/
    transition: 0.4s all;
    position: absolute;
    right: 0;
    top: -2px;
}

#mega-menu-wrap-topmenu #mega-menu-topmenu a.show div#searchbox {
    width: 400px;
    /*opacity: 1;*/
}


#searchbox .ais-SearchBox form.ais-SearchBox-form{
    height: 40px;
}

#mega-menu-wrap-topmenu #mega-menu-topmenu #searchbox .ais-SearchBox form.ais-SearchBox-form input{
    box-shadow: none;
    border-radius: 0;
    height: 40px;
    font-size: 16px;
    z-index: 1;
    border: 0;
    padding: 0;
}

#mega-menu-wrap-topmenu #mega-menu-topmenu a.show #searchbox .ais-SearchBox form.ais-SearchBox-form input{

    border: 1px solid #ccc;
    padding-left: 10px;
}

.ais-SearchBox-reset{
    display: none;
}

.ais-SearchBox-input::placeholder {
    color: #958d8d;
}

#mega-menu-wrap-topmenu #mega-menu-topmenu div#hits{
    border-top: 0;
    max-width: 400px;
    right: 0;
    width: 400px;
    position: absolute;
}

#mega-menu-wrap-topmenu #mega-menu-topmenu div#hits:not(:empty){
    background-color: #fff;
    padding: 10px;
    border: 1px solid #ccc;
    top: 32px;
}

#mega-menu-wrap-topmenu #mega-menu-topmenu li.mega-menu-item.search_icon{
    position: absolute;
    right: 138px;
    top: 3px;
    width: 40px;
}

#mega-menu-wrap-topmenu #mega-menu-topmenu li.mega-menu-item.search_agolia{
    position: absolute;
    right: 135px;
    top: 3px;
}

#mega-menu-wrap-topmenu #mega-menu-topmenu li.mega-menu-item.search_icon.no_pointer span{
    cursor: auto;
} 

#mega-menu-wrap-topmenu #mega-menu-topmenu li.mega-menu-item.search_icon span{
    position: absolute;
    z-index: 2;
    top: 0px;
    right: 10px;
    background: url(../images/search-icon.png) 0 75% no-repeat;
    display: inline-block;
    cursor: pointer;
    font: inherit;
    font-family: dashicons;
    margin: 0 6px 0 0px;
    vertical-align: top;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 24px;
    height: 36px;
    
}

#hits {
    @media (min-width: 1200px) {
        width: 34%;
        position: absolute;
        margin-top: 15px;
    }

    border-radius: 10px;
    background: #FFF;
    box-shadow: 0px 4px 24px 0px rgba(0, 0, 0, 0.09);
    z-index: 1;
}
.ais-Hits-list {
    direction: ltr;
    a {display: flex; gap: 10px; color: var(--black, #1D1D1D); font-style: normal; line-height: 20px; text-decoration: none; padding-left: 2px !important; font-size: 16px; 
        img{height: 39px;}
        
        @media (min-width: 1200px) {
            .title {font-size: 20px; font-weight: 700;}
            .picture {width: 80px;}
        }
        .sub-title {font-size: 15px; font-weight: 300;}
    }
    
    .ais-Highlight-highlighted {
        @media (max-width: 768px) {
            font-weight: 800;
        }
        background-color: white;
        color: black;
        padding: 0;
        font-weight: 600;
    }
    
}
.all_hits {font-size: 20px; font-style: normal; font-weight: 400; line-height: 20px; text-decoration-line: underline; cursor: pointer; width: 100%; text-align: center;}

.hidden {
    visibility: hidden;
}

.search_field_global {
    a {
        color: black;
        text-decoration: none;
    }
    
    mark {background-color: transparent;}
    em {font-weight: 600;}

    #loader {
        border: 4px solid #f3f3f3;
        border-top: 4px solid #c8c8c8 ;
        border-radius: 50%;
        width: 20px;
        height: 20px;
        animation: spin 1s linear infinite;
        position: absolute;
        right: 29px;
        top: 35%;
        transform: translateY(-50%);
        @media (max-width: 768px) {
            left: 19px;
            top: 15%;
        }
    }

    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    
    .flex {
        position: relative;
    }
}

/*#hits .ais-Hits ol .ais-Hits-item:nth-child(n+11)  {
    display:none !important
}*/

#mega-menu-wrap-topmenu #mega-menu-topmenu li.mega-menu-item.search_agolia a i{
    position: absolute;
    right: 7px;
    top: 13px;
    z-index: 2;
    cursor: pointer;
    font-size: 16px;
    opacity: 0;
    transition: 0.5s all;
}

#mega-menu-wrap-topmenu #mega-menu-topmenu li.mega-menu-item.search_agolia a.mega-menu-link.show i{
    opacity: 1;
}



#mega-menu-wrap-topmenu #mega-menu-topmenu > li.mega-wpml-ls-item{
    right: 180px !important;
}

#mega-menu-wrap-topmenu #mega-menu-topmenu > li.mega-store {
    margin-left: 200px !important;
}

.ais-SearchBox--loadingIndicator {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: red;
  }
  
  .ais-SearchBox-loadingIndicator::before {
    content: '';
    display: inline-block;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-right-color: transparent;
    border-top-color: transparent;
    width: 20px;
    height: 20px;
    animation: ais-spin 0.6s linear infinite;
  }
  
  @keyframes ais-spin {
    to {
      transform: rotate(1turn);
    }
  }

  .ais-SearchBox-loading {
    display: block; /* Show the indicator when loading */
  }