/* PFTC Filtros de tienda */
.pftc-f, .pftc-barra { --pf-azul: #0a66ff; --pf-navy: #0b1a3d; --pf-gris: #62708a; --pf-borde: #e0e5ee; --pf-suave: #f5f8ff; font-family: inherit; color: var(--pf-navy); }
.pftc-f *, .pftc-barra * { box-sizing: border-box; }

/* El kit de Elementor le da a todos los <button> padding de 18px, mayúsculas y fondo azul. */
/* body + html suben la especificidad por encima de .elementor-kit-9 button, que carga después. */
html body .pftc-f button, html body .pftc-barra button { all: unset; box-sizing: border-box; cursor: pointer; font-family: inherit; }
.pftc-f button:focus-visible, .pftc-barra button:focus-visible, .pftc-f a:focus-visible, .pftc-barra a:focus-visible, .pftc-barra select:focus-visible { outline: 2px solid var(--pf-azul); outline-offset: 2px; }

/* ---------- maquetación: barra arriba, panel a la izquierda, listado a la derecha ---------- */
.e-con-inner:has(> .pftc-col-filtros), .e-con:has(> .pftc-col-filtros) { gap: 0 32px; }
@media (min-width: 1025px) {
	.e-con-inner:has(> .pftc-col-filtros), .e-con:has(> .pftc-col-filtros) {
		display: grid !important; grid-template-columns: 264px minmax(0, 1fr); align-items: start;
	}
	.pftc-col-barra { grid-column: 1 / -1; }
	.pftc-col-filtros { grid-column: 1; }
	.pftc-col-listado { grid-column: 2; min-width: 0; }
	/* Elementor fuerza align-items en .e-con-inner: sin esto la columna se estira
	   hasta la altura del listado y el panel no tiene sitio donde quedarse pegado. */
	.pftc-col-filtros.elementor-widget { position: sticky; top: 24px; align-self: start !important; height: auto !important; }
	body.admin-bar .pftc-col-filtros.elementor-widget { top: 56px; }
}
.pftc-col-barra, .pftc-col-filtros, .pftc-col-listado { width: 100% !important; max-width: 100% !important; }
html.pftc-cargando .pftc-col-listado { opacity: .45; transition: opacity .15s; pointer-events: none; }

/* ---------- panel ---------- */
.pftc-f { background: #fff; border: 1px solid var(--pf-borde); border-radius: 14px; overflow: hidden; }
.pftc-f__cab { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--pf-borde); }
.pftc-f__titulo { margin: 0; font-size: 16px; font-weight: 700; flex: 1; color: var(--pf-navy); }
.pftc-f__limpiar { font-size: 13px; color: var(--pf-azul); text-decoration: underline; }
.pftc-f .pftc-f__cerrar { display: none; font-size: 28px; line-height: 1; padding: 0 4px; color: var(--pf-navy); }
.pftc-f__cuerpo { max-height: calc(100vh - 150px); overflow: auto; overscroll-behavior: contain; }
.pftc-f__pie { display: none; }

.pftc-g { border-bottom: 1px solid var(--pf-borde); }
.pftc-g:last-child { border-bottom: 0; }
.pftc-g__cab { list-style: none; display: flex; align-items: center; gap: 8px; padding: 14px 18px; cursor: pointer; user-select: none; }
.pftc-g__cab::-webkit-details-marker { display: none; }
.pftc-g__cab::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--pf-navy); border-bottom: 2px solid var(--pf-navy); transform: rotate(45deg); margin: -4px 4px 0 auto; transition: transform .2s; }
.pftc-g[open] > .pftc-g__cab::after { transform: rotate(-135deg); margin-top: 4px; }
.pftc-g__titulo { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.pftc-g__marcados { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--pf-azul); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

.pftc-ops, .pftc-sub { list-style: none; margin: 0; padding: 0; }
.pftc-ops { padding: 0 10px 12px; }
.pftc-sub { padding-left: 22px; }
.pftc-ops li { margin: 0; }
.pftc-g--corto:not(.is-largo) .pftc-ops > li.is-extra { display: none; }
.pftc-f .pftc-g__mas { display: block; margin: -4px 18px 14px; font-size: 13px; font-weight: 600; color: var(--pf-azul); }

.pftc-op { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; color: var(--pf-navy); text-decoration: none; font-size: 14px; line-height: 1.25; transition: background .12s; }
.pftc-op:hover { background: var(--pf-suave); color: var(--pf-navy); }
.pftc-op__caja { flex: 0 0 18px; width: 18px; height: 18px; border: 2px solid #b9c3d6; border-radius: 5px; background: #fff; position: relative; transition: border-color .12s, background .12s; }
.pftc-op--radio .pftc-op__caja { border-radius: 50%; }
.pftc-op.is-on .pftc-op__caja { border-color: var(--pf-azul); background: var(--pf-azul); }
.pftc-op.is-on .pftc-op__caja::after { content: ""; position: absolute; left: 4px; top: 0; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pftc-op--radio.is-on .pftc-op__caja::after { left: 3px; top: 3px; width: 8px; height: 8px; border: 0; border-radius: 50%; background: #fff; transform: none; }
.pftc-op__txt { flex: 1; min-width: 0; }
.pftc-op.is-on .pftc-op__txt { font-weight: 600; }
.pftc-op__n { flex: 0 0 auto; font-size: 12px; color: var(--pf-gris); background: var(--pf-suave); border-radius: 999px; padding: 1px 8px; }

.pftc-precio { display: flex; align-items: flex-end; gap: 8px; padding: 0 18px 16px; }
.pftc-precio label { flex: 1; min-width: 0; font-size: 12px; color: var(--pf-gris); }
.pftc-precio label span { display: block; margin-bottom: 3px; }
.pftc-precio input { width: 100%; height: 38px; border: 1px solid var(--pf-borde); border-radius: 8px; padding: 0 10px; font: inherit; font-size: 14px; color: var(--pf-navy); background: #fff; }
.pftc-precio .pftc-precio__ir { height: 38px; padding: 0 12px; border-radius: 8px; background: var(--pf-navy); color: #fff; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; }

/* ---------- barra ---------- */
.pftc-barra { margin-bottom: 20px; }
.pftc-herr { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 0; }
.pftc-barra .pftc-herr__filtrar { display: none; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border: 1px solid var(--pf-navy); border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--pf-navy); background: #fff; }
.pftc-herr__n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--pf-azul); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.pftc-herr__total { margin: 0; flex: 1; font-size: 15px; color: var(--pf-gris); }
.pftc-herr__total strong { color: var(--pf-navy); }
.pftc-herr__orden { display: flex; align-items: center; gap: 8px; margin: 0; }
.pftc-herr__orden label { font-size: 13px; color: var(--pf-gris); }
.pftc-herr__orden select { height: 42px; border: 1px solid var(--pf-borde); border-radius: 10px; padding: 0 34px 0 12px; font: inherit; font-size: 14px; color: var(--pf-navy); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230b1a3d' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center; -webkit-appearance: none; appearance: none; cursor: pointer; }

.pftc-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; padding: 0; }
.pftc-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--pf-suave); border: 1px solid #d8e2f5; color: var(--pf-navy); font-size: 13px; font-weight: 600; text-decoration: none; }
.pftc-chip span { font-size: 17px; line-height: 1; color: var(--pf-gris); }
.pftc-chip:hover { border-color: var(--pf-azul); color: var(--pf-azul); }
.pftc-chip--limpiar { background: transparent; border-color: transparent; color: var(--pf-azul); text-decoration: underline; }

/* ---------- accesos visuales ---------- */
.pftc-accesos { margin: 4px 0 18px; }
.pftc-accesos__titulo { margin: 10px 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pf-gris); }
.pftc-accesos__fila { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.pftc-acceso { display: flex; flex-direction: column; height: 100%; border-radius: 14px; overflow: hidden; background: var(--pf-navy); color: #fff; text-decoration: none; transition: transform .18s, box-shadow .18s; }
.pftc-acceso:hover { transform: translateY(-3px); box-shadow: 0 12px 28px -10px rgba(11, 26, 61, .45); color: #fff; }
.pftc-acceso__foto { display: block; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #13284f, #0b1a3d); overflow: hidden; }
.pftc-acceso__foto img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.pftc-acceso:hover .pftc-acceso__foto img { transform: scale(1.05); }
.pftc-acceso__txt { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.pftc-acceso__txt strong { font-size: 14px; line-height: 1.2; }
.pftc-acceso__txt small { font-size: 12px; color: #aebbd6; }

/* ---------- móvil y tablet ---------- */
@media (max-width: 1024px) {
	.pftc-barra .pftc-herr__filtrar { display: inline-flex; }
	.pftc-herr__total { flex-basis: 100%; order: 3; font-size: 14px; }
	.pftc-herr__orden label { display: none; }
	.pftc-accesos__fila { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 42%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
	.pftc-accesos__fila li { scroll-snap-align: start; }
	.pftc-f { position: fixed; top: 0; bottom: 0; left: 0; z-index: 100000; width: min(88vw, 380px); border-radius: 0; border: 0; display: flex; flex-direction: column; transform: translateX(-102%); transition: transform .25s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
	body.pftc-abierto .pftc-f { transform: none; }
	.pftc-f .pftc-f__cerrar { display: block; }
	.pftc-f__cuerpo { flex: 1; max-height: none; }
	.pftc-f__pie { display: block; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--pf-borde); background: #fff; }
	.pftc-f .pftc-f__ver { display: flex !important; width: 100%; height: 48px; align-items: center; justify-content: center; border-radius: 12px; background: var(--pf-azul); color: #fff; font-size: 15px; font-weight: 700; }
	.pftc-velo { position: fixed; inset: 0; z-index: 99999; background: rgba(11, 26, 61, .45); touch-action: none; }
	.pftc-op { padding: 10px 8px; }
	.pftc-precio input { font-size: 16px; }
	.pftc-col-filtros.elementor-widget { position: static; }
}
@media (min-width: 1025px) { .pftc-velo { display: none !important; } }
@media (max-width: 600px) { .pftc-accesos__fila { grid-auto-columns: 58%; } }

.pftc-aviso { position: fixed; left: 50%; bottom: 22px; z-index: 100001; transform: translate(-50%, 20px); background: var(--pf-navy, #0b1a3d); color: #fff; font-size: 14px; font-weight: 600; padding: 11px 18px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; white-space: nowrap; }
.pftc-aviso.is-ver { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .pftc-f, .pftc-acceso, .pftc-acceso__foto img, .pftc-aviso { transition: none; } }

/* El kit cambia fondo y sombra de cualquier botón al pasar el ratón o enfocarlo. */
body .pftc-f button:hover, body .pftc-f button:focus, body .pftc-barra button:hover, body .pftc-barra button:focus { box-shadow: none; }
body .pftc-f .pftc-f__cerrar:hover, body .pftc-f .pftc-f__cerrar:focus, body .pftc-f .pftc-g__mas:hover, body .pftc-f .pftc-g__mas:focus { background: transparent; color: var(--pf-navy); }
body .pftc-f .pftc-g__mas:hover { color: var(--pf-azul); text-decoration: underline; }
body .pftc-barra .pftc-herr__filtrar:hover, body .pftc-barra .pftc-herr__filtrar:focus { background: var(--pf-suave); color: var(--pf-navy); }
body .pftc-f .pftc-f__ver:hover, body .pftc-f .pftc-f__ver:focus { background: #0050d6; color: #fff; }
body .pftc-f .pftc-precio__ir:hover, body .pftc-f .pftc-precio__ir:focus { background: var(--pf-azul); color: #fff; }

/* ---------- barra de precio con dos tiradores ---------- */
.pftc-rango { padding: 2px 22px 22px; }
.pftc-rango__valores { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 14px; font-weight: 700; color: var(--pf-navy); }
.pftc-rango__guion { color: var(--pf-gris); font-weight: 400; }
.pftc-rango__pista { position: relative; height: 22px; }
.pftc-rango__pista::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 4px; background: var(--pf-borde); }
.pftc-rango__relleno { position: absolute; top: 9px; height: 4px; border-radius: 4px; background: var(--pf-azul); left: 0; right: 0; }
.pftc-rango__i { position: absolute; left: 0; top: 0; width: 100%; height: 22px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; z-index: 3; }
.pftc-rango__i--max { z-index: 4; }
.pftc-rango__i:focus { outline: none; }
.pftc-rango__i::-webkit-slider-runnable-track { background: none; height: 22px; }
.pftc-rango__i::-moz-range-track { background: none; height: 22px; }
.pftc-rango__i::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; pointer-events: auto; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--pf-azul); box-shadow: 0 2px 6px rgba(11, 26, 61, .25); cursor: grab; }
.pftc-rango__i::-moz-range-thumb { pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--pf-azul); box-shadow: 0 2px 6px rgba(11, 26, 61, .25); cursor: grab; }
.pftc-rango__i:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.12); }
.pftc-rango__i:focus-visible::-webkit-slider-thumb { outline: 3px solid rgba(10, 102, 255, .35); outline-offset: 2px; }
@media (max-width: 1024px) {
	.pftc-rango__pista, .pftc-rango__i, .pftc-rango__i::-webkit-slider-runnable-track { height: 30px; }
	.pftc-rango__pista::before, .pftc-rango__relleno { top: 13px; }
	.pftc-rango__i::-webkit-slider-thumb { width: 28px; height: 28px; }
	.pftc-rango__i::-moz-range-thumb { width: 24px; height: 24px; }
}

/* ---------- botón Filtrar flotante (solo móvil y tablet) ---------- */
html body button.pftc-flota { all: unset; box-sizing: border-box; position: fixed; left: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 99990; display: none; align-items: center; gap: 8px; height: 50px; padding: 0 20px; border-radius: 999px; background: #0b1a3d; color: #fff; font-family: inherit; font-size: 15px; font-weight: 700; box-shadow: 0 10px 28px -6px rgba(11, 26, 61, .5); cursor: pointer; opacity: 0; transform: translateY(16px); transition: opacity .2s, transform .2s; pointer-events: none; }
html body button.pftc-flota.is-ver { opacity: 1; transform: none; pointer-events: auto; }
html body button.pftc-flota:hover, html body button.pftc-flota:focus { background: #0a66ff; color: #fff; box-shadow: 0 10px 28px -6px rgba(10, 102, 255, .5); }
.pftc-flota__n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #0a66ff; color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 1024px) { html body button.pftc-flota { display: inline-flex; } }
body.pftc-abierto button.pftc-flota { opacity: 0 !important; pointer-events: none !important; }

/* ---------- iPhone ---------- */
/* Safari amplía la página al tocar un campo con letra de menos de 16px y al volver se queda con scroll lateral. */
@media (max-width: 1024px) {
	.pftc-barra select, .pftc-f input, .pftc-f select { font-size: 16px !important; }
	.pftc-herr { gap: 10px; }
	.pftc-herr__orden { flex: 1; min-width: 0; }
	.pftc-herr__orden select { width: 100%; min-width: 0; }
}
/* Nada del listado puede ensanchar la página (el panel cerrado vive fuera, a la izquierda). */
.elementor-location-archive:has(.pftc-f) { overflow-x: clip; max-width: 100%; }
html:has(.pftc-f), html:has(.pftc-f) body { overflow-x: clip; overscroll-behavior-x: none; }
/* Arrastrar un tirador mueve el tirador, no la página. */
.pftc-rango { touch-action: pan-y; }
.pftc-rango__i { touch-action: none; }
.pftc-f { overscroll-behavior: contain; max-width: 100vw; }

/* ---------- sin resultados ---------- */
.pftc-vacio { margin: 8px 0 24px; padding: 28px 22px; border: 1px dashed #c9d4e8; border-radius: 14px; background: var(--pf-suave); text-align: center; }
.pftc-vacio p { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--pf-navy); }
.pftc-vacio small { display: block; margin-bottom: 16px; font-size: 14px; color: var(--pf-gris); }
.pftc-vacio a { display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border-radius: 10px; background: var(--pf-azul); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; }
.pftc-vacio a:hover { background: #0050d6; color: #fff; }
