/* Hero */
.hero {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeUp 0.7s var(--transition) 0.1s both;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  margin-bottom: 0.85rem;
  letter-spacing: -0.02em;
}
.hero h1 .accent {
  font-style: italic;
  color: var(--gold-bright);
  font-weight: 400;
}
.hero p.lead {
  font-size: 1.05rem;
  color: var(--off-white-dim);
  max-width: 52ch;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* Search form */
.search-card {
  background: linear-gradient(135deg, rgba(20,36,54,0.7) 0%, rgba(13,27,42,0.5) 100%);
  border: 1px solid rgba(201,150,62,0.18);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-card);
  max-width: 760px;
  margin: 0 auto 2rem;
  animation: fadeUp 0.7s var(--transition) 0.2s both;
  position: relative;
  z-index: 20;
}
.search-label {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
  margin-bottom: 0.65rem;
  font-weight: 500;
}
.search-input-wrap {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
/* Row do CTA Analisar — agora após categorias, full-width */
.analyze-cta-row {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
}
.btn-analyze-cta {
  width: 100%;
  max-width: 480px;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  letter-spacing: 0.01em;
  justify-content: center;
}
@media (max-width: 640px) {
  .btn-analyze-cta { max-width: 100%; }
}
.search-input-wrap .input-shell {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(5,12,22,0.55);
  border: 1px solid rgba(245,240,232,0.1);
  border-radius: var(--radius-md);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input-wrap .input-shell:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,150,62,0.12);
}
.search-input-wrap .input-shell .search-icon {
  padding-left: 1rem;
  color: var(--off-white-dim);
  display: flex;
  align-items: center;
}
.search-input-wrap input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--off-white);
  font-size: 1rem;
  padding: 1rem 1rem 1rem 0.6rem;
  font-family: var(--font-body);
}
.search-input-wrap input::placeholder { color: var(--muted); }
.search-input-wrap .btn { padding: 0 1.6rem; }

.search-input-wrap.shake {
  animation: shake 0.4s var(--transition);
}

/* Autocomplete dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(135deg, rgba(20,36,54,0.96) 0%, rgba(13,27,42,0.96) 100%);
  border: 1px solid rgba(201,150,62,0.28);
  border-radius: var(--radius-md);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.04) inset;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 320px;
  overscroll-behavior: contain;
  animation: fadeUp 0.2s var(--transition);
}
.autocomplete-dropdown::-webkit-scrollbar { width: 6px; }
.autocomplete-dropdown::-webkit-scrollbar-track { background: transparent; }
.autocomplete-dropdown::-webkit-scrollbar-thumb {
  background: rgba(201,150,62,0.3);
  border-radius: 3px;
}
.autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(201,150,62,0.5);
}
.autocomplete-dropdown[hidden] { display: none; }
.ac-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(245,240,232,0.05);
  transition: background 0.15s;
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover,
.ac-item.active {
  background: rgba(201,150,62,0.12);
}
.ac-item .ac-ico {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201,150,62,0.15);
  border-radius: 50%;
  font-size: 0.9rem;
}
.ac-item .ac-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.ac-item .ac-name {
  font-size: 0.95rem;
  color: var(--off-white);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ac-item .ac-loc {
  font-size: 0.78rem;
  color: var(--off-white-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ac-item .ac-match { color: var(--gold-bright); font-weight: 600; }
.ac-loading,
.ac-empty {
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  color: var(--off-white-dim);
  text-align: center;
  font-style: italic;
}
.ac-loading::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(201,150,62,0.3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 0.5rem;
  vertical-align: -2px;
}
.ac-error {
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  color: var(--error);
  background: rgba(216,106,92,0.08);
  text-align: center;
}

/* Hotéis selecionados (chips com status de pré-fetch) */
.selected-hotels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.selected-hotels[hidden] { display: none; }
.hotel-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem 0.45rem 0.85rem;
  background: rgba(201,150,62,0.08);
  border: 1px solid rgba(201,150,62,0.3);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--off-white);
  max-width: 100%;
  animation: fadeUp 0.25s var(--transition);
}
.hotel-chip .ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.hotel-chip.status-loading .ico {
  border: 2px solid rgba(201,150,62,0.25);
  border-top-color: var(--gold-bright);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.hotel-chip.status-loading .ico::before { content: ''; }
.hotel-chip.status-ready { background: rgba(111,181,138,0.1); border-color: rgba(111,181,138,0.4); }
.hotel-chip.status-ready .ico { color: var(--success); }
.hotel-chip.status-error { background: rgba(216,106,92,0.08); border-color: rgba(216,106,92,0.35); }
.hotel-chip.status-error .ico { color: var(--error); }
.hotel-chip .name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.chip-remove {
  background: transparent;
  border: none;
  color: var(--off-white-dim);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.35rem;
  line-height: 1;
  border-radius: 50%;
  transition: all 0.15s;
}
.chip-remove:hover { color: var(--error); background: rgba(216,106,92,0.1); }

.hint-row {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: var(--off-white-dim);
  text-align: center;
}
.hint-row[hidden] { display: none; }

.search-history {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.85rem;
  font-size: 0.75rem;
  color: var(--off-white-dim);
  opacity: 0.75;
  transition: opacity 0.2s;
}
.search-history:hover { opacity: 1; }
.history-label {
  font-weight: 500;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  margin-right: 0.15rem;
}
.history-chip {
  background: rgba(245,240,232,0.04);
  color: var(--off-white-dim);
  border: 1px solid rgba(245,240,232,0.08);
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  cursor: pointer;
  transition: all 0.15s;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-body);
}
.history-chip:hover {
  background: rgba(201,150,62,0.12);
  border-color: rgba(201,150,62,0.4);
  color: var(--gold-bright);
}

