.search-popup-overlay {
  position: fixed; /* Make it cover the entire screen */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent black background */
  display: none; /* Initially hidden */
  z-index: 999; /* Make sure it's behind the popup */
  cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADo0lEQVRYhb1XP2gbZxR/7ztFR4OCWp2wfMa1RUF24BwLdF4aYxAatIjMovVQ0KAMhoJd2XO2DmrwEDzEg0d1Kh6yxSC0eckd2M4NFrVQPeQ4Lh6ubi/osPQ6VBKyIuVOspLfdu973/f73fv+/hA8QpKkgN/vlwFARsTFIWnvAEBpNBoVTdP+8TIuuiXIsiwSUZ6Ikoj4wKtgAHjVbDZ/Pzk5qY4lQJKkAM/zvwDAkxFIPwIRVRzHeTasItygYDweX/D5fL8h4uO7kAMAIGKU47jvI5HIW8Mwrj5q7w/Isiy2Wq3SiOV2BRFdM8Z+VBRF743fqoAkSQHG2AtEnJkkOQAAIvJEJAuC8No0TacTZ71JPM8//8QKn4SIRZ7nn/fGuhVIJBJ5uOOC84gZURRB13UFoL0G2lvt1Rcg7wIRnyiKojMAACLKf0nyXk5OkqSAz+f71a3D8vLyV5FI5J5hGDfDcoLBIFcqlR7Ozs7eOz4+djsJF0OhUInxPJ/0orhQKHy7t7e3kMlkgsPIDw4OFqLR6P3V1dWvg8HgwDOmFzzPJ7np6ek8Ikbdki8uLuxMJiOk0+mwZVmOpmkfett3d3e/W1paelCv1+1cLle1LKvpNiYRASeK4k+IGHZLNgzjRlGUv9Pp9DfJZDJERE1VVf8FACgWi/Nra2uhUcjbaGAikXjjMRkAbpe6XC6/BwBIpVLhMcgBAGBkAf0iAADGJQfoOwm9wrKsZq1WszvftVrNHod8bAHFYnG+U/Z6vW6nUqlwsVicH0sAEZ2P0mFra0vsnfNcLlcdVwQRnTMA0F0z28hms8L6+vqMaZqNzpxbltXM5XJVTdOuxxChc6IoCl4eHtlsVtjZ2Ynatn2zubn55+XlZfdKbTQadHh4eBWLxfypVCoci8X8R0dHlgcBfzDGWMWL1JWVlYBt2zcbGxvV09PTD4Nytre3/yqXy+91XXcGtfeDMVZBAIBEIvESAGS3DnNzc/7eP78jFFVVn3Z2wb6XHhMk73IyAABVVRUiqkxw8E+CiCqqqipdAQAAjuM8g/+NxefGuzYXAPQ8yUzTdKamphRETCMi/zmYiei61Wr9fHZ21t36t+5swzCuIpHIMSIuebkhRyQ/b7VahX6nNNAZtX3gy0m9kIno3HGcp4Pc0cBXi2majiAIrzmO8yPiozuSVxzHKQyzZq7mNB6PLzDG8oiYHJFbAYD9zmofBlcBHbQt2w/gwZ4j4n6/BRuG/wA9X65CnAC2oQAAAABJRU5ErkJggg==) 12 12, auto;
}
.search-popup.visible,
.search-popup-overlay.visible {
  display: block; /* Show both the popup and overlay */
}
.search-popup.visible{
  animation: zoomInCenter 0.3s ease-in-out;
}
@keyframes zoomInCenter {
  from {
    transform: scale(0.8) translate(-60%, -60%);
    opacity: 0;
  }
  to {
    transform: scale(1) translate(-50%, -50%);
    opacity: 1;
  }
}
.search-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 1000px;
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  max-height: 80%;
  overflow-y: auto;
  z-index: 1000; /* Popup above the overlay */
}
.search-popup-content {
  position: relative;
}
.close-popup {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 30px;
  cursor: pointer;
  color: #333;
  border: none;
  background: none;
}
.search-results {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}
.search-result-item {
  display: flex;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ddd;
  gap: 20px;
}
.search-result-content {
  display: flex;
  align-items: center;
  gap: 15px;
  height: fit-content !important;
}
.search-result-image {
  flex-shrink: 0;
  width: 80px;
  min-height: 80px;
  padding: 13px 0 13px 0;
  overflow: hidden;
}
.search-result-image img {
  max-width: 100%;
  height: 100%;
  object-fit:scale-down;
}
.search-result-details {
  flex-grow: 1;
}
.search-result-details span {
  font-size: 18px;
  margin: 0 0 5px;
}
.search-result-details span a {
  text-decoration: none;
  color: #3d8fff;
}
.search-result-details span a:hover {
  text-decoration: underline;
}
.search-result-details p {
  font-size: 14px;
  line-height: 1.5;
  color: #555;
  margin: 0;
}
.highlight {
  font-weight: bold;
  color: #3d8fff;
}
.search-form {
  display: flex;
  margin-bottom: 20px;
  align-items: center;
}
.search-field {
  flex: 1;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-right: 10px;
}
.search-submit {
  padding: 0 16px;
  border: none;
  background-color:#147095 ;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, .12);
  box-sizing: border-box;
  cursor: pointer;
  display: flex; 
  align-items: center;
  border-radius:0 3px 3px 0 ;
  font-size: 1em;
  height: 44px;
  justify-content: center;
  margin-top: 0;
  padding: 0 16px;
  transition: background-color .3s ease-in-out, border-color .3s ease-in-out;
}
.search-submit:hover {
  background-color:#147095;
}
/* Style for the search dropdown container */
.search-results-dropdown {
  display: none; /* Initially hidden */
  position: absolute;
  top: 100%; /* Align below the search input */
  left: 0;
  width: 100%; /* Full width of the parent container */
  max-height: 300px;
  overflow-y: auto; /* Add scroll when results overflow */
  background-color: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  border-radius: 4px;
}
/* Style for each search result item */
.search-results-list li {
  padding: 12px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #f1f1f1;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

/* Recent search CSS */
.recent_search_container{
  background: transparent;
  background-image: none;
  border: 0;
  box-sizing: border-box;
  display: block;
  font-size: 16px;
  height: auto;
  margin: 0;
  padding: 0;
  width: 91%;
  display: block;
  position: absolute;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.15);
  background: #fff;
  /* bottom: -164px; */
}
.recent_search_heading{
  font-size: 1.2em;
  margin: 8px;
  padding: 0;
  text-align: left;
  font-weight: 600;
  margin-bottom: 15px;
  color: #231d20;
}
.recent_search_item{
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 8px 8px 8px 16px;
}
.recent_search_item a{
  width: 85%;
  cursor: pointer;
}
.recent_search_item a span{
  display: block;
  margin-bottom: 4px;
  text-align: left;
  color: #231d20;
  font-size: 1em;
}
.recent_search_item:hover, .recent_search_item:hover .delete_recent_search svg{
  background: #dedede;
}
.recent_search_list{
  padding-left: 0;
  margin-bottom: 0;
}
.delete_recent_search{
  background-color: none;
  border: 0;
  box-sizing: border-box;
  display: block;
  float: none;
  height: auto;
  line-height: normal;
  margin: 0;
  min-width: 0;
  padding: 0;
  text-indent: unset;
}
.delete_recent_search svg{
  background-color: #fff;
}
/* Recent search CSS ends */

