/* MANA Filters */
.mf-wrap, .mf-trigger, .mf-active, .mf-sort, .mf-count, .mf-cats {
	--mf-accent: #823747; --mf-text: #2B211E; --mf-muted: #82766F; --mf-line: #E8DED4; --mf-bg: #FFFFFF;
	--mf-chip-bg: #FFFFFF; --mf-chip-text: #2B211E; --mf-radius: 10px;
	--mf-ease: cubic-bezier(.22, .61, .36, 1);
}
.mf-wrap svg, .mf-trigger svg, .mf-chip svg, .mf-sort svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---------- Panel (desktop) ---------- */
.mf-panel { background: var(--mf-bg); border: 1px solid var(--mf-line); border-radius: var(--mf-radius); color: var(--mf-text); }
.mf-head { display: none; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--mf-line); }
.mf-title { font-weight: 800; font-size: 16px; }
.mf-close { all: unset; cursor: pointer; display: inline-flex; padding: 6px; border-radius: 50%; color: var(--mf-text); }
.mf-close:focus-visible { outline: 2px solid var(--mf-accent); }
.mf-overlay { display: none; }
.mf-body { padding: 4px 18px; }

.mf-sec { border-bottom: 1px solid var(--mf-line); }
.mf-sec:last-child { border-bottom: 0; }
.mf-sec-title {
	list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
	padding: 16px 0; font-weight: 700; font-size: 14px; user-select: none;
}
.mf-sec-title::-webkit-details-marker { display: none; }
.mf-sec-title > span:first-child { flex: 1; }
.mf-chev { width: 16px !important; height: 16px !important; transition: transform .25s var(--mf-ease); color: var(--mf-muted); }
details[open] > .mf-sec-title .mf-chev { transform: rotate(180deg); }
.mf-badge { background: var(--mf-accent); color: #fff; font-size: 11px; line-height: 1; padding: 4px 7px; border-radius: 20px; font-weight: 600; }
.mf-sec-body { padding: 0 0 16px; }
.mf-sec--stock { padding: 14px 0; }

/* options */
.mf-opts { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow: auto; overscroll-behavior: contain; }
.mf-opt { position: relative; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 7px 2px; font-size: 14px; border-radius: 6px; transition: color .2s; }
.mf-opt input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.mf-opt-label { flex: 1; }
.mf-num { color: var(--mf-muted); font-size: 12px; }
.mf-box { width: 18px; height: 18px; border: 1.5px solid #C9BCB0; border-radius: 5px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; transition: all .2s var(--mf-ease); background: #fff; }
.mf-opt.is-on .mf-box { background: var(--mf-accent); border-color: var(--mf-accent); }
.mf-opt.is-on .mf-box::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.mf-opt:hover .mf-opt-label { color: var(--mf-accent); }
.mf-opt input:focus-visible ~ .mf-opt-label { text-decoration: underline; text-underline-offset: 4px; }
.mf-opt.is-off { opacity: .38; cursor: not-allowed; }
.mf-opt.is-off:hover .mf-opt-label { color: inherit; }

.mf-opts--pills { flex-direction: row; flex-wrap: wrap; gap: 8px; max-height: none; }
.mf-opts--pills .mf-opt { padding: 0; }
.mf-opts--pills .mf-opt-label {
	min-width: 46px; text-align: center; padding: 8px 12px; border: 1px solid var(--mf-line); border-radius: 8px;
	background: #fff; transition: all .2s var(--mf-ease); font-size: 13px;
}
.mf-opts--pills .mf-opt.is-on .mf-opt-label { background: var(--mf-text); color: #fff; border-color: var(--mf-text); }
.mf-opts--pills .mf-opt:hover:not(.is-off) .mf-opt-label { border-color: var(--mf-text); color: inherit; }
.mf-opts--pills .mf-opt.is-off .mf-opt-label { text-decoration: line-through; }

.mf-opts--swatches { flex-direction: row; flex-wrap: wrap; gap: 6px 4px; max-height: none; }
.mf-opts--swatches .mf-opt { flex-direction: column; gap: 6px; width: calc(25% - 3px); padding: 6px 0; font-size: 12px; text-align: center; }
.mf-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(43, 33, 30, .12); position: relative; transition: transform .2s var(--mf-ease); }
.mf-opts--swatches .mf-opt.is-on .mf-dot { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--mf-accent); }
.mf-opts--swatches .mf-opt:hover .mf-dot { transform: scale(1.08); }
.mf-opts--swatches .mf-num { display: none; }

/* price */
.mf-price { padding-top: 4px; }
.mf-range { position: relative; height: 24px; margin: 4px 8px 10px; direction: ltr; }
.mf-range::before { content: ""; position: absolute; inset: 11px 0 auto; height: 3px; border-radius: 3px; background: var(--mf-line); }
.mf-range-fill { position: absolute; top: 11px; height: 3px; border-radius: 3px; background: var(--mf-accent); }
.mf-range input { position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.mf-range input::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--mf-accent); box-shadow: 0 2px 8px rgba(43, 33, 30, .18); cursor: grab; }
.mf-range input::-moz-range-thumb { pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--mf-accent); cursor: grab; }
.mf-range input::-webkit-slider-runnable-track { background: none; }
.mf-price-fields { display: none; }
.mf-price-out { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--mf-text); }
.mf-out-sep { color: var(--mf-muted); }
.no-js .mf-price-fields, .mf-price:not([data-ready]) .mf-price-fields { display: flex; gap: 8px; }
.mf-price-fields label { flex: 1; display: flex; flex-direction: column; font-size: 12px; color: var(--mf-muted); }
.mf-price-fields input { border: 1px solid var(--mf-line); border-radius: 8px; padding: 8px; font: inherit; }
.mf-price[data-ready] .mf-range { display: block; }
.mf-price:not([data-ready]) .mf-range, .mf-price:not([data-ready]) .mf-price-out { display: none; }

