/* 产品搜索框容器样式 */
.explore-by-products-content {
  position: relative;
}

/* 产品搜索框样式 */
.selector-top-search-input {
  display: flex;
  align-items: center;
  width: 400px;
  height: 48px;
  border-radius: 24px;
  padding-right: 18px;
  padding-left: 18px;
  gap: 12px;
  background-color: #f5f5f5;
  transition: all 0.3s ease;
  opacity: 1;
  position: absolute;
  right: 0;
  top: -18px;
  /* 与"Select a product category"文本底部对齐 */
}

.selector-top-search-input:hover {
  background-color: #ebebeb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.selector-top-search-input:focus-within {
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.selector-top-search-input svg {
  opacity: 0.7;
  flex-shrink: 0;
}

.product-search-input {
  border: none;
  background: transparent;
  outline: none;
  flex: 1;
  font-family: Noto Sans;
  font-weight: 400;
  font-style: Regular;
  font-size: 16px;
  line-height: 100%;
  letter-spacing: 0%;
  color: #333;
  height: 100%;
}

.product-search-input::placeholder {
  color: #999;
}

/* 搜索结果下拉框样式 */
.product-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 557px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
  /* 防止x轴滚动条 */
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  margin-top: 8px;
  /* 添加一些间距 */
  text-align: left;
}

.product-search-dropdown.show {
  display: block;
  opacity: 1;
}

.product-search-item {
  width: 100%;
  height: 84px;
  padding: 8px 12px;
  gap: 12px;
  opacity: 1;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.product-search-item-image {
  width: 60px;
  height: 60px;
  opacity: 1;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.product-search-item-content {
  width: 362px;
  height: auto;
  gap: 4px;
  opacity: 1;
  transform: rotate(0deg);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  /* 确保内容不会溢出 */
}

.product-search-item:hover {
  background-color: #F7F9FA;
}

.product-search-item:last-child {
  border-bottom: none;
}

.product-search-item-title {
  font-family: Noto Sans;
  font-weight: 500;
  font-size: 16px;
  color: #333;
  margin-bottom: 2px;
}

.product-search-item-description {
  position: relative;
  display: block;
  max-width: 100%;
}

.product-search-item-description-trigger {
  display: block;
  width: 100%;
  max-width: 100%;
}

.product-search-item-description-text {
  font-family: Noto Sans;
  font-weight: 400;
  font-style: Regular;
  font-size: 14px;
  line-height: 150%;
  letter-spacing: 0%;
  color: var(----9B9FA8, #9B9FA8);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  max-width: 100%;
}

.custom-tooltip {
  --tooltip-arrow-left: 50%;
  position: fixed;
  top: 0;
  left: 0;
  max-width: min(320px, calc(100vw - 16px));
  background-color: #303133;
  color: #fff;
  font-size: 12px;
  border-radius: 6px;
  padding: 8px 12px;
  line-height: 1.5;
  pointer-events: none;
  z-index: 2147483647;
  visibility: hidden;
  opacity: 0;
  word-break: break-word;
}

.custom-tooltip.is-visible {
  visibility: visible;
  opacity: 1;
}

.custom-tooltip::before {
  content: '';
  position: absolute;
  left: var(--tooltip-arrow-left);
  width: 0;
  height: 0;
  margin-left: -6px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
}

.custom-tooltip[data-placement="bottom"]::before {
  top: -6px;
  border-bottom: 6px solid #303133;
}

.custom-tooltip[data-placement="top"]::before {
  bottom: -6px;
  border-top: 6px solid #303133;
}

.product-search-no-results {
  padding: 20px;
  text-align: center;
  color: #999;
  font-family: Noto Sans;
  font-size: 14px;
}

.product-search-no-results .error-message {
  font-family: Noto Sans;
  font-weight: 700;
  font-style: Bold;
  font-size: 18px;
  line-height: 150%;
  letter-spacing: 0%;
  text-align: left;
  color: #2A2B2E;
  margin-top: 15px;
}

.support-search-dropdown .product-search-no-results {
  height: 80px;
  text-align: left;
}

.product-search-title {
  width: 100%;
  height: auto;
  padding-top: 24px;
  padding-right: 12px;
  padding-bottom: 8px;
  padding-left: 12px;
  gap: 10px;
  transform: rotate(0deg);
  opacity: 1;
  font-family: Noto Sans;
  font-weight: 700;
  font-style: Bold;
  font-size: 14px;
  line-height: 150%;
  letter-spacing: 0%;
  text-align: left;
  color: var(----9B9FA8, #9B9FA8);
  box-sizing: border-box;
}

.highlight {
  color: #0055CD;
}

/* Support搜索下拉框样式 */
.support-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 557px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 999999;
  overflow-y: auto;
  overflow-x: hidden;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  margin-top: 8px;
  text-align: left;
}

/* 移动端样式 */
@media (max-width: 768px) {
  .selector-top-search-input {
    width: 100%;
    position: relative;
    right: auto;
    top: auto;
    margin: 40px 0;
    height: 48px;
  }

  .product-search-input {
    font-family: Noto Sans;
    font-weight: 400;
    font-style: Regular;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0%;
    height: 48px;
  }

  .product-search-dropdown {
    width: 100%;
  }

  .product-search-item {
    width: 100%;
  }

  .product-search-item-content {
    width: calc(100% - 72px);
  }

  .support-search-dropdown {
    width: 100% !important;
    top: 100%;
    text-align: left;
  }

  .product-search-no-results .error-message{
    margin-top: 0;
  }
}

/* Support搜索下拉框show状态 */
.support-search-dropdown.show {
  display: block;
  opacity: 1;
}
