/* RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background: #f4f4f4;
  color: #111;
  line-height: 1.6;
}

/* HEADER */
header {
  background: #111;
  color: #fff;
  padding: 2rem 1rem;
  text-align: center;
}

header h1 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

/* ALGOLIA SEARCHBOX */
.ais-SearchBox {
  display: flex;
  justify-content: center;
  margin: 0 auto;
}

.ais-SearchBox-form {
  display: flex;
  width: 100%;
  max-width: 480px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #333;
}

.ais-SearchBox-input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: none;
  outline: none;
}

.ais-SearchBox-submit,
.ais-SearchBox-reset {
  background: #8f8f8f;
  color: #fff;
  border: none;
  padding: 0 1rem;
  font-size: 1rem;
  cursor: pointer;
}

.ais-SearchBox-reset {
  display: none;
}

/* RESULTADOS */
#hits {
  padding: 2rem;
}

.ais-Hits-list {
  list-style: none;
  padding: 0;
  margin: 0;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* CARD DE OBRA */
.ais-Hits-item {
  background: #fff;
  border-radius: 12px;
  padding: 1.2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  text-align: center;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}

.ais-Hits-item:hover {
  transform: translateY(-6px);
}

.ais-Hits-item img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
  margin-bottom: 1rem;
}

.ais-Hits-item h2 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.ais-Hits-item p {
  font-size: 0.9rem;
  margin: 0.3rem 0;
  color: #333;
}

/* PLACEHOLDER DE BUSCA VAZIA */
.placeholder {
  font-style: italic;
  color: #666;
  text-align: center;
  margin: 2rem auto;
  font-size: 1.1rem;
}
