/* 木屿 H5 · 搜索页样式（自 search.wxss rpx→rem，1rem = 100rpx） */

.search-wrap {
  min-height: 100vh;
  background: #f7f3ea;
}

/* ---------- 顶部搜索栏 ---------- */
.search-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: 0.08rem;
  background: rgba(247, 243, 234, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.search-nav {
  display: flex;
  align-items: center;
  padding-left: 0.24rem;
  padding-right: 0.24rem;
}

/* 复用 nav 生成的返回按钮，压缩为行内图标 */
.search-nav .nav-shell {
  position: static;
  flex: none;
  width: auto;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.search-nav .nav-inner {
  min-height: 0 !important;
  padding: 0 !important;
  width: auto;
}
.search-nav .nav-left {
  min-width: 0;
}
.search-nav .back-btn {
  width: 0.58rem;
  height: 0.58rem;
  margin-right: 0.18rem;
  border: 0.01rem solid rgba(36, 38, 31, 0.09);
  border-radius: 50%;
  background: rgba(255, 252, 246, 0.78);
}
.back-btn--hover {
  opacity: 0.68;
}

.search-box {
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
  height: 0.68rem;
  padding: 0 0.2rem;
  border: 0.01rem solid rgba(36, 38, 31, 0.09);
  border-radius: 999rem;
  background: rgba(255, 252, 246, 0.9);
}
.search-icon {
  width: 0.28rem;
  height: 0.28rem;
  color: #7f796c;
  flex: none;
}
.search-input {
  flex: 1;
  min-width: 0;
  height: 0.68rem;
  margin-left: 0.12rem;
  color: #2e3129;
  font-size: 0.23rem;
  line-height: 0.68rem;
}
.search-input::placeholder {
  color: #aaa397;
  font-size: 0.22rem;
  letter-spacing: 0.005rem;
}
.search-input::-webkit-search-cancel-button {
  display: none;
}
.clear-btn {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 0.36rem;
  height: 0.36rem;
  border-radius: 50%;
  background: rgba(36, 38, 31, 0.08);
  color: #766f62;
}
.clear-btn.is-hidden {
  display: none;
}
.clear-btn .icon {
  width: 0.2rem;
  height: 0.2rem;
}

/* ---------- 页面主体 ---------- */
.search-page {
  padding: 0 0.24rem calc(0.7rem + env(safe-area-inset-bottom));
}
.search-initial {
  padding-top: 0.18rem;
}

.recent-section,
.hot-section,
.discover-section {
  margin-top: 0.28rem;
}
.block-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 0.06rem;
  margin-bottom: 0.2rem;
}
.block-title {
  display: block;
  margin-top: 0.06rem;
  color: #2d3028;
  font-size: 0.4rem;
  font-weight: 500;
  letter-spacing: 0.01rem;
  line-height: 1.25;
}

/* 最近搜索 */
.clear-history {
  display: flex;
  align-items: center;
  padding-bottom: 0.05rem;
  color: #a0998c;
  font-size: 0.18rem;
}
.clear-history .icon {
  width: 0.22rem;
  height: 0.22rem;
  margin-right: 0.05rem;
}
.history-chips {
  display: flex;
  flex-wrap: wrap;
}
.history-chip {
  display: flex;
  align-items: center;
  height: 0.62rem;
  margin: 0 0.12rem 0.12rem 0;
  padding: 0 0.24rem;
  border: 0.01rem solid rgba(36, 38, 31, 0.1);
  border-radius: 999rem;
  color: #625d51;
  font-size: 0.21rem;
  letter-spacing: 0.005rem;
}
.history-chip:active {
  background: #fffcf6;
}
.history-empty {
  color: #aaa294;
  font-size: 0.2rem;
}

/* 热门搜索 */
.hot-date {
  padding-bottom: 0.05rem;
  color: #b0a99c;
  font-size: 0.14rem;
  letter-spacing: 0.02rem;
}
.hot-card {
  padding: 0.02rem 0.22rem;
  border: 0.01rem solid rgba(36, 38, 31, 0.06);
  border-radius: 0.26rem;
  background: #fffcf6;
}
.hot-row {
  display: flex;
  align-items: center;
  height: 0.88rem;
  border-bottom: 0.01rem solid rgba(36, 38, 31, 0.07);
}
.hot-row:last-child {
  border-bottom: none;
}
.hot-row:active {
  opacity: 0.65;
}
.hot-rank {
  width: 0.52rem;
  color: #b7b0a3;
  font-size: 0.24rem;
  letter-spacing: 0.01rem;
}
.hot-rank--top {
  color: #b05f40;
}
.hot-word {
  flex: 1;
  color: #41443a;
  font-size: 0.23rem;
  letter-spacing: 0.005rem;
}
.hot-label {
  margin-right: 0.12rem;
  padding: 0.02rem 0.1rem;
  border-radius: 0.04rem;
  background: #f0e8d8;
  color: #9b7d4d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.13rem;
  letter-spacing: 0.01rem;
}
.hot-arrow {
  width: 0.23rem;
  height: 0.23rem;
  color: #b5aea1;
}

/* 今日灵感 */
.discover-note {
  padding-bottom: 0.05rem;
  color: #a59e90;
  font-size: 0.17rem;
}
.discover-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
.discover-card {
  width: calc(50% - 0.08rem);
  margin-bottom: 0.24rem;
}
.discover-media {
  position: relative;
  overflow: hidden;
  height: 2.5rem;
  border-radius: 0.22rem;
}
.discover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.discover-image.is-contain {
  object-fit: contain;
}
.discover-add {
  position: absolute;
  right: 0.13rem;
  bottom: 0.13rem;
  width: 0.44rem;
  height: 0.44rem;
}
.discover-add .icon {
  width: 0.2rem;
  height: 0.2rem;
}
.discover-name {
  display: block;
  overflow: hidden;
  margin-top: 0.11rem;
  color: #353830;
  font-size: 0.22rem;
  letter-spacing: 0.005rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.discover-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.03rem;
}
.discover-price {
  color: #30342b;
  font-size: 0.22rem;
}
.discover-tag {
  overflow: hidden;
  max-width: 1.4rem;
  color: #aaa295;
  font-size: 0.15rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 引言 */
.search-quote {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.34rem 0 0.08rem;
}
.quote-line {
  width: 0.42rem;
  height: 0.01rem;
  background: rgba(36, 38, 31, 0.13);
}
.quote-text {
  margin: 0 0.16rem;
  color: #a69d8e;
  font-size: 0.17rem;
  letter-spacing: 0.02rem;
}

/* ---------- 搜索结果 ---------- */
.results-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0.24rem 0.06rem 0.24rem;
}
.results-title {
  display: block;
  margin-top: 0.06rem;
  color: #2d3028;
  font-size: 0.4rem;
  font-weight: 500;
  letter-spacing: 0.01rem;
  line-height: 1.25;
}
.results-query {
  overflow: hidden;
  max-width: 2.6rem;
  padding-bottom: 0.08rem;
  color: #a0998c;
  font-size: 0.18rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.results-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
.result-card {
  width: calc(50% - 0.09rem);
  margin-bottom: 0.34rem;
}
.result-media {
  position: relative;
  overflow: hidden;
  height: 3.28rem;
  border-radius: 0.25rem;
}
.result-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.result-image.is-contain {
  object-fit: contain;
}
.result-badge {
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  height: 0.3rem;
  padding: 0 0.1rem;
  border-radius: 999rem;
  background: rgba(255, 252, 246, 0.9);
  color: #5f5a4e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.13rem;
  letter-spacing: 0.01rem;
  line-height: 0.3rem;
}
.result-add {
  position: absolute;
  right: 0.14rem;
  bottom: 0.14rem;
  width: 0.46rem;
  height: 0.46rem;
}
.result-add .icon {
  width: 0.21rem;
  height: 0.21rem;
}
.result-card .product-en {
  margin-top: 0.13rem;
}
.result-name {
  display: block;
  overflow: hidden;
  margin-top: 0.03rem;
  color: #30332b;
  font-size: 0.25rem;
  font-weight: 500;
  letter-spacing: 0.005rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.result-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 0.06rem;
}
.result-bottom .price {
  font-size: 0.28rem;
}
.result-tag {
  overflow: hidden;
  max-width: 1.4rem;
  color: #aaa295;
  font-size: 0.15rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ---------- 空结果 ---------- */
.no-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.1rem 0 0.8rem;
}
.no-result-orbit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border: 0.01rem solid rgba(36, 38, 31, 0.12);
  border-radius: 50%;
  color: #7d877a;
}
.no-result-orbit::after {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  bottom: 0.2rem;
  left: 0.2rem;
  border: 0.01rem dashed rgba(36, 38, 31, 0.1);
  border-radius: 50%;
  content: "";
}
.no-result-orbit .icon {
  width: 0.58rem;
  height: 0.58rem;
}
.no-result-title {
  margin-top: 0.3rem;
  color: #3b3e35;
  font-size: 0.36rem;
  letter-spacing: 0.01rem;
}
.no-result-desc {
  margin-top: 0.11rem;
  color: #a29b8e;
  font-size: 0.2rem;
}
.no-result-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 0.68rem;
  margin-top: 0.28rem;
  padding: 0 0.36rem;
  border-radius: 999rem;
  background: #20372c;
  color: #f8f3e9;
  font-size: 0.21rem;
  letter-spacing: 0.01rem;
}
