/**
 * HBE Property Filters - Premium Compact Design v8.0
 * Breviestay-inspired: minimal, dense, calm, premium
 * Font: Poppins | Palette: Neutral + Blue accent
 *
 * v8.0 FIX: Added aggressive WordPress theme override resets.
 * WordPress themes apply heavy border/background/box-shadow
 * to all <button> and <input> elements globally.
 * All filter-panel selectors now use scoped specificity
 * (.hpf-panel .classname) plus !important on conflict-prone
 * properties to guarantee visual hierarchy.
 */

/* Google Font: Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

:root {
    /* Primary accent: calm blue — used only for active/selected states */
    --hpf-primary: #2563eb;
    --hpf-primary-hover: #1d4ed8;
    --hpf-primary-light: #eff6ff;
    --hpf-primary-border: #bfdbfe;

    /* Text hierarchy */
    --hpf-text: #1e293b;
    --hpf-text-secondary: #64748b;
    --hpf-text-muted: #94a3b8;

    /* Borders & backgrounds — neutral, non-aggressive */
    --hpf-border: #ededed;
    --hpf-border-light: #f3f3f3;
    --hpf-bg: #fafafa;
    --hpf-card-bg: #ffffff;

    /* Spacing & shape */
    --hpf-radius: 5px;
    --hpf-radius-lg: 10px;

    /* Typography */
    --hpf-font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}


/* ============================================
   THEME OVERRIDE RESET
   Strips ALL inherited WordPress theme button/input
   styles inside the filter panel AND the active chips
   bar (which lives outside .hpf-panel). This is the
   nuclear option — every property themes commonly set
   on buttons is explicitly neutralized here.
   ============================================ */
.hpf-panel button,
.hpf-panel button:hover,
.hpf-panel button:focus,
.hpf-panel button:active,
.hpf-panel button[type="button"],
.hpf-panel button[type="button"]:hover,
.hpf-panel button[type="button"]:focus,
.hpf-panel button[type="button"]:active,
.hpf-active-chips button,
.hpf-active-chips button:hover,
.hpf-active-chips button:focus,
.hpf-active-chips button:active,
.hpf-active-chips button[type="button"],
.hpf-active-chips button[type="button"]:hover,
.hpf-active-chips button[type="button"]:focus,
.hpf-active-chips button[type="button"]:active {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    outline: none !important;
    text-transform: none !important;
    text-decoration: none !important;
    letter-spacing: normal !important;
    min-height: 0 !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    font-family: var(--hpf-font) !important;
    line-height: inherit !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    cursor: pointer;
    box-sizing: border-box;
}

/* Also reset inputs inside panel to prevent theme bleeding */
.hpf-panel input[type="text"],
.hpf-panel input[type="number"],
.hpf-panel input[type="search"] {
    box-shadow: none !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    font-family: var(--hpf-font) !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.hpf-panel input[type="range"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
}


/* ============================================
   MAIN LAYOUT
   Two-column: filter panel left, results right
   ============================================ */
.hpf-layout {
    display: flex;
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 16px 48px;
    background: var(--hpf-bg);
    font-family: var(--hpf-font);
}


/* ============================================
   FILTER PANEL — Single cohesive card, left side
   One white card with soft internal dividers.
   ============================================ */
.hpf-panel {
    width: 248px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    order: -1;
    background: var(--hpf-card-bg);
    border-radius: var(--hpf-radius-lg);
    border: 1px solid var(--hpf-border);
    font-family: var(--hpf-font);
    font-size: 13px;
    line-height: 1.4;
    color: var(--hpf-text);
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.hpf-panel::-webkit-scrollbar { width: 3px; }
.hpf-panel::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }
.hpf-panel * { box-sizing: border-box; }


/* Results Area */
.hpf-results-area {
    flex: 1;
    min-width: 0;
    font-family: var(--hpf-font);
}


/* ============================================
   PANEL HEADER
   "Filters" title left, "Clear all" text-link right
   ============================================ */
.hpf-panel .hpf-panel-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px !important;
    border-bottom: 1px solid var(--hpf-border) !important;
}

