/* Dynamic Product Filter — layout */
.dpf-wrapper {
	display: flex;
	gap: 32px;
	align-items: flex-start;
}

.dpf-sidebar {
	width: var(--dpf-sidebar-width, 280px);
	flex: 0 0 var(--dpf-sidebar-width, 280px);
	font-family: inherit;
}

.dpf-results {
	flex: 1 1 auto;
	min-width: 0;
}

/* -------------------------------------------------------------- *
 * Defensive reset for interactive elements.
 * Themes/Elementor global styles often target bare `button`, `select`,
 * `a`/`.button` with equal-or-higher specificity than a single plugin
 * class and load after this stylesheet, so borders/colors (typically
 * the theme's global "accent" swatch) bleed through onto our controls
 * (e.g. pink-bordered view-toggle icons). Resetting with `all: unset`
 * first, then re-declaring exactly what each control needs below,
 * guarantees this plugin always renders the same regardless of theme.
 * -------------------------------------------------------------- */
.dpf-wrapper button,
.dpf-wrapper select,
.dpf-wrapper .dpf-price-field input {
	all: unset;
	box-sizing: border-box;
	display: inline-flex;
}
.dpf-wrapper button { cursor: pointer; font-family: inherit; }
.dpf-wrapper select,
.dpf-wrapper .dpf-price-field input { font-family: inherit; }
.dpf-wrapper input[type="checkbox"] {
	appearance: auto;
	-webkit-appearance: checkbox;
}
.dpf-wrapper a { text-decoration: none; }
.dpf-wrapper *,
.dpf-wrapper *::before,
.dpf-wrapper *::after { box-sizing: border-box; }

/* `:hover` alone isn't enough — clicking a button triggers `:focus`/`:active`, and
   those pseudo-classes on a bare `button`/`a` tag selector are MORE specific than a
   single plugin class, so theme defaults (pink fill, black focus ring, etc.) were
   still winning on click even though hover looked fine. Blanket-neutralize outline/
   box-shadow here; each control re-asserts its own colors with !important below. */
.dpf-wrapper button:focus,
.dpf-wrapper button:focus-visible,
.dpf-wrapper button:active,
.dpf-wrapper a:focus,
.dpf-wrapper a:focus-visible,
.dpf-wrapper a:active,
.dpf-wrapper select:focus,
.dpf-wrapper input:focus {
	outline: none !important;
	box-shadow: none !important;
}

/* -------------------------------------------------------------- *
 * Sidebar — design tokens
 * Every option is shown (no inner scrolling). To cap a list again — e.g. to peek 2.5 / 3.5 rows
 * like the mockup — set --dpf-cat-max / --dpf-facet-max on .dpf-sidebar, for example:
 *   --dpf-cat-max: calc(var(--dpf-row-h) * 2.5);
 *   --dpf-facet-max: calc(var(--dpf-row-h) * 3.5);
 * -------------------------------------------------------------- */
.dpf-sidebar {
	--dpf-line: #e9e9e9;
	--dpf-text: #181818;
	--dpf-muted: #737373;
	--dpf-faint: #c4c4c4;
	--dpf-count: #333;
	--dpf-navy: #334366;
	--dpf-row-h: 34px;
	--dpf-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5l4 4 4-4' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	--dpf-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.4 6.3l2.4 2.4 4.8-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Section headers ("CATEGORY" / "FILTER BY") */
.dpf-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 6px;
}
.dpf-header-filterby {
	margin: 32px 0 0;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--dpf-line);
}
.dpf-header h3 {
	margin: 0;
	padding: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: .02em;
	color: var(--dpf-text);
}
.dpf-header-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--dpf-text);
	flex: 0 0 auto;
}

