/* Filtro: campo e botões lado a lado no desktop, sem sobreposição */
.filtro-container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap; /* desktop: mantém em linha */
  margin-top: 10px;
}

/* Mobile/tablet: permite quebra e empilha */
@media (max-width: 720px) {
  .filtro-container {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* Campo com X interno */
.input-wrap {
  position: relative;
  flex: 0 1 360px;    /* base 360px; pode encolher; não cresce infinito */
  max-width: 420px;   /* evita ocupar a página toda */
  min-width: 260px;   /* previne ficar pequeno demais no desktop */
}

.input-wrap input {
  width: 100%;
  padding: 10px 40px 10px 12px; /* espaço para o X à direita */
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
  background: #fff;
  box-sizing: border-box;
}

.input-wrap input:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0,123,255,0.12);
}

/* Botão X (não interfere no fluxo do flex) */
.clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 20px;
  color: #888;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.clear-btn:hover { color: #333; }

/* Botões: não crescem nem encolhem, e não sobrepõem */
.btn {
  flex: 0 0 auto;
  padding: 10px 14px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Buscar: branco com sombra */
.btn-buscar {
  background: #fff;
  color: #333;
  border: 1px solid #ddd;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}
.btn-buscar:hover { background: #f7f7f7; }

/* Localização: azul sólido */
.btn-localizacao {
  background: #007bff;
  color: #fff;
  border: none;
}
.btn-localizacao:hover { opacity: 0.9; }

/* Mobile: botões ocupam 100% e empilham */
@media (max-width: 480px) {
  .btn { width: 100%; }
  .input-wrap { flex: 1 1 100%; max-width: 100%; min-width: 0; }
}

/* Resultados */
#resultados { margin-top: 16px; }

.sem-resultados {
  padding: 12px;
  background: #fff3cd;
  border: 1px solid #ffeeba;
  border-radius: 6px;
  color: #614c17;
}

/* Card do representante */
.representante {
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fff;
}
.rep-nome { font-size: 16px; margin-bottom: 6px; }
.rep-local { color: #666; margin-bottom: 8px; }
.rep-contatos { display: grid; gap: 6px; }

/* Mapa responsivo */
#map {
  height: 360px;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 12px;
}