.hpf-panel .hpf-panel-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--hpf-text) !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: var(--hpf-font) !important;
}

/* "Clear all" — subtle text link, de-emphasized */
.hpf-panel .hpf-panel-clear {
    display: inline !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    color: var(--hpf-text-muted) !important;
    font-family: var(--hpf-font) !important;
    line-height: 1 !important;
    cursor: pointer;
}

.hpf-panel .hpf-panel-clear:hover {
    color: var(--hpf-text-secondary) !important;
    text-decoration: underline !important;
}


/* ============================================
   RESULTS HEADER
   ============================================ */
.hpf-results-header {
    margin-bottom: 14px;
}

.hpf-results-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--hpf-text);
    margin: 0 0 2px 0;
    font-family: var(--hpf-font);
}

.hpf-results-count {
    font-size: 12px;
    color: var(--hpf-text-secondary);
    font-family: var(--hpf-font);
}


/* ============================================
   MOBILE FILTER BAR — Modern pill button
   ============================================ */
.hpf-mobile-bar {
    display: none;
    gap: 8px;
    margin-bottom: 14px;
}

.hpf-mobile-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--hpf-text);
    cursor: pointer;
    font-family: var(--hpf-font);
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.hpf-mobile-filter-btn:active {
    transform: scale(0.97);
    background: #f8fafc;
}

.hpf-mobile-filter-btn svg {
    width: 15px;
    height: 15px;
    color: var(--hpf-text-secondary);
}

.hpf-mobile-filter-count {
    background: var(--hpf-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 2px;
    min-width: 18px;
    text-align: center;
    line-height: 1.3;
}


/* ============================================
   ACTIVE FILTER CHIPS — lightweight, neutral
   ============================================ */
.hpf-active-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.hpf-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 6px 3px 8px;
    background: #f1f5f9;
    border: none;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    color: var(--hpf-text-secondary);
    font-family: var(--hpf-font);
    line-height: 1.4;
    overflow: hidden;
}
.hpf-chip-x {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    color: var(--hpf-text-muted) !important;
    border: none !important;
    border-radius: 2px !important;
    cursor: pointer;
    opacity: 0.7;
    padding: 0 !important;
    margin: 0 !important;
    margin-left: 1px !important;
    transition: opacity 0.15s, background 0.15s;
    flex-shrink: 0;
    overflow: hidden !important;
    box-sizing: border-box !important;
}
.hpf-chip-x svg {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    pointer-events: none;
}
.hpf-chip-x:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.08) !important;
}
.hpf-chip-clear {
    background: transparent;
    color: var(--hpf-text-muted);
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    font-size: 10.5px;
}
.hpf-chip-clear:hover {
    color: var(--hpf-text-secondary);
    text-decoration: underline;
}

/* ============================================
   RESULTS GRID
   ============================================ */
.hpf-results-grid {
    position: relative;
    display: grid;
    gap: 14px;
    min-height: 200px;
}

.hpf-results-grid.loading { opacity: 0.5; pointer-events: none; }

.hpf-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
}

.hpf-loading-overlay.visible { opacity: 1; visibility: visible; }

.hpf-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--hpf-border);
    border-top-color: var(--hpf-primary);
    border-radius: 50%;
    animation: hpf-spin 0.6s linear infinite;
}

@keyframes hpf-spin { to { transform: rotate(360deg); } }

.hpf-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-radius: var(--hpf-radius-lg);
    border: 1px solid var(--hpf-border);
}

.hpf-no-results-icon { font-size: 36px; margin-bottom: 10px; opacity: 0.4; }
.hpf-no-results h3 { font-size: 15px; font-weight: 600; color: var(--hpf-text); margin: 0 0 4px; font-family: var(--hpf-font); }
.hpf-no-results p { color: var(--hpf-text-secondary); font-size: 12px; margin: 0; }


