/* A compact Home search with results layered above the vehicle rows. */
.home-search {
  position: relative;
  z-index: 5;
  padding-top: 14px;
  padding-bottom: 2px;
}
.home-search-shell {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
}
.home-search-form {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 1px 3px 1px 13px;
  border: 1px solid #bfd2c5;
  border-radius: 14px;
  background: #ffffffed;
  color: #22392b;
  box-shadow: 0 3px 14px #163a2308, inset 0 1px 0 #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.home-search-form:focus-within {
  border-color: #579f78;
  box-shadow: 0 0 0 3px #83edbf2e, 0 4px 18px #163a230d;
}
.home-search-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-right: 4px;
  color: #51896b;
}
.home-search-symbol svg { width: 18px; height: 18px; }
#home-vehicle-search {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 0 3px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: #23372b;
  font-size: 16px;
  line-height: 1.3;
  appearance: none;
}
#home-vehicle-search::placeholder { color: #66796c; opacity: 1; }
#home-vehicle-search::-webkit-search-cancel-button { display: none; }
.home-search-form > button,
.home-search-results-head > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  min-width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
}
#home-search-clear { background: transparent; color: #62776a; }
#home-search-clear:hover { background: #eaf3ed; color: #244b34; }
.home-search-form .home-search-submit { border: 1px solid #30684c; background: #1c5239; color: #d7ffe8; }
.home-search-form .home-search-submit:hover { border-color: #3a825b; background: #266c4a; }
.home-search-form > button svg { width: 18px; height: 18px; }
.home-search-hint {
  margin: 5px 0 0;
  color: var(--theme-muted, #676f66);
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}
.home-search-results {
  position: absolute;
  z-index: 6;
  top: calc(100% + 7px);
  left: 50%;
  display: flex;
  flex-direction: column;
  width: min(600px, calc(100vw - 36px));
  max-height: min(560px, 75dvh);
  overflow: hidden;
  border: 1px solid var(--theme-border, #dce1d8);
  border-radius: 14px;
  background: var(--theme-surface, #fff);
  color: var(--theme-text, #191a18);
  box-shadow: 0 16px 50px #0c251b29, 0 3px 12px #0c251b0d;
  transform: translateX(-50%);
}
#home-search-clear[hidden],
#home-search-results[hidden],
#home-search-more[hidden] { display: none; }
.home-search-results-head {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 3px 7px 3px 14px;
  border-bottom: 1px solid var(--theme-border, #dce1d8);
}
#home-search-status { min-width: 0; font-size: 13px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
#home-search-close { background: transparent; color: var(--theme-muted, #676f66); }
#home-search-close:hover { background: var(--theme-raised, #f5f6f3); color: var(--theme-text, #191a18); }
#home-search-close svg { width: 18px; height: 18px; }
.home-search-results-note {
  flex: none;
  margin: 0;
  padding: 8px 14px;
  color: var(--theme-muted, #676f66);
  font-size: 11px;
  line-height: 1.45;
}
.home-search-results-note:empty { display: none; }
.home-search-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(420px, 52dvh);
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
  overscroll-behavior: contain;
  scroll-padding-block: 8px;
  scrollbar-width: thin;
  scrollbar-color: #a3b7aa transparent;
}
.home-search-list > li { min-width: 0; margin: 0; padding: 0; }
.home-search-result {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-width: 0;
  min-height: 72px;
  margin: 0;
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid var(--theme-border, #dce1d8);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.home-search-list > li:first-child .home-search-result { border-top: 0; }
.home-search-result:hover,
.home-search-result[aria-selected="true"] { background: #eff7f1; }
.home-search-result img {
  width: 70px;
  height: 50px;
  border: 1px solid #dce5dd;
  border-radius: 6px;
  background: #eef2ed;
  object-fit: contain;
  object-position: center;
}
.home-search-result-copy { display: block; min-width: 0; }
.home-search-result-copy > strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}
.home-search-result-copy > small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--theme-muted, #676f66);
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.home-search-result-price {
  max-width: 115px;
  color: #1b704b;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.25px;
  text-align: right;
  overflow-wrap: anywhere;
}
#home-search-more {
  flex: none;
  min-height: 44px;
  margin: 8px 12px 10px;
  padding: 9px 12px;
  border: 1px solid #c4dccb;
  border-radius: 8px;
  background: #eef6f0;
  color: #235d3b;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  cursor: pointer;
}
#home-search-more:hover { border-color: #97bea5; background: #e0f0e5; }
.home-search button:focus-visible { outline: 3px solid #39835b; outline-offset: -3px; }
html[data-theme="dark"] .home-search-form { border-color: #476656; background: #202b26ed; color: #d6eee0; box-shadow: 0 3px 14px #0002, inset 0 1px 0 #d6ffe10a; }
html[data-theme="dark"] .home-search-form:focus-within { border-color: #83edbf; box-shadow: 0 0 0 3px #83edbf24; }
html[data-theme="dark"] .home-search-symbol { color: #93c9a8; }
html[data-theme="dark"] #home-vehicle-search { color: #edf7f1; }
html[data-theme="dark"] #home-vehicle-search::placeholder { color: #b1c7ba; }
html[data-theme="dark"] #home-search-clear { color: #b8ccbf; }
html[data-theme="dark"] #home-search-clear:hover { background: #354a3c; color: #e7faed; }
html[data-theme="dark"] .home-search-results { border-color: #41594b; box-shadow: 0 16px 50px #0006; }
html[data-theme="dark"] .home-search-result:hover,
html[data-theme="dark"] .home-search-result[aria-selected="true"] { background: #293e32; }
html[data-theme="dark"] .home-search-result img { border-color: #46594b; background: #17241c; }
html[data-theme="dark"] .home-search-result-price { color: #83edbf; }
html[data-theme="dark"] #home-search-more { border-color: #476b54; background: #293e31; color: #c3f0d0; }
html[data-theme="dark"] #home-search-more:hover { border-color: #71ae87; background: #36513f; }
html[data-theme="dark"] .home-search button:focus-visible { outline-color: #83edbf; }
@media (max-width: 600px) {
  .home-search.wrap { width: calc(100% - 36px); padding-top: 12px; }
  .home-search-form { padding-left: 10px; }
  .home-search-results { width: 100%; max-height: 72dvh; }
  .home-search-result { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 8px; min-height: 68px; padding: 9px 10px; }
  .home-search-result img { width: 56px; height: 44px; }
  .home-search-result-copy > strong { font-size: 12px; }
  .home-search-result-copy > small { font-size: 10px; }
  .home-search-result-price { max-width: 86px; font-size: 13px; }
  .home-search-results-head { padding-left: 11px; }
  .home-search-results-note { padding-inline: 11px; }
}
@media (max-width: 380px) {
  .home-search-symbol { margin-right: 1px; }
  .home-search-form { gap: 2px; }
  .home-search-hint { font-size: 9px; }
  .home-search-result-price { max-width: 72px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-search-form { transition: none; }
}
