/* =========================
   MOBILE + TABLET SEARCH
========================= */
@media (max-width: 1024px) {

  /* Hide search input initially */
  .elementor-widget-search .e-search-input-wrapper {
    width: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
  }

  /* Show only icon */
  .elementor-widget-search .e-search-label {
    cursor: pointer;
  } 
  
  body.search-open .elementor-widget-search .e-search-label svg {
    cursor: pointer;
    margin-left: 6px !important;
  }
  body.search-open .elementor-widget-search .e-search-input-wrapper svg {
      margin-right: 10px;
  }
  
  body.search-open .elementor-widget-search .e-search-loader{
      width: fit-content;
  }
  
  /* Hide cart price text */
  .elementor-menu-cart__toggle_button .elementor-button-text {
    display: none !important;
  }
  
  .elementor-element-5cb75c5 
  .elementor-widget-button 
  .elementor-button-text {
    display: none !important;
  }

  /* Hide "Cart" label */
  .elementor-menu-cart__toggle_button .custom-cart-text {
    display: none !important;
  }

  /* Keep icon & qty visible */
  .elementor-menu-cart__toggle_button .elementor-button-icon {
    margin: 0 !important;
  }

  /* Remove extra padding */
  .elementor-menu-cart__toggle_button {
    padding: 0 !important;
    min-width: auto !important;
  }
  
  body.search-open .e-search{
    width: 100% !important;
  }
  
  body.search-open .e-search-form {
    padding: 12px;
  }

  /* Active search (full header) */
  body.search-open .elementor-widget-search {
    position: fixed;
    top: 42px;
    left: 10px;
    width: 95% !important;
    height: 100% !important;
    background: rgb(70 64 64 / 60%) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: #fff;
    z-index: 9999;
    display: flex;
    align-items: flex-start !important;;
    border: none !important;
    border-radius: 6px !important;
    padding: 0px 16px;
    overflow: visible !important;
  }

  /* SHOW INPUT + ALLOW RESULTS */
  body.search-open .e-search-input-wrapper {
    width: 100%;
    opacity: 1;
    border-radius: 6px !important;
    overflow: visible !important;
    position: relative;
  }

  body.search-open .e-search-input {
    border: none;
    font-size: 18px;
    padding: 12px 10px;
    padding-left: 36px;
    width: 100% !important;
    outline: none;
    border-radius: 6px !important;
  }
  
 body.search-open .e-search-input-wrapper:focus-within {
  border-color: #003D29 !important;
}

body.search-open .e-search-results .e-search-results-list .e-con-inner{
    flex-direction: row !important;
    flex-wrap: nowrap !important;
}

  body.search-open .e-search-results-container {
    position: absolute;
    display: flex;
    justify-content: center;
    top: 100%;
    left: 0;
    right: 0;
    border:none !important;

    max-height: 60vh;
    overflow-y: auto;

    background: #fff;
    border-radius: 6px !important;
    margin-top: 6px;

    z-index: 10000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  }

  /* Hide other header elements */
  body.search-open 
  .elementor-widget-theme-site-logo,
  body.search-open 
  .elementor-widget-nav-menu,
  body.search-open 
  .elementor-widget-button,
  body.search-open 
  .elementor-widget-woocommerce-menu-cart {
    display: none !important;
  }
}

body.search-open .e-search-results,
body.search-open .e-search-loader {
  border: none !important;
}



body a.elementor-item.elementor-item-active.menu-link {
  background-color: white !important;
  color: black !important;
}

elementor-element.elementor-element-c3e2929 {
  height: 24px !important;
}

@media(max-width: 1024px){
    
  body.search-open .elementor-widget-search{
    padding: 20px !important;
    width: 100% !important;
    height: max-content;
    top:0;
    left: 0;
  }
    
  .e-search-form{
    padding: 0 !important;
  }
    
  .e-search-input-wrapper{
    border: 1px solid #cccccc !important;
    border-radius: 6px !important;
  }
}
