/* 全站实时搜索样式 */
.search-box {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

.search-input {
  width: 160px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid #d9d9d9;
  border-radius: 100px;
  font-size: 14px;
  color: #333;
  background: #fff;
  outline: none;
  transition: border-color .2s, width .2s;
}

.search-input:focus {
  border-color: #4caf50;
  width: 180px;
}

.search-dropdown {
  position: absolute;
  top: 42px;
  right: 0;
  width: 280px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .14);
  display: none;
  z-index: 999;
  max-height: 340px;
  overflow-y: auto;
  text-align: left;
}

.search-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #f2f2f2;
  cursor: pointer;
  text-decoration: none;
  color: #333;
}

.search-item:hover {
  background: #f6f6f6;
}

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

.search-cat {
  flex-shrink: 0;
  font-size: 12px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 3px;
  margin-right: 10px;
}

.cat-prod { background: #e8f5e9; color: #2e7d32; }
.cat-news { background: #e3f2fd; color: #1565c0; }
.cat-case { background: #fff3e0; color: #ef6c00; }
.cat-page { background: #f3e5f5; color: #6a1b9a; }

.search-title {
  flex: 1;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-empty {
  padding: 18px;
  text-align: center;
  color: #999;
  font-size: 13px;
}

/* 移动端搜索框适配 */
.mb_nav .search-box {
  width: 100%;
  padding: 8px 12px;
}

.mb_nav .search-input {
  width: 100%;
  box-sizing: border-box;
}

.mb_nav .search-dropdown {
  width: 100%;
  left: 0;
  right: auto;
  position: relative;
  top: 4px;
}