.search-results-list li:hover {
  background-color: #f4f4f4; /* Highlight result on hover */
}
/* Style for the result link */
.search-results-list li a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #333;
  font-size: 14px;
}
/* Product image style */
.search-results-list li a img {
  width: 40px;
  height: 40px;
  margin-right: 12px;
  object-fit: cover; /* Crop and scale images to fit */
  border-radius: 4px;
}
/* Highlighted search term in the result */
.search-results-list li a span.highlight {
  background-color: yellow; /* Background color for highlighted term */
  font-weight: bold;
}

/* Style for search input */
.search-input {
  position: relative;
  padding-right: 40px; /* Space for dropdown icon (optional) */
}
/* Add some spacing between search field and the dropdown */
.search-form-wrap {
  position: relative;
}
/* Additional styling for dropdown when no results found */
.search-results-dropdown.no-results {
  border-color: #ff7b7b; /* Red border for no results */
  background-color: #ffe6e6;
}
.search-results-dropdown.no-results li {
  color: #ff3333;
  font-style: italic;
  padding: 10px;
  text-align: center;
}
/* Overlay to dim background */
.search-popup-overlay {
  display: none; /* Initially hidden, shown when search popup is visible */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 999;
}
/* Buttons in Job/Quote popup */
.popup-btn {
  background-color: #0073e6;
  color: #fff !important;
  border: none;
  padding: 10px 20px;
  margin: 10px;
  cursor: pointer;
  font-size: 16px;
  border-radius: 5px;
  transition: background-color 0.3s;
}
.popup-btn:hover {
  background-color: #005bb5;
}
.custom-sorry-display {
  font-size: 20px;
  font-weight: lighter;
  padding-top: 20px;
}
.custom-found-display {
  font-size: 25px;
}
#search-popup{
  padding: 0 24px 32px 32px;
  width: 80%;
  max-width: 800px;
  height: 80%;
  border-radius: 0 !important;
}
.search-popup-heading{
  font-size: 15px;
  line-height: 24px;
}
.search-popup-btn{
    border-radius: 8px !important;
    font-size: 15px;
    padding: 8px 18px !important;
    margin: 0 !important;
    line-height: 22.5px !important;
}
.yes-search-popup-btn{
   background-color: #ab192d !important;
   border: 2px solid transparent !important;
   color: #fff !important;
}
.yes-search-popup-btn:hover{
  background-color: #231d20 !important;
}
.main-yes-btn{
  height: 42.5px;
  border: none;
}
.no-search-popup-btn{
   background-color: #fff !important;
   color: #147095 !important;
   border: 2px solid #147095 !important;
}
.no-search-popup-btn:hover{
  background-color: #147095 !important;
  color: #fff !important;
}
.search-close-btn{
  position:sticky;
  top: -1px;
  right: 0;
  line-height: 13px !important;
  padding: 19px 0  2px 0;
  background-color: #fff;
  z-index: 99;
}
.custom-search-display{
  margin-top: 1px;
  margin-bottom: 24px;
  padding-bottom: 8px;
  position: sticky;
  top:33px;
  background-color:#fff;
  z-index: 99;
}
#ajax-search-form label{
  width: 100%;
  max-width: 420px;
}
.prod-search-field{
  background-position: 4px 10px;
  background-repeat: no-repeat;
  background-size: 24px 24px;
  border: 1px solid #dedede;
  border-radius: 0;
  border-bottom-left-radius: 3px;
  border-top-left-radius: 3px;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, .12);
  box-sizing: border-box;
  font-size: 1.2em;
  height: 44px;
  margin: 0;
  padding: 0 8px;
}
.custom-found-display{
  padding: 12px 0;
  margin-bottom: 15px;
  font-size: 1.2em;
  line-height: 1.2;
}
.search-result-item{
  box-shadow: -1px 1px 6px rgba(0, 0, 0, .12);
  margin: 4px 0 24px;
  width: 100%;
  padding-bottom: 0;
  gap: 0;
}
.search-result-item .search-result-image{
  max-width: 33%;
  min-height: 100%;
  min-width: 250px;
  overflow: hidden;
  position: relative;
  text-align: center;
  width: 250px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.search-result-item .search-result-content{
  gap: 0;
} 
.search-result-details{
  margin-left: 16px;
  max-width: 100%;
  overflow: hidden;
  padding:8px 0 12px 0;
  width: 100%;
}
.search-result-heading .highlight,
.search-result-heading{
  line-height: 1.41 !important;
  margin-bottom: 4px;
  padding: 8px 0 0;
  font-weight: 400 !important;
  font-size: 1.2em;
}
.search-result-heading a,
.search-result-heading a .highlight{
  font-size: 19.2px;
}

.search-text-content{
  margin: 12px 0 !important;
  padding-right: 16px !important;
  word-break: break-word;
  color: #4a4f62 !important;
}
.search-text-content .highlight{
  font-weight: 700;
  color: #4a4f62 !important;
  font-size: 14px !important;
}
.showing-search-result{
  padding-left:4px ;
  padding-right: 4px;
  margin: 0 0 16px 0;
}
#see-more-btn{
  border-color: #3d8fff;
  color: #3d8fff;
  background: none;
  border: 2px solid;
  border-radius: 3px;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, .12);
  box-sizing: border-box;
  cursor: pointer;
  display: block;
  font-size: 1.2em;
  font-weight: 400;
  margin-bottom: 24px;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  min-width: 180px;
  padding: 8px 32px;
  text-align: center;
  transition: background-color .3s ease-in-out, color .3s ease-in-out;
  width: auto;
}

@media screen and (max-width:767px) {
  .search-result-content {
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  .search-result-item .search-result-image {
    min-height: inherit;
  }
  #search-popup {
    width: 100%;
    height: 100%;
    border-radius: 0;
    max-height: 100%;
  }
  .custom-search-display{
    max-width: calc(100% - 50px);
  }
  .recent_search_item{
    padding: 16px;
  }
  .recent_search_container{
    width: 92%;
  }
  .search_hover .dropdown-menu.search-form-wrap{
    width: 100%;
  }
}