/* ===============================
   STREETGO - ESTILOS MAPA E LOJAS
   Sistema dois estados (Renault-like)
   =============================== */

/* Container principal */
.pontos-de-venda {
  display: flex;
  width: 100%;
  min-height: 600px;
  gap: 2rem;
}

/* ===============================
   ESTADO 1: Tela Inicial
   =============================== */

.estado-inicial {
  flex-direction: row;
  align-items: stretch;
}

.estado-inicial .box-onde-comprar {
  flex: 0 0 40%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
  background: rgba(15, 16, 17, 0.8);
  border-radius: 8px;
}

.estado-inicial .box-onde-comprar.centralized {
  justify-content: center;
}

.mapa-fake {
  flex: 1;
  background-image: url('/wp-content/uploads/2025/12/mapa-estatico-streetgo.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

/* Overlay escuro no mapa fake */
.mapa-fake::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

/* ===============================
   ESTADO 2: Resultados
   =============================== */

.estado-resultados {
  flex-direction: row;
  gap: 0;
  height: 600px;
  max-height: 80vh;
}

.lado-esquerdo {
  flex: 0 0 40%;
  display: flex;
  flex-direction: column;
  background: rgba(15, 16, 17, 0.95);
  border-radius: 8px 0 0 8px;
  overflow: hidden;
  height: 100%;
}

.lado-direito {
  flex: 1;
  position: relative;
  height: 100%;
}

/* Header dos resultados */
.header-resultados {
  padding: 2rem;
  border-bottom: 1px solid rgba(228, 255, 0, 0.2);
  background: rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.btn-voltar {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid rgba(228, 255, 0, 0.5);
  color: var(--color-primary);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-family-primary);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s;
  margin-bottom: 1rem;
}

.btn-voltar:hover {
  background: var(--color-primary);
  color: #0F1011;
  border-color: var(--color-primary);
}

.titulo-resultados {
  font-family: var(--font-family-primary);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #FFFFFF;
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
}

.subtitulo-resultados {
  font-family: var(--font-family-primary);
  font-size: 1rem;
  color: var(--color-primary);
  margin: 0;
}

/* Lista de lojas */
.lista-lojas-container {
  flex: 1 !important;
  overflow: hidden;
  position: relative;
  min-height: 0;
  display: flex !important;
  flex-direction: column !important;
}

.lista-lojas {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.5rem;
  display: flex !important;
  flex-direction: column;
  gap: 2rem;
  visibility: visible !important;
  opacity: 1 !important;
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) rgba(92, 92, 92, 0.2);
}

/* Scrollbar customizada */
.lista-lojas::-webkit-scrollbar {
  width: 6px;
}

.lista-lojas::-webkit-scrollbar-track {
  background: rgba(92, 92, 92, 0.2);
  border-radius: 4px;
}

.lista-lojas::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 4px;
}

.lista-lojas::-webkit-scrollbar-thumb:hover {
  background: #d1e600;
}

/* Card de loja */
.box-loja {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border-left: 4px solid var(--color-primary);
  transition: all 0.3s;
  cursor: pointer;
}

.box-loja:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(5px);
}

.numero-distancia {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.numero-loja {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  color: #0F1011;
  border-radius: 50%;
  font-weight: 900;
  font-size: 1.1rem;
}

.distancia-loja {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.nome-loja {
  font-family: var(--font-family-primary);
  font-weight: 900;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: #FFFFFF;
  line-height: 1.3;
}

.endereco-loja {
  font-family: var(--font-family-primary);
  font-weight: 300;
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

.telefone-loja {
  font-family: var(--font-family-primary);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.25rem;
}

.links-loja {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.links-loja a {
  font-size: 0.85rem;
  color: var(--color-primary);
  text-decoration: underline;
  transition: color 0.3s;
}

.links-loja a:hover {
  color: #d1e600;
}

.btn-selecionar {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--color-primary);
  color: #0F1011;
  border: none;
  border-radius: 4px;
  font-family: var(--font-family-primary);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
}

.btn-selecionar:hover {
  background: #d1e600;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(228, 255, 0, 0.3);
}

/* Mapa real */
#mapa {
  width: 100%;
  height: 100%;
  min-height: 600px;
  border-radius: 0 8px 8px 0;
}

#mapa.mapa-ativa {
  background-image: none;
}

/* ===============================
   ELEMENTOS COMUNS
   =============================== */

.onde-comprar-header img {
  max-width: 100%;
  height: auto;
}

.busca-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.onde-comprar-subtit {
  font-family: var(--font-family-primary);
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: #FFFFFF;
  font-weight: 600;
}

.campo-de-busca {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: all 0.3s;
}

.campo-de-busca:focus-within {
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.15);
}

