/* =========================================================
   map.css — OVERLAY SIEMPRE (sin paneles fijos)
   - Panel izquierdo y derecho flotan por arriba del mapa
   - Botones flotantes siempre visibles
   - Backdrop para cerrar tocando afuera
   ========================================================= */

/* =====================
   Reset básico
   ===================== */
* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #dde0e6;
  color: #e5e7eb;
  /* --- AGREGÁ ESTO --- */
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden; /* Evita cualquier scroll accidental del body */
}

a { color: #38bdf8; }

/* =====================
   Topbar
   ===================== */
.topbar{
  display: flex;
  align-items: center;
  width: 100%;
  gap: 1px;
  padding: 10px 20px;
}

.topbar-left {
  display: flex;
  align-items: center;
  /* Quitamos el margin-right: auto para permitir que el buscador se expanda */
}

.header-search {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 50%;
  margin-left: auto;  /* Esto empuja todo el espacio libre hacia la izquierda, tirando la barra a la derecha */
  margin-right: 20px; /* Deja un margen prolijo entre el buscador y los botones de usuario */
}
.topbar-right{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 12px;
}

.topbar-right form{
  display: flex;
  align-items: center;
  margin: 0;
}


.topbar-right button,
.topbar-right a {
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  border: none;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}
.boton-color {
    font-size: 17px;
    padding-left: 30px;
    padding-right: 30px;
    border-radius: 15px;
    color:#fafafa;
    background: #F26D26;
}
.btn-wide{
  display: block;
  width: 100%;
  box-sizing: border-box;
}
.boton-color2 {
    font-size: 11px;
    border-radius: 15px;
    padding: 4px;
    color:#f3f3f3;
    background: #202620;
    border-color:antiquewhite;
}
/*.topbar-right button { background: #f97316; color: #111827; }*/
.topbar-right button:hover { background: #ea580c; }

.boton-izquierdo {
   /* margin-left: 30%;*/
}

/*.topbar-right a { background: #f26d26; color: #e5e7eb; }*/
.boton-registrarse { background: #f26d26; color: #e5e7eb; }
.boton-iniciar{ background: #404040; color: #e5e7eb; }
/* =====================
   Contenedor principal (ancla de overlays)
   ===================== */
#app-layout {
  flex: 1;          /* Ocupa todo el espacio disponible */
  position: relative;
  overflow: hidden;
  background: #dde0e6;
  /* Borrá el height: calc(...) que tenías antes */
}

/* =====================
   Mapa (full screen dentro de app-layout)
   ===================== */
#map-container {
  position: absolute;
  inset: 0;
}

#map {
  width: 100%;
  height: 100%;
}

/* =====================
   Backdrop (2 capas, una por panel)
   ===================== */
.backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, .45);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease-out;
}

.backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* =====================
   Paneles laterales OVERLAY
   ===================== */
.side-panel {
    margin: 8px;
    border-radius: 15px;
  position: absolute;
  top: 0;
  bottom: 0;
  width: 340px;
  max-width: 88vw;
  z-index: 1100;

  background: #202620;
  color: #e5e7eb;

  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 12px;

  box-shadow: 20px 0 40px rgba(0,0,0,.35);
  transition: transform .2s ease-out;
}

/* Izquierdo: entra desde la izquierda */
.left-panel {
  left: 0;
  transform: translateX(-100%);
  border-right: 1px solid #111827;
}

.left-panel.open {
  transform: translateX(0);
}

/* Derecho: entra desde la derecha */
.right-panel {
  right: 0;
  transform: translateX(100%);
  border-left: 1px solid #111827;
}

.right-panel.open {
  transform: translateX(0);
}

/* =====================
   Botones flotantes (siempre encima del mapa)
   ===================== */
.floating-btn {
  position: absolute; /* dentro de #app-layout (no fixed) */
  z-index: 1200;
  top: 12px;

  padding: 10px 12px;
  border-radius: 999px;
  border: none;
  background: #0f172a;
  color: #e5e7eb;
  font-size: 13px;
  cursor: pointer;

  box-shadow: 0 10px 25px rgba(0,0,0,.25);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.floating-btn.left  { left: 12px; }
.floating-btn.right { right: 12px; }
.floating-btn:active { transform: translateY(1px); }

/* =====================
   Panel sections
   ===================== */
.panel-section {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #111827;
}

.panel-section h2,
.panel-section h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
}

