:root {
  --azul: #344c81;
  --azul-escuro: #22355f;
  --azul-claro: #e9eef8;
  --laranja: #f26f36;
  --laranja-escuro: #d95a24;
  --fundo: #f3f5f9;
  --branco: #ffffff;
  --texto: #1c2840;
  --suave: #5a6682;
  --borda: #dde3ee;
  --verde: #1f8f5f;
  --raio: 14px;
  --sombra: 0 1px 2px rgba(28, 40, 64, .06), 0 8px 24px rgba(28, 40, 64, .07);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: var(--texto);
  background: var(--fundo);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: var(--azul); }

/* ------------------------------------------------ topo */

.topo {
  background: var(--branco);
  border-bottom: 1px solid var(--borda);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.topo-dentro {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.marca img { display: block; height: 24px; width: auto; }

.topo-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--suave);
  text-decoration: none;
}
.topo-link:hover { color: var(--azul); }

/* ------------------------------------------------ página */

.pagina {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 16px 28px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.coluna { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.abertura { padding: 2px 2px 0; }

.selo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--azul);
  background: var(--azul-claro);
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
}
.selo::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--laranja);
}

h1 {
  margin: 10px 0 0;
  font-size: 27px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--azul-escuro);
  text-wrap: balance;
}

/* ------------------------------------------------ busca */

.busca {
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  box-shadow: var(--sombra);
  padding: 18px 16px 14px;
  border-top: 4px solid var(--laranja);
}

.busca label {
  display: block;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--texto);
  margin-bottom: 12px;
}

.busca-linha { display: flex; gap: 8px; }

.busca input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--texto);
  background: var(--fundo);
  border: 2px solid var(--borda);
  border-radius: 10px;
  padding: 11px 14px;
  outline: none;
  transition: border-color .15s, background .15s;
}
.busca input::placeholder { color: #a3acbf; font-weight: 500; }
.busca input:focus { border-color: var(--azul); background: var(--branco); }
.busca input[aria-invalid="true"] { border-color: #c8402a; }

.busca button,
.botao {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 0;
  border-radius: 10px;
  background: var(--laranja);
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s, transform .1s;
}
.busca button { padding: 0 18px; font-size: 16px; white-space: nowrap; }
.busca button:hover, .botao:hover { background: var(--laranja-escuro); }
.busca button:active, .botao:active { transform: translateY(1px); }
.busca button[disabled] { opacity: .7; cursor: progress; }

.ajuda { margin: 10px 0 0; font-size: 14px; }
.ajuda a { color: var(--suave); }

.aviso {
  margin: 10px 0 0;
  font-size: 15px;
  color: #a8331f;
  font-weight: 500;
}

/* ------------------------------------------------ resultado */

.resultado:empty { display: none; }
.resultado { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 66px; }

.resultado-titulo { margin: 4px 2px 0; }
.resultado-titulo h2 { margin: 0; font-size: 19px; font-weight: 700; color: var(--azul-escuro); }
.resultado-titulo p { margin: 2px 0 0; font-size: 14px; color: var(--suave); }

.loja {
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  box-shadow: var(--sombra);
  padding: 15px 16px 14px;
  scroll-margin-top: 70px;
}
.loja.ativa { border-color: var(--azul); box-shadow: 0 0 0 2px rgba(52, 76, 129, .15), var(--sombra); }

.loja-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }

.loja-nome {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--azul-escuro);
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}

.etiqueta {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--azul);
  border-radius: 999px;
  padding: 2px 9px;
  margin-bottom: 6px;
}

.distancia {
  flex: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--azul);
  background: var(--azul-claro);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.loja-end { margin: 6px 0 0; font-size: 15px; color: var(--suave); }

.loja-info {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--texto);
  display: flex;
  align-items: center;
  gap: 7px;
}
.loja-info::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--verde);
}
.loja-info.agendamento::before { background: var(--laranja); }

.acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.acoes .botao { padding: 10px 14px; font-size: 15px; flex: 1 1 auto; }
.botao svg { width: 18px; height: 18px; flex: none; }

.botao-secundario {
  background: var(--azul-claro);
  color: var(--azul-escuro);
}
.botao-secundario:hover { background: #dbe3f3; }

/* sem loja por perto */

.sem-loja {
  background: var(--azul);
  color: #fff;
  border-radius: var(--raio);
  padding: 20px 18px 18px;
  box-shadow: var(--sombra);
}
.sem-loja h2 { margin: 0; font-size: 20px; line-height: 1.25; font-weight: 700; }
.sem-loja p { margin: 8px 0 0; color: #dfe6f5; font-size: 15px; }
.sem-loja .botao { margin-top: 16px; padding: 13px 18px; font-size: 16px; width: 100%; }

.alternativa {
  background: var(--branco);
  border: 1px dashed #c4cde0;
  border-radius: var(--raio);
  padding: 13px 16px;
  font-size: 15px;
  color: var(--suave);
}
.alternativa strong { color: var(--texto); font-weight: 600; }
.alternativa a { font-weight: 600; }

/* comprar online */

.online {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  padding: 13px 14px 13px 16px;
}
.online div { display: flex; flex-direction: column; font-size: 14px; color: var(--suave); }
.online strong { font-size: 15px; color: var(--texto); font-weight: 600; }
.online[hidden] { display: none; }

.botao-contorno {
  flex: none;
  font-weight: 600;
  font-size: 15px;
  color: var(--azul);
  border: 2px solid var(--azul);
  border-radius: 10px;
  padding: 8px 14px;
  text-decoration: none;
  white-space: nowrap;
}
.botao-contorno:hover { background: var(--azul); color: #fff; }

/* ------------------------------------------------ mapa */

.mapa-area { min-width: 0; }

.mapa {
  height: 330px;
  border-radius: var(--raio);
  border: 1px solid var(--borda);
  box-shadow: var(--sombra);
  overflow: hidden;
  background: #e8ecf3;
  z-index: 1;
}
.mapa .leaflet-tile-pane { filter: saturate(.6) brightness(1.03); }

.mapa-legenda { margin: 8px 2px 0; font-size: 13px; color: var(--suave); }

.pino-loja {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--azul);
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.pino-loja.destaque { width: 22px; height: 22px; background: var(--azul); }
.pino-voce {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--laranja);
  border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(242, 111, 54, .25), 0 1px 4px rgba(0, 0, 0, .35);
}

.leaflet-popup-content { font-family: "Outfit", system-ui, sans-serif; font-size: 14px; margin: 10px 14px; }
.leaflet-popup-content strong { color: var(--azul-escuro); }

/* ------------------------------------------------ rodapé */

.rodape {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 4px 16px 24px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--suave);
}
.rodape a { color: var(--suave); }

/* carregando */
.girando {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: gira .7s linear infinite;
}
@keyframes gira { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation-duration: 0s !important; }
}

/* ------------------------------------------------ telas pequenas */

@media (max-width: 380px) {
  h1 { font-size: 24px; }
  .busca label { font-size: 16px; }
  .busca input { font-size: 20px; padding: 10px 12px; }
  .busca button { padding: 0 14px; font-size: 15px; }
  .topo-link { display: none; }
}

/* ------------------------------------------------ notebook e maior */

@media (min-width: 900px) {
  .marca img { height: 28px; }
  .pagina {
    grid-template-columns: minmax(380px, 470px) 1fr;
    gap: 24px;
    padding-top: 24px;
    align-items: start;
  }
  h1 { font-size: 32px; }
  .mapa-area { position: sticky; top: 76px; }
  .mapa { height: calc(100dvh - 140px); min-height: 420px; }
}
