/* IMC RC40 — database-driven header product search.
   Shared on every public page through header.php + menu.php. */

#header.imc-header-2026 .imc-header-product-search{
  position:relative;
  z-index:1105;
  display:inline-flex;
  align-items:center;
  font-family:Poppins,Arial,sans-serif;
}

#header.imc-header-2026 .imc-product-search-toggle,
#header.imc-header-2026 .imc-product-search-close,
#header.imc-header-2026 .imc-product-search-clear{
  appearance:none;
  -webkit-appearance:none;
  border:0;
  outline:0;
  cursor:pointer;
  font-family:inherit;
}

#header.imc-header-2026 .imc-product-search-toggle{
  width:44px;
  height:44px;
  padding:0;
  display:none;
  align-items:center;
  justify-content:center;
  gap:7px;
  border:1px solid rgba(163,230,53,.2);
  border-radius:13px;
  color:#f8fafc;
  background:rgba(255,255,255,.045);
  box-shadow:none;
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,color .18s ease;
}

#header.imc-header-2026 .imc-product-search-toggle:hover,
#header.imc-header-2026 .imc-product-search-toggle:focus-visible,
#header.imc-header-2026 .imc-header-product-search.is-open .imc-product-search-toggle{
  color:#a3e635;
  border-color:rgba(163,230,53,.48);
  background:rgba(163,230,53,.09);
  box-shadow:0 0 18px rgba(163,230,53,.12);
}

#header.imc-header-2026 .imc-product-search-toggle span{
  display:none;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}

#header.imc-header-2026 .imc-product-search-panel{
  position:relative;
  width:230px;
}

#header.imc-header-2026 .imc-product-search-panel-head{
  display:none;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0 0 11px;
  color:#f7fbf2;
}

#header.imc-header-2026 .imc-product-search-panel-head strong{
  font-size:13px;
  font-weight:800;
}

#header.imc-header-2026 .imc-product-search-close{
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(255,255,255,.11);
  border-radius:10px;
  color:#eef4ea;
  background:rgba(255,255,255,.045);
}

#header.imc-header-2026 .imc-product-search-close:hover,
#header.imc-header-2026 .imc-product-search-close:focus-visible{
  color:#a3e635;
  border-color:rgba(163,230,53,.38);
  background:rgba(163,230,53,.08);
}

#header.imc-header-2026 .imc-product-search-form{
  position:relative;
  margin:0;
}

#header.imc-header-2026 .imc-product-search-control{
  position:relative;
  min-height:44px;
  display:flex;
  align-items:center;
  border:1px solid rgba(193,211,172,.52);
  border-radius:13px;
  background:#f5f8ef;
  box-shadow:0 8px 22px rgba(0,0,0,.12);
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;
}

#header.imc-header-2026 .imc-product-search-control:focus-within{
  border-color:#a9ca67;
  background:#fff;
  box-shadow:0 0 0 3px rgba(163,230,53,.11),0 10px 24px rgba(0,0,0,.14);
}

#header.imc-header-2026 .imc-product-search-leading-icon{
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  z-index:1;
  color:#627557;
  font-size:13px;
  pointer-events:none;
}

#header.imc-header-2026 .imc-product-search-control input{
  width:100%;
  height:42px;
  margin:0;
  padding:0 38px 0 38px;
  border:0!important;
  outline:0!important;
  border-radius:12px;
  color:#263423!important;
  background:transparent!important;
  box-shadow:none!important;
  font-family:Poppins,Arial,sans-serif!important;
  font-size:12px!important;
  font-weight:600!important;
  line-height:42px!important;
  -webkit-appearance:none;
}

#header.imc-header-2026 .imc-product-search-control input::placeholder{
  color:#75836e;
  opacity:1;
}

#header.imc-header-2026 .imc-product-search-control input::-webkit-search-cancel-button{
  display:none;
}

#header.imc-header-2026 .imc-product-search-clear{
  position:absolute;
  right:7px;
  top:50%;
  transform:translateY(-50%);
  width:30px;
  height:30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:9px;
  color:#64725f;
  background:transparent;
}

#header.imc-header-2026 .imc-product-search-clear[hidden]{
  display:none!important;
}

#header.imc-header-2026 .imc-product-search-clear:hover,
#header.imc-header-2026 .imc-product-search-clear:focus-visible{
  color:#435b35;
  background:#e6efd8;
}

#header.imc-header-2026 .imc-product-search-dropdown{
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  width:min(500px,calc(100vw - 24px));
  overflow:hidden;
  border:1px solid #d8e3cd;
  border-radius:17px;
  background:#fff;
  box-shadow:0 24px 55px rgba(8,18,13,.24);
}

#header.imc-header-2026 .imc-product-search-dropdown[hidden]{
  display:none!important;
}

#header.imc-header-2026 .imc-product-search-status{
  min-height:34px;
  display:flex;
  align-items:center;
  padding:8px 14px;
  border-bottom:1px solid #e8eee2;
  color:#65715f;
  background:#f7f9f3;
  font-size:10px;
  line-height:1.35;
  font-weight:700;
  letter-spacing:.025em;
}

#header.imc-header-2026 .imc-product-search-list{
  max-height:min(430px,58vh);
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:#b9ce91 #f4f7ef;
}

#header.imc-header-2026 .imc-product-search-item{
  position:relative;
  min-height:72px;
  display:grid;
  grid-template-columns:58px minmax(0,1fr) 22px;
  align-items:center;
  gap:11px;
  padding:9px 13px;
  border-bottom:1px solid #edf1e9;
  color:#33452e!important;
  background:#fff;
  text-decoration:none!important;
  transition:background .15s ease,color .15s ease;
}

