/* ── SEARCH.CSS ────────────────────────────────────────────────────────────────
   Panel de búsqueda a pantalla completa — estilo moderno.
────────────────────────────────────────────────────────────────────────────── */

#search-fullscreen-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 20, 0.55);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--fast);
  backdrop-filter: blur(2px);
}

#search-fullscreen-overlay.active {
  opacity: 1;
  visibility: visible;
}

#search-results-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-white);
  z-index: 901;
  transform: translateY(-100%);
  transition: transform var(--med) var(--ease);
  box-shadow: 0 20px 40px rgba(0,0,0,.15);
  max-height: 90vh;    /* fallback */
  max-height: 90dvh;   /* moderno */
  overflow-y: auto;
}

#search-results-panel.active {
  transform: translateY(0);
}

#search-results-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 8px 24px 48px;
}

/* ── BARRA DE BÚSQUEDA DENTRO DEL PANEL ── */
#search-page-bar-wrap {
  padding-top: 17px;
  margin-bottom: 16px;
}

#search-page-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f3f4f6;
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 4px 6px 4px 16px;
  transition: all .15s ease;
}

#search-page-bar:focus-within {
  background: #fff;
  border-color: var(--accent, #c8102e);
  box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.08);
}

.search-page-icon {
  width: 20px;
  height: 20px;
  color: var(--ink3, #9ca3af);
  flex-shrink: 0;
}

#search-page-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 15px;
  color: var(--ink, #111);
  padding: 12px 0;
}

#search-page-input::placeholder {
  color: var(--ink4, #9ca3af);
}

#search-page-clear {
  background: #e5e7eb;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink2, #4b5563);
  transition: all .15s ease;
  flex-shrink: 0;
}

#search-page-clear:hover {
  background: #d1d5db;
  color: var(--ink, #111);
}

/* ── HEADER DE RESULTADOS ── */
#search-results-header {
  margin-bottom: 20px;
  padding: 0 2px;
}

#search-results-title {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink, #111);
  margin-bottom: 4px;
  line-height: 1.3;
}

#search-results-title strong {
  font-weight: 800;
  color: var(--accent, #c8102e);
}

#search-result-count-panel {
  font-size: 13px;
  color: var(--ink3, #6b7280);
  font-family: var(--font-body, 'Inter', sans-serif);
}

/* ── GRID DE RESULTADOS ── */
#search-results-grid-panel {
  min-height: 0;
}

/* ── ESTADO VACÍO ── */
.search-empty-panel {
  text-align: center;
  padding: 60px 20px;
}

.search-empty-icon {
  font-size: 44px;
  opacity: .35;
  margin-bottom: 14px;
}

.search-empty-title {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink, #111);
  margin-bottom: 6px;
}

.search-empty-sub {
  font-size: 13.5px;
  color: var(--ink3, #6b7280);
  font-family: var(--font-body, 'Inter', sans-serif);
}

/* ── HEADER EXPANDIDO ── */
.header-inner.search-expanded .search-box {
  max-width: 480px;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  #search-results-inner {
    padding: 8px 16px 40px;
  }

  #search-page-bar-wrap {
    padding-top: 20px;
    margin-bottom: 10px;
  }

  #search-page-input {
    font-size: 14px;
  }

  #search-results-title {
    font-size: 16px;
  }
}