/* Category Selector (collapsed by default) */
.category-panel {
  background: linear-gradient(135deg, rgba(20,36,54,0.55) 0%, rgba(13,27,42,0.4) 100%);
  border: 1px solid rgba(245,240,232,0.08);
  border-radius: var(--radius-lg);
  margin-top: 1rem;     /* dentro do search-card agora */
  margin-bottom: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeUp 0.7s var(--transition) 0.3s both;
  overflow: hidden;
}
.category-details summary { list-style: none; cursor: pointer; user-select: none; }
.category-details summary::-webkit-details-marker { display: none; }
.category-details summary::marker { content: ''; }
.category-summary-row {
  padding: 1rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: background 0.2s;
  cursor: pointer;
}
.category-summary-row:hover { background: rgba(201,150,62,0.04); }
.cs-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.cs-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold-bright);
  font-weight: 600;
  white-space: nowrap;
}
.cs-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 1.5rem;
}
.cs-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(201,150,62,0.1);
  border: 1px solid rgba(201,150,62,0.22);
  color: var(--off-white);
  white-space: nowrap;
  line-height: 1.4;
}
.cs-toggle {
  color: var(--gold-bright);
  font-size: 0.82rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.cs-caret {
  display: inline-block;
  transition: transform 0.25s var(--transition);
  font-size: 0.75rem;
}
.category-details[open] .cs-caret { transform: rotate(180deg); }
.category-details[open] .cs-cats { display: none; }
.category-body {
  padding: 0.5rem 1.75rem 1.5rem;
  border-top: 1px solid rgba(245,240,232,0.06);
  animation: fadeUp 0.3s var(--transition);
}
.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.category-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
}
.category-title .accent { font-style: italic; color: var(--bee); font-weight: 400; font-size: 0.95em; }
.category-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.6rem;
}

/* ── Custom keyword chip — visual sutilmente diferente da categoria
   predefinida pra deixar claro que é "sua busca" sem brigar visualmente ── */
.chip.chip-custom {
  border-style: dashed;
  border-color: rgba(242,200,75,0.4);
}
.chip.chip-custom.active {
  background: linear-gradient(135deg, rgba(242,200,75,0.14) 0%, rgba(242,200,75,0.05) 100%);
  border-color: var(--bee);
  border-style: solid;
}
.chip.chip-custom .chip-label { font-style: italic; }
.chip-custom-remove {
  background: none;
  border: none;
  color: var(--off-white-dim);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.2rem;
  margin-left: auto;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.chip-custom-remove:hover { color: var(--error); background: rgba(216,106,92,0.1); }

/* "+ Adicionar palavra-chave" — chip dashed convidativo */
.chip-add-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1rem;
  background: transparent;
  border: 1px dashed rgba(242,200,75,0.35);
  border-radius: var(--radius-md);
  color: var(--bee);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s var(--transition);
  user-select: none;
}
.chip-add-custom:hover {
  border-color: var(--bee);
  background: rgba(242,200,75,0.06);
}
.chip-add-custom .icon { font-size: 1.05rem; line-height: 1; }

/* Input expansível quando clica em "+ Adicionar" */
.chip-add-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.7rem;
  background: rgba(5,12,22,0.45);
  border: 1px solid var(--bee);
  border-radius: var(--radius-md);
}
.chip-add-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--off-white);
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
  min-width: 0;
}
.chip-add-input-wrap input::placeholder { color: var(--off-white-dim); font-style: italic; }
.chip-add-input-wrap .btn-confirm {
  background: var(--bee);
  color: var(--navy-900);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.chip-add-input-wrap .btn-cancel {
  background: none;
  border: none;
  color: var(--off-white-dim);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0 0.3rem;
  flex-shrink: 0;
}
.chip-add-input-wrap .btn-cancel:hover { color: var(--error); }

