/* search.css - the Search page */

.srch { max-width: 1100px; margin: 0 auto; padding: 0 9px; }

.srch__bar { position: sticky; top: var(--header-h); z-index: 5; margin: 0 -9px; padding: 8px 9px 10px; background: var(--cream); }
.srch__form {
  display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 8px 0 14px;
  border: 1.5px solid #e7dfd0; border-radius: 14px; background: #fff;
}
.srch__form:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(242, 106, 0, 0.15); }
.srch__form svg { width: 22px; height: 22px; flex: none; color: var(--orange); }
.srch__input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: #111; }
.srch__input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.srch__input::placeholder { color: #8a8378; }
.srch__clear { flex: none; width: 36px; height: 36px; border-radius: 50%; background: #f3eee4; color: #333; font-size: 22px; line-height: 1; }
.srch__clear[hidden] { display: none; }
.srch__clear:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.srch__status { min-height: 22px; margin: 6px 3px 10px; font-size: 14px; color: var(--grey); overflow-wrap: anywhere; }
.srch__status b { color: #111; font-weight: 600; }

.srch__block { margin: 0 0 22px; }
.srch__block[hidden] { display: none; }
.srch__head { display: flex; align-items: center; justify-content: space-between; margin: 0 3px 10px; }
.srch__head h2 { margin: 0; font-size: 15px; font-weight: 600; color: #111; }
.srch__link { font-size: 13px; font-weight: 600; color: var(--orange); }
.srch__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.srch__chip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; height: 40px; padding: 0 14px;
  border: 1.5px solid #f0e9dc; border-radius: 999px; background: #fff; color: #333;
  font-size: 14px; font-weight: 500; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.srch__chip svg { width: 20px; height: 20px; flex: none; color: var(--orange); }
.srch__chip:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

#searchPage .products__grid { margin-top: 4px; }
.search.is-active { color: #b34d00; }

html[data-theme="dark"] .srch__bar { background: #161514; }
html[data-theme="dark"] .srch__form { background: #262422; border-color: #3a3836; }
html[data-theme="dark"] .srch__input { color: #f5f5f5; }
html[data-theme="dark"] .srch__clear { background: #3a3836; color: #f5f5f5; }
html[data-theme="dark"] .srch__status b, html[data-theme="dark"] .srch__head h2 { color: #f5f5f5; }
html[data-theme="dark"] .srch__chip { background: #262422; border-color: #3a3836; color: #f5f5f5; }

@media (min-width: 900px) {
  .srch { padding: 0; }
  .srch__bar { margin: 0; padding: 4px 0 14px; top: calc(var(--header-h) + 8px); }
  .srch__form { height: 58px; max-width: 760px; margin: 0 auto; }
  .srch__status { max-width: 760px; margin-inline: auto; }
  .srch__idle { max-width: 760px; margin: 0 auto; }
  .srch__chip:hover { border-color: var(--orange); }
  #searchPage .products__grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1200px) {
  #searchPage .products__grid { grid-template-columns: repeat(5, 1fr); }
}
