/* =========================================================
   Mi Viaje UI — Responsive
   Breakpoints comprobados: 320, 375, 390, 414, 768, 1024, 1280, 1440, 1920
   ========================================================= */

/* ---- ≤1280px: Grid a 3 columnas (Tablet grande / laptop pequeño) ---- */
@media (max-width: 1280px) {
	body.mvj-theme .mvj-grid,
	body.mvj-theme .hp-listings,
	body.mvj-theme .hp-listing__list,
	body.mvj-theme .hivepress-listings-container {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ---- ≤1024px: Tablet — 3 columnas, buscador se adapta ---- */
@media (max-width: 1024px) {
	body.mvj-theme .mvj-header__inner {
		padding: 12px 20px;
	}

	body.mvj-theme .mvj-header__nav {
		gap: 16px;
	}
}

/* ---- ≤900px: Tablet pequeña — 2 columnas ---- */
@media (max-width: 900px) {
	body.mvj-theme .mvj-grid,
	body.mvj-theme .hp-listings,
	body.mvj-theme .hp-listing__list,
	body.mvj-theme .hivepress-listings-container {
		grid-template-columns: repeat(2, 1fr);
	}

	body.mvj-theme .hp-listing-view,
	body.mvj-theme .hivepress-listing-view {
		grid-template-columns: 1fr;
	}

	body.mvj-theme .hp-listing--view-page.mvj-listing-grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	body.mvj-theme .mvj-listing-sidebar {
		position: static;
	}
}

/* ---- ≤768px: móvil grande — activa navegación de app ---- */
@media (max-width: 768px) {

	/* Header desktop se oculta: usamos bottom nav */
	body.mvj-theme .mvj-header__nav {
		display: none;
	}

	body.mvj-theme .mvj-header__inner {
		justify-content: center;
	}

	/* Bottom nav visible y fija */
	body.mvj-theme .mvj-bottom-nav {
		display: flex;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 200;
		padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
		border-radius: 0;
		border-left: none;
		border-right: none;
		border-bottom: none;
	}

	/* Reserva espacio para que la bottom nav no tape contenido */
	body.mvj-theme {
		padding-bottom: 76px;
	}

	/* Buscador se apila verticalmente */
	body.mvj-theme .mvj-search {
		flex-direction: column;
		align-items: stretch;
		border-radius: var(--mvj-radius-lg);
		padding: 14px;
		gap: 8px;
	}

	body.mvj-theme .mvj-search__divider {
		display: none;
	}

	body.mvj-theme .mvj-search__submit {
		width: 100%;
		border-radius: var(--mvj-radius-pill);
	}

	/* Filtros nativos de HivePress se ocultan y se abren en panel */
	body.mvj-theme .hp-listings__sidebar,
	body.mvj-theme .hp-block--listings-filter {
		display: none;
	}

	body.mvj-theme .mvj-filters-panel-open .hp-listings__sidebar,
	body.mvj-theme .mvj-filters-panel-open .hp-block--listings-filter {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 300;
		border-radius: 0;
		overflow-y: auto;
		padding: 24px;
	}

	body.mvj-theme .mvj-filters-trigger {
		display: block;
	}
}

/* ---- ≤600px: móvil estándar — 1 columna ---- */
@media (max-width: 600px) {
	body.mvj-theme .mvj-grid,
	body.mvj-theme .hp-listings,
	body.mvj-theme .hp-listing__list,
	body.mvj-theme .hivepress-listings-container {
		grid-template-columns: 1fr;
	}

	body.mvj-theme .hp-page,
	body.mvj-theme .hivepress-page,
	body.mvj-theme .mvj-search-wrap {
		padding-left: 16px;
		padding-right: 16px;
	}
}

/* ---- ≤375px: móviles pequeños ---- */
@media (max-width: 375px) {
	body.mvj-theme .mvj-header__logo {
		font-size: 1rem;
	}

	body.mvj-theme .mvj-bottom-nav__label {
		font-size: .62rem;
	}
}

/* Evita scroll horizontal en cualquier tamaño */
body.mvj-theme,
body.mvj-theme .hp-page,
body.mvj-theme .hivepress-page {
	overflow-x: hidden;
	max-width: 100%;
}
