/* =========================
   RESET
========================= */
* {
  box-sizing: border-box;
  font-family: system-ui, sans-serif;
}

body {
  margin: 0;
  background: #f4f6f8;
  color: #333;
}
h3{
  text-align: center;
}


/* =========================
   HEADER / TOP BAR
========================= */
.top {
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}

.top-bar h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

/* =========================
   MENU TOP
========================= */
.menu-toggle {
  display: none;
  font-size: 22px;
  cursor: pointer;
}

.acciones-top {
  display: flex;
  gap: 8px;
}

.btn-top {
  padding: 8px 14px;
  background: #111827;
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}

.btn-top.salir {
  background: #dc2626;
}

/* =========================
   FILTROS
========================= */
.filtros {
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  background: #f9fafb;
}

.filtros input,
.filtros select {
  flex: 1;
  min-width: 140px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

/* =========================
   CONTENIDO
========================= */
.contenedor {
  padding: 20px;
}

/* =========================
   GRID
========================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 15px;
}
/* =========================
   LIMITE GRID EN PC (5 MAX)
========================= */
@media (min-width: 1200px){
  .grid{
    max-width: calc(220px * 5 + 15px * 4); /* 5 cards + gaps */
    margin: auto;
  }
}


/* =========================
   CARD NEGOCIO
========================= */
.card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  transition: transform .15s;
}

.card:hover {
  transform: translateY(-3px);
}

.card .img-negocio{
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: #eee;
}


.card-body {
  padding: 12px;
}

.card-body h4 {
  margin: 0 0 4px;
}

.dir {
  font-size: 13px;
  color: #555;
}

.tipo {
  display: inline-block;
  font-size: 12px;
  color: #2563eb;
  margin-bottom: 4px;
}

.estado {
  display: block;
  font-weight: 600;
  margin: 6px 0;
}

.estado.on { color: #15803d; }
.estado.off { color: #b91c1c; }

/* =========================
   BOTÓN CARD
========================= */
.btn {
  display: block;
  text-align: center;
  padding: 8px;
  margin-top: 8px;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
}

/* =========================
   PAGINACIÓN
========================= */
.paginacion {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.paginacion button {
  padding: 6px 12px;
  border: none;
  background: #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {

  .menu-toggle {
    display: block;
  }

  .acciones-top {
    position: absolute;
    top: 60px;
    right: 12px;
    background: #ffffff;
    flex-direction: column;
    width: 200px;
    padding: 12px;
    border-radius: 14px;
    box-shadow: 0 15px 40px rgba(0,0,0,.15);
    display: none;
    z-index: 999;
  }

  .acciones-top.activo {
    display: flex;
  }

  .btn-top {
    width: 100%;
    text-align: center;
  }
}

/* =========================
   CARRUSEL NEGOCIOS
========================= */
.carrusel-negocios{
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 10px 5px 20px;
}

.carrusel-negocios .card{
  min-width: 260px;
  max-width: 260px;
  flex-shrink: 0;
  scroll-snap-align: start;
}

/* Scroll horizontal bonito */
.carrusel-negocios::-webkit-scrollbar{
  height: 8px;
}

.carrusel-negocios::-webkit-scrollbar-thumb{
  background: #d1d5db;
  border-radius: 10px;
}

/* =========================
   CARRUSEL NEGOCIOS - MOBILE
========================= */
.carrusel-negocios{
  gap: 12px;
  padding: 8px 4px 16px;
}

.carrusel-negocios .card{
  min-width: 80%;
  max-width: 80%;
}

/* Ajustes visuales de la card */
.carrusel-negocios .card img{
  height: 160px;
}

.carrusel-negocios .card-body h4{
  font-size: 16px;
}

.carrusel-negocios .btn{
  font-size: 15px;
  padding: 10px;
}

/* =========================
   AJUSTES CARD EN CARRUSEL
========================= */
.carrusel-negocios .card{
  min-width: 220px;
  max-width: 220px;
}

.carrusel-negocios .card img{
  height: 110px;
}

.carrusel-negocios .card-body{
  padding: 10px;
}

.carrusel-negocios .card-body h4{
  font-size: 14px;
  margin-bottom: 4px;
}

.carrusel-negocios .dir{
  font-size: 12px;
}

.carrusel-negocios .btn{
  font-size: 13px;
  padding: 6px;
}

/* =========================
   BUSQUEDA PRODUCTOS
========================= */
.busqueda-productos{
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  background: #f9fafb;
}

.busqueda-productos input{
  flex: 1;
  min-width: 220px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  font-size: 15px;
}

.btn-ver-negocios{
  padding: 12px 16px;
  background: #111827;
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* =========================
   LOGO - DESKTOP
========================= */
.logo{
  display: flex;
  align-items: center;
}

.logo img{
  height: 48px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

/* =========================
   BOTÓN INSTALAR PWA
========================= */
#btnInstall{
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;

  background: #111827; /* mismo theme */
  color: #fff;
  border: none;
  border-radius: 14px;

  padding: 14px 22px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .3px;

  display: none; /* JS lo controla */
  align-items: center;
  gap: 10px;

  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  cursor: pointer;

  animation: pwaIn .4s ease-out;
}

/* Hover PC */
#btnInstall:hover{
  background: #1f2937;
}

/* Active (tap) */
#btnInstall:active{
  transform: translateX(-50%) scale(.96);
}

/* =========================
   ANIMACIÓN ENTRADA
========================= */
@keyframes pwaIn{
  from{
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to{
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* =========================
   MOBILE AJUSTES
========================= */
@media (max-width: 768px){
  #btnInstall{
    width: calc(100% - 30px);
    bottom: 12px;
    padding: 16px;
    font-size: 16px;
  }
}

.nombre-negocio{
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;

  /* 🔥 CLAVE */
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.icon-verificado{
  width: 1.5em !important;
  height: 1.5em !important;
  object-fit: contain !important;
}
