:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1a2332;
  --muted: #5a6b7d;
  --primary: #4293E1;
  --primary-soft: rgba(66, 147, 225, 0.12);
  --border: #d8e0ea;
  --ok: #128a4b;
  --bad: #c0392b;
  --shadow: 0 8px 24px rgba(26, 35, 50, 0.06);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
}

.app-top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.app-top-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand strong { display: block; font-size: 0.95rem; line-height: 1.15; }
.brand small { color: var(--muted); font-size: 0.8rem; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-ghost { background: transparent; }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 14px calc(96px + env(safe-area-inset-bottom));
}

.filters {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}
.filters-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 900px) {
  .filters-row { grid-template-columns: 1.3fr repeat(5, minmax(0, 1fr)) auto; }
}
@media (min-width: 700px) and (max-width: 899px) {
  .filters-row { grid-template-columns: 1fr 1fr; }
}
.filters input,
.filters select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
  color: var(--text);
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
}
.chip.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.meta-line {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 12px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  width: 100%;
  cursor: pointer;
  color: var(--text);
}
.card-cover {
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #dbeafe, #eef2ff);
  background-size: cover;
  background-position: center;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text);
}
.card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .price-line,
.detail-content .price-line {
  margin: 4px 0 0;
  font-weight: 800;
  font-size: 1.02rem;
  color: #128a4b;
}
.card .sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}
.card .card-desc {
  margin: 0;
  color: #3f3f46;
  font-size: 0.86rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  background: #f4f7fb;
  color: var(--text);
}
.badge.open { color: #166534; border-color: #86efac; background: #dcfce7; }
.badge.closed { color: #991b1b; border-color: #fecaca; background: #fee2e2; }
.badge.featured {
  color: #1a2332;
  border-color: #f5d76e;
  background: #ffd84d;
  font-weight: 900;
}
.card.is-featured {
  box-shadow: 0 0 0 2px #ffd84d, 0 10px 28px rgba(26, 35, 50, 0.12);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.actions .btn {
  padding: 7px 9px;
  font-size: 0.72rem;
  background: rgba(255,255,255,0.95);
  color: var(--text);
}
.actions .btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Todas las pantallas: foto + nombre; botones/detalle al abrir la ficha */
.card-body {
  padding: 12px 10px 10px;
  gap: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 5%, rgba(0,0,0,0.25) 75%, transparent);
}
.card-body .sub,
.card-body .badges,
.card-body .actions {
  display: none;
}
.card h3 {
  font-size: 0.92rem;
  -webkit-line-clamp: 2;
}
.card.is-featured::after {
  content: 'Destacado';
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 0.68rem;
  font-weight: 900;
  color: #1a2332;
  background: #ffd84d;
  border: 1px solid #f5d76e;
  border-radius: 999px;
  padding: 3px 8px;
  pointer-events: none;
}

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0 8px;
}
.pager .btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.pager .page-info { color: var(--muted); font-size: 0.88rem; font-weight: 700; }

