/* ═══════════════════════════════════════════════════════
   Metro Directorio GeoDirectory — metro-directorio.css
   ═══════════════════════════════════════════════════════ */

/* ── BUSCADOR ── */
.mmd-search-form {
  margin-bottom: 20px;
}
.mmd-search-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid #e4e4e7;
  border-radius: 10px;
  padding: 10px 16px;
  transition: border-color .2s;
}
.mmd-search-inner:focus-within {
  border-color: #00A651;
}
.mmd-search-inner input[type="text"] {
  flex: 1;
  border: none;
  outline: none;
  font-size: .88rem;
  color: #111113;
  background: transparent;
  font-family: inherit;
  height: auto;
  box-shadow: none;
  padding: 0;
}
.mmd-search-inner input::placeholder { color: #a1a1aa; }
.mmd-search-inner button {
  background: #00A651;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 7px 16px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  font-family: inherit;
  line-height: 1;
  box-shadow: none;
}
.mmd-search-inner button:hover { background: #008f46; }

/* ── LAYOUT BASE ── */
.mmd-wrap {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #111113;
  max-width: 1100px;
  margin: 0 auto;
}
.mmd-wrap * { box-sizing: border-box; }
.mmd-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* ── SIDEBAR ── */
.mmd-sidebar {
  width: 210px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  padding: 20px 16px;
  position: sticky;
  top: 20px;
}
.mmd-sidebar-title {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #71717A;
  margin-bottom: 14px;
}
.mmd-filtro-grupo { margin-bottom: 20px; }
.mmd-filtro-grupo:last-child { margin-bottom: 0; }
.mmd-filtro-label {
  font-size: .75rem;
  font-weight: 700;
  color: #111113;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mmd-filtro-label::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 13px;
  background: #00A651;
  border-radius: 2px;
}

/* Chips de línea */
.mmd-linea-chips { display: flex; flex-direction: column; gap: 4px; }
.mmd-linea-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 500;
  color: #52525b;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.mmd-linea-chip:hover  { background: #f4f4f5; color: #111113; }
.mmd-linea-chip.active { background: #f0fdf4; color: #111113; font-weight: 700; }
.mmd-linea-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mmd-linea-dot.todas {
  background: linear-gradient(135deg, #00A651, #0072BC);
}

/* Chips de categoría */
.mmd-cat-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.mmd-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #e4e4e7;
  font-size: .72rem;
  font-weight: 500;
  color: #52525b;
  text-decoration: none;
  background: #fff;
  transition: all .15s;
  white-space: nowrap;
}
.mmd-cat-chip:hover   { border-color: #a1a1aa; color: #111; }
.mmd-cat-chip.active  { background: #111113; color: #fff; border-color: #111113; }
.mmd-cat-count {
  font-size: .65rem;
  color: #a1a1aa;
  font-weight: 400;
}
.mmd-cat-chip.active .mmd-cat-count { color: rgba(255,255,255,.6); }

/* Pills de calificación */
.mmd-pill-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.mmd-pill {
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid #e4e4e7;
  font-size: .72rem;
  font-weight: 600;
  color: #52525b;
  text-decoration: none;
  background: #fff;
  transition: all .15s;
  white-space: nowrap;
}
.mmd-pill:hover  { border-color: #a1a1aa; color: #111; }
.mmd-pill.active { background: #111113; color: #fff; border-color: #111113; }

/* Limpiar filtros */
.mmd-limpiar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .72rem;
  color: #a1a1aa;
  text-decoration: none;
  margin-top: 14px;
  transition: color .15s;
}
.mmd-limpiar:hover { color: #E24B4A; }

/* ── CONTENIDO ── */
.mmd-content { flex: 1; min-width: 0; }

.mmd-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.mmd-count { font-size: .85rem; color: #52525b; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mmd-count strong { color: #111113; font-weight: 700; }
.mmd-count-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  background: #f4f4f5;
  color: #52525b;
  border: 1px solid #e4e4e7;
}

.mmd-orden { display: flex; gap: 6px; flex-wrap: wrap; }
.mmd-orden-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #e4e4e7;
  font-size: .75rem;
  font-weight: 600;
  color: #52525b;
  text-decoration: none;
  background: #fff;
  transition: all .15s;
  white-space: nowrap;
}
.mmd-orden-btn:hover  { border-color: #a1a1aa; color: #111; }
.mmd-orden-btn.active { background: #111113; color: #fff; border-color: #111113; }

/* ── GRID ── */
.mmd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

/* ── TARJETA ── */
.mmd-card {
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.mmd-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
  transform: translateY(-2px);
  border-color: #d1d1d6;
}

/* Imagen con badges encima */
.mmd-card-img-wrap { position: relative; }
.mmd-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: #f4f4f5;
  display: block;
}
.mmd-card-img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #f4f4f5, #e4e4e7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  position: relative;
}

/* Badges de línea sobre la imagen */
.mmd-card-badges {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.mmd-card-badges--placeholder {
  position: absolute;
  bottom: 8px;
  left: 8px;
}
.mmd-card-badge {
  display: inline-block;
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: .03em;
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
}

/* Body de la tarjeta */
.mmd-card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.mmd-card-tag {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #71717A;
  margin-bottom: 4px;
}
.mmd-card-nombre {
  font-size: .88rem;
  font-weight: 700;
  color: #111113;
  line-height: 1.3;
  margin-bottom: 5px;
}
.mmd-card-dir {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-size: .7rem;
  color: #71717A;
  line-height: 1.4;
  margin-bottom: 5px;
}
.mmd-card-dir svg { flex-shrink: 0; margin-top: 1px; }
.mmd-card-rating {
  font-size: .75rem;
  font-weight: 600;
  color: #111113;
  margin-bottom: 6px;
}
.mmd-stars { color: #F59E0B; }

/* Líneas en el footer de la tarjeta */
.mmd-card-lineas-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #f4f4f5;
}
.mmd-card-linea-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .68rem;
  font-weight: 500;
  color: #52525b;
}
.mmd-card-linea-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mmd-card-ver {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: #008f46;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-top: 6px;
}

/* ── PAGINACIÓN ── */
.mmd-paginacion {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.mmd-pag-btn {
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #e4e4e7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  color: #52525b;
  background: #fff;
  transition: all .15s;
  padding: 0 10px;
}
.mmd-pag-btn:hover   { border-color: #a1a1aa; color: #111; }
.mmd-pag-btn.active  { background: #111113; color: #fff; border-color: #111113; }
.mmd-pag-btn.disabled { opacity: .35; pointer-events: none; }
.mmd-pag-ellipsis {
  color: #a1a1aa;
  font-size: .85rem;
  padding: 0 4px;
}

/* ── SIN RESULTADOS ── */
.mmd-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #71717A;
}
.mmd-empty-icon { font-size: 2.5rem; margin-bottom: 10px; }
.mmd-empty p { font-size: .9rem; margin-bottom: 12px; }
.mmd-empty-link {
  display: inline-block;
  background: #00A651;
  color: #fff;
  text-decoration: none;
  padding: 9px 22px;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  transition: background .2s;
}
.mmd-empty-link:hover { background: #008f46; }

/* ── GEOLOCALIZACIÓN — Cerca de mí ── */
.mmd-geo-grupo { margin-bottom: 0; }
.mmd-geo-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 12px;
  border: 2px dashed #c8e6c9;
  background: linear-gradient(135deg, #f0fdf4 0%, #e8f5e9 100%);
  cursor: pointer;
  transition: all .2s;
}
.mmd-geo-btn:hover {
  border-color: #00A651;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,166,81,.15);
}
.mmd-geo-btn.mmd-geo-active {
  border-style: solid;
  border-color: #00A651;
  background: #00A651;
}
.mmd-geo-btn.mmd-geo-active .mmd-geo-label,
.mmd-geo-btn.mmd-geo-active .mmd-geo-sub { color: #fff; }
.mmd-geo-btn.mmd-geo-active .mmd-geo-icon svg { stroke: #fff; }
.mmd-geo-btn.mmd-geo-loading {
  border-color: #a1a1aa;
  background: #f4f4f5;
}
.mmd-geo-btn.mmd-geo-loading .mmd-geo-icon svg {
  animation: mmd-geo-pulse 1.2s infinite;
}
@keyframes mmd-geo-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}
.mmd-geo-btn.mmd-geo-error {
  border-color: #fca5a5;
  background: #fef2f2;
}
.mmd-geo-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0,166,81,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mmd-geo-btn.mmd-geo-active .mmd-geo-icon { background: rgba(255,255,255,.2); }
.mmd-geo-btn.mmd-geo-error .mmd-geo-icon { background: rgba(220,80,60,.1); }
.mmd-geo-icon svg { stroke: #00A651; transition: stroke .2s; }
.mmd-geo-btn.mmd-geo-error .mmd-geo-icon svg { stroke: #dc5040; }
.mmd-geo-txt { flex: 1; min-width: 0; }
.mmd-geo-label {
  font-size: .82rem;
  font-weight: 700;
  color: #111113;
  display: block;
  line-height: 1.3;
}
.mmd-geo-sub {
  font-size: .68rem;
  color: #71717A;
  display: block;
  margin-top: 2px;
}
.mmd-geo-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 10px;
  background: #f0fdf4;
  border: 1px solid #c8e6c9;
  border-radius: 8px;
}
.mmd-geo-found {
  font-size: .7rem;
  color: #00A651;
  font-weight: 500;
  line-height: 1.3;
}
.mmd-geo-clear {
  font-size: .68rem;
  font-weight: 600;
  color: #a1a1aa;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  font-family: inherit;
  transition: color .15s;
  box-shadow: none;
  line-height: 1;
}
.mmd-geo-clear:hover { color: #E24B4A; }

/* Divisor visual entre geo y los filtros normales */
.mmd-geo-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #e4e4e7 20%, #e4e4e7 80%, transparent 100%);
  margin: 16px 0;
}

/* Badge de distancia en las tarjetas */
.mmd-dist-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  color: #00A651;
  background: #f0fdf4;
  border: 1px solid #c8e6c9;
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 6px;
}

/* Nota de rutas rc_lugares */
.mmd-rc-nota {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #f0fdf4 0%, #e8f5e9 100%);
  border: 1.5px solid #c8e6c9;
  border-radius: 12px;
}
.mmd-rc-nota-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}
.mmd-rc-nota-txt {
  font-size: .82rem;
  color: #374151;
  line-height: 1.5;
}
.mmd-rc-nota-txt strong {
  color: #00A651;
  font-weight: 700;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .mmd-layout       { flex-direction: column; }
  .mmd-sidebar      { width: 100%; position: static; }
  .mmd-linea-chips  { flex-direction: row; flex-wrap: wrap; }
  .mmd-grid         { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .mmd-grid    { grid-template-columns: 1fr; }
  .mmd-orden   { flex-wrap: wrap; }
  .mmd-topbar  { flex-direction: column; align-items: flex-start; }
}
