/* Header search shares the existing Silvina palette and typography. */
header.catalog-header {
  position: relative;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(240px, 440px) minmax(110px, 1fr);
  gap: 24px;
}
.catalog-header .site-brand { grid-column: 1; grid-row: 1; justify-self: start; }
.catalog-header .site-cart-link { grid-column: 3; grid-row: 1; justify-self: end; }
.site-search {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  margin: 0;
  color: var(--silvina-teal, #072c30);
  font: 400 16px/1.5 Manrope, Arial, sans-serif;
  letter-spacing: normal;
  text-transform: none;
}
.site-search [hidden] { display: none !important; }
.site-search__field {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding-inline: 16px 4px;
  border: 1px solid rgba(7, 44, 48, .22);
  border-radius: 999px;
  background: var(--silvina-paper, #fbf8f2);
}
.site-search__field:focus-within {
  outline: 2px solid var(--silvina-teal, #072c30);
  outline-offset: 3px;
}
.site-search__icon { flex: 0 0 19px; width: 19px; height: 19px; margin-right: 10px; }
.site-search input {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: normal;
  appearance: none;
}
.site-search input::placeholder { color: #586e6b; opacity: 1; }
.site-search input::-webkit-search-cancel-button { display: none; }
.site-search__clear {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.site-search__clear svg { width: 18px; height: 18px; }
.site-search__clear:hover { background: #e3e9e2; }
.site-search__clear:focus-visible { outline: 2px solid currentColor; outline-offset: -3px; }
.site-search__panel {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline: 0;
  overflow: auto;
  max-height: min(55svh, 470px);
  padding: 8px;
  border-radius: 20px;
  background: var(--silvina-paper, #fbf8f2);
  box-shadow: 0 12px 40px rgba(7, 44, 48, .18);
  overscroll-behavior: contain;
  text-align: left;
}
.site-search__list { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.site-search__list a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}
.site-search__list a:hover,
.site-search__list a[aria-selected="true"] { background: #e3e9e2; }
.site-search__list img { display: block; width: 44px; height: 44px; border-radius: 9px; object-fit: cover; }
.site-search__name { font-size: 15px; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.site-search__arrow { font-size: 20px; line-height: 1; }
.site-search__message { margin: 0; padding: 15px 12px; font-size: 15px; }
.site-search__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 700px) {
  header.catalog-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px 16px;
    padding-block: 14px 18px;
  }
  .catalog-header .site-cart-link { grid-column: 2; }
  .catalog-header .site-search { grid-column: 1 / -1; grid-row: 2; }
  .site-search__panel { max-height: 50svh; }
}