/* ============================================
   FILTER SECTIONS — Borderless, soft dividers
   Each section inside the panel is separated by a
   very light 1px line. No boxed borders per section.
   ============================================ */
.hpf-panel .hpf-section {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    border-bottom: 1px solid var(--hpf-border-light) !important;
    overflow: visible;
    margin: 0 !important;
    padding: 0 !important;
}

.hpf-panel .hpf-section:last-child {
    border-bottom: none !important;
}

/* Section toggle — looks like a LABEL, not a button.
   Full-width flex row: title left, chevron right.
   No border, no background, just subtle hover tint. */
.hpf-panel .hpf-section-toggle {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 20px 12px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    cursor: pointer;
    font-family: var(--hpf-font) !important;
    transition: background 0.1s;
    line-height: 1.4 !important;
}

.hpf-panel .hpf-section-toggle:hover {
    background: rgba(0, 0, 0, 0.02) !important;
}

/* Remove the old "Clear" pseudo-element */
.hpf-panel .hpf-section-toggle::after {
    display: none !important;
    content: none !important;
}

/* Section title label — 13px / 600, looks like a label */
.hpf-panel .hpf-section-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--hpf-text) !important;
    font-family: var(--hpf-font) !important;
    line-height: 1.3 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    padding-left: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Active filter count badge — small blue pill */
.hpf-panel .hpf-section-badge {
    display: none;
    background: var(--hpf-primary) !important;
    color: #fff !important;
    font-size: 9px !important;
    font-weight: 600 !important;
    min-width: 16px;
    height: 16px;
    padding: 0 4px !important;
    border-radius: 8px !important;
    align-items: center;
    justify-content: center;
    font-family: var(--hpf-font) !important;
    line-height: 1 !important;
}

.hpf-panel .hpf-section.has-active .hpf-section-badge {
    display: inline-flex;
}