.quadradinho-pin {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

#endereco-localizacao {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF;
  font-family: var(--font-family-primary);
  font-size: 1rem;
}

#endereco-localizacao::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.lupinha-amarela {
  width: 24px;
  height: 24px;
  cursor: pointer;
  transition: transform 0.3s;
  flex-shrink: 0;
}

.lupinha-amarela:hover {
  transform: scale(1.1);
}

.perto-de-mim-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.onde-comprar-ou {
  font-family: var(--font-family-primary);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
}

.perto-de-mim {
  width: 100%;
  padding: 1rem 2rem;
  background: var(--color-primary);
  color: #0F1011;
  border: none;
  border-radius: 8px;
  font-family: var(--font-family-primary);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
}

.perto-de-mim:hover {
  background: #d1e600;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(228, 255, 0, 0.3);
}

/* ===============================
   RESPONSIVO
   =============================== */

@media (max-width: 1024px) {
  .estado-inicial {
    flex-direction: column;
  }
  
  .estado-inicial .box-onde-comprar {
    flex: 1;
  }
  
  .mapa-fake {
    min-height: 400px;
  }
  
  .estado-resultados {
    flex-direction: column;
  }
  
  .lado-esquerdo {
    flex: 1;
    border-radius: 8px 8px 0 0;
    max-height: 50vh;
  }
  
  .lado-direito {
    flex: 1;
    min-height: 400px;
  }
  
  #mapa {
    border-radius: 0 0 8px 8px;
  }
}

@media (max-width: 768px) {
  .pontos-de-venda {
    gap: 0;
    min-height: 100vh;
  }
  
  /* Estado inicial mobile */
  .estado-inicial {
    flex-direction: column;
    min-height: 100vh;
  }
  
  .estado-inicial .box-onde-comprar {
    padding: 1.5rem;
    flex: 1;
  }
  
  .mapa-fake {
    min-height: 300px;
  }
  
  /* Estado resultados mobile */
  .estado-resultados {
    flex-direction: column;
    height: auto !important;
    min-height: 100vh;
    max-height: none !important;
  }
  
  .lado-esquerdo {
    flex: 0 0 auto;
    height: auto;
    min-height: 60vh;
    max-height: 300px;
    border-radius: 0;
  }
  
  .lado-direito {
    flex: 0 0 auto;
    height: 40vh;
    min-height: 40vh;
  }
  
  .header-resultados {
    padding: 1rem 1.5rem;
  }
  
  .btn-voltar {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
  }
  
  .titulo-resultados {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
  }
  
  .subtitulo-resultados {
    font-size: 0.9rem;
  }
  
  .lista-lojas-container {
    flex: 1;
    min-height: 0;
  }
  
  .lista-lojas {
    padding: 1rem;
    gap: 1rem;
  }
  
  .box-loja {
    padding: 1rem;
  }
  
  .numero-loja {
    width: 28px;
    height: 28px;
    font-size: 1rem;
  }
  
  .nome-loja {
    font-size: 1.1rem;
  }
  
  .endereco-loja {
    font-size: 0.85rem;
  }
  
  #mapa {
    border-radius: 0;
    min-height: 40vh;
    width:300px;
  }
}
