/* =========================
   RESET BÁSICO
========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f4f6f8;
  color: #111;
}

/* =========================
   HEADER
========================= */
.top {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

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

.back {
  text-decoration: none;
  color: #2563eb;
  font-weight: 600;
}


/* =========================
   CONTENEDOR
========================= */
#negocios {
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

/* =========================
   LINK NEGOCIO
========================= */
.negocio {
  text-decoration: none;
  color: inherit;
}

/* =========================
   CARD
========================= */
.negocio-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  transition: transform .15s ease, box-shadow .15s ease;
}

.negocio-card:active {
  transform: scale(.98);
}

/* =========================
   IMAGEN
========================= */
.negocio-img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: #e5e7eb;
}

/* =========================
   TEXTO
========================= */
.negocio-card h4 {
  font-size: 17px;
  margin: 10px 12px 2px;
  font-weight: 600;
}

.negocio-card p {
  margin: 2px 12px;
  font-size: 14px;
  color: #555;
}

/* =========================
   DISTANCIA
========================= */
.negocio-distancia {
  margin: 8px 12px 12px;
  display: inline-block;
  font-size: 13px;
  color: #065f46;
  background: #ecfdf5;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 500;
}

/* =========================
   PAGINACIÓN
========================= */
.paginacion {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 20px 0 30px;
}

.paginacion button {
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: #ffffff;
  box-shadow: 0 3px 8px rgba(0,0,0,.1);
  font-size: 14px;
}

.paginacion button:active {
  transform: scale(.95);
}

/* =========================
   TABLET / DESKTOP
========================= */
@media (min-width: 768px) {
  #negocios {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  #negocios {
    grid-template-columns: repeat(3, 1fr);
  }
}
