/*
 * F&C — Filtros móviles MP + CO
 * This file changes presentation only below the WoodMart tablet breakpoint.
 */

.fyc-mobile-filter-launcher,
.fyc-mobile-filter-overlay,
.fyc-mobile-filter-drawer {
	display: none;
}

@media (max-width: 1024px) {
	body.fyc-mobile-filters-enabled {
		--fyc-filter-accent: #5b345a;
		--fyc-filter-accent-soft: #f7f0f5;
		--fyc-filter-ink: #2b2330;
		--fyc-filter-border: #e5d8e2;
	}

	body.fyc-mobile-filters-co {
		--fyc-filter-accent: #302846;
		--fyc-filter-accent-soft: #f1f1fb;
		--fyc-filter-ink: #1f2035;
		--fyc-filter-border: #d8d8ef;
	}

	body.fyc-mobile-filter-is-open {
		overflow: hidden !important;
		touch-action: none;
	}

	body.fyc-mobile-filters-enabled .fyc-mobile-filter-source-hidden {
		display: none !important;
	}

	/* Avoid duplicated native WoodMart launchers once the unified one is mounted. */
	body.fyc-mobile-filters-enabled.fyc-mobile-filter-is-ready .wd-show-sidebar-btn,
	body.fyc-mobile-filters-enabled.fyc-mobile-filter-is-ready .wd-off-canvas-btn {
		display: none !important;
	}

	.fyc-mobile-filter-launcher {
		display: block;
		width: 100%;
		margin: 0 0 18px;
		padding: 0;
	}

	.fyc-mobile-filter-open {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 10px;
		width: 100%;
		min-height: 50px;
		padding: 12px 18px;
		border: 1px solid var(--fyc-filter-accent) !important;
		border-radius: 12px;
		background: var(--fyc-filter-accent) !important;
		box-shadow: 0 6px 18px rgba(40, 30, 48, .12);
		color: #fff !important;
		font: inherit;
		font-size: 15px;
		font-weight: 700;
		line-height: 1.2;
		text-transform: none;
		cursor: pointer;
	}

	.fyc-mobile-filter-open svg {
		width: 20px;
		height: 20px;
		fill: none;
		stroke: currentColor;
		stroke-linecap: round;
		stroke-linejoin: round;
		stroke-width: 1.8;
	}

	.fyc-mobile-filter-count {
		display: none;
		align-items: center;
		justify-content: center;
		min-width: 23px;
		height: 23px;
		padding: 0 6px;
		border-radius: 999px;
		background: #fff;
		color: var(--fyc-filter-accent);
		font-size: 12px;
		font-weight: 800;
	}

	.fyc-mobile-filter-count[data-count]:not([data-count="0"]) {
		display: inline-flex;
	}

	.fyc-mobile-filter-overlay {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 100000;
		border: 0;
		background: rgba(20, 17, 24, .56);
		opacity: 0;
		visibility: hidden;
		transition: opacity .22s ease, visibility .22s ease;
		cursor: pointer;
	}

	.fyc-mobile-filter-drawer {
		display: flex;
		position: fixed !important;
		top: 0 !important;
		bottom: 0 !important;
		left: 0 !important;
		z-index: 100001;
		flex-direction: column;
		width: min(390px, calc(100vw - 24px)) !important;
		max-width: calc(100vw - 24px) !important;
		height: 100vh;
		height: 100dvh;
		margin: 0 !important;
		padding: 0 !important;
		overflow-x: hidden !important;
		overflow-y: auto !important;
		overscroll-behavior: contain;
		background: #fff;
		box-shadow: 12px 0 34px rgba(20, 17, 24, .22);
		transform: translate3d(-104%, 0, 0);
		transition: transform .24s ease;
		-webkit-overflow-scrolling: touch;
	}

	body.fyc-mobile-filter-is-open .fyc-mobile-filter-overlay {
		opacity: 1;
		visibility: visible;
	}

	body.fyc-mobile-filter-is-open .fyc-mobile-filter-drawer {
		transform: translate3d(0, 0, 0);
	}

	.fyc-mobile-filter-header {
		display: flex;
		position: sticky;
		top: 0;
		z-index: 5;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		min-height: 66px;
		padding: max(14px, env(safe-area-inset-top)) 18px 14px;
		border-bottom: 1px solid var(--fyc-filter-border);
		background: #fff;
		color: var(--fyc-filter-ink);
	}

	.fyc-mobile-filter-title {
		margin: 0;
		font-size: 19px;
		font-weight: 750;
		line-height: 1.2;
	}

	.fyc-mobile-filter-close {
		display: inline-flex;
		align-items: center;
		gap: 7px;
		min-height: 40px;
		padding: 7px 3px 7px 10px;
		border: 0;
		background: transparent;
		color: var(--fyc-filter-ink);
		font: inherit;
		font-size: 14px;
		font-weight: 700;
		text-transform: none;
		cursor: pointer;
	}

	.fyc-mobile-filter-close svg {
		width: 20px;
		height: 20px;
		stroke: currentColor;
		stroke-width: 2;
	}

	.fyc-mobile-filter-footer {
		display: block;
		position: sticky;
		bottom: 0;
		z-index: 5;
		margin-top: auto;
		padding: 12px 18px max(12px, env(safe-area-inset-bottom));
		border-top: 1px solid var(--fyc-filter-border);
		background: rgba(255, 255, 255, .96);
		backdrop-filter: blur(8px);
	}

	.fyc-mobile-filter-results {
		width: 100%;
		min-height: 48px;
		border: 0;
		border-radius: 11px;
		background: var(--fyc-filter-accent);
		color: #fff;
		font: inherit;
		font-size: 15px;
		font-weight: 750;
		text-transform: none;
		cursor: pointer;
	}

	/* The live filter node is moved, never cloned. These rules neutralize inherited desktop widths. */
	body.fyc-mobile-filters-enabled .fyc-mobile-filter-drawer > .wd-product-filters,
	body.fyc-mobile-filters-enabled .fyc-mobile-filter-drawer > .elementor-widget-container {
		position: relative !important;
		top: auto !important;
		left: auto !important;
		flex: 0 0 auto !important;
		width: 100% !important;
		min-width: 0 !important;
		max-width: 100% !important;
		margin: 0 !important;
		padding: 18px !important;
		border-right: 0 !important;
		border-left: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		transform: none !important;
		overflow: visible !important;
	}

	body.fyc-mobile-filters-enabled .fyc-mobile-filter-drawer,
	body.fyc-mobile-filters-enabled .fyc-mobile-filter-drawer *,
	body.fyc-mobile-filters-enabled .fyc-mobile-filter-drawer *::before,
	body.fyc-mobile-filters-enabled .fyc-mobile-filter-drawer *::after {
		box-sizing: border-box;
	}

	body.fyc-mobile-filters-enabled .fyc-mobile-filter-drawer * {
		min-width: 0 !important;
		max-width: 100% !important;
	}

	body.fyc-mobile-filters-enabled .fyc-mobile-filter-drawer a,
	body.fyc-mobile-filters-enabled .fyc-mobile-filter-drawer label,
	body.fyc-mobile-filters-enabled .fyc-mobile-filter-drawer .widget-title,
	body.fyc-mobile-filters-enabled .fyc-mobile-filter-drawer .wd-pf-title,
	body.fyc-mobile-filters-enabled .fyc-mobile-filter-drawer .fc-filter-label {
		white-space: normal !important;
		overflow-wrap: anywhere;
		word-break: normal;
	}

	body.fyc-mobile-filters-enabled .fyc-mobile-filter-drawer ul,
	body.fyc-mobile-filters-enabled .fyc-mobile-filter-drawer li,
	body.fyc-mobile-filters-enabled .fyc-mobile-filter-drawer .widget,
	body.fyc-mobile-filters-enabled .fyc-mobile-filter-drawer .wd-pf-dropdown,
	body.fyc-mobile-filters-enabled .fyc-mobile-filter-drawer .wd-scroll-content {
		width: 100% !important;
		max-width: 100% !important;
		margin-right: 0 !important;
		margin-left: 0 !important;
	}

	body.fyc-mobile-filters-enabled .fyc-mobile-filter-drawer input,
	body.fyc-mobile-filters-enabled .fyc-mobile-filter-drawer select {
		max-width: 100% !important;
	}
}

@media (min-width: 1025px) {
	.fyc-mobile-filter-launcher,
	.fyc-mobile-filter-overlay,
	.fyc-mobile-filter-drawer {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fyc-mobile-filter-overlay,
	.fyc-mobile-filter-drawer {
		transition: none !important;
	}
}
