.search-wrap {
  padding-top: 30px;
  padding-bottom: 60px;
  max-width: 720px;
}

/* Duplicated per this codebase's page-scoped CSS convention -- search.html
   doesn't load listing.css/seller.css/account.css, so shared small pieces
   get copied rather than pulling in a whole unrelated stylesheet. */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--body);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 13px;
  text-decoration: none;
  color: var(--ink);
  margin-bottom: 24px;
}
.back-link:hover { color: var(--red); }

.search-bar-wrap { position: relative; margin-bottom: 32px; }
.search-page-bar { margin-top: 0; margin-bottom: 0; }

/* ---------- Autocomplete suggestions ---------- */
.search-suggestions-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  box-shadow: 0 10px 24px -14px rgba(18, 18, 18, 0.35);
  padding: 6px;
  z-index: 20;
  overflow: hidden;
}
.search-suggestion-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  padding: 10px 8px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  color: var(--ink-soft);
}
.search-suggestion-row:hover { background: var(--paper-dim); }
.search-suggestion-row .search-icon { flex-shrink: 0; }
.search-suggestion-title {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--body);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-suggestion-count {
  flex-shrink: 0;
  font-family: var(--body);
  font-weight: 600;
  font-size: 12px;
  color: var(--ink-soft);
}

.field-hint {
  display: block;
  font-weight: 500;
  text-transform: none;
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 16px;
  color: var(--ink-soft);
}

.search-empty {
  font-family: var(--body);
  font-size: 14px;
  color: var(--ink-soft);
  padding: 20px 0;
}

.search-section-title {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 18px;
  letter-spacing: 0.3px;
  margin: 0 0 14px;
}

/* ---------- Recent search rows ---------- */
.search-history-list {
  display: flex;
  flex-direction: column;
}
.search-history-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 4px;
  border-bottom: 1.5px solid var(--hairline);
}
.search-history-query {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.search-history-pin-icon { flex-shrink: 0; font-size: 13px; }
.search-history-text {
  font-family: var(--body);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-history-age {
  font-family: var(--body);
  font-weight: 600;
  font-size: 12px;
  color: var(--ink-soft);
  flex-shrink: 0;
}

/* Duplicated from account.css (see .back-link note above). */
.row-menu { position: relative; margin-left: auto; flex-shrink: 0; }
.row-menu-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  border-radius: 8px;
  cursor: pointer;
}
.row-menu-btn:hover, .row-menu-btn[aria-expanded="true"] { background: var(--paper-dim); color: var(--ink); }
.row-menu-dropdown {
  position: absolute;
  top: 36px;
  right: 0;
  min-width: 160px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 20;
}
.menu-item {
  font-family: var(--body);
  font-weight: 700;
  font-size: 13px;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--ink);
  padding: 9px 10px;
  cursor: pointer;
  border-radius: 6px;
}
.menu-item:hover { background: var(--paper-dim); }
.menu-item-danger { color: var(--red); }
.menu-item-danger:hover { background: var(--red); color: #fff; }

/* ---------- Live results grid ---------- */
/* Duplicated from seller.css (see .back-link note above). */
.search-results-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin: 0;
}
.card {
  display: block;
  text-decoration: none;
  color: inherit;
}
.card-img-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper-dim);
  border: 1.5px solid var(--hairline);
  margin-bottom: 8px;
  transition: transform 0.12s ease;
}
.card:hover .card-img-wrap { transform: translateY(-2px); }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card h3 {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: -0.2px;
  line-height: 1.2;
  margin: 0;
}
