/*
 * Worldprom · versión móvil tipo app (≤ 767 px). En computadora no aplica nada.
 * Azul #37377a, salmón #f16a5b. Sin verdes.
 * Thomas (agente de desarrollo), 2026-11-04.
 */
@media (max-width: 767px) {
	body.wpmov {
		--wpmov-navy: #37377a;
		--wpmov-coral: #f16a5b;
		--wpmov-line: #e3e6ef;
		--wpmov-soft: #f6f7fb;
		--wpmov-muted: #6b6b85;
		--wpmov-safe: env(safe-area-inset-bottom, 0px);
		padding-bottom: calc(72px + var(--wpmov-safe)) !important;
	}
	body.wpmov.wpmov-ficha { padding-bottom: calc(124px + var(--wpmov-safe)) !important; }
	body.wpmov.wpmov-compra { padding-bottom: 0 !important; }

	/* Mientras se arma la versión móvil (fracciones de segundo) la página no se
	   muestra, para que no aparezca el diseño anterior. Si el script fallara,
	   la página aparece igual a los 3 s. */
	body.wpmov:not(.wpmov-listo) { animation: wpmov-aparecer 0s linear 3s forwards; opacity: 0; }
	@keyframes wpmov-aparecer { to { opacity: 1; } }

	/* Lo que reemplaza esta versión */
	body.wpmov .elementor-location-header,
	body.wpmov [data-elementor-type="header"],
	body.wpmov .worldpromp-quick-access,
	body.wpmov .wpcb-launcher {
		display: none !important;
	}
	body.wpmov .grecaptcha-badge { visibility: hidden !important; }
	body.wpmov #wpcb { z-index: 100002 !important; }

	/* Barra superior */
	.wpmov-top {
		position: sticky;
		top: 0;
		z-index: 1000;
		display: flex;
		align-items: center;
		justify-content: space-between;
		height: 56px;
		padding: 0 8px 0 14px;
		background: #fff;
		border-bottom: 1px solid #e9ebf2;
		box-sizing: border-box;
	}
	body.admin-bar .wpmov-top { top: 46px; }
	.wpmov-logo { display: flex; align-items: center; }
	.wpmov-logo img { display: block; width: auto; max-width: 140px; height: 38px; object-fit: contain; }
	.wpmov-top__acciones { display: flex; align-items: center; }
	.wpmov-icono {
		position: relative;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		color: var(--wpmov-navy) !important;
	}
	.wpmov-icono span:first-child,
	.wpmov-nav span { display: inline-flex; }
	.wpmov-cart-count {
		position: absolute;
		top: 4px;
		right: 2px;
		min-width: 18px;
		height: 18px;
		padding: 0 4px;
		border-radius: 9px;
		background: var(--wpmov-coral);
		color: #fff;
		font-size: 11px;
		font-weight: 700;
		line-height: 18px;
		text-align: center;
		box-sizing: border-box;
	}
	.wpmov-cart-count[hidden] { display: none !important; }

	/* Buscador, accesos y categorías */
	.wpmov-header { background: #fff; padding: 10px 0 0; border-bottom: 1px solid #e9ebf2; }
	.wpmov-buscar { padding: 0 16px 10px; }
	.wpmov-buscar .aws-container,
	.wpmov-buscar .aws-search-form { margin: 0 !important; }
	.wpmov-buscar .aws-search-form {
		height: 44px !important;
		border: 1.5px solid var(--wpmov-line) !important;
		border-radius: 12px !important;
		background: var(--wpmov-soft) !important;
		overflow: hidden;
	}
	.wpmov-buscar .aws-search-field {
		height: 100% !important;
		border: 0 !important;
		background: transparent !important;
		font-size: 15px !important;
		padding-left: 14px !important;
	}
	.wpmov-chips {
		display: flex;
		gap: 8px;
		padding: 0 16px 10px;
		overflow-x: auto;
		scrollbar-width: none;
	}
	.wpmov-chips::-webkit-scrollbar { display: none; }
	.wpmov-chip {
		flex: 0 0 auto;
		padding: 7px 13px;
		border-radius: 999px;
		background: #eef0fa;
		color: var(--wpmov-navy) !important;
		font-size: 13px;
		font-weight: 600;
		line-height: 1.2;
		text-decoration: none !important;
	}
	.wpmov-chip.is-destacado { background: #fff1ef; color: #c2412f !important; }
	.wpmov-cats {
		display: flex;
		gap: 12px;
		padding: 4px 16px 12px;
		overflow-x: auto;
		scroll-snap-type: x proximity;
		scrollbar-width: none;
	}
	.wpmov-cats::-webkit-scrollbar { display: none; }
	.wpmov-cats__item {
		flex: 0 0 64px;
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 6px;
		color: #2a2a45 !important;
		font-size: 11.5px;
		font-weight: 600;
		line-height: 1.2;
		text-align: center;
		text-decoration: none !important;
		scroll-snap-align: start;
	}
	.wpmov-cats__icono,
	.wpmov-hoja__icono {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 54px;
		height: 54px;
		border: 1.5px solid var(--wpmov-line);
		border-radius: 16px;
		background: #fff;
		color: var(--wpmov-navy);
		font-size: 22px;
		box-sizing: border-box;
	}
	.wpmov-cats__icono svg,
	.wpmov-hoja__icono svg { width: 24px; height: 24px; fill: currentColor; }
	.wpmov-cats__item.is-actual .wpmov-cats__icono { border-color: var(--wpmov-navy); background: var(--wpmov-navy); color: #fff; }

	/* Hoja de categorías */
	.wpmov-hoja { position: fixed; inset: 0; z-index: 100000; }
	.wpmov-hoja[hidden] { display: none; }
	.wpmov-hoja__fondo { position: absolute; inset: 0; background: rgb(30 30 60 / 45%); opacity: 0; transition: opacity .2s ease; }
	.wpmov-hoja__panel {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		max-height: 86vh;
		overflow-y: auto;
		padding: 0 16px calc(20px + var(--wpmov-safe));
		border-radius: 22px 22px 0 0;
		background: #fff;
		box-shadow: 0 -10px 30px rgb(20 20 50 / 25%);
		transform: translateY(100%);
		transition: transform .22s ease;
		box-sizing: border-box;
	}
	.wpmov-hoja.is-abierta .wpmov-hoja__fondo { opacity: 1; }
	.wpmov-hoja.is-abierta .wpmov-hoja__panel { transform: none; }
	.wpmov-hoja__asa { display: block; width: 44px; height: 5px; margin: 10px auto 0; border-radius: 3px; background: #d4d6e3; }
	.wpmov-hoja__cabecera { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 10px; }
	.wpmov-hoja__cabecera h2 { margin: 0; color: var(--wpmov-navy); font-size: 18px; font-weight: 700; }
	.wpmov-hoja__cerrar {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		border-radius: 12px;
		background: var(--wpmov-soft) !important;
		color: var(--wpmov-navy) !important;
		box-shadow: none !important;
		cursor: pointer;
	}
	.wpmov-chips--hoja { flex-wrap: wrap; padding: 0 0 14px; overflow: visible; }
	.wpmov-hoja__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
	.wpmov-hoja__item {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 6px;
		padding: 12px 6px;
		border-radius: 14px;
		background: var(--wpmov-soft);
		color: #2a2a45 !important;
		font-size: 12.5px;
		font-weight: 600;
		line-height: 1.2;
		text-align: center;
		text-decoration: none !important;
	}
	.wpmov-hoja__item .wpmov-hoja__icono { width: auto; height: 30px; border: 0; background: transparent; }
	.wpmov-hoja__sub { margin: 18px 0 8px; color: var(--wpmov-navy); font-size: 15px; font-weight: 700; }
	.wpmov-hoja__lista { display: flex; flex-direction: column; border-top: 1px solid var(--wpmov-line); }
	.wpmov-hoja__fila {
		display: flex;
		align-items: center;
		min-height: 46px;
		padding: 0 4px;
		border-bottom: 1px solid var(--wpmov-line);
		color: #2a2a45 !important;
		font-size: 14px;
		font-weight: 500;
		text-decoration: none !important;
	}
	.wpmov-cats__todas {
		margin: 0;
		padding: 0;
		border: 0;
		background: transparent !important;
		box-shadow: none !important;
		font: inherit;
		font-size: 11.5px !important;
		cursor: pointer;
	}
	.wpmov-cats__todas .wpmov-cats__icono { background: #eef0fa; border-color: #eef0fa; }
	body.wpmov-sin-scroll { overflow: hidden; }

	/* Barra inferior */
	.wpmov-nav {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9990;
		display: grid;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		height: calc(64px + var(--wpmov-safe));
		padding-bottom: var(--wpmov-safe);
		background: #fff;
		border-top: 1px solid var(--wpmov-line);
		box-shadow: 0 -4px 16px rgb(55 55 122 / 6%);
		box-sizing: border-box;
	}
	.wpmov-nav > a,
	.wpmov-nav > button {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 3px;
		min-width: 0;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 0;
		background: transparent !important;
		box-shadow: none !important;
		color: var(--wpmov-muted) !important;
		font: inherit;
		font-size: 11px !important;
		font-weight: 600;
		line-height: 1.1;
		text-decoration: none !important;
		text-transform: none;
		letter-spacing: 0;
		cursor: pointer;
	}
	.wpmov-nav > .is-actual { color: var(--wpmov-coral) !important; }
	.wpmov-nav > a:focus-visible,
	.wpmov-nav > button:focus-visible { outline: 2px solid var(--wpmov-navy); outline-offset: -4px; }
	.wpmov-nav__carrito { position: relative; }
	.wpmov-nav__carrito .wpmov-cart-count { top: -6px; right: -10px; }
	body.wpmov-ficha .wpmov-nav,
	body.wpmov-compra .wpmov-nav { display: none; }

	/* Botón de contacto único */
	.wpmov-contacto { position: fixed; right: 16px; bottom: calc(80px + var(--wpmov-safe)); z-index: 9995; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
	body.wpmov-ficha .wpmov-contacto { bottom: calc(134px + var(--wpmov-safe)); }
	body.wpmov-compra .wpmov-contacto { bottom: calc(16px + var(--wpmov-safe)); }
	.wpmov-contacto__fondo { display: none; }
	.wpmov-contacto.is-abierto .wpmov-contacto__fondo { display: block; position: fixed; inset: 0; z-index: -1; background: rgb(30 30 60 / 45%); }
	.wpmov-contacto__menu { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
	.wpmov-contacto__menu[hidden] { display: none; }
	.wpmov-contacto__op {
		display: flex;
		align-items: center;
		gap: 12px;
		margin: 0;
		padding: 0;
		border: 0;
		background: transparent !important;
		box-shadow: none !important;
		text-decoration: none !important;
		cursor: pointer;
	}
	.wpmov-contacto__txt {
		padding: 8px 12px;
		border-radius: 10px;
		background: #fff;
		color: var(--wpmov-navy);
		font-size: 14px;
		font-weight: 600;
		box-shadow: 0 4px 12px rgb(0 0 0 / 12%);
	}
	.wpmov-contacto__ico {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 48px;
		height: 48px;
		border-radius: 50%;
		background: var(--wpmov-navy);
		color: #fff;
	}
	.wpmov-contacto__fab {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 54px;
		height: 54px;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: var(--wpmov-coral) !important;
		color: #fff !important;
		box-shadow: 0 8px 20px rgb(241 106 91 / 40%);
		cursor: pointer;
	}
	.wpmov-contacto__fab:focus-visible { outline: 3px solid var(--wpmov-navy); outline-offset: 2px; }

	/* Ficha de producto: barra fija de compra */
	.wpmov-compra {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9990;
		display: flex;
		flex-direction: column;
		gap: 8px;
		padding: 10px 16px calc(12px + var(--wpmov-safe));
		background: #fff;
		border-top: 1px solid var(--wpmov-line);
		box-shadow: 0 -8px 24px rgb(55 55 122 / 10%);
		box-sizing: border-box;
	}
	.wpmov-compra__resumen { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
	.wpmov-compra__etiqueta { color: var(--wpmov-muted); font-size: 12.5px; }
	.wpmov-compra__total { color: var(--wpmov-navy); font-size: 19px; }
	.wpmov-compra__botones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.wpmov-compra__botones button {
		height: 48px;
		margin: 0;
		padding: 0 8px;
		border: 0;
		border-radius: 12px;
		color: #fff !important;
		font: inherit;
		font-size: 15px !important;
		font-weight: 600;
		cursor: pointer;
	}
	.wpmov-compra__cotizar { background: var(--wpmov-coral) !important; }
	.wpmov-compra__carrito { background: var(--wpmov-navy) !important; }
	.wpmov-compra__botones button:only-child { grid-column: 1 / -1; }

	/* Filtros de la tienda */
	.wpmov-filtros:not(.is-abierto) { display: none !important; }
	/* Plegados desde el primer instante, antes de que cargue el script */
	body.wpmov .elementor-widget:has(.wpfMainWrapper):not(.is-abierto) { display: none !important; }
	.wpmov-filtrar {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		width: 100%;
		height: 46px;
		margin: 6px 0 12px;
		border: 1.5px solid var(--wpmov-line) !important;
		border-radius: 12px;
		background: #fff !important;
		color: var(--wpmov-navy) !important;
		font: inherit;
		font-size: 14px !important;
		font-weight: 600;
		box-shadow: none !important;
		cursor: pointer;
	}
	.wpmov-filtrar[aria-expanded="true"] { border-color: var(--wpmov-navy) !important; background: #eef0fa !important; }
	.wpmov-hoja__sub { font-size: 15px !important; line-height: 1.3 !important; }

	/* Listados de productos en 2 columnas */
	body.wpmov ul.products {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 12px !important;
		margin: 0 !important;
	}
	body.wpmov ul.products::before,
	body.wpmov ul.products::after { display: none !important; }
	body.wpmov ul.products li.product {
		width: auto !important;
		min-width: 0;
		margin: 0 !important;
		padding: 0 !important;
		float: none !important;
	}
	body.wpmov ul.products li.product img { width: 100% !important; height: auto !important; border-radius: 10px; }
	body.wpmov ul.products li.product .woocommerce-loop-product__title { font-size: 13px !important; line-height: 1.3 !important; }
	body.wpmov ul.products li.product .price { font-size: 14px !important; }
	body.wpmov ul.products li.product .button { width: 100%; padding: 10px 6px !important; font-size: 12.5px !important; white-space: normal; }

	/* Aviso de reCAPTCHA */
	.wpmov-recaptcha {
		margin: 0 !important;
		padding: 12px 16px !important;
		color: var(--wpmov-muted);
		font-size: 11.5px;
		line-height: 1.45;
		text-align: center;
	}
	.wpmov-recaptcha a { color: var(--wpmov-navy); text-decoration: underline; }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
	.wpmov-hoja__fondo,
	.wpmov-hoja__panel { transition: none; }
}