.empty, .loading {
  text-align: center;
  padding: 36px 16px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 80;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.detail-overlay.open { display: flex; }
.detail-sheet {
  background: #fff;
  width: min(720px, 100%);
  max-height: min(92dvh, 920px);
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
}
@media (min-width: 860px) {
  .detail-overlay { align-items: center; padding: 24px; }
  .detail-sheet {
    width: min(980px, 100%);
    border-radius: 16px;
    max-height: 88vh;
  }
}
.detail-head {
  position: relative;
  min-height: 46px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background: #fff;
  z-index: 2;
}
.detail-head h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.detail-head .btn {
  background: #f4f7fb;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  min-height: 34px;
  padding: 6px 12px;
  font-weight: 700;
}
.detail-body {
  overflow: auto;
  padding: 0;
  -webkit-overflow-scrolling: touch;
}
.detail-shop {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
}
.detail-gallery {
  padding: 16px 16px 4px;
  background: #f7f8fa;
}
.detail-photo {
  display: grid;
  place-items: center;
  width: min(100%, 460px);
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 1px solid #e6ebf2;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  cursor: zoom-in;
}
.detail-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #fff;
}
.detail-photo.is-empty {
  cursor: default;
  background: #f4f7fb;
  color: #94a3b8;
  font-size: 4rem;
  font-weight: 800;
}
.detail-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  width: min(100%, 460px);
  margin: 10px auto 0;
}
.detail-thumb.is-on { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(66, 147, 225, 0.25); }
.detail-summary {
  padding: 18px 18px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  min-width: 0;
}
.detail-kicker {
  margin: 0;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.detail-name {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.2;
  color: var(--text);
}
.detail-summary .badges { justify-content: flex-start; }
.detail-price {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  color: #128a4b;
  line-height: 1.1;
}
.detail-excerpt {
  margin: 0;
  color: #3f4a5a;
  line-height: 1.5;
  text-align: left;
}
.detail-facts {
  width: 100%;
  display: grid;
  gap: 0;
  margin: 4px 0 0;
  text-align: left;
  border-top: 1px solid #e6ebf2;
}
.detail-facts div {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid #eef2f6;
}
.detail-facts dt {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}
.detail-facts dd { margin: 0; color: var(--text); }
.detail-actions { width: 100%; }
.detail-actions .btn { flex: 1; min-height: 44px; }
.btn-wa { background: #128c7e; border-color: #128c7e; color: #fff; }
.btn-call { background: var(--primary); border-color: var(--primary); color: #fff; }
@media (min-width: 860px) {
  .detail-shop {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
  }
  .detail-gallery {
    position: sticky;
    top: 0;
    padding: 22px;
    border-right: 1px solid var(--border);
  }
  .detail-photo,
  .detail-thumbs { width: 100%; max-width: none; }
  .detail-summary { padding: 22px 26px 28px; }
}
.detail-summary p { text-align: left; }
.detail-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  text-align: left;
}
.hours-block h3,
.detail-content h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--text);
  text-align: left;
}
.detail-content .badges {
  justify-content: flex-start;
}
.detail-content .badges .badge {
  color: var(--text);
  background: #f1f5f9;
  border-color: var(--border);
}
.detail-content .badges .badge.open {
  color: var(--ok);
  border-color: #b7e4c7;
  background: #edfdf3;
}
.detail-content .badges .badge.closed {
  color: var(--bad);
  border-color: #f1c0c0;
  background: #fff1f1;
}
.detail-content .badges .badge.featured {
  color: #1a2332;
  background: #ffd84d;
  border-color: #f5d76e;
}
.detail-content .block {
  width: 100%;
}
.hours-block h3 {
  margin-bottom: 10px;
}
.hours-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.hours-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
}
.hours-row:last-child { border-bottom: 0; }
.hours-row:nth-child(even) { background: #f8fafc; }
.hours-day {
  font-weight: 700;
  color: var(--text);
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hours-day em {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #1d4f8c;
  background: #e8f2fc;
  border: 1px solid #c7dff5;
  border-radius: 999px;
  padding: 2px 7px;
}
.hours-time {
  font-weight: 650;
  color: #334155;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hours-row.is-today {
  background: #eef6ff;
  border-left: 3px solid var(--primary);
  padding-left: 11px;
}
.hours-row.is-today .hours-time {
  color: #1d4f8c;
  font-weight: 800;
}
.hours-row.is-closed .hours-time {
  color: var(--bad);
  font-weight: 700;
}
.detail-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 10px;
  width: 100%;
  margin-top: 2px;
}
.detail-actions .btn {
  width: 100%;
  min-height: 44px;
  padding: 11px 10px;
  font-size: 0.88rem;
  font-weight: 800;
  border: 0;
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-call { background: #4293E1; }
.btn-wa { background: #25D366; }
.btn-maps { background: #EA4335; }
.detail-actions .btn-soft {
  background: #f4f7fb;
  color: #1a2332;
  border: 1px solid #e2e8f0;
}
.btn-waze { background: #33CCFF; color: #0b2740; }
.btn-call:hover,
.btn-wa:hover,
.btn-maps:hover,
.btn-waze:hover { filter: brightness(0.95); }

.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.gallery-thumb {
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
  cursor: zoom-in;
  width: 88px;
  height: 88px;
  display: block;
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.gallery-thumb:hover { border-color: var(--primary); }

/* Lightbox / softbox galería */
body.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 16, 28, 0.92);
  padding: 16px;
}
.lightbox.open { display: flex; }
.lightbox-img {
  max-width: min(96vw, 1100px);
  max-height: min(84dvh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.45);
  background: #0f172a;
}
.lightbox-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,0.95);
  color: #0f172a;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  z-index: 2;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: rgba(255,255,255,0.92);
  color: #0f172a;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.lightbox-prev { left: max(10px, env(safe-area-inset-left)); }
.lightbox-next { right: max(10px, env(safe-area-inset-right)); }
.lightbox-count {
  position: absolute;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  background: rgba(0,0,0,0.45);
  padding: 6px 12px;
  border-radius: 999px;
}
@media (max-width: 560px) {
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
  .gallery-thumb {
    width: 76px;
    height: 76px;
  }
}
@media (max-width: 480px) {
  .detail-gallery { padding: 12px 12px 0; }
  .detail-summary { padding: 14px 14px 22px; }
  .detail-name { font-size: 1.35rem; }
  .detail-facts div { grid-template-columns: 92px minmax(0, 1fr); }
  .detail-actions { gap: 8px; }
  .detail-actions .btn { font-size: 0.82rem; min-height: 42px; }
}

.hidden { display: none !important; }

/* Buses — zonas */
.buses-intro {
  text-align: center;
  margin: 8px 0 18px;
}
.buses-intro h1 {
  margin: 0 0 6px;
  font-size: 1.45rem;
  color: var(--text);
}
.buses-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.zone-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px) {
  .zone-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 980px) {
  .zone-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.zone-card {
  display: grid;
  gap: 6px;
  text-align: left;
  padding: 18px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  cursor: pointer;
  border-left: 5px solid var(--primary);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.zone-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}
.zone-card .zone-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}
.zone-card .zone-blurb {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.35;
}
.zone-card .zone-count {
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--primary);
}
.zone-norte { border-left-color: #2563eb; }
.zone-centro { border-left-color: #0d9488; }
.zone-pacifico { border-left-color: #4293E1; }
.zone-occidente { border-left-color: #7c3aed; }
.zone-sur { border-left-color: #ea580c; }
.zone-sur_oriente { border-left-color: #ca8a04; }
.zone-raan { border-left-color: #059669; }
.zone-raas { border-left-color: #0891b2; }
.zone-otras { border-left-color: #64748b; }

.zone-toolbar {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.zone-toolbar h2 {
  margin: 0 0 2px;
  font-size: 1.25rem;
}
.zone-toolbar .zone-blurb {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.buses-filters {
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .buses-filters {
    grid-template-columns: 1.4fr 1fr 1fr auto;
  }
}

.bus-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 720px) {
  .bus-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .bus-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.bus-hero {
  position: relative;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px 14px 42px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(16, 24, 36, 0.35), rgba(16, 24, 36, 0.42)),
    url("/assets/img/buses-hero.jpg?v=20261005bus5") center 40% / cover no-repeat;
  overflow: hidden;
}
.bus-hero h1 {
  margin: 0 0 6px;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.28);
}
.bus-hero p {
  margin: 0 0 16px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.28);
}
.bus-search {
  width: min(920px, 100%);
  max-width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  background: #fff;
  color: var(--text);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 16px 40px rgba(16, 32, 56, 0.18);
}
.bus-search select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  outline: none;
  box-shadow: none;
  background-color: #f4f7fb;
  border-radius: 10px;
  min-height: 46px;
  padding: 0 34px 0 12px;
  font: inherit;
  color: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23627484' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
}
.bus-search select:focus { outline: none; box-shadow: none; }
.bus-search button { min-height: 46px; }
@media (min-width: 900px) {
  .bus-hero { min-height: 380px; padding: 56px 24px 64px; }
  .bus-search {
    grid-template-columns: 1fr 1fr auto;
    align-items: stretch;
    gap: 0;
    padding: 6px;
    width: min(720px, 100%);
  }
  .bus-search select {
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 0 32px 0 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23627484' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 8px;
  }
  .bus-search button { margin-left: 8px; padding: 0 22px; border-radius: 10px; }
}
html[data-gabanto-placement="buses"] .app-top-inner,
html[data-gabanto-placement="buses"] .wrap { max-width: 1280px; }
@media (max-width: 720px) {
  .bus-hero { min-height: 300px; padding: 28px 12px 32px; }
  .bus-hero h1 { font-size: 1.55rem; }
  html[data-gabanto-placement="buses"] .wrap { padding-top: 12px; }
  html[data-gabanto-placement="buses"],
  html[data-gabanto-placement="buses"] body { overflow-x: hidden; }
}
.bus-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.bus-card-inner {
  flex: 1;
  padding: 14px 48px 14px 14px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}
.bus-card .time {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
}
.bus-card .route-line {
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.bus-card .sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}
.bus-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 8px;
}
.bus-tag.express {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fdba74;
}

.bus-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.bus-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
}
.bus-legend b { font-weight: 800; }
.bus-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}
.bus-swatch.expreso,
.bus-dot.expreso { background: #FFCD11; }
.bus-swatch.interlocal,
.bus-dot.interlocal { background: #0E8A62; }
.bus-swatch.ruteado,
.bus-dot.ruteado { background: #8B0000; }
.bus-dot {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px rgba(26, 35, 50, 0.22);
  padding: 0;
  z-index: 2;
}
button.bus-dot {
  cursor: pointer;
  appearance: none;
}
button.bus-dot:hover { transform: scale(1.06); }
.bus-mode-btn {
  margin-top: auto;
  width: 100%;
  box-sizing: border-box;
  border: 0;
}
.bus-mode-btn.expreso { background: #FFCD11; color: #1a2332; }
.bus-mode-btn.interlocal { background: #0E8A62; color: #fff; }
.bus-mode-btn.ruteado { background: #8B0000; color: #fff; }
.bus-edit-hint {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
}
.bus-type-pop {
  position: fixed;
  z-index: 80;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px;
  display: grid;
  gap: 6px;
  min-width: 168px;
}
.bus-type-pop[hidden] { display: none; }
.bus-type-pop p {
  margin: 2px 4px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--muted);
}
.bus-type-pop button {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 800;
  cursor: pointer;
  color: var(--text);
}
.bus-type-pop button.on { border-color: #4293E1; color: #4293E1; }
.bus-type-pop i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}

.site-footer {
  margin-top: 28px;
  padding: 18px 14px calc(72px + env(safe-area-inset-bottom));
  text-align: center;
}
.site-footer p {
  margin: 0 auto;
  max-width: 720px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}
.site-footer a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.back-top {
  position: fixed;
  right: 14px;
  bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  z-index: 45;
  width: 46px;
  height: 46px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--primary, #4293E1);
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(20, 40, 70, .28);
}
.back-top[hidden] { display: none !important; }
.back-top:hover { filter: brightness(1.05); }

.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  z-index: 50;
}
.bottom-nav a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 800;
  padding: 4px 12px;
  font-size: 0.88rem;
}
.bottom-nav .foot-copy {
  margin: 0;
  max-width: 960px;
  padding: 0 6px;
  text-align: center;
  color: var(--muted);
  font-size: 0.58rem;
  line-height: 1.25;
  font-weight: 500;
}
.bottom-nav .foot-copy a {
  display: inline;
  padding: 0;
  font-weight: 700;
  font-size: inherit;
}

/* Entrada por categorías + listado agrupado */
.browse-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  min-height: 0;
}
.browse-bar:empty { display: none; }
.browse-bar-hint {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}
.listings-root {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.list-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.list-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.list-section-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex: 1 1 auto;
  min-width: 0;
}
.list-section-count {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 4px 10px;
}
.section-more {
  align-self: flex-start;
}
/* Ciudad → municipios (dónde comer / hoteles) */
.loc-city {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.loc-city:last-child { border-bottom: none; }
.loc-city-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.15;
}
.loc-munis {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Categoría / municipio: nombre simple + carrusel horizontal */
.cat-rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.cat-rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}
.cat-rail-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1.2;
}
.loc-city .cat-rail-title {
  font-size: 1rem;
  font-weight: 700;
  color: #2a3a4d;
}
.cat-rail-all {
  border: none;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}
.cat-rail-all:hover { text-decoration: underline; }
.cat-rail-wrap {
  position: relative;
  min-width: 0;
}
.cat-rail-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 2px 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.cat-rail-track::-webkit-scrollbar { height: 6px; }
.cat-rail-track::-webkit-scrollbar-thumb {
  background: #c5d0dc;
  border-radius: 999px;
}
.cat-rail-track > .card {
  flex: 0 0 158px;
  width: 158px;
  max-width: 158px;
  scroll-snap-align: start;
}
@media (min-width: 700px) {
  .cat-rail-track > .card {
    flex-basis: 180px;
    width: 180px;
    max-width: 180px;
  }
}
@media (min-width: 980px) {
  .cat-rail-track > .card {
    flex-basis: 200px;
    width: 200px;
    max-width: 200px;
  }
}
.cat-rail-nav {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-55%);
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(26, 35, 50, 0.12);
  align-items: center;
  justify-content: center;
  padding: 0;
}
.cat-rail-prev { left: 4px; }
.cat-rail-next { right: 4px; }
@media (min-width: 760px) {
  .cat-rail-nav { display: inline-flex; }
  .cat-rail-track { padding-left: 40px; padding-right: 40px; }
}
.listings-root > .grid,
.list-section > .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 720px) {
  .listings-root > .grid,
  .list-section > .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}
@media (min-width: 1100px) {
  .listings-root > .grid,
  .list-section > .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Catálogo al estilo de la tienda */
body.catalog-shop .app-top-inner,
body.catalog-shop .wrap {
  max-width: 1280px;
}
body.catalog-shop .filters {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin-bottom: 8px;
}
body.catalog-shop .filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
body.catalog-shop .filters-row > input,
body.catalog-shop .filters-row > select {
  flex: 1 1 160px;
  width: auto;
  min-width: 0;
  max-width: 100%;
}
.app-tab { display: none; }
.app-filters-btn { display: none; }
@media (max-width: 720px) {
  body.catalog-shop,
  body.catalog-shop .wrap,
  body.catalog-shop .app-top-inner {
    max-width: 100%;
    overflow-x: hidden;
  }
  body.catalog-shop .app-top-inner { padding: 8px 12px; }
  body.catalog-shop .brand small { display: none; }
  body.catalog-shop .wrap { padding: 10px 12px calc(88px + env(safe-area-inset-bottom)); }
  body.catalog-shop .intro { display: none; }
  body.catalog-shop .filters-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }
  body.catalog-shop .filters-row > input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    grid-column: 1;
  }
  body.catalog-shop .app-filters-btn {
    display: inline-flex;
    grid-column: 2;
    min-height: 44px;
  }
  body.catalog-shop .filters-row > select,
  body.catalog-shop .filters-row > .chip {
    display: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    grid-column: 1 / -1;
  }
  body.catalog-shop .filters.is-open .filters-row > select,
  body.catalog-shop .filters.is-open .filters-row > .chip {
    display: block;
  }
  body.catalog-shop .listings-root > .grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  body.catalog-shop .card-cover { aspect-ratio: 16 / 10; }
  .bottom-nav > a,
  .bottom-nav .foot-copy { display: none; }
  .bottom-nav {
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
  }
  .app-tab {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    align-items: end;
  }
  .app-tab a,
  .app-tab button {
    border: 0;
    background: transparent;
    color: var(--muted);
    text-decoration: none;
    font: inherit;
    font-size: 0.68rem;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 0;
    cursor: pointer;
  }
  .app-tab .app-tab-plus {
    width: 46px;
    height: 46px;
    margin-top: -16px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    line-height: 1;
    box-shadow: 0 8px 16px rgba(66, 147, 225, 0.35);
  }
}
body.catalog-shop .filters-row > .btn,
body.catalog-shop .filters-row > .chip {
  flex: 0 0 auto;
  width: auto;
}
body.catalog-shop .browse-bar:empty { display: none; }
body.catalog-shop .intro {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.92rem;
}
body.catalog-shop .gb-aviso { margin: 0 0 12px; }
body.catalog-shop .gb-aviso[hidden] { display: none !important; }
body.catalog-shop .gb-aviso-slide {
  display: block;
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 8px;
}
body.catalog-shop .gb-aviso-slide img {
  display: block;
  width: 100%;
  height: auto;
}
body.catalog-shop .listings-root > .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 721px) {
  body.catalog-shop .listings-root > .grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
  }
}
body.catalog-shop .card {
  height: 100%;
  position: relative;
  text-align: left;
}
body.catalog-shop .card-cover {
  aspect-ratio: 1 / 1;
  background: #e8eef5 center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.catalog-shop .cover-empty {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.85rem;
}
body.catalog-shop .card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 8px 8px 10px;
  gap: 0;
  background: #fff;
}
body.catalog-shop .card-cat {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}
body.catalog-shop .card h3 {
  margin: 0 0 2px;
  font-size: 0.92rem;
  line-height: 1.25;
  color: var(--text);
}
body.catalog-shop .card .sub {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.78rem;
}
body.catalog-shop .card .card-desc {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.catalog-shop .card-body .sub,
body.catalog-shop .card-body .card-desc {
  display: block;
}
body.catalog-shop .card .card-desc {
  display: -webkit-box;
}
body.catalog-shop .card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
}
body.catalog-shop .card-actions .btn {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  font-size: 0.78rem;
}
body.catalog-shop .card-quick { background: #fff; }
body.catalog-shop .pager .btn:disabled { opacity: 0.45; cursor: default; }
@media (max-width: 720px) {
  body.catalog-shop .listings-root > .grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  body.catalog-shop .card-cover { aspect-ratio: 16 / 10; }
}

