/* =============================================
   HEADER INLINE SEARCH BAR  (WTHeader design)
   ============================================= */
.wt-headsearch {
  flex: 1;
  display: flex;
  align-items: center;
  background: #f4f6f8;
  border: 1.5px solid var(--gray-border);
  border-radius: 10px;
  padding: 0 4px 0 14px;
  max-width: 560px;
  height: 42px;
  transition: border-color 0.2s ease;
}
.wt-headsearch:focus-within,
.wt-headsearch:hover { border-color: var(--blue-mid); }
.wt-headsearch > svg { flex-shrink: 0; }
.wt-headsearch-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 0 10px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text-dark);
  min-width: 60px;
  cursor: pointer;
}
.wt-headsearch-input::placeholder { color: #888; }
.wt-headsearch-btn {
  background: var(--blue-mid);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.wt-headsearch-btn:hover { background: var(--blue-dark); }

/* =============================================
   SEARCH MODAL  (WTHeader design)
   ============================================= */
.wt-search-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 9vh 16px 16px;
  background: rgba(3, 44, 66, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1200;
}
.wt-search-modal.is-open { display: flex; }

/* Hide waves when modal is open */
body.wt-modal-open .wt-header-waves,
body.wt-modal-open .wt-header-wave { display: none; }

.wt-search-modal__dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: 82vh;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
}
.wt-search-modal__form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* Header row: icon + input + ESC */
.wt-search-modal__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1.5px solid #eef1f4;
}
.wt-search-modal__icon { flex-shrink: 0; }
.wt-search-modal__input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 17px;
  font-family: inherit;
  color: var(--text-dark);
  min-width: 0;
}
/* Scoped to the form so it overrides the global `.wt-search-form button` (32px/blue) rule */
.wt-search-modal__form .wt-search-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #f4f6f8;
  border: 1.5px solid var(--gray-border);
  border-radius: 50%;
  padding: 0;
  color: #555;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.wt-search-modal__form .wt-search-modal__close:hover {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}
.wt-search-modal__x { font-size: 16px; line-height: 1; }

/* Body */
.wt-search-modal__body {
  flex: 1;
  padding: 18px 20px 22px;
  overflow-y: auto;
  background: #fff;
}

/* Default suggestions */
.wt-search-default { display: flex; flex-direction: column; gap: 18px; }
.wt-search-sec-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 9px;
}
.wt-search-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wt-search-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e8f3fb;
  color: var(--blue-dark);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.wt-search-chip:hover { background: var(--blue-dark); color: #fff; }
.wt-search-quickcats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}
.wt-search-qcat {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.wt-search-qcat:hover { background: #f4f6f8; border-color: var(--gray-border); color: var(--blue-dark); }
.wt-search-qcat-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* Footer strip */
.wt-search-modal__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-dark);
  color: #fff;
  font-size: 12px;
  padding: 10px 20px;
}
.wt-search-modal__foot svg { flex-shrink: 0; }

