.search-popup {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%);
  transition:
    opacity 0.3s ease-in-out,
    visibility 0.3s ease-in-out;
}

.search-popup.is-open {
  opacity: 1;
  visibility: visible;
}

.search-wrapper {
  width: 500px;
  min-height: 174px;
  max-height: 220px;
  margin: 0 auto;
  border-radius: 0 0 12px 12px;
  background-color: var(--content);
  box-shadow: var(--shadow-soft);
  transform: translateY(-10px);
  transition: transform 0.3s ease-in-out;
  overflow: hidden;
}

.search-popup.is-open .search-wrapper {
  transform: translateY(0);
}

.search-content {
  min-height: 174px;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: auto !important;
  scrollbar-color: auto !important;
}

.search-content::-webkit-scrollbar {
  width: 12px;
}

.search-content::-webkit-scrollbar-track {
  background: var(--gray-light);
}

.search-content::-webkit-scrollbar-thumb {
  background: #c8cfdc;
  border-radius: 6px;
  border: 3px solid var(--gray-light);
  background-clip: padding-box;
}

.search-content::-webkit-scrollbar-button {
  display: none;
  height: 0;
  width: 0;
  background: transparent;
  opacity: 0;
}

.search-content::-webkit-scrollbar-button:start:decrement,
.search-content::-webkit-scrollbar-button:end:increment {
  display: none;
  height: 0;
  width: 0;
}

.search-list {
  list-style: none;
  margin: 0;
  padding: 0;
  padding-right: 4px;
  padding-left: 16px;
}

.search-item:not(:last-child) {
  margin-bottom: 10px;
  border-bottom: 1px solid var(--gray-light);
}

.search-item-link {
  display: flex;
  align-items: center;
  padding: 12px;
  text-decoration: none;
}

.search-item-image {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  margin-right: 12px;
  border-radius: 11px;
  overflow: hidden;
}

.search-item-image img {
  max-width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-item-title {
  display: flex;
  flex-direction: column;
  row-gap: 5px;
}

.search-item-title strong {
  font-size: 15px;
  font-weight: 700;
  line-height: 100%;
  letter-spacing: -0.5px;
  color: var(--text-dark);
  white-space: nowrap;
  transition: color 0.3s ease-in-out;
}

.search-item-link:hover .search-item-title strong {
  color: var(--blue);
}

.search-item-title span {
  font-size: 14px;
  font-weight: 600;
  line-height: 10px;
  letter-spacing: -0.5px;
  color: var(--gray);
  white-space: nowrap;
}

.search-item-price {
  margin-left: auto;
  font-size: 18px;
  font-weight: 700;
  line-height: 100%;
  letter-spacing: -0.5px;
  color: var(--text-dark);
  white-space: nowrap;
}

.search-empty {
  padding-top: 50px;
  font-size: 14px;
  font-weight: 600;
  line-height: 100%;
  letter-spacing: -0.5px;
  color: var(--gray);
  text-align: center;
}

@media (max-width: 767px) {
  .search-popup {
    top: 100%;
    left: var(--mobile-gutter);
    width: calc(100% - var(--mobile-gutter) * 2);
    transform: unset;
  }

  .search-wrapper {
    width: 100%;
    min-height: 250px;
    max-height: 250px;
    box-shadow: unset;
  }

  .search-content {
    min-height: 250px;
    max-height: 250px;
  }

  .search-list {
    padding-right: 6px;
    padding-left: 0;
  }

  .search-item:not(:last-child) {
    margin-bottom: 0;
  }

  .search-item-link {
    padding: 6px 16px 6px 6px;
  }

  .search-item-image {
    width: 42px;
    height: 42px;
    margin-right: 8px;
    border-radius: 10px;
  }

  .search-item-title {
    row-gap: 2px;
  }

  .search-item-title strong {
    font-size: 16px;
    line-height: 21px;
  }

  .search-item-title span {
    line-height: 100%;
  }

  .search-item-price {
    font-size: 16px;
    line-height: 21px;
  }

  .search-empty {
    padding-top: 55px;
    font-size: 12px;
    letter-spacing: -3%;
  }
}

@media (max-width: 525px) {
  .search-wrapper {
    min-height: 142px;
    max-height: 142px;
  }

  .search-content {
    min-height: 142px;
    max-height: 142px;
  }
}
