/* =============================================================
   SENV — header-search.css
   Overlay de busca no header: campo expansível + resultados live
   ============================================================= */

/* ── Botão toggle (já herdado de .senv-header-actions__icon) ── */
#senv-search-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Backdrop ──────────────────────────────────────────────── */
.senv-search-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 7, 0.6);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.senv-search-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Overlay ─────────────────────────────────────────────────── */
.senv-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #111;
  border-bottom: 1px solid #222;
  z-index: 1000;
  padding: 20px 0 0;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}
.senv-search-overlay.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ── Inner: campo + botão fechar ─────────────────────────────── */
.senv-search-overlay__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 20px;
}

.senv-search-overlay__field {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.senv-search-overlay__icon {
  position: absolute;
  left: 14px;
  color: #666;
  pointer-events: none;
  flex-shrink: 0;
}

.senv-search-overlay__input {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 2px;
  color: var(--senv-offwhite, #F7F2ED);
  font-family: var(--senv-font-body, 'Inter', sans-serif);
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.02em;
  padding: 12px 40px 12px 44px;
  outline: none;
  transition: border-color 0.2s ease;
  -webkit-appearance: none;
}
.senv-search-overlay__input::placeholder {
  color: #555;
}
.senv-search-overlay__input:focus {
  border-color: var(--senv-gold, #B8924A);
}
/* Remove ícone nativo de search */
.senv-search-overlay__input::-webkit-search-cancel-button,
.senv-search-overlay__input::-webkit-search-decoration { display: none; }

.senv-search-overlay__clear {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #666;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s ease;
}
.senv-search-overlay__clear:hover { color: var(--senv-offwhite, #F7F2ED); }

.senv-search-overlay__close {
  background: none;
  border: none;
  color: #666;
  font-size: 16px;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
  transition: color 0.15s ease;
}
.senv-search-overlay__close:hover { color: var(--senv-offwhite, #F7F2ED); }

/* ── Resultados live ─────────────────────────────────────────── */
.senv-search-overlay__results {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  max-height: 440px;
  overflow-y: auto;
  border-top: 1px solid #1e1e1e;
}
.senv-search-overlay__results:empty {
  display: none;
}

/* Loading / empty */
.senv-sr__loading,
.senv-sr__empty {
  font-family: var(--senv-font-body, 'Inter', sans-serif);
  font-size: 13px;
  color: #666;
  padding: 16px 0;
  margin: 0;
}
.senv-sr__empty strong { color: var(--senv-offwhite, #F7F2ED); }

/* Lista */
.senv-sr__list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}
.senv-sr__item {
  border-bottom: 1px solid #1e1e1e;
}
.senv-sr__item:last-child { border-bottom: none; }

.senv-sr__link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  text-decoration: none;
  transition: background 0.15s ease;
  border-radius: 2px;
}
.senv-sr__link:hover { background: #1a1a1a; padding-left: 8px; padding-right: 8px; }

.senv-sr__img {
  width: 48px;
  height: 64px;
  object-fit: cover;
  flex-shrink: 0;
  background: #1a1a1a;
  border-radius: 1px;
}
.senv-sr__img--placeholder { background: #222; }

.senv-sr__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.senv-sr__name {
  font-family: var(--senv-font-body, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 400;
  color: var(--senv-offwhite, #F7F2ED);
  letter-spacing: 0.02em;
}
.senv-sr__name mark {
  background: none;
  color: var(--senv-gold, #B8924A);
  font-weight: 500;
}
.senv-sr__price {
  font-family: var(--senv-font-body, 'Inter', sans-serif);
  font-size: 12px;
  color: #888;
}

/* "Ver todos" */
.senv-sr__all {
  display: block;
  padding: 14px 0 18px;
  font-family: var(--senv-font-body, 'Inter', sans-serif);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--senv-gold, #B8924A);
  text-decoration: none;
  border-top: 1px solid #222;
  margin-top: 4px;
  transition: opacity 0.15s ease;
}
.senv-sr__all:hover { opacity: 0.8; }
.senv-sr__all strong { font-weight: 500; }

/* ── Responsivo ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .senv-search-overlay__inner { padding: 0 20px 16px; }
  .senv-search-overlay__results { padding: 0 20px; }
  .senv-cat-hero__title { font-size: 40px; }
}