/* Collapse chevron — small, muted gray */
.hpf-panel .hpf-section-arrow {
    width: 12px;
    height: 12px;
    color: var(--hpf-text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.hpf-panel .hpf-section.collapsed .hpf-section-arrow {
    transform: rotate(-90deg);
}

/* Section body — smooth collapse via max-height */
.hpf-panel .hpf-section-body {
    padding: 0 20px 14px;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.25s ease, padding-bottom 0.2s ease, opacity 0.15s ease;
    opacity: 1;
}

.hpf-panel .hpf-section.collapsed .hpf-section-body {
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0;
}


/* ============================================
   SORT OPTIONS — Clean radio-style list
   Each option is a plain text row with a small
   radio circle on the left. NO borders, NO boxes,
   NO card appearance. Just a clean list.
   ============================================ */
.hpf-panel .hpf-sort-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hpf-panel .hpf-sort-option {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 5px 2px !important;
    margin: 1px 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 3px !important;
    box-shadow: none !important;
    font-size: 12.5px !important;
    font-weight: 400 !important;
    color: var(--hpf-text-secondary) !important;
    cursor: pointer;
    text-align: left !important;
    width: 100% !important;
    font-family: var(--hpf-font) !important;
    line-height: 1.3 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    transition: color 0.1s;
}

/* Hide SVG icons inside sort options */
.hpf-panel .hpf-sort-option svg {
    display: none !important;
}

/* Radio circle via ::before pseudo-element */
.hpf-panel .hpf-sort-option::before {
    content: '' !important;
    display: block !important;
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 50% !important;
    background: #fff !important;
    flex-shrink: 0;
    transition: all 0.12s ease;
    box-sizing: border-box !important;
    box-shadow: none !important;
}

.hpf-panel .hpf-sort-option:hover {
    color: var(--hpf-text) !important;
    background: rgba(0,0,0,0.01) !important;
}

.hpf-panel .hpf-sort-option:hover::before {
    border-color: #9ca3af !important;
}

/* Active sort — filled blue radio dot */
.hpf-panel .hpf-sort-option.active {
    color: var(--hpf-text) !important;
    font-weight: 500 !important;
    background: transparent !important;
}

.hpf-panel .hpf-sort-option.active::before {
    border-color: var(--hpf-primary) !important;
    background: var(--hpf-primary) !important;
    box-shadow: inset 0 0 0 2.5px #fff !important;
}


/* ============================================
   PRICE RANGE — Minimal inputs + thin slider
   ============================================ */
.hpf-panel .hpf-price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.hpf-panel .hpf-price-input-group {
    flex: 1;
}

/* Label — tiny, muted, not uppercase */
.hpf-panel .hpf-price-input-group label {
    display: block;
    font-size: 10px !important;
    font-weight: 500 !important;
    color: var(--hpf-text-muted) !important;
    margin-bottom: 3px;
    letter-spacing: 0 !important;
    text-transform: none !important;
    font-family: var(--hpf-font) !important;
}

.hpf-panel .hpf-price-input-group input[type="number"] {
    width: 100% !important;
    padding: 5px 8px !important;
    border: 1px solid var(--hpf-border) !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    color: var(--hpf-text) !important;
    box-sizing: border-box !important;
    font-family: var(--hpf-font) !important;
    background: #fff !important;
    transition: border-color 0.15s;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: 0 !important;
}

.hpf-panel .hpf-price-input-group input[type="number"]:focus {
    outline: none !important;
    border-color: var(--hpf-primary) !important;
    box-shadow: none !important;
}

.hpf-panel .hpf-price-sep {
    color: var(--hpf-text-muted);
    font-size: 11px;
    padding-top: 16px;
    font-family: var(--hpf-font);
}

/* Price slider — HIDDEN per request */
.hpf-panel .hpf-price-slider {
    display: none !important;
}

.hpf-panel .hpf-price-track {
    position: absolute;
    top: 9px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e5e7eb;
    border-radius: 1px;
}

.hpf-panel .hpf-price-track-fill {
    position: absolute;
    top: 0;
    height: 2px;
    background: var(--hpf-primary);
    border-radius: 1px;
}

.hpf-panel .hpf-price-slider input[type="range"] {
    position: absolute !important;
    width: 100% !important;
    height: 20px !important;
    background: transparent !important;
    pointer-events: none;
    -webkit-appearance: none !important;
    appearance: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.hpf-panel .hpf-price-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2px solid var(--hpf-primary);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.hpf-panel .hpf-price-slider input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2px solid var(--hpf-primary);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: none;
}

/* Price action row: Clear (ghost text) + Apply (primary) */
.hpf-panel .hpf-price-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 0;
}

/* Shared button base — small, compact */
.hpf-panel .hpf-btn-sm {
    padding: 4px 10px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    cursor: pointer;
    font-family: var(--hpf-font) !important;
    line-height: 1.4 !important;
    display: inline-block !important;
    text-align: center !important;
}

/* Clear = invisible ghost text, NOT a bordered button */
.hpf-panel .hpf-btn-sm.hpf-btn-sm-ghost {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--hpf-text-muted) !important;
    padding: 4px 6px !important;
}

.hpf-panel .hpf-btn-sm.hpf-btn-sm-ghost:hover {
    color: var(--hpf-text) !important;
    background: transparent !important;
    text-decoration: underline !important;
}

/* Apply = THE ONLY real button — compact primary blue */
.hpf-panel .hpf-btn-sm.hpf-btn-sm-primary {
    background: var(--hpf-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    padding: 6px 14px !important;
}

.hpf-panel .hpf-btn-sm.hpf-btn-sm-primary:hover {
    background: var(--hpf-primary-hover) !important;
    color: #fff !important;
}


/* ============================================
   CHECKBOX LIST — Small, modern, rounded
   Clean list of items with custom checkboxes.
   ============================================ */
.hpf-panel .hpf-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 180px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.hpf-panel .hpf-checkbox-list::-webkit-scrollbar { width: 3px; }
.hpf-panel .hpf-checkbox-list::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }

