.atlas-search-field { position: relative; min-width: 0; }
.atlas-search-input-icon {
  position: absolute;
  inset-block-start: 23px;
  inset-inline-start: 13px;
  transform: translateY(-50%);
  width: 1.2rem;
  height: 1.2rem;
  color: var(--muted);
  pointer-events: none;
}
.atlas-search-field input[role="combobox"] {
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  padding-inline-start: calc(23px + 1.2rem);
}
.atlas-search-popup {
  position: absolute;
  z-index: 1400;
  inset: calc(100% + 6px) 0 auto;
  max-height: min(46dvh, 420px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: var(--text-ui);
  line-height: 1.35;
}
.atlas-search-popup ul { list-style: none; margin: 0; padding: 0; }
.atlas-search-popup li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: var(--radius-control);
  cursor: pointer;
  overflow-wrap: anywhere;
}
.atlas-search-popup li + li { margin-top: 2px; }
.atlas-search-popup li:hover { background: var(--brand-soft); }
.atlas-search-popup li[aria-selected="true"] {
  background: var(--brand-soft);
  outline: 2px solid var(--brand-link);
  outline-offset: -2px;
}
.atlas-search-category-icon {
  display: grid;
  place-items: center;
  width: max(36px, 2rem);
  height: max(36px, 2rem);
  border-radius: var(--radius-control);
  background: var(--brand-soft);
  background: color-mix(in srgb, var(--search-category-color) 20%, var(--paper));
  color: var(--ink);
  color: color-mix(in srgb, var(--search-category-color) 55%, var(--ink));
}
.atlas-search-category-icon svg { width: 1.2rem; height: 1.2rem; }
.atlas-search-popup li > .atlas-search-category-icon { position: relative; overflow: hidden; }
.atlas-search-result-thumbnail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}
.atlas-search-result-thumbnail.is-loaded { opacity: 1; }
.atlas-search-result-copy { display: grid; gap: 2px; min-width: 0; }
.atlas-search-result-title { font-weight: 700; }
.atlas-search-popup small { color: var(--muted); font-size: var(--text-small); }
.atlas-search-result-arrow { width: 1rem; height: 1rem; color: var(--muted); }
.atlas-search-popup .atlas-search-more {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 44px;
  margin-top: 6px;
  background: #f6f2e6;
}
.atlas-search-popup .atlas-search-more:hover,
.atlas-search-popup .atlas-search-more[aria-selected="true"] { background: var(--brand-soft); }
.atlas-search-status { margin: 0; padding: 10px; color: var(--muted); }
.atlas-search-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }

.heritage-search-fields > .atlas-search-field { grid-column: 1; grid-row: 1; }
.producer-search-panel > .atlas-search-field { grid-column: 1; grid-row: 2; }
@media (max-width: 600px) {
  .producer-search-panel > .atlas-search-field { grid-column: auto; grid-row: auto; }
}
@media (max-width: 520px) {
  .heritage-search-fields > .atlas-search-field { grid-column: 1 / -1; grid-row: 2; }
}

