.ae_search_wrap {
  position: relative;
  z-index: 1000;
}

.ae_megaautocomplete {
  background: #171717;
  border: 1px solid #2f2f2f;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  padding: 12px;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: min(1180px, calc(100vw - 20px));
  max-height: calc(100vh - 58px);
  z-index: 999999;
  overflow: hidden;
  color: #f2f2f2;
}

.ae_megaautocomplete.is-loading {
  pointer-events: none;
}

.ae_megaautocomplete.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 12, 0.68);
  z-index: 5;
}

.ae_megaautocomplete.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  margin-left: -17px;
  margin-top: -17px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: rsel-spin 0.8s linear infinite;
  z-index: 6;
}

@keyframes rsel-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ae_megaautocomplete a {
  color: #f2f2f2;
  text-decoration: none;
}

#ae_c {
  width: 100%;
  float: none;
  padding: 0;
  margin: 0 0 10px 0;
}

.ae_category,
#ae_manufacturer {
  color: #cfcfcf;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 4px 0;
}

#ae_categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 90px;
  overflow-y: auto;
}

.ae_autocomplete_category {
  float: none;
  width: auto;
  margin: 0;
  padding: 6px 10px;
  background: #222;
  border: 1px solid #333;
  border-radius: 4px;
}

#ae_m,
#ae_p {
  min-height: 220px;
  max-height: none;
  overflow-y: visible;
}

.ae_grid_1-4 {
  width: 22%;
  float: left;
  padding: 6px 8px 6px 8px;
  background: #1c1c1c;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  margin-top: 0;
}

.ae_grid_3-4 {
  width: 76%;
  float: right;
}

#ae_links a {
  display: block;
  padding: 2px 0;
  line-height: 1.15;
  font-size: 12px;
  border-bottom: 1px dashed #2d2d2d;
}

#ae_links {
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding-right: 4px;
}

.ae_product_autocomplete {
  min-height: 108px;
  width: calc(50% - 8px);
  float: left;
  background: #1f1f1f;
  border: 1px solid #2d2d2d;
  border-radius: 6px;
  padding: 8px;
  margin: 4px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.ae_product_autocomplete:hover {
  border-color: #505050;
}

.product_img {
  width: 86px;
  float: left;
}

.product_img img {
  width: 100%;
  max-width: 86px;
  height: auto;
  border-radius: 4px;
  background: #111;
}

.product_name {
  margin-left: 96px;
  line-height: 1.35;
  min-height: 88px;
  position: relative;
  font-size: 13px;
}

.product_avail {
  position: absolute;
  left: 0;
  bottom: 0;
  font-size: 11px;
  color: #bdbdbd;
}

.ac-form {
  float: left;
  color: #bfc1c1;
  background-color: #5c6060;
  border-radius: 5px;
  padding: 0 0 0 10px;
  margin: 6px 0 0 0;
  width: 440px;
}

.ssa-search-query-input {
  float: left;
  width: calc(100% - 50px);
  font-size: 15px;
  height: 45px;
  line-height: 45px;
  border: 0;
  color: #fff;
  background: none;
}

.ac-form .ae_icon {
  float: left;
  color: #fff;
  cursor: pointer;
  border: 0;
  margin: 0;
  padding: 8px 10px;
  height: 45px;
  width: 50px;
  background: none;
}

@media (max-width: 980px) {
  .ae_grid_1-4,
  .ae_grid_3-4 {
    width: 100%;
    float: none;
  }

  #ae_m {
    margin-bottom: 10px;
  }

  .ae_product_autocomplete {
    width: 100%;
    margin: 0 0 8px 0;
  }
}
