
.ipf-filter-wrapper {
    background: #fff;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 4px;
    font-size: 14px;
}

.ipf-main-title {
    text-align: center;
    font-weight: 600; 
    margin-bottom: 15px;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ipf-filter-group h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 600 !important;
    font-size: 1em;
    opacity: 0.9;
}

.ipf-checkbox-list { list-style: none !important; padding: 0 !important; margin: 0 !important; max-height: 200px; overflow-y: auto; }
.ipf-checkbox-list li { margin-bottom: 5px; list-style-type: none !important; }
.ipf-checkbox-list label { cursor: pointer; display: flex; align-items: center; gap: 8px; }
.ipf-checkbox-list .count { margin-left: auto; opacity: 0.7; background: #f5f5f5; padding: 2px 6px; border-radius: 10px; font-size: 0.85em; }

/* Slider */
.ipf-price-slider { margin: 15px 5px 20px; background: #eee; height: 4px; position: relative; border-radius: 2px; display: block; }
.ipf-price-slider .ui-slider-handle { width: 14px; height: 14px; background: #fff; border: 2px solid #333; border-radius: 50%; position: absolute; top: -5px; cursor: pointer; outline: none; }
.ipf-price-inputs { display: flex; gap: 10px; }
.ipf-input-wrap { display: flex; align-items: center; border: 1px solid #ddd; border-radius: 4px; width: 50%; padding: 0 5px; background: #f9f9f9; }
.ipf-currency { font-size: 0.85em; opacity: 0.7; margin-right: 4px; }
.ipf-price-inputs input { width: 100%; padding: 5px 0; border: none; background: transparent; outline: none; font-size: inherit; }

/* Buttons */
.ipf-actions { display: flex; gap: 10px; margin-top: 15px; flex-wrap: wrap; }
.ipf-submit-filter, .ipf-reset-filter {
    flex: 1;
    padding: 6px 10px; 
    font-size: 0.85em; 
    cursor: pointer;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
    line-height: 1.2;
    transition: opacity 0.2s;
    white-space: nowrap;
}
.ipf-reset-filter { background-color: #999 !important; color: #fff; }
.ipf-submit-filter:hover, .ipf-reset-filter:hover { opacity: 0.9; }

/* Sticky Mobile Bar (Standard Full Width) */
.ipf-mobile-sticky-bar {
    display: none; /* Hidden on desktop */
    position: fixed;
    bottom: 0; /* Fixed at BOTTOM */
    left: 0;
    width: 100%;
    background: transparent;
    z-index: 99999; 
    padding: 10px;
    text-align: center;
    box-sizing: border-box;
    pointer-events: none;
}
.ipf-mobile-filter-btn {
    pointer-events: auto; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 30px; /* Pill shape */
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    border: none;
    gap: 8px;
    background-color: #000; /* Default black fallback */
    color: #fff;
}

/* Responsive Rules */
@media (max-width: 1024px) {
    .ipf-horizontal { flex-direction: column; }
    .ipf-horizontal .ipf-filter-group { border-right: none; border-bottom: 1px solid #eee; width: 100%; }
    .ipf-submit-filter, .ipf-reset-filter { width: 48%; flex: auto; }
    .ipf-mobile-sticky-bar { display: block; }
    
    /* HIDE the original SOURCE wrapper on mobile/tablet (USER FIX) */
    .js-ipf-source { display: none !important; }
    
    /* Ensure the drawer clone IS visible */
    .ipf-mobile-drawer .js-ipf-static { display: block !important; }
    
    /* Sticky bar padding */
    body { padding-bottom: 80px !important; }
}

/* Drawer CSS - Slide Up Overlay */
.ipf-mobile-drawer { 
    position: fixed; 
    top: 0; 
    left: -100%; 
    width: 100%; 
    height: 100%; 
    z-index: 2147483647; /* MAX SAFE INTEGER */
    transition: left 0.3s ease; 
    display: flex; 
}
.ipf-mobile-drawer.open { left: 0; }

.ipf-drawer-overlay { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.6); 
    z-index: 1; 
}

.ipf-drawer-content { 
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 85%; /* Slide up 85% */
    background: #ffffff !important; /* Force Solid White to prevent Overlap */
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.15);
}
.ipf-mobile-drawer.open .ipf-drawer-content { transform: translateY(0); }

.ipf-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #ffffff !important;
}
.ipf-drawer-header h4 { margin: 0; font-size: 18px; font-weight: 700; }

.ipf-drawer-close { 
    background: none; 
    border: none; 
    font-size: 28px; 
    cursor: pointer;
    line-height: 1;
    padding: 0;
    color: #333;
}

.ipf-drawer-inner {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #ffffff !important;
    /* Safe area for bottom nav */
    padding-bottom: 40px; 
}

body.ipf-drawer-open { overflow: hidden; }

.ipf-loading { opacity: 0.5; pointer-events: none; }
