/* WiteQ Header Search — DESIGN.md §8.1 (input) + dropdown wyników
   Użycie: [witeq_header_search] w Top bar (biały wiersz, grid 240px + 1fr ...), tło białe */
.witeq-header-search {
  position: relative;
  width: 100%;
  max-width: 100%; /* pełna szerokość kolumny — grid minmax(360px,1fr) decyduje o szerokości */
  flex: 1 1 auto;
  align-self: stretch;
  font-family: "Manrope", system-ui, -apple-system, Segoe UI, sans-serif;
}
/* Header stacking — wyniki muszą być nad navy menu i nad hero (sekcja niżej) */
.et-l--header {
  z-index: 10001 !important;
  position: relative !important;
}
.et-l--header .et_pb_section:first-child,
.et-l--header .et_pb_section:first-child .et_pb_row,
.et-l--header .et_pb_section:first-child .et_pb_column {
  overflow: visible !important;
}
/* Top bar (1. sekcja headera) musi być nad navy bar (2. sekcja) — inaczej dropdown chowa się pod tekst Start/O firmie */
.et-l--header .et_pb_section:first-child {
  z-index: 10003 !important;
  position: relative !important;
}
.et-l--header .et_pb_section:nth-child(2) {
  z-index: 9999 !important;
  position: relative !important;
}
/* Gdy kolumna nadrzędna jest flex + centered (Twoje ustawienie), wyszukiwarka i tak ma wypełnić szerokość */
.et-l--header .et_pb_column .witeq-header-search,
.et_pb_column .witeq-header-search {
  width: 100% !important;
  max-width: 100% !important;
  flex: 1 1 auto !important;
}
.witeq-header-search__form {
  position: relative;
  display: flex;
  align-items: center;
}
.witeq-header-search__input {
  width: 100% !important;
  height: 54px !important;
  border: 1px solid #D8E2EC !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #3F4852 !important;
  padding: 0 44px 0 18px !important;
  font-size: 15px !important;
  line-height: 1 !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color .18s ease, box-shadow .18s ease !important;
}
.witeq-header-search__input::placeholder {
  color: #8A95A3 !important;
}
.witeq-header-search__input:focus {
  border-color: #1360A3 !important;
  box-shadow: 0 0 0 3px rgba(19,96,163,.10) !important;
}
.witeq-header-search__submit {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0 !important;
  border-radius: 8px !important;
  background: #F5F8FB !important;
  color: #1360A3 !important;
  font-size: 16px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  transition: background .18s ease, color .18s ease !important;
}
.witeq-header-search__submit:hover,
.witeq-header-search__submit:focus-visible {
  background: #1360A3 !important;
  color: #fff !important;
  outline: none !important;
}
/* Dropdown wyników — wysoki z-index + nad hero i navy menu */
.witeq-header-search__results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #D8E2EC;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(6,34,74,.12);
  overflow: hidden;
  z-index: 10002;
  max-height: 420px;
  overflow-y: auto;
}
.witeq-header-search__results[hidden] {
  display: none !important;
}
.witeq-header-search__section {
  padding: 10px 0;
  border-bottom: 1px solid #EDF1F5;
}
.witeq-header-search__section:last-child {
  border-bottom: 0;
}
.witeq-header-search__section-title {
  margin: 0 0 6px !important;
  padding: 0 16px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  color: #8A95A3 !important;
  line-height: 1 !important;
}
.witeq-header-search__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none !important;
  color: #10213D !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
  transition: background .15s ease !important;
}
.witeq-header-search__item:hover,
.witeq-header-search__item:focus-visible,
.witeq-header-search__item.is-active {
  background: #F5F8FB !important;
  color: #10213D !important;
  outline: none !important;
}
.witeq-header-search__item-thumb {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  background: #F5F8FB;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #EDF1F5;
}
.witeq-header-search__item-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
}
.witeq-header-search__item-meta {
  flex: 1 1 auto;
  min-width: 0;
}
.witeq-header-search__item-title {
  font-weight: 600 !important;
  color: #10213D !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.witeq-header-search__item-sku {
  font-size: 12px !important;
  color: #6F7A86 !important;
  font-weight: 400 !important;
}
.witeq-header-search__item-cat {
  font-size: 13px !important;
  color: #1360A3 !important;
}
.witeq-header-search__empty {
  padding: 18px 16px;
  text-align: center;
  color: #6F7A86 !important;
  font-size: 14px !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.4 !important;
}
.witeq-header-search__view-all {
  display: block;
  text-align: center;
  padding: 12px 16px;
  background: #F5F8FB;
  border-top: 1px solid #EDF1F5;
  color: #1360A3 !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  text-decoration: none !important;
}
.witeq-header-search__view-all:hover {
  background: #EEF5FB !important;
  color: #0B447B !important;
}
/* Divi reset dla results */
#left-area .witeq-header-search ul,
.entry-content .witeq-header-search ul,
.et-l--body .witeq-header-search ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.witeq-header-search mark {
  background: rgba(243,106,33,.15) !important;
  color: inherit !important;
  padding: 0 2px !important;
  border-radius: 2px !important;
}
/* Mobile — w headerze top bar jest hidden na tablet/phone (disabledOn), ale shortcode może być użyty w mobile headerze */
@media (max-width: 980px) {
  .witeq-header-search {
    max-width: 100%;
  }
  .witeq-header-search__input {
    height: 48px !important;
    font-size: 14px !important;
  }
}