/* stock switch */
.mf-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 600; }
.mf-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mf-switch-ui { width: 38px; height: 22px; border-radius: 22px; background: var(--mf-line); position: relative; transition: background .25s; flex-shrink: 0; }
.mf-switch-ui::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .25s var(--mf-ease); }
.mf-switch input:checked + .mf-switch-ui { background: var(--mf-accent); }
.mf-switch input:checked + .mf-switch-ui::after { transform: translateX(-16px); }
.mf-switch input:focus-visible + .mf-switch-ui { outline: 2px solid var(--mf-accent); outline-offset: 2px; }

/* footer */
.mf-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--mf-line); }
.mf-clear { color: var(--mf-muted); font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.mf-clear:hover { color: var(--mf-accent); }
.mf-apply {
	flex: 1; max-width: 240px; border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 14px;
	background: var(--mf-accent); color: #fff; border-radius: 40px; padding: 12px 18px; transition: opacity .2s, background .2s;
}
.mf-apply:disabled { background: var(--mf-muted); cursor: not-allowed; }
.mf-wrap[data-mf-instant="1"] .mf-apply { display: none; }
.mf-wrap[data-mf-instant="1"] .mf-foot { justify-content: flex-start; border-top: 0; padding-top: 0; }

/* ---------- Bottom sheet (tablet/mobile) ---------- */
@media (max-width: 1024px) {
	.mf-wrap[data-mf-sheet="tablet"] .mf-panel { position: fixed; z-index: 100001; inset: auto 0 0 0; max-height: 88vh; display: flex; flex-direction: column; border-radius: 20px 20px 0 0; border: 0; transform: translateY(102%); transition: transform .35s var(--mf-ease); box-shadow: 0 -20px 40px -20px rgba(43, 33, 30, .35); visibility: hidden; }
	.mf-wrap[data-mf-sheet="tablet"] .mf-head { display: flex; }
	.mf-wrap[data-mf-sheet="tablet"] .mf-body { overflow: auto; flex: 1; overscroll-behavior: contain; }
	.mf-wrap[data-mf-sheet="tablet"] .mf-apply { display: block; }
	.mf-wrap[data-mf-sheet="tablet"] .mf-foot { justify-content: space-between; border-top: 1px solid var(--mf-line); padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); }
	.mf-wrap[data-mf-sheet="tablet"] .mf-overlay { display: block; position: fixed; inset: 0; z-index: 100000; background: rgba(43, 33, 30, .45); opacity: 0; pointer-events: none; transition: opacity .3s; }
	.mf-wrap[data-mf-sheet="tablet"].is-open .mf-panel { transform: none; visibility: visible; }
	.mf-wrap[data-mf-sheet="tablet"].is-open .mf-overlay { opacity: 1; pointer-events: auto; }
	.mf-wrap[data-mf-sheet="tablet"] .mf-panel::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--mf-line); }
}
@media (max-width: 767px) {
	.mf-wrap[data-mf-sheet="mobile"] .mf-panel { position: fixed; z-index: 100001; inset: auto 0 0 0; max-height: 88vh; display: flex; flex-direction: column; border-radius: 20px 20px 0 0; border: 0; transform: translateY(102%); transition: transform .35s var(--mf-ease); visibility: hidden; }
	.mf-wrap[data-mf-sheet="mobile"] .mf-head { display: flex; }
	.mf-wrap[data-mf-sheet="mobile"] .mf-body { overflow: auto; flex: 1; }
	.mf-wrap[data-mf-sheet="mobile"] .mf-apply { display: block; }
	.mf-wrap[data-mf-sheet="mobile"] .mf-foot { justify-content: space-between; border-top: 1px solid var(--mf-line); padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
	.mf-wrap[data-mf-sheet="mobile"] .mf-overlay { display: block; position: fixed; inset: 0; z-index: 100000; background: rgba(43, 33, 30, .45); opacity: 0; pointer-events: none; transition: opacity .3s; }
	.mf-wrap[data-mf-sheet="mobile"].is-open .mf-panel { transform: none; visibility: visible; }
	.mf-wrap[data-mf-sheet="mobile"].is-open .mf-overlay { opacity: 1; pointer-events: auto; }
	.mf-opts--swatches .mf-opt { width: calc(20% - 4px); }
}
html.mf-lock, html.mf-lock body { overflow: hidden; }

/* ---------- Trigger button ---------- */
.mf-trigger {
	--mf-btn-bg: #fff; --mf-btn-text: #2B211E; --mf-btn-border: #E8DED4;
	all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
	background: var(--mf-btn-bg); color: var(--mf-btn-text); border: 1px solid var(--mf-btn-border);
	border-radius: 40px; padding: 9px 16px; font-size: 14px; font-weight: 600; min-height: 42px;
}
.mf-trigger:focus-visible { outline: 2px solid var(--mf-accent); outline-offset: 2px; }
.mf-trigger-badge { background: var(--mf-accent); color: #fff; border-radius: 20px; font-size: 11px; padding: 3px 7px; line-height: 1; }
.mf-trigger-badge[hidden] { display: none; }
@media (min-width: 1025px) { .elementor-element.mf-btn-show-tablet { display: none !important; } }
@media (min-width: 768px) { .elementor-element.mf-btn-show-mobile { display: none !important; } }

/* ---------- Active chips ---------- */
.mf-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mf-active:empty { display: none; }
.mf-chip {
	display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 12px; border-radius: 40px;
	background: var(--mf-chip-bg); color: var(--mf-chip-text); border: 1px solid var(--mf-line); font-size: 13px; text-decoration: none;
	transition: border-color .2s, color .2s;
}
.mf-chip svg { width: 14px; height: 14px; }
.mf-chip:hover { border-color: var(--mf-accent); color: var(--mf-accent); }
.mf-chip-clear { font-size: 13px; color: var(--mf-accent); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Sort ---------- */
.mf-sort { display: inline-flex; align-items: center; gap: 8px; color: var(--mf-text); font-size: 14px; }
.mf-sort-label { color: var(--mf-muted); white-space: nowrap; }
.mf-select { position: relative; display: inline-flex; align-items: center; }
.mf-select select {
	-webkit-appearance: none; appearance: none; font: inherit; color: inherit; cursor: pointer;
	background: #fff; border: 1px solid var(--mf-line); border-radius: 40px; padding: 9px 16px 9px 38px; min-height: 42px;
}
.mf-select select:focus-visible { outline: 2px solid var(--mf-accent); outline-offset: 1px; }
.mf-select svg { position: absolute; left: 14px; width: 14px; height: 14px; pointer-events: none; color: var(--mf-muted); }
@media (max-width: 767px) { .mf-sort-label { display: none; } }

/* ---------- Count ---------- */
.mf-count { margin: 0; color: var(--mf-muted); font-size: 14px; }
.mf-count strong { color: var(--mf-text); font-weight: 700; }

/* ---------- Category chips ---------- */
.mf-cats { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin-inline: -2px; }
.mf-cats::-webkit-scrollbar { display: none; }
.mf-cats-track { display: flex; gap: 8px; padding: 2px; width: max-content; }
.mf-cat {
	white-space: nowrap; padding: 9px 18px; border-radius: 40px; border: 1px solid var(--mf-line);
	background: var(--mf-chip-bg); color: var(--mf-chip-text); font-size: 14px; text-decoration: none; transition: all .2s var(--mf-ease);
}
.mf-cat:hover { border-color: var(--mf-text); }
.mf-cat.is-on { background: var(--mf-accent); border-color: var(--mf-accent); color: #fff; }

/* ---------- Loading ---------- */
.mf-results { transition: opacity .25s; }
html.mf-loading .mf-results { opacity: .45; pointer-events: none; }
html.mf-loading .mf-count { opacity: .6; }

@media (prefers-reduced-motion: reduce) {
	.mf-panel, .mf-overlay, .mf-dot, .mf-switch-ui::after { transition: none !important; }
}