/* Active filter chips */
.dpf-active-chips:empty { display: none; }
.dpf-active-chips { margin-bottom: 4px; }
.dpf-chip {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 0;
	font-size: 14px;
	border-bottom: 1px solid var(--dpf-line);
}
.dpf-chip .dpf-chip-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--dpf-primary, #ef7a00);
	flex: 0 0 auto;
}
.dpf-chip .dpf-chip-label { flex: 1 1 auto; color: #3a3a3a; }
.dpf-chip .dpf-chip-remove {
	cursor: pointer;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	background: none !important;
	font-size: 16px;
	line-height: 1;
	color: #7a7a7a !important;
}
.dpf-chip .dpf-chip-remove:hover,
.dpf-chip .dpf-chip-remove:focus { color: var(--dpf-primary, #ef7a00) !important; }

/* -------------------------------------------------------------- *
 * Accordion rows (category groups + Filter By sections)
 * Chevron | Title | RESET — closed = chevron down, open = chevron up.
 * -------------------------------------------------------------- */
.dpf-options { display: flex; flex-direction: column; }
.dpf-category-tree { margin: 0; }

.dpf-cat-group,
.dpf-section { border-bottom: 1px solid var(--dpf-line); }

.dpf-cat-summary,
.dpf-section > summary {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 0;
	cursor: pointer;
	list-style: none;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--dpf-text);
}
.dpf-cat-summary::-webkit-details-marker,
.dpf-section > summary::-webkit-details-marker { display: none; }
.dpf-cat-summary::marker,
.dpf-section > summary::marker { content: ""; }

.dpf-cat-name,
.dpf-sec-title { flex: 1 1 auto; min-width: 0; }

.dpf-wrapper .dpf-sidebar .dpf-cat-summary:focus,
.dpf-wrapper .dpf-sidebar .dpf-section > summary:focus { outline: 0; }
.dpf-wrapper .dpf-sidebar .dpf-cat-summary:focus-visible,
.dpf-wrapper .dpf-sidebar .dpf-section > summary:focus-visible {
	outline: 2px solid var(--dpf-primary, #ef7a00);
	outline-offset: 2px;
}

/* One chevron, drawn with a CSS mask so it takes its colour from background-color */
.dpf-cat-chevron,
.dpf-section > summary::before {
	flex: 0 0 12px;
	width: 12px;
	height: 12px;
	background-color: #9a9a9a;
	-webkit-mask: var(--dpf-chev) center / contain no-repeat;
	mask: var(--dpf-chev) center / contain no-repeat;
	transition: transform .2s ease;
}
.dpf-section > summary::before { content: ""; }
.dpf-cat-group[open] > .dpf-cat-summary .dpf-cat-chevron,
.dpf-section[open] > summary::before { transform: rotate(180deg); }

.dpf-reset {
	flex: 0 0 auto;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--dpf-faint);
	text-decoration: none;
	transition: color .15s ease;
}
.dpf-reset:hover { color: var(--dpf-primary, #ef7a00); }

/* -------------------------------------------------------------- *
 * Option lists — uncapped by default (see --dpf-cat-max / --dpf-facet-max above)
 * -------------------------------------------------------------- */
.dpf-scroll {
	overflow-y: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.dpf-scroll::-webkit-scrollbar { display: none; }

.dpf-cat-children {
	max-height: var(--dpf-cat-max, none);
	margin: 0 0 12px;
}
.dpf-section > .dpf-options {
	max-height: var(--dpf-facet-max, none);
	margin: 0 0 16px;
}

/* Nested category groups (3rd level and below): plain indented sub-accordions, no inner scroll */
.dpf-cat-group .dpf-cat-group { border-bottom: 0; }
.dpf-cat-group .dpf-cat-group > .dpf-cat-summary { padding: 8px 0; font-size: 14px; font-weight: 500; }
.dpf-cat-group .dpf-cat-group > .dpf-cat-children {
	max-height: none;
	overflow: visible;
	margin: 0;
	padding-left: 26px;
}

/* -------------------------------------------------------------- *
 * Checkbox rows (category children + Filter By facets)
 * -------------------------------------------------------------- */
.dpf-checkbox {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: var(--dpf-row-h);
	cursor: pointer;
	font-size: 14px;
	line-height: 1.35;
	color: var(--dpf-muted);
}
.dpf-cat-children .dpf-checkbox,
.dpf-section .dpf-checkbox { padding-right: 6px; }

.dpf-sidebar .dpf-checkbox input[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin: 0;
	padding: 0;
	background: #fff;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease;
}
.dpf-sidebar .dpf-checkbox input[type="checkbox"]:hover,
.dpf-sidebar .dpf-checkbox input[type="checkbox"]:focus-visible { border-color: var(--dpf-primary, #ef7a00); }
.dpf-sidebar .dpf-checkbox input[type="checkbox"]:focus-visible { border-width: 2px; }
.dpf-sidebar .dpf-checkbox input[type="checkbox"]:checked {
	background: var(--dpf-primary, #ef7a00) var(--dpf-check) center / 12px 12px no-repeat;
	border-color: var(--dpf-primary, #ef7a00);
}
.dpf-sidebar .dpf-checkbox input[type="checkbox"]:disabled {
	background-color: #f5f5f5;
	border-color: #ececec;
	cursor: not-allowed;
}

.dpf-label-text { flex: 1 1 auto; min-width: 0; transition: color .15s ease; }
.dpf-checkbox:hover .dpf-label-text,
.dpf-checkbox input:checked + .dpf-label-text { color: var(--dpf-text); }
.dpf-count {
	flex: 0 0 auto;
	font-size: 13px;
	font-weight: 500;
	color: var(--dpf-count);
}
.dpf-checkbox.is-disabled,
.dpf-checkbox.is-disabled:hover .dpf-label-text,
.dpf-checkbox.is-disabled .dpf-label-text { color: #c3c3c3; cursor: not-allowed; }
.dpf-checkbox.is-disabled .dpf-count { color: #d0d0d0; }

/* A top-level category with no children: styled like an accordion row so the list stays even */
.dpf-cat-row.depth-0 {
	min-height: 52px;
	border-bottom: 1px solid var(--dpf-line);
	font-size: 15px;
	font-weight: 600;
	color: var(--dpf-text);
}

/* -------------------------------------------------------------- *
 * Price range
 * -------------------------------------------------------------- */
.dpf-price {
	--dpf-thumb: 20px;
	margin: 2px 0 22px;
}
.dpf-slider {
	position: relative;
	height: 24px;
}
/* Rail = the drawn track. Inset by half a thumb so its ends line up with the thumb centres. */
.dpf-slider-rail {
	position: absolute;
	top: 0;
	bottom: 0;
	left: calc(var(--dpf-thumb) / 2);
	right: calc(var(--dpf-thumb) / 2);
}
.dpf-slider-track,
.dpf-slider-range {
	position: absolute;
	top: 50%;
	height: 6px;
	transform: translateY(-50%);
	border-radius: 3px;
}
.dpf-slider-track { left: 0; right: 0; background: #e3e3e3; }
.dpf-slider-range { background: var(--dpf-primary, #ef7a00); }
.dpf-slider-ticks { position: absolute; inset: 0; }
.dpf-slider-ticks i {
	position: absolute;
	top: 50%;
	width: 1px;
	height: 16px;
	background: #d5d5d5;
	transform: translate(-50%, -50%);
}
.dpf-slider-ticks i:nth-child(1) { left: 25%; }
.dpf-slider-ticks i:nth-child(2) { left: 50%; }
.dpf-slider-ticks i:nth-child(3) { left: 75%; }

.dpf-range {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 24px;
	margin: 0;
	padding: 0;
	background: none;
	-webkit-appearance: none;
	appearance: none;
	pointer-events: none;
}
.dpf-range::-webkit-slider-runnable-track { height: 24px; background: transparent; }
.dpf-range::-moz-range-track { height: 24px; background: transparent; }
.dpf-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
	width: var(--dpf-thumb);
	height: var(--dpf-thumb);
	margin-top: calc((24px - var(--dpf-thumb)) / 2);
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--dpf-primary, #ef7a00);
	cursor: pointer;
	pointer-events: auto;
}
.dpf-range::-moz-range-thumb {
	box-sizing: border-box;
	width: var(--dpf-thumb);
	height: var(--dpf-thumb);
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--dpf-primary, #ef7a00);
	cursor: pointer;
	pointer-events: auto;
}

/* Scale labels sit under the ticks: first/last hug the container edges, the rest centre on 25/50/75% */
.dpf-slider-scale {
	position: relative;
	height: 18px;
	margin: 6px calc(var(--dpf-thumb) / 2) 0;
}
.dpf-slider-scale span {
	position: absolute;
	top: 0;
	font-size: 11px;
	line-height: 1.25;
	color: #a5a5a5;
	white-space: nowrap;
	transform: translateX(-50%);
}
.dpf-slider-scale span:nth-child(1) { left: calc(var(--dpf-thumb) / -2); transform: none; }
.dpf-slider-scale span:nth-child(2) { left: 25%; }
.dpf-slider-scale span:nth-child(3) { left: 50%; }
.dpf-slider-scale span:nth-child(4) { left: 75%; }
.dpf-slider-scale span:nth-child(5) { right: calc(var(--dpf-thumb) / -2); transform: none; }

.dpf-price-inputs {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 14px;
}
.dpf-price-field {
	flex: 1 1 0;
	min-width: 0;
	background: #fff;
	border: 1px solid #dcdcdc;
	border-radius: 6px;
	transition: border-color .15s ease;
}
.dpf-price-field:focus-within { border-color: var(--dpf-primary, #ef7a00); }
.dpf-sidebar .dpf-price-field input[type="text"] {
	display: block;
	width: 100%;
	height: 44px;
	padding: 0 10px;
	background: none;
	border: 0;
	outline: 0;
	box-shadow: none;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	color: var(--dpf-navy);
}
.dpf-price-dash { flex: 0 0 auto; color: var(--dpf-text); }

/* Clear all — pinned to the end of the sidebar.
   Scoped to .dpf-wrapper .dpf-sidebar so it out-ranks theme button styles (incl. :hover/:focus) without !important. */
.dpf-wrapper .dpf-sidebar .dpf-clear-all {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 48px;
	margin-top: 24px;
	padding: 0 16px;
	background: var(--dpf-clear-bg, #ef7a00);
	color: #fff;
	border: 0;
	border-radius: 4px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	transition: filter .15s ease;
}
.dpf-wrapper .dpf-sidebar .dpf-clear-all:hover,
.dpf-wrapper .dpf-sidebar .dpf-clear-all:focus,
.dpf-wrapper .dpf-sidebar .dpf-clear-all:focus-visible,
.dpf-wrapper .dpf-sidebar .dpf-clear-all:active {
	background: var(--dpf-clear-bg, #ef7a00);
	color: #fff;
	filter: brightness(.94);
}
.dpf-clear-all svg { flex: 0 0 auto; }

/* -------------------------------------------------------------- *
 * Toolbar: sort (left) + result title & view toggle (right)
 * -------------------------------------------------------------- */
.dpf-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 12px;
}
.dpf-sort {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	color: #6a6a6a;
}
.dpf-sort label { white-space: nowrap; }
.dpf-orderby {
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	background: none !important;
	font-weight: 700;
	font-size: 14px;
	color: #1a1a1a !important;
	cursor: pointer;
	padding: 4px 0;
}
.dpf-toolbar-right {
	display: flex;
	align-items: center;
	gap: 18px;
}
.dpf-result-title {
	font-size: 14px;
	font-weight: 700;
	color: #1a1a1a;
	white-space: nowrap;
}
.dpf-result-count { color: #9a9a9a; font-weight: 400; margin-left: 3px; }

.dpf-view-toggle {
	display: flex;
	gap: 6px;
}
.dpf-view-btn {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 1px solid #e3e8ea !important;
	outline: none !important;
	box-shadow: none !important;
	border-radius: 6px;
	background: #fff !important;
	color: #9a9a9a !important;
	cursor: pointer;
	padding: 0;
}
.dpf-view-btn:hover,
.dpf-view-btn:focus,
.dpf-view-btn:focus-visible,
.dpf-view-btn:active {
	border-color: var(--dpf-primary, #ef7a00) !important;
	color: var(--dpf-primary, #ef7a00) !important;
	background: #fff !important;
}
.dpf-view-btn.is-active,
.dpf-view-btn.is-active:hover,
.dpf-view-btn.is-active:focus,
.dpf-view-btn.is-active:focus-visible,
.dpf-view-btn.is-active:active {
	background: var(--dpf-dark, #1a1a1a) !important;
	border-color: var(--dpf-dark, #1a1a1a) !important;
	color: #fff !important;
}

/* Results grid - Mobile First */
.dpf-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
}

@media (min-width: 641px) {
    .dpf-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .dpf-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1551px) {
    .dpf-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* View toggle variants (dpf-view-grid4 is the same as the default 4-col grid above) */
.dpf-grid.dpf-view-grid2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) { .dpf-grid.dpf-view-grid2 { grid-template-columns: 1fr; } }

.dpf-grid.dpf-view-list { grid-template-columns: 1fr; }
.dpf-grid.dpf-view-list .dpf-card {
	flex-direction: row;
	align-items: stretch;
}
.dpf-grid.dpf-view-list .dpf-card-image {
	flex: 0 0 180px;
	width: 180px;
	padding: 0;
}
.dpf-grid.dpf-view-list .dpf-card-image img { height: 100%; min-height: 140px; }
.dpf-grid.dpf-view-list .dpf-card-body {
	margin-top: 0;
	margin-left: 14px;
	justify-content: center;
	flex: 1 1 auto;
}

/* -------------------------------------------------------------- *
 * Product card
 * -------------------------------------------------------------- */
.dpf-card {
	position: relative;
	background: var(--dpf-card-bg, #fff);
	border: 1px solid #eceff1;
	border-radius: var(--dpf-radius, 10px);
	box-shadow: 0 1px 4px rgba(20, 30, 40, .05);
	padding: 14px 14px 16px;
	display: flex;
	flex-direction: column;
	transition: box-shadow .15s ease;
}
.dpf-card:hover { box-shadow: 0 6px 18px rgba(20, 30, 40, .09); }

.dpf-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 1;
	background: var(--dpf-badge-bg, #eceff1);
	color: #3a3a3a;
	padding: 4px 10px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
}
.dpf-card-image { display: block; padding: 6px 0 12px; text-align: center; }
.dpf-card-image img { width: 100%; height: 200px; object-fit: contain; }

.dpf-card-body {
	background: transparent;
	padding: 0;
	margin-top: 2px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.dpf-card-title {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	color: #3a3a3a;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.6em;
}
.dpf-card-title a { color: inherit; text-decoration: none; }

.dpf-card-price-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.dpf-card-price {
	display: flex;
	align-items: baseline;
	gap: 6px;
	font-size: 15px;
	font-weight: 700;
}
/* WooCommerce prints <del>regular</del> <ins>sale</ins> — flip the visual order so the
   current (sale) price reads first and the struck-through price trails it, per the design. */
.dpf-card-price ins { order: 1; text-decoration: none; color: #1a1a1a; }
.dpf-card-price del { order: 2; text-decoration: line-through; color: #9a9a9a; font-weight: 400; font-size: 13px; }
.dpf-card-price bdi { unicode-bidi: normal; }

.dpf-discount-pill {
	background: #eceff1;
	color: #5a5a5a;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 3px;
	white-space: nowrap;
}

.dpf-card-cart { margin-top: 2px; }
.dpf-view-more-btn {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	background: var(--dpf-primary, #ef7a00) !important;
	color: #fff !important;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	border-radius: 6px;
	padding: 10px 18px;
	font-size: 13px;
	font-weight: 700;
}
.dpf-view-more-btn:hover,
.dpf-view-more-btn:focus { filter: brightness(0.95); color: #fff !important; }

.dpf-card-cart .button {
	display: inline-block !important;
	background: var(--dpf-primary, #ef7a00) !important;
	color: #fff !important;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	border-radius: 6px;
	padding: 10px 16px;
	font-size: 13px;
	text-decoration: none;
	font-weight: 600;
}
.dpf-card-cart .button:hover,
.dpf-card-cart .button:focus { color: #fff !important; filter: brightness(0.95); }
.dpf-card-cart .button.loading { opacity: .6; }
.dpf-card-cart .button.added::after { content: " ✓"; }

.dpf-no-products { grid-column: 1 / -1; text-align: center; color: #9a9a9a; padding: 40px 0; }

/* When rendering via a selected Elementor Loop Item template instead of the built-in card */
.dpf-elementor-item { min-width: 0; }

.dpf-grid.is-loading { opacity: .5; pointer-events: none; }

/* -------------------------------------------------------------- *
 * Load More — a persistent, always-visible button that ALSO auto-
 * triggers (via IntersectionObserver in JS) the moment it scrolls
 * into view, so it behaves like infinite scroll while still giving
 * people a clear, clickable affordance.
 * -------------------------------------------------------------- */
.dpf-load-more-wrap {
	text-align: center;
	margin-top: 28px;
}
.dpf-load-more-wrap.is-hidden { display: none; }

.dpf-wrapper .dpf-load-more {
	/* Scoped to .dpf-wrapper so it out-ranks the wrapper's `button { all: unset }` reset
	   (that reset was wiping the padding/radius/gap and collapsing the spinner onto the text). */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	box-sizing: border-box;
	min-width: 180px;
	min-height: 46px;
	padding: 0 32px;
	background: var(--dpf-primary, #ef7a00);
	color: #fff;
	border: 0;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	transition: filter .15s ease, opacity .15s ease;
}
.dpf-wrapper .dpf-load-more:hover,
.dpf-wrapper .dpf-load-more:focus,
.dpf-wrapper .dpf-load-more:active {
	background: var(--dpf-primary, #ef7a00);
	color: #fff;
	filter: brightness(.95);
}
.dpf-wrapper .dpf-load-more:focus-visible {
	outline: 2px solid var(--dpf-primary, #ef7a00);
	outline-offset: 3px;
}
.dpf-wrapper .dpf-load-more[disabled] {
	opacity: .75;
	cursor: progress;
	pointer-events: none;
}
.dpf-load-more .dpf-spinner {
	flex: 0 0 auto;
	box-sizing: border-box;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, .4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: dpf-spin .7s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
	.dpf-load-more .dpf-spinner { animation-duration: 2s; }
}
@keyframes dpf-spin { to { transform: rotate(360deg); } }

/* -------------------------------------------------------------- *
 * Sticky sidebar (desktop only: above the tablet breakpoint, where the off-canvas drawer takes over).
 * Positioning is done in filter.js (initSticky): a tall sidebar has no scrollbar of its own — it
 * scrolls with the page until its bottom is visible and then holds; scrolling back up it holds
 * once its top is visible. Offset: Settings → Product Filter → "Sticky top offset" (--dpf-sticky-top).
 * -------------------------------------------------------------- */
@media (min-width: 1025px) {
	.dpf-wrapper.is-sticky .dpf-sidebar { will-change: transform; }
}

/* -------------------------------------------------------------- *
 * Off-canvas filter drawer — tablet and below (max-width: 1024px, Elementor's tablet breakpoint).
 * The sidebar becomes a slide-in panel opened by the "Filters" button in the toolbar.
 * filter.js hoists it (and its overlay) into a <div class="dpf-wrapper dpf-drawer-host"> on <body>
 * so a transformed Elementor ancestor can't break position: fixed. Everything below works without
 * that move too; it only makes the drawer bullet-proof.
 * -------------------------------------------------------------- */

/* Drawer-only controls are hidden on desktop */
/* (buttons are scoped: the wrapper's `button { all: unset }` reset out-ranks a bare class) */
.dpf-wrapper .dpf-filter-toggle,
.dpf-wrapper .dpf-sidebar .dpf-drawer-apply,
.dpf-drawer-head,
.dpf-overlay { display: none; }

.dpf-toolbar-left {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
}

@media (max-width: 1024px) {
	.dpf-wrapper { display: block; }
	.dpf-drawer-host { display: block; }

	/* --- toolbar button --- */
	.dpf-wrapper .dpf-toolbar .dpf-filter-toggle {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		height: 40px;
		padding: 0 16px;
		background: #fff;
		color: var(--dpf-dark, #181818);
		border: 1px solid #dcdcdc;
		border-radius: 6px;
		font-size: 14px;
		font-weight: 600;
		line-height: 1;
		cursor: pointer;
		transition: border-color .15s ease, color .15s ease;
	}
	.dpf-wrapper .dpf-toolbar .dpf-filter-toggle:hover,
	.dpf-wrapper .dpf-toolbar .dpf-filter-toggle:focus,
	.dpf-wrapper .dpf-toolbar .dpf-filter-toggle:active {
		background: #fff;
		color: var(--dpf-primary, #ef7a00);
		border-color: var(--dpf-primary, #ef7a00);
	}
	.dpf-wrapper .dpf-toolbar .dpf-filter-toggle:focus-visible { outline: 2px solid var(--dpf-primary, #ef7a00); outline-offset: 2px; }
	.dpf-filter-toggle svg { flex: 0 0 auto; }
	.dpf-filter-badge {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 18px;
		height: 18px;
		padding: 0 5px;
		border-radius: 9px;
		background: var(--dpf-primary, #ef7a00);
		color: #fff;
		font-size: 11px;
		font-weight: 600;
		line-height: 1;
	}
	.dpf-filter-badge[hidden] { display: none; }

	/* --- overlay --- */
	.dpf-overlay {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 100000;
		background: rgba(0, 0, 0, .5);
		opacity: 0;
		visibility: hidden;
		transition: opacity .3s ease, visibility 0s linear .3s;
	}
	.dpf-overlay.is-open {
		opacity: 1;
		visibility: visible;
		transition: opacity .3s ease;
	}
	html.dpf-drawer-open,
	html.dpf-drawer-open body { overflow: hidden; }

	/* --- the drawer itself --- */
	.dpf-sidebar {
		--dpf-drawer-pad: 20px;
		position: fixed;
		top: 0;
		bottom: 0;
		left: 0;
		z-index: 100001;
		box-sizing: border-box;
		width: min(var(--dpf-drawer-width, 360px), 90vw);
		max-width: none;
		padding: 0 var(--dpf-drawer-pad);
		background: #fff;
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
		transform: translateX(-100%);
		visibility: hidden;
		transition: transform .3s ease, visibility 0s linear .3s;
	}
	.dpf-sidebar.is-open {
		transform: none;
		visibility: visible;
		box-shadow: 0 0 40px rgba(0, 0, 0, .25);
		transition: transform .3s ease, visibility 0s;
	}

	/* header: title + close, pinned to the top of the drawer */
	.dpf-drawer-head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		position: sticky;
		top: 0;
		z-index: 3;
		margin: 0 calc(var(--dpf-drawer-pad) * -1) 16px;
		padding: 14px var(--dpf-drawer-pad);
		background: #fff;
		border-bottom: 1px solid var(--dpf-line);
	}
	.dpf-drawer-title {
		font-size: 18px;
		font-weight: 700;
		line-height: 1.2;
		text-transform: uppercase;
		letter-spacing: .02em;
		color: var(--dpf-text);
	}
	.dpf-wrapper .dpf-sidebar .dpf-drawer-close {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 36px;
		height: 36px;
		margin-right: -8px;
		padding: 0;
		background: none;
		color: var(--dpf-text);
		border: 0;
		border-radius: 50%;
		cursor: pointer;
	}
	.dpf-wrapper .dpf-sidebar .dpf-drawer-close:focus {
		background: none;
		color: var(--dpf-text);
	}
	.dpf-wrapper .dpf-sidebar .dpf-drawer-close:hover,
	.dpf-wrapper .dpf-sidebar .dpf-drawer-close:active {
		background: #f3f3f3;
		color: var(--dpf-primary, #ef7a00);
	}
	.dpf-wrapper .dpf-sidebar .dpf-drawer-close:focus-visible { outline: 2px solid var(--dpf-primary, #ef7a00); outline-offset: 0; }

	/* footer: Clear All + View Results, pinned to the bottom of the drawer */
	.dpf-sidebar-actions {
		display: flex;
		gap: 12px;
		position: sticky;
		bottom: 0;
		z-index: 3;
		margin: 24px calc(var(--dpf-drawer-pad) * -1) 0;
		padding: 14px var(--dpf-drawer-pad) calc(14px + env(safe-area-inset-bottom, 0px));
		background: #fff;
		border-top: 1px solid var(--dpf-line);
	}
	.dpf-wrapper .dpf-sidebar .dpf-clear-all {
		flex: 0 0 auto;
		width: auto;
		margin: 0;
		padding: 0 18px;
		background: #fff;
		color: var(--dpf-clear-bg, #ef7a00);
		border: 1px solid var(--dpf-clear-bg, #ef7a00);
	}
	.dpf-wrapper .dpf-sidebar .dpf-clear-all:hover,
	.dpf-wrapper .dpf-sidebar .dpf-clear-all:focus,
	.dpf-wrapper .dpf-sidebar .dpf-clear-all:focus-visible,
	.dpf-wrapper .dpf-sidebar .dpf-clear-all:active {
		background: #fff;
		color: var(--dpf-clear-bg, #ef7a00);
		filter: none;
		box-shadow: inset 0 0 0 1px var(--dpf-clear-bg, #ef7a00);
	}
	.dpf-wrapper .dpf-sidebar .dpf-drawer-apply {
		display: flex;
		align-items: center;
		justify-content: center;
		flex: 1 1 auto;
		min-height: 48px;
		padding: 0 16px;
		background: var(--dpf-primary, #ef7a00);
		color: #fff;
		border: 0;
		border-radius: 4px;
		font-size: 15px;
		font-weight: 500;
		line-height: 1;
		cursor: pointer;
		transition: filter .15s ease;
	}
	.dpf-wrapper .dpf-sidebar .dpf-drawer-apply:hover,
	.dpf-wrapper .dpf-sidebar .dpf-drawer-apply:focus,
	.dpf-wrapper .dpf-sidebar .dpf-drawer-apply:focus-visible,
	.dpf-wrapper .dpf-sidebar .dpf-drawer-apply:active {
		background: var(--dpf-primary, #ef7a00);
		color: #fff;
		filter: brightness(.94);
	}
}

@media (prefers-reduced-motion: reduce) {
	.dpf-sidebar,
	.dpf-sidebar.is-open,
	.dpf-overlay,
	.dpf-overlay.is-open { transition: none; }
}
