/* --------------------------------------------------- where the bar sits */
.header-search-slot {
  flex: 0 1 auto;
  width: 420px;
  max-width: 100%;
  margin: 0 24px;
}

@media screen and (max-width: 1400px) {
  .header-search-slot {
    width: 320px;
  }
}
@media screen and (max-width: 1100px) {
  .header-search-slot {
    width: 240px;
    margin: 0 12px;
  }
}
.header-search-slot--esp {
  width: 320px;
  margin: 0;
}

@media screen and (max-width: 1300px) {
  .header-search-slot--esp {
    width: 240px;
  }
}
/* ------------------------------------------------------------------ the bar */
form.header-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 4px;
}
form.header-search .header-search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  border-radius: 4px 0 0 4px;
  padding: 9px 12px;
  font-size: 13px;
  color: #212529;
}
form.header-search .header-search-input:focus {
  outline: 2px solid rgba(0, 0, 0, 0.25);
  outline-offset: -2px;
}
form.header-search .header-search-input::-webkit-search-cancel-button {
  margin-right: 2px;
}
form.header-search .header-search-submit {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 0 4px 4px 0;
  background: transparent;
  color: #6c757d;
  cursor: pointer;
}
form.header-search .header-search-submit:hover, form.header-search .header-search-submit:focus {
  color: #212529;
}

/* ------------------------------------------------- the magnifier, mobile only */
.header-search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: currentColor;
  cursor: pointer;
}
.header-search-trigger[hidden] {
  display: none;
}

/* --------------------------------------------------------- suggestion panel */
.header-search-panel {
  position: absolute;
  z-index: 1050;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 70vh;
  overflow-y: auto;
  padding: 8px 0;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  text-align: left;
}
.header-search-panel[hidden] {
  display: none;
}

.search-suggest-group + .search-suggest-group {
  border-top: 1px solid #d9d9d9;
  margin-top: 4px;
  padding-top: 4px;
}

.search-suggest-title {
  margin: 0;
  padding: 6px 12px 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6c757d;
}

.search-suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  color: #212529;
  text-decoration: none;
}
.search-suggest-item:hover, .search-suggest-item.is-active {
  background: #f2f2f2;
  color: #212529;
}

.search-suggest-thumb {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.search-suggest-label,
.search-suggest-path {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-suggest-price {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
}

.search-suggest-all {
  display: block;
  margin-top: 4px;
  padding: 8px 12px;
  border-top: 1px solid #d9d9d9;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  color: #212529;
}
.search-suggest-all:hover, .search-suggest-all.is-active {
  background: #f2f2f2;
  color: #212529;
}

.search-suggest-empty {
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  color: #6c757d;
}

/* --------------------------------------------------- empty results screen */
.search-empty {
  padding: 8px 0 24px;
}
.search-empty .search-empty-message {
  font-size: 16px;
  font-weight: 700;
}
.search-empty .search-empty-didyoumean {
  font-size: 15px;
}
.search-empty .search-empty-didyoumean a {
  font-weight: 700;
}
.search-empty .search-empty-title {
  margin-top: 20px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: #6c757d;
}
.search-empty .search-empty-shelves {
  margin: 0 0 16px;
  padding-left: 18px;
  font-size: 14px;
}
.search-empty .search-empty-hints {
  font-size: 14px;
  color: #6c757d;
}

/* --------------------------------------------------- full-screen overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1080;
  background: #fff;
  padding: 16px;
}
.search-overlay[hidden] {
  display: none;
}
.search-overlay .search-overlay-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.search-overlay form.header-search {
  flex: 1 1 auto;
  flex-wrap: wrap;
  max-width: none;
  min-width: 0;
  border: 1px solid #d9d9d9;
}
.search-overlay .header-search-panel {
  position: static;
  order: 3;
  flex: 0 0 100%;
  max-height: none;
  border: 0;
  box-shadow: none;
  margin-top: 12px;
}
.search-overlay .search-overlay-close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #212529;
  cursor: pointer;
}

body.search-overlay-open {
  overflow: hidden;
}
