/* Baobab Filtros — usa los colores globales de Elementor si existen */
.kf, .kf-drawer, .kf-fab {
	--kf-accent: var(--e-global-color-accent, #F7AB71);
	--kf-primary: var(--e-global-color-primary, #8AB7E3);
	--kf-ink: #334155;
	--kf-muted: #8a94a6;
	--kf-line: #e6e9ef;
	--kf-soft: #f4f7fb;
	--kf-radius: 10px;
}

.kf *, .kf-drawer, .kf-drawer *, .kf-fab, .kf-fab * { box-sizing: border-box; }
.kf-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.kf-lock, html.kf-lock body { overflow: hidden; }

/* ---------- Barra superior ---------- */
.kf-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 20px; }
.kf-open, .kf-fab {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 10px 18px; min-height: 44px;
	border: 1.5px solid var(--kf-ink); border-radius: 999px;
	background: #fff; color: var(--kf-ink);
	font: inherit; font-weight: 600; font-size: 15px; line-height: 1;
	cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.kf-open:hover, .kf-open:focus-visible { background: var(--kf-ink); color: #fff; }
.kf-ico { width: 20px; height: 20px; flex: none; }
.kf-badge {
	display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
	border-radius: 999px; background: var(--kf-accent); color: #fff; font-size: 12px; font-weight: 700;
}
.kf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.kf-chips li { margin: 0; }
.kf-chip {
	display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px;
	border-radius: 999px; background: var(--kf-soft); color: var(--kf-ink);
	font-size: 14px; text-decoration: none; border: 1px solid var(--kf-line);
}
.kf-chip:hover { border-color: var(--kf-ink); color: var(--kf-ink); }
.kf-chip span[aria-hidden] { font-size: 16px; line-height: 1; opacity: .7; }
.kf-chip-clear { font-size: 14px; color: var(--kf-ink); text-decoration: underline; padding: 7px 4px; }

/* ---------- Botón flotante (móvil/tablet) ---------- */
.kf-fab {
	--kf-tx: -50%;
	position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 9990;
	transform: translate(var(--kf-tx), 120px); opacity: 0; pointer-events: none;
	padding: 12px 22px; min-height: 50px;
	background: var(--kf-ink); color: #fff; border-color: var(--kf-ink);
	box-shadow: 0 8px 24px rgba(15, 23, 42, .25);
	transition: transform .3s ease, opacity .3s ease, background .2s;
}
.kf-fab--left  { left: 20px; --kf-tx: 0; }
.kf-fab--right { left: auto; right: 20px; --kf-tx: 0; }
.kf-fab.is-visible { transform: translate(var(--kf-tx), 0); opacity: 1; pointer-events: auto; }
.kf-fab:hover, .kf-fab:focus-visible { background: var(--kf-accent); border-color: var(--kf-accent); color: #fff; }
@media (min-width: 1025px) { .kf-fab:not(.kf-fab--always) { display: none; } }
@media (max-width: 480px) { .kf-fab--left { left: 16px; } .kf-fab--right { right: 16px; } }
html.kf-lock .kf-fab { opacity: 0; pointer-events: none; }
.kf--floating .kf-toolbar { margin-bottom: 16px; }

/* ---------- Overlay + panel ---------- */
.kf-overlay {
	position: fixed; inset: 0; z-index: 100000;
	background: rgba(15, 23, 42, .45);
	opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s;
}
.kf-overlay.is-open { opacity: 1; visibility: visible; transition: opacity .3s ease; }

.kf-drawer {
	position: fixed; top: 0; bottom: 0; z-index: 100001;
	width: min(420px, 100%); height: 100%; height: 100dvh;
	display: flex; flex-direction: column;
	background: #fff; color: var(--kf-ink);
	box-shadow: 0 0 40px rgba(15, 23, 42, .2);
	visibility: hidden;
	transition: transform .32s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .32s;
}
.kf-drawer.kf-right { right: 0; transform: translateX(100%); }
.kf-drawer.kf-left  { left: 0;  transform: translateX(-100%); }
.kf-drawer.is-open  { transform: translateX(0); visibility: visible; transition: transform .32s cubic-bezier(.2, .8, .2, 1); }
@media (prefers-reduced-motion: reduce) { .kf-drawer, .kf-overlay, .kf-fab { transition: none !important; } }

body.admin-bar .kf-drawer { top: 32px; height: calc(100% - 32px); }
@media (max-width: 782px) { body.admin-bar .kf-drawer { top: 0; height: 100%; } }

.kf-head {
	display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
	padding: 14px 18px; border-bottom: 1px solid var(--kf-line);
}
.kf-title { margin: 0; font-size: 18px; line-height: 1.2; text-align: center; color: var(--kf-ink); }
.kf-close, .kf-reset {
	background: none; border: 0; padding: 6px 0; margin: 0; color: var(--kf-ink);
	font: inherit; font-size: 14px; cursor: pointer;
}
.kf-close { justify-self: start; display: inline-flex; align-items: center; gap: 6px; }
.kf-close span { font-size: 22px; line-height: 1; }
.kf-reset { justify-self: end; text-decoration: underline; }
.kf-close:hover, .kf-reset:hover { color: var(--kf-accent); background: none; }

.kf-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 18px 18px; }
.kf-drawer.is-loading .kf-n { opacity: .4; }

/* Buscador */
.kf-search { padding: 14px 0 6px; }
.kf-q {
	width: 100%; padding: 11px 14px 11px 40px !important; border: 1px solid var(--kf-line) !important;
	border-radius: var(--kf-radius) !important; font: inherit; font-size: 15px; background: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a94a6' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: 12px center; background-size: 18px;
}
.kf-q:focus { outline: none; border-color: var(--kf-primary) !important; box-shadow: 0 0 0 3px rgba(138, 183, 227, .35); }
.kf-nomatch { margin: 12px 0 0; color: var(--kf-muted); font-size: 14px; }

/* Secciones */
.kf-sec { border-bottom: 1px solid var(--kf-line); }
.kf-sec[hidden] { display: none; }
.kf-sec-head {
	display: flex; width: 100%; align-items: center; justify-content: space-between;
	padding: 16px 0; margin: 0; background: none !important; border: 0; color: var(--kf-ink) !important;
	font: inherit; font-weight: 700; font-size: 15px; text-align: left; cursor: pointer;
}
.kf-chev { width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s; }
.kf-sec.is-open .kf-chev { transform: rotate(-135deg) translate(-2px, -2px); }
.kf-sec-body { display: none; padding: 0 0 16px; }
.kf-sec.is-open .kf-sec-body { display: block; }

/* Opciones */
.kf-opts { list-style: none; margin: 0; padding: 0; }
.kf-opt { margin: 0; }
.kf-opt label { display: flex; align-items: center; gap: 10px; padding: 7px 0; cursor: pointer; font-size: 15px; line-height: 1.3; }
.kf-opt input { width: 19px; height: 19px; margin: 0; flex: none; accent-color: var(--kf-accent); cursor: pointer; }
.kf-n { color: var(--kf-muted); font-size: 13px; margin-left: auto; padding-left: 8px; }
.kf-opt.is-zero { opacity: .45; }
.kf-opt.is-zero label { cursor: not-allowed; }
.kf-opt.kf-extra { display: none; }
.kf-opts.is-expanded .kf-opt.kf-extra,
.kf-drawer.is-searching .kf-opt.kf-extra { display: block; }
.kf-opt.kf-hide { display: none !important; }
.kf-drawer.is-searching .kf-more { display: none; }
.kf-more {
	margin-top: 6px; padding: 6px 12px; border: 1px solid var(--kf-line); border-radius: 999px;
	background: #fff !important; color: var(--kf-ink) !important; font: inherit; font-size: 13px; cursor: pointer;
}
.kf-more:hover { border-color: var(--kf-ink); }

/* Precio */
.kf-range { position: relative; height: 28px; margin: 4px 10px 10px; }
.kf-range::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 4px; border-radius: 4px; background: var(--kf-line); }
.kf-range-fill { position: absolute; top: 12px; height: 4px; border-radius: 4px; background: var(--kf-accent); left: 0; right: 0; }
.kf-range input[type=range] {
	position: absolute; left: -10px; right: -10px; top: 0; width: calc(100% + 20px); height: 28px; margin: 0;
	background: none; pointer-events: none; -webkit-appearance: none; appearance: none;
}
.kf-range input[type=range]::-webkit-slider-runnable-track { background: none; height: 28px; }
.kf-range input[type=range]::-moz-range-track { background: none; }
.kf-range input[type=range]::-webkit-slider-thumb {
	-webkit-appearance: none; pointer-events: auto; width: 22px; height: 22px; margin-top: 3px; border-radius: 50%;
	background: #fff; border: 2px solid var(--kf-accent); box-shadow: 0 1px 4px rgba(0, 0, 0, .15); cursor: grab;
}
.kf-range input[type=range]::-moz-range-thumb {
	pointer-events: auto; width: 18px; height: 18px; border-radius: 50%;
	background: #fff; border: 2px solid var(--kf-accent); cursor: grab;
}
.kf-price-inputs { display: flex; align-items: center; gap: 10px; }
.kf-price-inputs label { flex: 1 1 0; min-width: 0; position: relative; }
.kf-price-inputs input {
	width: 100%; padding: 10px 28px 10px 12px !important; border: 1px solid var(--kf-line) !important;
	border-radius: var(--kf-radius) !important; font: inherit; font-size: 15px; text-align: center; -moz-appearance: textfield;
}
.kf-price-inputs input::-webkit-outer-spin-button, .kf-price-inputs input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.kf-cur { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--kf-muted); font-size: 14px; }
.kf-dash { color: var(--kf-muted); }

/* Pie */
.kf-foot { padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--kf-line); background: #fff; }
.kf-apply {
	width: 100%; min-height: 50px; border: 0; border-radius: var(--kf-radius);
	background: var(--kf-accent); color: #fff; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer;
	transition: filter .2s;
}
.kf-apply:hover { filter: brightness(.95); }
.kf-apply:disabled { background: #cbd2dc; cursor: not-allowed; }

@media (max-width: 480px) {
	.kf-drawer { width: 100%; }
	.kf-toolbar .kf-open { flex: 1 1 auto; justify-content: center; }
}

/* ---------- Carga AJAX ---------- */
.kf-loading { opacity: .45; pointer-events: none; transition: opacity .2s ease; }
html.kf-busy::before {
	content: ""; position: fixed; top: 0; left: 0; z-index: 100002; height: 3px; width: 100%;
	background: linear-gradient(90deg, transparent, var(--e-global-color-accent, #F7AB71), transparent);
	background-size: 50% 100%; background-repeat: no-repeat;
	animation: kf-bar 1s linear infinite;
}
@keyframes kf-bar { from { background-position: -50% 0; } to { background-position: 150% 0; } }
@media (prefers-reduced-motion: reduce) { html.kf-busy::before { animation: none; background: var(--e-global-color-accent, #F7AB71); } }

/* ---------- Blindaje frente a los estilos de botón del tema / Elementor ---------- */
.kf-drawer .kf-close, .kf-drawer .kf-reset, .kf-drawer .kf-more, .kf-drawer .kf-sec-head {
	background: transparent !important; box-shadow: none !important; text-transform: none !important;
	letter-spacing: normal !important; min-height: 0 !important; width: auto; line-height: 1.3 !important;
	border-radius: 0 !important; border: 0 !important; color: var(--kf-ink) !important;
}
.kf-drawer .kf-close, .kf-drawer .kf-reset { padding: 6px 0 !important; font-size: 14px !important; font-weight: 500 !important; }
.kf-drawer .kf-close:hover, .kf-drawer .kf-reset:hover { color: var(--kf-accent) !important; }
.kf-drawer .kf-sec-head { width: 100% !important; padding: 16px 0 !important; font-size: 15px !important; font-weight: 700 !important; }
.kf-drawer .kf-more {
	display: inline-flex !important; align-items: center; gap: 6px; margin-top: 8px !important; padding: 4px 0 !important;
	font-size: 14px !important; font-weight: 600 !important; text-decoration: underline !important; text-underline-offset: 3px;
}
.kf-drawer .kf-more::after {
	content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s;
}
.kf-drawer .kf-more[aria-expanded="true"]::after { transform: rotate(-135deg) translate(-2px, -2px); }
.kf-drawer .kf-more:hover { color: var(--kf-accent) !important; }
.kf-drawer .kf-apply { background: var(--kf-accent) !important; color: #fff !important; border: 0 !important; border-radius: var(--kf-radius) !important; text-transform: none !important; box-shadow: none !important; padding: 0 16px !important; }
.kf-drawer .kf-apply:disabled { background: #cbd2dc !important; }
.kf-open, .kf-fab { text-transform: none !important; letter-spacing: normal !important; }