/* Live results (rendered by search-modal.js) */
/* Product results — two-column showcase that uses the modal width */
.wt-search-results { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
.wt-search-results:not(:empty) { margin-top: 6px; }
.wt-sr { list-style: none; }
.wt-sr-link {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 13px;
  align-items: center;
  height: 100%;
  padding: 11px;
  background: #fff;
  border: 1.5px solid var(--gray-border);
  border-radius: 13px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.wt-sr-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(4, 77, 115, 0.12);
  border-color: #b3d4e8;
  color: inherit;
}
.wt-sr-thumb {
  position: relative;
  width: 76px; height: 76px;
  border-radius: 11px;
  overflow: hidden;
  background: linear-gradient(135deg, #e8f3fb, #f4f6f8);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.wt-sr-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 7px; }
.wt-sr-oos {
  position: absolute; left: 4px; top: 4px;
  background: #c0392b; color: #fff; font-size: 8.5px; font-weight: 800;
  letter-spacing: .3px; text-transform: uppercase; padding: 2px 6px; border-radius: 5px;
}
.wt-sr-pre {
  position: absolute; left: 4px; top: 4px;
  background: #a86b00; color: #fff; font-size: 8.5px; font-weight: 800;
  letter-spacing: .3px; text-transform: uppercase; padding: 2px 6px; border-radius: 5px;
}
.wt-sr-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wt-sr-cat { font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--blue-mid); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-sr-title {
  font-size: 13.5px; font-weight: 700; color: var(--text-dark); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* Size the customer searched for, e.g. "120ml" — the link opens on that tile. */
.wt-sr-variant {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 20px;
  background: var(--blue-mid); color: #fff; font-size: 10.5px; font-weight: 800;
  letter-spacing: .02em; vertical-align: middle; white-space: nowrap;
}
.wt-sr-price { font-size: 14.5px; color: var(--blue-dark); font-weight: 800; margin-top: 1px; }
.wt-sr-price del { font-size: 11.5px; color: #aaa; font-weight: 400; }
.wt-sr-price ins { text-decoration: none; color: #e03535; }

.wt-search-result__empty {
  grid-column: 1 / -1;
  padding: 20px 16px;
  text-align: center;
  color: #888;
  background: #f4f6f8;
  border-radius: 12px;
  font-size: 13.5px;
}
.wt-search-result__empty.is-error { color: #a9321f; background: #fdeeea; }

/* Loading placeholders shown while a search request is open. */
.wt-sr--skel { display: flex; align-items: center; gap: 12px; padding: 8px; pointer-events: none; }
.wt-sr-skelbox { width: 76px; height: 76px; border-radius: 11px; flex-shrink: 0; }
.wt-sr-skellines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.wt-sr-skellines span { height: 11px; border-radius: 6px; display: block; }
.wt-sr-skellines span:first-child { width: 70%; }
.wt-sr-skellines span:last-child { width: 40%; }
.wt-sr-skelbox, .wt-sr-skellines span {
  background: linear-gradient(90deg, #eef1f4 25%, #e2e7ec 37%, #eef1f4 63%);
  background-size: 400% 100%;
  animation: wt-sr-shimmer 1.2s ease-in-out infinite;
}
@keyframes wt-sr-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .wt-sr-skelbox, .wt-sr-skellines span { animation: none; } }

/* One column on narrow phones so each card stays roomy */
@media (max-width: 560px) {
  .wt-search-results { grid-template-columns: 1fr; }
}

/* Mobile: dock the modal as a bottom sheet that rises from the bottom-nav search button */
@media (max-width: 768px) {
  .wt-search-modal { align-items: flex-end; justify-content: stretch; padding: 0; }
  .wt-search-modal__dialog {
    width: 100%;
    max-height: 80vh;
    border-radius: 20px 20px 0 0;
    /* float just above the fixed bottom nav */
    margin-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    animation: wtSearchSheetUp .28s cubic-bezier(.4, 0, .2, 1);
  }
  .wt-search-quickcats { grid-template-columns: 1fr 1fr; }
  .wt-search-modal__input { font-size: 16px; }
}
@keyframes wtSearchSheetUp { from { transform: translateY(110%); opacity: .5; } to { transform: translateY(0); opacity: 1; } }

/* ── Hersteller matches, above the product rows ── */
.wt-sr-brands {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #eef1f4;
  background: #f7fafc;
  grid-column: 1 / -1;
}
.wt-sr-brands-hd {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #8c99a5;
}
.wt-sr-brands-row { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.wt-sr-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 20px;
  background: #fff;
  border: 1.5px solid #cfe4f1;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.wt-sr-brand:hover { background: #e8f3fb; border-color: #006DAD; }
.wt-sr-brand-name { font-size: 12.5px; font-weight: 700; color: #044D73; }
.wt-sr-brand-count {
  font-size: 10.5px;
  font-weight: 800;
  color: #6b7681;
  background: #eef2f6;
  border-radius: 10px;
  padding: 1px 6px;
}