#header.imc-header-2026 .imc-product-search-item:last-child{
  border-bottom:0;
}

#header.imc-header-2026 .imc-product-search-item:hover,
#header.imc-header-2026 .imc-product-search-item:focus-visible,
#header.imc-header-2026 .imc-product-search-item.is-active{
  color:#2f4726!important;
  background:#eaf2dc;
  outline:0;
}

#header.imc-header-2026 .imc-product-search-thumb{
  width:58px;
  height:52px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid #dfe8d6;
  border-radius:10px;
  background:#f8faf5;
}

#header.imc-header-2026 .imc-product-search-thumb img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}

#header.imc-header-2026 .imc-product-search-copy{
  min-width:0;
}

#header.imc-header-2026 .imc-product-search-name{
  display:block;
  overflow:hidden;
  color:#31442c;
  font-size:12px;
  line-height:1.35;
  font-weight:800;
  text-overflow:ellipsis;
  white-space:nowrap;
}

#header.imc-header-2026 .imc-product-search-description{
  display:-webkit-box;
  overflow:hidden;
  margin-top:3px;
  color:#6c7867;
  font-size:10px;
  line-height:1.42;
  font-weight:500;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}

#header.imc-header-2026 .imc-product-search-arrow{
  color:#7d9854;
  font-size:11px;
  text-align:center;
}

#header.imc-header-2026 .imc-product-search-empty{
  padding:25px 18px;
  color:#62705d;
  text-align:center;
  font-size:12px;
  line-height:1.6;
}

#header.imc-header-2026 .imc-product-search-empty i{
  display:block;
  margin-bottom:8px;
  color:#91aa6a;
  font-size:22px;
}

#header.imc-header-2026 .imc-product-search-all{
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:9px 14px;
  border-top:1px solid #dfe8d4;
  color:#496137!important;
  background:#edf4e2;
  font-size:11px;
  line-height:1.3;
  font-weight:800;
  text-decoration:none!important;
}

#header.imc-header-2026 .imc-product-search-all:hover,
#header.imc-header-2026 .imc-product-search-all:focus-visible{
  color:#365126!important;
  background:#deebc9;
}

@media(min-width:1281px){
  #header.imc-header-2026 .imc-product-search-panel-head{
    display:none!important;
  }
}

@media(max-width:1280px){
  #header.imc-header-2026 .imc-product-search-toggle{
    display:inline-flex;
  }

  #header.imc-header-2026 .imc-product-search-panel{
    display:none;
    position:absolute;
    top:calc(100% + 12px);
    right:0;
    width:min(430px,calc(100vw - 24px));
    padding:14px;
    border:1px solid rgba(163,230,53,.18);
    border-radius:18px;
    background:linear-gradient(145deg,#101821,#0b1219);
    box-shadow:0 24px 55px rgba(0,0,0,.32);
  }

  #header.imc-header-2026 .imc-header-product-search.is-open .imc-product-search-panel{
    display:block;
  }

  #header.imc-header-2026 .imc-product-search-panel-head{
    display:flex;
  }

  #header.imc-header-2026 .imc-product-search-dropdown{
    position:relative;
    top:auto;
    right:auto;
    width:100%;
    margin-top:9px;
    box-shadow:none;
  }
}

@media(max-width:991.98px){
  #header.imc-header-2026 .imc-header-product-search{
    position:static;
  }

  #header.imc-header-2026 .imc-product-search-toggle{
    width:42px;
    height:42px;
    border-radius:12px;
  }

  #header.imc-header-2026 .imc-product-search-panel{
    position:fixed;
    top:74px;
    left:12px;
    right:12px;
    width:auto;
    max-height:calc(100vh - 90px);
    overflow-y:auto;
    padding:13px;
    border-radius:17px;
  }

  #header.imc-header-2026 .imc-product-search-list{
    max-height:calc(100vh - 245px);
  }

  body.imc-product-search-open{
    overflow:hidden;
  }
}

@media(max-width:575px){
  #header.imc-header-2026 .imc-product-search-panel{
    top:70px;
    left:8px;
    right:8px;
    padding:11px;
    border-radius:15px;
  }

  #header.imc-header-2026 .imc-product-search-control{
    min-height:42px;
  }

  #header.imc-header-2026 .imc-product-search-control input{
    height:40px;
    font-size:12px!important;
    line-height:40px!important;
  }

  #header.imc-header-2026 .imc-product-search-item{
    min-height:66px;
    grid-template-columns:50px minmax(0,1fr) 18px;
    gap:9px;
    padding:8px 10px;
  }

  #header.imc-header-2026 .imc-product-search-thumb{
    width:50px;
    height:46px;
    border-radius:9px;
  }

  #header.imc-header-2026 .imc-product-search-name{
    font-size:11.5px;
  }

  #header.imc-header-2026 .imc-product-search-description{
    font-size:9.5px;
  }
}

/* Keep search, call, quote list and menu usable together on smaller screens. */
@media(max-width:575px){
  #header.imc-header-2026 .call-us-p{display:inline!important;max-width:145px;line-height:1.45}
  #header.imc-header-2026 .header-nav-features{margin-left:4px!important}
}

/* While the mobile search panel is open, temporarily move the contact dock out of the way.
   It returns immediately when search closes. */
body.imc-product-search-open .imc-contact-dock{
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
}

/* Search suggestions must sit above the restored floating contact dock. */
#header.imc-header-2026 .imc-header-product-search,
#header.imc-header-2026 .imc-product-search-panel,
#header.imc-header-2026 .imc-product-search-dropdown{
  z-index:10050;
}
