.meili-search-wrapper {
  position: relative;
}

.meili-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 0;
  display: none;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 5px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  overflow: hidden;
}

.meili-search-results.is-visible {
  display: block;
}

.meili-ac {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  column-gap: 28px;
  row-gap: 14px;
  padding: 14px 22px 12px;
}

.meili-ac--products-only {
  grid-template-columns: minmax(0, 1fr);
}

.meili-ac--products-only .meili-ac__side,
.meili-ac--products-only .meili-ac__chips {
  display: none;
}

.meili-ac__chips {
  grid-column: 1 / -1;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.meili-ac__chip {
  min-width: 34px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid #f02b3f;
  border-radius: 4px;
  background: #fff;
  color: #222;
  font-size: 12px;
  line-height: 28px;
  text-align: center;
  cursor: pointer;
}

.meili-ac__title {
  margin: 0 0 9px;
  color: #555;
  font-size: 12px;
  font-weight: 700;
}

.meili-ac__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meili-ac__suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #333;
  font: inherit;
  font-size: 13px;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.meili-ac__suggestion:hover {
  color: #e60028;
  text-decoration: none;
}

.meili-ac__suggestion:before {
  content: "";
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  background: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m16.5 16.5 4 4'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.meili-ac__suggestion--category:before {
  background-image: url("data:image/svg+xml,%3Csvg width='13' height='13' viewBox='0 0 13 13' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='1.25' y='1.25' width='3' height='3' stroke='%23b5b5b5' stroke-width='1'/%3E%3Crect x='1.25' y='5.25' width='3' height='3' stroke='%23b5b5b5' stroke-width='1'/%3E%3Crect x='1.25' y='9.25' width='3' height='3' stroke='%23b5b5b5' stroke-width='1'/%3E%3Crect x='5.25' y='1.25' width='3' height='3' stroke='%23b5b5b5' stroke-width='1'/%3E%3Crect x='5.25' y='5.25' width='3' height='3' stroke='%23b5b5b5' stroke-width='1'/%3E%3Crect x='5.25' y='9.25' width='3' height='3' stroke='%23b5b5b5' stroke-width='1'/%3E%3C/svg%3E");
}

.meili-ac__products {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.meili-ac__product {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 14px;
  min-height: 85px;
  color: #222;
  text-align: left !important;
  text-decoration: none !important;
}

.meili-ac__image {
  width: 85px;
  height: 85px;
  flex: 0 0 85px;
  display: block;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.meili-ac__body {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left !important;
}

.meili-ac__name {
  display: block;
  color: #222;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left !important;
}

.meili-ac__meta {
  display: flex;
  align-items: center;
  justify-content: flex-start !important;
  gap: 8px;
  margin-top: 6px;
  text-align: left !important;
}

.meili-ac__price {
  color: #222;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.meili-ac__all {
  grid-column: 1 / -1;
  justify-self: center;
  min-width: 204px;
  min-height: 40px;
  padding: 0 22px;
  border: 1px solid #f02b3f;
  border-radius: 5px;
  background: #fff;
  color: #222;
  font-weight: 700;
  cursor: pointer;
}

#headerfixed .meili-search-results {
  left: 50%;
  right: auto;
  z-index: 1200;
  width: min(560px, calc(100vw - 24px));
  transform: translateX(-50%);
}

#headerfixed .meili-ac {
  grid-template-columns: 180px minmax(0, 1fr);
  column-gap: 22px;
  max-height: calc(100vh - 88px);
  padding: 12px 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#headerfixed .meili-ac__chips {
  gap: 6px;
}

#headerfixed .meili-ac__chip {
  height: 28px;
  padding: 0 10px;
  line-height: 26px;
}

#headerfixed .meili-ac__list {
  gap: 7px;
}

#headerfixed .meili-ac__product {
  min-height: 72px;
  gap: 12px;
}

#headerfixed .meili-ac__image {
  width: 68px;
  height: 68px;
  flex-basis: 68px;
}

#headerfixed .meili-ac__price {
  font-size: 17px;
}

@media (max-width: 767px) {
  .meili-search-results {
    border-radius: 5px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
  }

  .meili-ac {
    grid-template-columns: 1fr;
    gap: 12px;
    max-height: calc(100vh - 88px);
    padding: 12px 14px 14px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .meili-ac__chips {
    order: 1;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0 -2px;
    padding: 0 2px 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .meili-ac__chip {
    flex: 0 0 auto;
    min-width: 0;
    height: 32px;
    padding: 0 13px;
    font-size: 12px;
    line-height: 30px;
  }

  .meili-ac__products-col {
    order: 2;
  }

  .meili-ac__products-col .meili-ac__title {
    display: none;
  }

  .meili-ac__products {
    gap: 0;
  }

  .meili-ac__product {
    min-height: 92px;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
  }

  .meili-ac__product:last-child {
    border-bottom: 0;
  }

  .meili-ac__image {
    width: 76px;
    height: 76px;
    flex-basis: 76px;
  }

  .meili-ac__name {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.3;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .meili-ac__price {
    font-size: 16px;
  }

  .meili-ac__side {
    order: 4;
    padding-top: 2px;
  }

  .meili-ac__all {
    order: 3;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    margin-top: 2px;
  }
}
