/**
 * YoLaburo / Zippyn — home mobile refinement (premium 2026/2027).
 * Depends on zp-home-mobile-premium-2026 + yolaburo-home-clarity on front page.
 * Reversible: dequeue handle zp-yolaburo-home-mobile-refinement-2027.
 */

@media (max-width: 991px) {
	body.home.zp-market-home {
		overflow-x: clip;
	}

	/* —— Hero: H1 + lead (alineado a escala premium; no competir con buscador) —— */
	body.home.zp-market-home .zp-home--premium-app .zp-hero__title--py {
		font-size: clamp(1.6875rem, 5.4vw, 2.125rem);
		font-weight: 700;
		line-height: 1.18;
		letter-spacing: -0.028em;
		margin-bottom: 0.625rem;
	}

	body.home.zp-market-home .zp-home--premium-app .zp-hero__lead--py {
		font-size: clamp(1rem, 3.2vw, 1.125rem);
		line-height: 1.5;
		font-weight: 400;
		color: #94a3b8;
		margin-bottom: 1.125rem;
	}

	body.home.zp-market-home .zp-home--premium-app .zp-hero--py {
		padding: 20px 0 16px;
	}

	/* —— Segmented control (iOS-like) —— */
	body.home.zp-market-home .zp-home--premium-app .zp-intent-switch {
		padding: 5px;
		gap: 5px;
		margin-bottom: 1rem;
		background: rgba(255, 255, 255, 0.72);
		-webkit-backdrop-filter: blur(16px) saturate(1.2);
		backdrop-filter: blur(16px) saturate(1.2);
		border: 1px solid rgba(226, 232, 240, 0.95);
		box-shadow:
			0 3px 14px rgba(15, 23, 42, 0.05),
			inset 0 1px 0 rgba(255, 255, 255, 0.85);
	}

	body.home.zp-market-home .zp-home--premium-app .zp-intent-switch__btn {
		display: flex;
		align-items: center;
		justify-content: center;
		text-align: center;
		padding: 14px 14px;
		min-height: 48px;
		font-size: clamp(0.9375rem, 3.2vw, 1.125rem);
		font-weight: 600;
		transition:
			background 0.28s cubic-bezier(0.22, 1, 0.36, 1),
			color 0.28s cubic-bezier(0.22, 1, 0.36, 1),
			box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1),
			transform 0.12s ease;
	}

	body.home.zp-market-home .zp-home--premium-app .zp-intent-switch__btn.is-active {
		background: linear-gradient(165deg, #3b82f6 0%, #2563eb 42%, #1d4ed8 100%);
		color: #fff;
		box-shadow:
			inset 0 1px 0 rgba(255, 255, 255, 0.24),
			inset 0 -1px 0 rgba(15, 23, 42, 0.06),
			0 4px 14px rgba(37, 99, 235, 0.22);
	}

	body.home.zp-market-home .zp-home--premium-app .zp-intent-switch__btn:not(.is-active) {
		background: rgba(248, 250, 252, 0.95);
		color: #0f172a;
		box-shadow: none;
	}

	body.home.zp-market-home .zp-home--premium-app .zp-intent-switch__btn:active {
		transform: scale(0.98);
	}

	/* —— Search card —— */
	body.home.zp-market-home .zp-home--premium-app .zp-search-panel--py {
		border-radius: 18px;
		padding: 14px 14px 12px;
		box-shadow:
			0 1px 0 rgba(255, 255, 255, 0.92) inset,
			0 0 0 1px rgba(37, 99, 235, 0.08),
			0 4px 10px rgba(15, 23, 42, 0.05),
			0 16px 40px rgba(37, 99, 235, 0.13),
			0 34px 68px rgba(15, 23, 42, 0.12);
		border: 1px solid rgba(226, 232, 240, 0.95);
		position: relative;
		z-index: 2;
	}

	body.home.zp-market-home .zp-home--premium-app .zp-search-field__control {
		border-radius: 14px;
		min-height: 46px;
		padding: 3px 11px 3px 9px;
		background: #fff;
		border: 1px solid #e2e8f0;
		transition: box-shadow 0.2s ease, border-color 0.2s ease;
	}

	body.home.zp-market-home .zp-home--premium-app .zp-search-field__control:focus-within {
		border-color: rgba(37, 99, 235, 0.42);
		box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12), 0 4px 16px rgba(37, 99, 235, 0.08);
	}

	body.home.zp-market-home .zp-home--premium-app .zp-search-field--category .zp-search-field__control:focus-within,
	body.home.zp-market-home .zp-home--premium-app .zp-search-field--category .zp-search-field__control:has(.chosen-container-active) {
		border-color: rgba(37, 99, 235, 0.48);
		box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12), 0 4px 16px rgba(37, 99, 235, 0.08);
	}

	@media (hover: hover) {
		body.home.zp-market-home .zp-home--premium-app .zp-search-field--category .zp-search-field__control:hover,
		body.home.zp-market-home .zp-home--premium-app .zp-search-field--location .zp-search-field__control--location:hover {
			border-color: #cbd5e1;
			box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1), 0 4px 14px rgba(37, 99, 235, 0.08);
		}
	}

	body.home.zp-market-home .zp-home--premium-app .zp-search-field__icon {
		color: #2563eb;
	}

	/* Chosen solo categoría clásica: activo, sin #999 del core. */
	body.home.zp-market-home .zp-home--premium-app .zp-search-panel--py .zp-search-field--category .chosen-container-single .chosen-single {
		min-height: 42px !important;
		line-height: 1.38 !important;
		font-size: 15px !important;
		color: #334155 !important;
		background: #fff !important;
		border: none !important;
		box-shadow: none !important;
	}

	body.home.zp-market-home .zp-home--premium-app .zp-search-panel--py .zp-search-field--category .chosen-container-single .chosen-single.chosen-default,
	body.home.zp-market-home .zp-home--premium-app .zp-search-panel--py .zp-search-field--category .chosen-container-single .chosen-default span {
		color: #0f172a !important;
	}

	body.home.zp-market-home .zp-home--premium-app .zp-search-panel--py .zp-search-field--category .chosen-container-single .chosen-single:not(.chosen-default) span {
		color: #0f172a !important;
	}

	body.home.zp-market-home .zp-home--premium-app .zp-search-panel--py .zp-search-field--category .chosen-container-active .chosen-single {
		border: none !important;
	}

	body.home.zp-market-home .zp-home--premium-app .zp-search-panel--py .zp-search-field--category .chosen-container-single .chosen-single div {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: 30px !important;
	}

	body.home.zp-market-home .zp-home--premium-app .zp-search-panel--py .zp-search-field--category .chosen-container .chosen-single div b {
		border-top-color: #2563eb !important;
	}

	body.home.zp-market-home .zp-home--premium-app .zp-search-panel--py #search_address_search.zp-input {
		font-size: 15px !important;
		line-height: 1.38 !important;
		color: #334155 !important;
	}

	body.home.zp-market-home .zp-home--premium-app .zp-search-panel--py #search_address_search.zp-input::placeholder {
		color: #94a3b8;
	}

	body.home.zp-market-home .zp-home--premium-app .zp-location-btn {
		width: 40px;
		height: 40px;
		flex: 0 0 40px;
		border-radius: 10px;
		background: rgba(37, 99, 235, 0.1) !important;
		font-size: 16px;
	}

	/* Buscar: mismo radio que inputs, menos “bloque” */
	body.home.zp-market-home .zp-home--premium-app.zp-home--py .zp-search-panel--py #zp-classic-search-submit.zp-ai-search__submit.zp-btn {
		border-radius: 14px !important;
		min-height: 46px !important;
		font-size: 15px !important;
		font-weight: 600 !important;
		padding: 10px 16px !important;
		background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
		box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
		letter-spacing: 0.01em;
	}

	body.home.zp-market-home .zp-home--premium-app.zp-home--py .zp-search-panel--py #zp-classic-search-submit.zp-ai-search__submit.zp-btn:active {
		transform: scale(0.98);
	}

	body.home.zp-market-home .zp-home--premium-app .zp-classic-search__btn-wrap {
		padding-top: 4px;
		padding-bottom: 2px;
	}

	/* —— Trust pills —— */
	body.home.zp-market-home .zp-home-trust-micro {
		gap: 8px;
		margin: 14px 0 10px;
		padding: 2px 0 4px;
	}

	body.home.zp-market-home .zp-home-trust-micro__item {
		padding: 6px 10px;
		font-size: 11px;
		font-weight: 500;
		gap: 6px;
		border-radius: 999px;
		background: #fff;
		border: 1px solid rgba(226, 232, 240, 0.95);
		box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
	}

	body.home.zp-market-home .zp-home-trust-micro__icon {
		width: 20px;
		height: 20px;
		font-size: 11px;
		border-radius: 7px;
	}

	/* —— Macro strip: ~2.5–3 cards visible —— */
	body.home.zp-market-home.zp-ui-home-clarity .zp-section.zp-macro-strip .zp-macro-carousel {
		scroll-snap-type: x mandatory;
		padding-bottom: 6px;
	}

	body.home.zp-market-home.zp-ui-home-clarity .zp-section.zp-macro-strip .zp-macro-card {
		width: min(128px, 38vw);
		scroll-snap-align: start;
		align-items: center;
		text-align: center;
	}

	body.home.zp-market-home.zp-ui-home-clarity .zp-section.zp-macro-strip .zp-macro-card__icon {
		font-size: 1.5rem;
		text-align: center;
		width: 100%;
		justify-content: center;
	}

	body.home.zp-market-home .zp-section.zp-macro-strip .zp-macro-card__title {
		font-size: clamp(0.9375rem, 3.8vw, 1.0625rem) !important;
		font-weight: 700 !important;
		line-height: 1.24 !important;
		text-align: center;
	}

	body.home.zp-market-home .zp-section.zp-macro-strip .zp-macro-card__desc {
		font-size: clamp(0.8125rem, 2.9vw, 0.875rem) !important;
		line-height: 1.28 !important;
		text-align: center;
	}

	body.home.zp-market-home.zp-ui-home-clarity .zp-section.zp-macro-strip .zp-macro-card__title {
		text-align: center;
		width: 100%;
	}

	/* —— WA floating FAB: slightly smaller —— */
	body.home.zp-market-home .zp-home-wa-fab {
		width: 52px;
		height: 52px;
		font-size: 26px;
		bottom: calc(88px + env(safe-area-inset-bottom, 0px));
		right: max(12px, env(safe-area-inset-right, 0px));
		box-shadow: 0 8px 22px rgba(22, 163, 74, 0.32);
	}

	/* —— Bottom nav: press + Chat tab tint —— */
	#menu-footer.zp-bottom-nav-shell .zp-bottom-nav__item:active {
		transform: scale(0.98);
	}

	#menu-footer.zp-bottom-nav-shell .zp-bottom-nav__item--chat .zp-bottom-nav__ico,
	#menu-footer.zp-bottom-nav-shell .zp-bottom-nav__item--chat .zp-bottom-nav__ico i {
		color: #16a34a !important;
	}

	/* —— Mount micro-animation (home only) —— */
	html.zp-refine-home-mounted:not(.zp-refine-motion-off) body.home.zp-market-home .zp-home--premium-app .zp-search-panel--py {
		animation: zpRefCardIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
	}

	html.zp-refine-home-mounted:not(.zp-refine-motion-off) body.home.zp-market-home .zp-home--premium-app .zp-hero__inner--py {
		animation: zpRefFadeUp 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
	}
}

@keyframes zpRefCardIn {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes zpRefFadeUp {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	html.zp-refine-motion-off body.home.zp-market-home .zp-home--premium-app .zp-search-panel--py,
	html.zp-refine-motion-off body.home.zp-market-home .zp-home--premium-app .zp-hero__inner--py {
		animation: none !important;
	}
}