.panel-section:last-child { border-bottom: none; }

/* =====================
   Formularios / inputs
   ===================== */
.form-row {
  margin-bottom: 8px;
  font-size: 14px;
}


.form-row label {
  display: block;
  margin-bottom: 2px;
  color: #cbd5e1;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="password"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #1f2937;
  background: #424C42;
  color: #e5e7eb;
  font-size: 14px;
  outline: none;
}

.form-row textarea { resize: vertical; }

.form-row.two-cols {
  display: flex;
  gap: 8px;
}
.form-row.two-cols > div { flex: 1; }

.btn-full { width: 100%; padding: 8px; }

.btn-primary {
  background: #22c55e;
  color: #022c22;
  border: none;
  cursor: pointer;
  border-radius: 8px;
}
.btn-primary:hover { background: #16a34a; }

.hint { font-size: 12px; color: #9ca3af; }

/* =====================
   Lista de marcadores
   ===================== */
.marker-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.marker-item {
    border-color:antiquewhite;
  padding: 8px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: rgba(255,255,255,.02);
  border: 1px solid #111827;
  cursor: pointer;
}

.marker-item:hover { border-color: #3b82f6; }

.marker-item-title {
  color: #C2B280;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}

.marker-item-meta {
  font-size: 12px;
  color: #9ca3af;
}

/* =====================
   Detalle e imágenes
   ===================== */
#detail-body p { margin: 4px 0; }

.detail-rating {
  margin-top: 4px;
  font-size: 13px;
  color: #facc15;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.image-grid img,
.detail-thumb {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid #111827;
}

/* =====================
   Reseñas
   ===================== */
.reviews-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.review-item {
  padding: 6px;
  margin-bottom: 6px;
  border-radius: 6px;
  background: rgba(255,255,255,.02);
  border: 1px solid #111827;
  font-size: 13px;
}

.review-rating {
  font-size: 13px;
  color: #fbbf24;
  margin-bottom: 2px;
}

/* =====================
   Mis lugares (vendedor)
   ===================== */
#my-places-body { font-size: 14px; }

.my-places-card {
  border-radius: 8px;
  background: rgba(255,255,255,.02);
  border: 1px solid #111827;
  padding: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}

.my-places-card h4 {
  margin: 0 0 2px;
  font-size: 14px;
}

.my-places-card p {
  margin: 0 0 4px;
  font-size: 13px;
}

.place-actions,
.my-places-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.place-actions button,
.my-places-actions button,
.icon-btn {
  flex: 1;
  border-radius: 6px;
  border: none;
  padding: 4px 6px;
  font-size: 12px;
  cursor: pointer;
}

.icon-btn.edit   { background: #3b82f6; color: #eff6ff; }
.icon-btn.delete { background: #ef4444; color: #fee2e2; }
.icon-btn.alert  { background: #f59e0b; color: #451a03; }

/* =====================
   Alertas
   ===================== */
.alert-banner {
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid #f87171;
  margin-bottom: 8px;
  font-size: 13px;
}

.alert-current {
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.02);
  border: 1px solid #1d4ed8;
  font-size: 13px;
  margin-bottom: 8px;
}

/* =====================
   Lightbox
   ===================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.lightbox.hidden { display: none; }

.lightbox-content img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

/* =====================
   Tooltip (popup)
   ===================== */
.marker-tooltip { font-size: 12px; color: #111827; }
.marker-tooltip strong { font-size: 13px; }

.marker-tooltip-img {
  display: block;
  max-width: 160px;
  max-height: 100px;
  border-radius: 6px;
  object-fit: cover;
  margin-top: 4px;
}

/* =====================
   Ajustes chicos
   ===================== */
@media (max-width: 900px) {
  .side-panel { width: 300px; }
  .floating-btn { top: 10px; }
  .floating-btn.left { left: 10px; }
  .floating-btn.right { right: 10px; }
}


:root{
  --announce-bg: #F26D26;
  --announce-text: #ffffff;
  --announce-height: 40px;
}

/* Barra */
.top-announcement{
  position: sticky;      /* queda arriba al scrollear */
  top: 0;
  z-index: 9999;
  background: var(--announce-bg);
  color: var(--announce-text);
  min-height: var(--announce-height);
  display: flex;
  align-items: center;
}

/* Contenido */
.top-announcement__inner{
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-announcement__msg{
  flex: 1;
  text-align: center;
  font-size: 14px;
  line-height: 1.2;
}

/* Cerrar */
.top-announcement__close{
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--announce-text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

.top-announcement__close:hover{
  background: rgba(255,255,255,0.15);
}

/* Mobile: mejor alineación */
@media (max-width: 520px){
  .top-announcement__msg{
    text-align: left;
    font-size: 13px;
  }
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #424C42;
    color: white;
}

/* ----------------------------------- */

.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-left img.logo {
    height: 30px;       /* tamaño controlado */
    width: auto;
}

.topbar-right a,
.topbar-right button {
    
    /*background: none;*/
    border: none;
    cursor: pointer;
    font-size: 14px;
}





.footer {
  display: flex;
  background: #222;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 8px 16px;
  flex-shrink: 0; /* Asegura que el footer no se achique */
}

.footer-links{
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.footer a{
  text-decoration: none;
}

.icon-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


.checkbox-filtro {
    font-size: small;
}


.leaflet-marker-icon.marker-highlight{
  animation: markerHalo 0.2s infinite ease-in-out;
  filter:
    drop-shadow(0 0 6px rgba(0, 0, 0, 0.74))
    drop-shadow(0 0 14px rgba(90, 90, 90, 0.781))
    drop-shadow(0 0 22px rgba(145, 145, 145, 0.911));
}

@keyframes markerHalo{
  0%,100%{ opacity: 0.85; }
  50%{ opacity: 1; }
}

.pin{
  /* Borde (contorno) */
  filter:
    drop-shadow( 1px  0   0 rgba(255,255,255,0.95))
    drop-shadow(-1px  0   0 rgba(255,255,255,0.95))
    drop-shadow( 0    1px 0 rgba(255,255,255,0.95))
    drop-shadow( 0   -1px 0 rgba(255,255,255,0.95))
    /* Sombra */
    drop-shadow(0 8px 16px rgba(0,0,0,0.45));
}


/* Por defecto se ve (escritorio / pantallas grandes) */
.solo-escritorio {
  display: inline;
}

/* En celular (hasta 768px) se oculta */
@media (max-width: 768px) {
  .solo-escritorio {
    display: none !important;
  }
}

/* Contenedor del DivIcon */
.marcador-con-promo-container {
    position: relative;
    background: none !important;
    border: none !important;
}


.marcador-con-promo-container {
    position: relative;
    background: none !important;
    border: none !important;
}

.base-icon {
    position: absolute;
    width: 48px;
    height: 48px;
    z-index: 1; /* Icono verde abajo */
}

.promo-overlay-img {
    position: absolute;
    width: 48px;
    height: 48px;
    z-index: 10 !important; /* Barra amarilla arriba */
    pointer-events: none;
}


/* Quitar estilos por defecto de Leaflet */
.leaflet-tooltip-promo-custom {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* El estilo del cartelito ahora en ROJO */
.promo-cartelito-vibe {
    /* Degradado de rojo oscuro a rojo brillante */
    background: linear-gradient(135deg, #b71c1c 0%, #f44336 100%); 
    border: 2px solid #ffffff;
    border-radius: 12px;
    padding: 6px 12px;
    color: white;
    text-align: center;
    /* Sombra roja para darle profundidad */
    box-shadow: 0 4px 12px rgba(183, 28, 28, 0.5); 
    min-width: 80px;
    position: relative;
    pointer-events: none; /* Para que no interfiera con el clic al marcador */
}

.promo-cartelito-porcentaje {
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
}

.promo-cartelito-desc {
    font-size: 9px;
    text-transform: uppercase;
    font-weight: bold;
    margin-top: 2px;
}

/* Flechita superior blanca */
.promo-cartelito-vibe::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #ffffff;
}

/* Ocultar la flecha negra estándar de Leaflet */
.leaflet-tooltip-bottom:before {
    display: none !important;
}

/* Etiqueta llamativa en el Popup del mapa */
.promo-popup-badge {
    background: #d32f2f;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    display: inline-block;
    margin-top: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: 1px solid white;
}

/* Banner destacado en el panel de detalles */
.promo-detail-banner {
    background: linear-gradient(135deg, #b71c1c 0%, #f44336 100%);
    color: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
    border: 2px solid #fff;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4);
    position: relative;
    overflow: hidden;
}

.promo-detail-banner::before {
    content: "🎁";
    font-size: 30px;
    position: absolute;
    opacity: 0.2;
    right: 10px;
    bottom: -5px;
}

.promo-title-tag {
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 1px;
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 5px;
}

/* Cartel rojo flotante sobre el marcador (Tooltip) */
.leaflet-tooltip-promo-roja {
    background: #e63946 !important;
    color: white !important;
    border: 2px solid #fff !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3) !important;
    font-family: 'Arial Black', sans-serif;
    text-align: center;
}

.promo-tooltip-off {
    font-size: 18px;
    font-weight: 900;
    display: block;
    line-height: 1;
}

.promo-tooltip-code {
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    margin-top: 4px;
}

/* Banner naranja en el panel lateral (Detalle) */
.promo-detail-banner-orange {
    background: #ff8c00;
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
    border: 2px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.promo-detail-value {
    font-size: 26px;
    font-weight: 900;
    text-transform: uppercase;
}

.promo-detail-code-label {
    font-size: 13px;
    font-weight: bold;
    display: block;
    margin-top: 5px;
}

.search-container {
    display: flex;
    align-items: center;
    background: #f4f4f4;
    border-radius: 25px;    /* Bordes apenas más redondeados */
    padding: 6px 15px;      /* Más espacio "arriba y abajo" para que no se vea aplastado */
    border: 1px solid #ddd;
    width: 100%;            /* Obliga a la barra blanca a ocupar el 50% de la pantalla que le dimos arriba */
}

.search-container input {
    border: none;
    background: transparent;
    width: 100%;
    padding: 4px;
    outline: none;
    font-size: 15px;        /* Letra apenas más grande y legible */
}

.search-icon-btn {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #111;
    box-shadow: none;
    appearance: none;
}

.search-icon-btn:focus {
    outline: none;
    box-shadow: none;
}

/* Estilos para el popup de publicidad */
.popup-publicidad {
    padding: 5px;
}

.grid-publicidad {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Crea 2 columnas iguales (2x2) */
    gap: 10px; /* Espacio entre los botones */
}

.pub-btn img {
    width: 100%;
    height: 100px; /* Altura fija para que todos los botones sean iguales */
    object-fit: cover; /* Evita que la imagen se deforme */
    border-radius: 8px;
    border: 2px solid #C2B280; /* Color dorado característico de tu web */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pub-btn img:hover {
    transform: scale(1.05); /* Efecto de zoom suave al pasar el mouse */
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}



@keyframes mecer_icono {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(8deg); }
    75% { transform: rotate(-8deg); }
}

.animacion-mecer {
    animation: mecer_icono 2s infinite ease-in-out;
    transform-origin: bottom center; /* Fundamental para que el "pin" quede clavado abajo */
}



#floating-buttons-container {
    position: absolute;
    bottom: 25px;
    left: 20px;
    z-index: 1200;
    display: flex;
    flex-direction: column-reverse; /* El último creado queda arriba */
    gap: 15px;
    transition: all 0.3s ease;
}

#left-panel.open ~ #map-container #floating-buttons-container {
    left: 370px; /* Se desplaza con el panel */
}

.circular-focus-btn {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #fff;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border: 4px solid #C2B280; /* Default */
    transition: transform 0.2s;
    position: relative;
}

/* Colores Dinámicos */
.foco-caza { border-color: #2e7d32; } /* Verde Caza */
.foco-pesca { border-color: #0277bd; } /* Azul Pesca */

.circular-focus-btn img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.circular-focus-btn:hover { transform: scale(1.15); }

/* Etiqueta al pasar el mouse */
.btn-label {
    position: absolute;
    left: 75px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(32, 38, 32, 0.9);
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.circular-focus-btn:hover .btn-label { opacity: 1; }