.hpf-panel .hpf-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 2px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.1s;
}

.hpf-panel .hpf-checkbox-row:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Custom checkbox — 15px, rounded 3px, blue fill when checked */
.hpf-panel .hpf-checkbox-row input[type="checkbox"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    min-height: 15px !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 3px !important;
    background: #fff !important;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
    transition: all 0.12s ease;
    box-shadow: none !important;
    outline: none !important;
}

.hpf-panel .hpf-checkbox-row input[type="checkbox"]:hover {
    border-color: #9ca3af !important;
}

.hpf-panel .hpf-checkbox-row input[type="checkbox"]:checked {
    background: var(--hpf-primary) !important;
    border-color: var(--hpf-primary) !important;
}

.hpf-panel .hpf-checkbox-row input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

/* Checkbox label */
.hpf-panel .hpf-checkbox-label {
    flex: 1;
    font-size: 12.5px;
    font-weight: 400;
    color: var(--hpf-text);
    line-height: 1.3;
    font-family: var(--hpf-font);
}

.hpf-panel .hpf-checkbox-count {
    font-size: 10px;
    color: var(--hpf-text-muted);
    font-family: var(--hpf-font);
}

.hpf-panel .hpf-empty-msg {
    display: none !important;
}


/* ============================================
   HEAVEN HAVN TOGGLE — Compact pill switch
   Plain row: icon + label left, pill toggle right.
   No border, no card, no gradient background.
   ============================================ */
.hpf-panel .hpf-hh-toggle {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 6px 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
}

.hpf-panel .hpf-hh-toggle input {
    display: none !important;
}

/* Pill toggle switch — compact 34x18 */
.hpf-panel .hpf-hh-switch {
    width: 34px;
    height: 18px;
    min-width: 34px;
    background: #d1d5db;
    border-radius: 9px;
    position: relative;
    transition: background 0.2s ease;
    flex-shrink: 0;
    order: 1;
    margin-left: auto;
}

.hpf-panel .hpf-hh-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}

.hpf-panel .hpf-hh-toggle input:checked + .hpf-hh-switch {
    background: var(--hpf-primary);
}

.hpf-panel .hpf-hh-toggle input:checked + .hpf-hh-switch::after {
    transform: translateX(16px);
}

/* Star icon — subtle gold */
.hpf-panel .hpf-hh-icon {
    font-size: 13px;
    color: #d97706;
    order: 0;
}

/* Label text */
.hpf-panel .hpf-hh-label {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--hpf-text);
    order: 0;
    font-family: var(--hpf-font);
}


/* ============================================
   MOBILE FILTER DRAWER — Modern Bottom Sheet v2
   iOS-style bottom sheet with drag handle,
   smooth spring animation, glassmorphism header.
   ============================================ */
.hpf-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hpf-mobile-overlay.visible { display: block; opacity: 1; }

.hpf-mobile-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    height: auto;
    background: #f8fafc;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.12), 0 -2px 10px rgba(0, 0, 0, 0.06);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    font-family: var(--hpf-font);
    overflow: hidden;
    top: auto;
}

.hpf-mobile-drawer.open { transform: translateY(0); }

/* Drag handle bar */
.hpf-drawer-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 20px 14px;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
}

.hpf-drawer-header::before {
    content: '';
    width: 36px;
    height: 4px;
    background: #d1d5db;
    border-radius: 4px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.hpf-drawer-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.hpf-drawer-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--hpf-text);
    margin: 0;
    font-family: var(--hpf-font);
    letter-spacing: -0.01em;
}

.hpf-drawer-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    color: var(--hpf-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1;
}

.hpf-drawer-close:hover,
.hpf-drawer-close:active {
    background: #e2e8f0;
    color: var(--hpf-text);
}