.topbar > .atlas-global-search-trigger {
  grid-area: 1 / 6;
  display: grid;
  place-items: center;
  justify-self: end;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #ffdf6c99;
  border-radius: 50%;
  background: #ffdf6c;
  color: var(--ink);
}
.atlas-global-search-trigger svg { width: 22px; height: 22px; }
.topbar > .atlas-global-search-trigger:hover { background: #fff1bc; }
@media (max-width: 1200px) {
  .topbar:has(> .atlas-global-search-trigger) { grid-template-columns: minmax(0, 1fr) auto auto; }
  .topbar > .atlas-global-search-trigger { grid-column: 3; }
  .topbar:has(> .atlas-global-search-trigger) > .account-auth { grid-column: 3; }
}
@media (max-width: 480px) {
  .topbar:has(> .atlas-global-search-trigger) > .brand-home { grid-column: 1 / 3; }
}
.atlas-global-search {
  --search-gutter: clamp(16px, 4vw, 24px);
  box-sizing: border-box;
  width: min(620px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - min(10dvh, 64px) - 12px);
  margin: min(10dvh, 64px) auto auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 64px #18251b52;
}
.atlas-global-search::backdrop { background: #182a2175; }
.atlas-global-search-heading {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(8px, 2.5vw, 16px);
  padding: var(--search-gutter);
  border-block-start: 4px solid var(--brand-link);
  border-block-end: 1px solid var(--line);
  background: var(--cream);
  overflow: hidden;
}
.atlas-global-search-heading h2 {
  margin: 0;
  font: 700 clamp(1.3rem, 4vw, 1.9rem)/1.13 var(--font-heading);
  overflow-wrap: anywhere;
}
.atlas-global-search-route {
  position: absolute;
  z-index: -1;
  inset: auto -24px -8px auto;
  width: 48%;
  color: #b99038;
  opacity: .32;
}
.atlas-global-search-emblem {
  display: grid;
  place-items: center;
  width: clamp(42px, 9vw, 54px);
  aspect-ratio: 1;
  border-radius: var(--radius-control);
  background: #ffdf6c;
}
.atlas-global-search-emblem svg { width: 62%; height: 62%; }
.atlas-global-search-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--control-line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
}
.atlas-global-search-close:hover { background: var(--brand-soft); }
.atlas-global-search-close svg { width: 18px; height: 18px; }
.atlas-global-search > .atlas-search-field {
  padding: var(--search-gutter);
}
.atlas-global-search .atlas-search-input-icon {
  inset-block-start: calc(var(--search-gutter) + 27px);
  inset-inline-start: calc(var(--search-gutter) + 13px);
}
.atlas-global-search .atlas-global-query {
  min-height: 54px;
  padding-block: 8px;
  padding-inline-end: 12px;
  border: 1px solid var(--control-line);
  border-radius: var(--radius-control);
  background: #fff;
  color: var(--ink);
  font: var(--text-ui)/1.4 var(--font-body);
}
.atlas-global-query::placeholder { color: var(--muted); }
.atlas-global-search .atlas-global-query:focus {
  border-color: var(--brand-link);
  outline: 2px solid var(--brand-link);
  outline-offset: -1px;
  box-shadow: 0 0 0 4px #c6d6bf;
}
.atlas-global-search .atlas-search-popup {
  position: static;
  max-height: none;
  overflow: visible;
  margin-top: 12px;
  padding: 4px 0 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.atlas-global-search-examples { margin-top: 16px; }
.atlas-global-search-examples h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font: 700 var(--text-small)/1.35 var(--font-body);
}
.atlas-global-search-example-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.atlas-global-search .atlas-search-popup:not([hidden]) + .atlas-global-search-examples { display: none; }
.atlas-global-search-examples button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  max-width: 100%;
  padding: 5px 11px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font: 650 var(--text-small)/1.3 var(--font-body);
  text-align: start;
  overflow-wrap: anywhere;
}
.atlas-global-search-examples button:hover { background: var(--brand-soft); }
.atlas-global-search-examples .atlas-search-category-icon {
  flex: none;
  width: max(27px, 1.6rem);
  height: max(27px, 1.6rem);
  border-radius: 50%;
}
.atlas-global-search-examples .atlas-search-category-icon svg { width: 1rem; height: 1rem; }
@media (max-width: 380px) {
  .atlas-global-search { margin-block-start: 20px; max-height: calc(100dvh - 32px); }
  .atlas-global-search-route { width: 65%; }
  .atlas-global-search .atlas-search-popup li {
    grid-template-columns: auto minmax(0, 1fr);
    padding-inline: 6px;
  }
  .atlas-global-search .atlas-search-popup .atlas-search-more { grid-template-columns: minmax(0, 1fr); }
  .atlas-global-search .atlas-search-result-arrow { display: none; }
}

.atlas-not-found {
  padding: clamp(28px, 4vw, 48px) var(--page-gutter);
}
.atlas-not-found-card {
  max-width: 760px;
  margin-inline: auto;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid var(--line);
  border-left: 4px solid #d9ab29;
  border-radius: var(--radius-card);
  background: var(--paper);
}
.atlas-not-found-card :is(h1, p) { margin: 0 0 8px; }
.atlas-not-found-card h1 { color: var(--ink); font: 700 clamp(1.4rem, 3vw, 1.85rem)/1.2 var(--font-heading); }
.atlas-not-found-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.atlas-not-found-heading h1 { overflow-wrap: anywhere; }
.atlas-not-found-icon { flex: none; width: clamp(44px, 9vw, 64px); height: auto; }
.atlas-not-found-card .not-found-code { color: var(--muted); font-size: var(--text-small); font-weight: 700; }
.atlas-not-found-card label { display: block; margin: 12px 0 4px; color: var(--ink); font-size: var(--text-ui); font-weight: 700; }
.atlas-not-found-card nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: var(--text-ui); }
.catalog-search-filter { display: grid; gap: 6px; align-content: start; min-width: 0; }
