:root {
  --primary: #e63946;
  --dark: #1d3557;
  --light: #f4f4f6;
  --shadow: 0 2px 10px rgba(0,0,0,0.08);
  --radius: 14px;
  --transition: all 0.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--light);
  color: #333;
  padding-bottom: 74px;
}

/* ── Navbar ── */
.busca-navbar {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
}

.btn-back-busca {
  background: none; border: none;
  font-size: 1.1rem; color: #555;
  padding: 6px 8px; border-radius: 50%;
  cursor: pointer; text-decoration: none;
  display: flex; align-items: center;
  transition: var(--transition); flex-shrink: 0;
}
.btn-back-busca:hover { background: #f0f0f0; color: var(--dark); }

.busca-input-wrap {
  flex: 1; position: relative;
  display: flex; align-items: center;
}
.busca-icon {
  position: absolute; left: 14px;
  color: #bbb; font-size: 0.9rem; pointer-events: none;
}
.busca-input {
  width: 100%;
  padding: 10px 40px 10px 38px;
  border: 2px solid #eee; border-radius: 24px;
  font-size: 0.95rem; font-family: inherit;
  outline: none; background: #f8f8f8;
  transition: var(--transition);
}
.busca-input:focus { border-color: var(--primary); background: #fff; }
.busca-clear {
  position: absolute; right: 12px;
  background: #ddd; border: none; border-radius: 50%;
  width: 20px; height: 20px;
  font-size: 0.65rem; color: #666;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: var(--transition);
}
.busca-clear:hover { background: var(--primary); color: #fff; }

/* ── Chips ── */
.chips-row {
  display: flex; gap: 8px;
  overflow-x: auto; padding: 12px 14px 4px;
  scrollbar-width: none;
}
.chips-row::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border: 2px solid #e0e0e0; background: #fff;
  color: #555; border-radius: 20px;
  padding: 7px 14px; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 5px;
  transition: var(--transition);
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Section block ── */
.section-block { padding: 14px 14px 4px; }
.section-label {
  font-size: 0.9rem; font-weight: 700;
  color: var(--dark); margin-bottom: 12px;
  display: flex; align-items: center; gap: 6px;
}
.section-label i { color: var(--primary); }

/* ── Grade de categorias ── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.cat-card {
  background: #fff; border-radius: 12px;
  padding: 14px 6px 10px;
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  cursor: pointer; border: 2px solid transparent;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: var(--transition);
}
.cat-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.cat-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.cat-label {
  font-size: 0.7rem; font-weight: 600;
  color: var(--dark); text-align: center;
  line-height: 1.2; word-break: break-word;
}

/* ── Recentes ── */
.recente-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 4px; border-bottom: 1px solid #f0f0f0;
  cursor: pointer; font-size: 0.88rem; color: #555;
  transition: color 0.15s;
}
.recente-item:hover { color: var(--primary); }
.recente-item i:first-child { color: #ccc; font-size: 0.8rem; }
.recente-fill { color: #ddd; font-size: 0.75rem; }

/* ── Resultados ── */
.resultados-header { padding: 12px 14px 4px; }
.res-count { font-size: 0.82rem; color: #999; font-weight: 500; }

.resultados-grid { padding: 0 14px; display: flex; flex-direction: column; gap: 10px; }

.res-card {
  background: #fff; border-radius: var(--radius);
  display: flex; align-items: center; gap: 12px;
  padding: 12px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  transition: var(--transition);
  border: 2px solid transparent;
}
.res-card:hover { border-color: var(--primary); transform: translateX(3px); }

.res-img {
  width: 72px; height: 72px; border-radius: 10px;
  object-fit: cover; flex-shrink: 0;
}
.res-info { flex: 1; min-width: 0; }
.res-name { font-weight: 700; font-size: 0.95rem; color: var(--dark); margin-bottom: 2px; }
.res-desc { font-size: 0.78rem; color: #888; margin-bottom: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-meta { font-size: 0.75rem; color: #999; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.res-rating { color: #f4a924; font-weight: 700; }
.res-sep { color: #ddd; }
.res-arrow { color: #ddd; font-size: 0.8rem; flex-shrink: 0; }

/* ── Sem resultados ── */
.sem-resultados {
  text-align: center; padding: 48px 20px;
  color: #ccc;
}
.sem-resultados i { font-size: 2.5rem; display: block; margin-bottom: 12px; }
.sem-resultados p { font-size: 0.9rem; color: #aaa; margin-bottom: 16px; }
.btn-limpar {
  background: none; border: 2px solid var(--primary);
  color: var(--primary); border-radius: 20px;
  padding: 8px 20px; font-size: 0.85rem; font-weight: 700;
  cursor: pointer; transition: var(--transition);
}
.btn-limpar:hover { background: var(--primary); color: #fff; }

/* ── Responsivo ── */
@media (max-width: 380px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}