.hpf-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 8px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.hpf-drawer-section {
    background: #fff;
    border-radius: 14px;
    border: none;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.hpf-drawer-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--hpf-text-muted);
    margin: 0 0 10px 0;
    font-family: var(--hpf-font);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Mobile Sort Pills — modern chip style */
.hpf-mobile-sort-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hpf-mobile-sort-option {
    padding: 8px 14px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 100px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--hpf-text);
    cursor: pointer;
    font-family: var(--hpf-font);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.hpf-mobile-sort-option:active {
    transform: scale(0.97);
}

.hpf-mobile-sort-option.active {
    background: #eff6ff;
    border-color: var(--hpf-primary);
    color: var(--hpf-primary);
    font-weight: 600;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
}

/* Mobile Price — modern grouped inputs */
.hpf-mobile-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hpf-mobile-price-input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    color: var(--hpf-text);
    box-sizing: border-box;
    font-family: var(--hpf-font);
    background: #f8fafc;
    transition: all 0.15s ease;
}

.hpf-mobile-price-input:focus {
    outline: none;
    border-color: var(--hpf-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.hpf-mobile-price-sep {
    color: var(--hpf-text-muted);
    font-size: 12px;
    font-weight: 500;
}

/* Mobile Checkbox — modern toggle-pill style */
.hpf-mobile-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}

.hpf-mobile-checkbox-list::-webkit-scrollbar { width: 3px; }
.hpf-mobile-checkbox-list::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 3px; }

.hpf-mobile-checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.12s ease;
}

.hpf-mobile-checkbox-row:active { background: #f1f5f9; }

.hpf-mobile-checkbox-row input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    margin: 0;
    position: relative;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.hpf-mobile-checkbox-row input[type="checkbox"]:checked {
    background: var(--hpf-primary);
    border-color: var(--hpf-primary);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.hpf-mobile-checkbox-row input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.hpf-mobile-checkbox-label {
    font-size: 13.5px;
    color: var(--hpf-text);
    font-family: var(--hpf-font);
    font-weight: 400;
    line-height: 1.3;
}

/* Mobile Heaven Havn */
.hpf-mobile-hh-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    background: transparent;
    border-radius: 0;
    cursor: pointer;
    border: none;
}

.hpf-mobile-hh-toggle .hpf-hh-switch {
    width: 44px;
    height: 24px;
    min-width: 44px;
    background: #d1d5db;
    border-radius: 12px;
    position: relative;
    transition: background 0.2s ease;
    flex-shrink: 0;
    order: 1;
    margin-left: auto;
}

.hpf-mobile-hh-toggle .hpf-hh-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.hpf-mobile-hh-toggle input:checked + .hpf-hh-switch {
    background: var(--hpf-primary);
}

.hpf-mobile-hh-toggle input:checked + .hpf-hh-switch::after {
    transform: translateX(20px);
}

.hpf-mobile-hh-toggle .hpf-hh-label {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--hpf-text);
    font-family: var(--hpf-font);
}

.hpf-mobile-hh-toggle .hpf-hh-icon {
    font-size: 16px;
    color: #d97706;
}

/* Drawer Footer — frosted glass sticky */
.hpf-drawer-footer {
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.hpf-drawer-btn {
    flex: 1;
    padding: 13px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--hpf-font);
    transition: all 0.15s ease;
    text-align: center;
}

.hpf-drawer-btn:active {
    transform: scale(0.97);
}

.hpf-drawer-btn-clear {
    background: #f1f5f9;
    color: var(--hpf-text);
    border: none;
}

.hpf-drawer-btn-clear:active {
    background: #e2e8f0;
}

.hpf-drawer-btn-apply {
    background: var(--hpf-primary);
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.hpf-drawer-btn-apply:active {
    background: var(--hpf-primary-hover);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}


/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 960px) {
    .hpf-layout {
        flex-direction: column;
        padding: 12px;
    }

    .hpf-panel { display: none; }
    .hpf-mobile-bar { display: flex; }
}
