.listing-user-pages-bar .view-hidden {
    display: none !important;
}

.listing-user-pages-bar .ui-sortable-helper {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.listing-user-pages-bar .ui-sortable-placeholder {
    visibility: visible !important;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    border-radius: 4px;
}
.listing-filters-bar .filter-sector .tm-check {
    font-size: 0.8em;
}

.listing-filters-bar .filter-sector.active {
    background-color: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

.listing-filters-bar .filter-category-dropdown .filter-category-item:hover,
.listing-view-modal .modal-category-dropdown .modal-category-item:hover {
    background-color: #f5f5f5;
}

.listing-filters-bar .filter-category-tag,
.listing-view-modal .modal-category-tag {
    font-weight: normal;
}

.listing-filters-bar .filter-categories,
.listing-view-modal .modal-section-categories {
    min-width: 260px;
}

/* ============================ Filter panel ============================ */
.listings-filter-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

/* ============================ Summary row ============================= */
.lfp-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #f0f1f3;
    min-height: 32px;
}
.lfp-summary:empty,
.lfp-summary.is-empty {
    display: none;
}
.lfp-summary-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    font-weight: 600;
}
.lfp-summary-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}
.lfp-summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef2ff;
    color: #3730a3;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
}
.lfp-summary-chip .lfp-summary-chip-x {
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.15s;
}
.lfp-summary-chip .lfp-summary-chip-x:hover {
    opacity: 1;
}
.lfp-clear-all {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
}
.lfp-clear-all:hover {
    color: #111827;
    text-decoration: underline;
}

/* ============================ Controls layout ========================= */
.lfp-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 24px;
    align-items: flex-start;
}
.lfp-block {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.lfp-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin: 0;
}
.lfp-body {
    display: flex;
    align-items: center;
    gap: 6px;
}
.lfp-sort-right {
    margin-left: auto;
}

/* ============================ Sector chips ============================ */
.lfp-chip-group {
    flex-wrap: wrap;
}
.lfp-chip {
    background: #f3f4f6;
    border: 1px solid transparent;
    color: #374151;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.lfp-chip:hover {
    background: #e5e7eb;
}
.lfp-chip.active {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}
.lfp-chip.active:hover {
    background: #4338ca;
}

/* ============================ Inputs / selects / buttons ============== */
.lfp-input,
.lfp-select {
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    color: #111827;
    transition: border-color 0.15s, box-shadow 0.15s;
    min-height: 32px;
}
.lfp-input:focus,
.lfp-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.lfp-input {
    width: 80px;
}
.lfp-select {
    cursor: pointer;
}
.lfp-btn {
    background: #4f46e5;
    border: 1px solid #4f46e5;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}
.lfp-btn:hover {
    background: #4338ca;
}
.lfp-btn-ghost {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #4b5563;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}
.lfp-btn-ghost:hover {
    background: #f9fafb;
    color: #111827;
    border-color: #9ca3af;
}

.lfp-price-range {
    display: flex;
    align-items: center;
    gap: 6px;
}
.lfp-price-sep {
    color: #9ca3af;
}
.lfp-distance-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.lfp-location-status {
    font-size: 11px;
}

/* ============================ Category multiselect ==================== */
.lfp-multiselect {
    position: relative;
    min-width: 280px;
}
.lfp-multiselect-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 4px 8px;
    min-height: 32px;
    cursor: text;
}
.lfp-multiselect-inner:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.lfp-multiselect-input {
    flex: 1;
    min-width: 80px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    color: #111827;
    padding: 2px 0;
}
.lfp-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eef2ff;
    color: #3730a3;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}
.lfp-tag-x {
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.15s;
}
.lfp-tag-x:hover {
    opacity: 1;
}

.lfp-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    max-height: 280px;
    overflow-y: auto;
    z-index: 1050;
}
.lfp-dropdown.show {
    display: block;
}
.lfp-dropdown-item {
    padding: 8px 12px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: background 0.1s;
}
.lfp-dropdown-item:hover {
    background: #f3f4f6;
}

/* ============================ Responsive ============================== */
@media (max-width: 640px) {
    .lfp-controls { gap: 14px; }
    .lfp-block { width: 100%; }
    .lfp-sort-right { margin-left: 0; }
    .lfp-multiselect { min-width: 0; width: 100%; }
}


.filter-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* Top: aside above main, full width */
.filter-layout.lfl-top {
    flex-direction: column;
}
.filter-layout.lfl-top .filter-aside {
    flex: 0 0 auto;
    width: 100%;
    position: static;
}

/* Left/right: sidebar */
.filter-layout.lfl-left  { flex-direction: row; }
.filter-layout.lfl-right { flex-direction: row-reverse; }

.filter-layout.lfl-left  .filter-aside,
.filter-layout.lfl-right .filter-aside {
    flex: 0 0 280px;
    position: sticky;
    top: 16px;
}

.filter-layout.lfl-top .filter-main {
    width: 100%;
}

/* In sidebar mode, stack blocks vertically */
.lfl-left .lfp-controls,
.lfl-right .lfp-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
}
.lfl-left .lfp-block,
.lfl-right .lfp-block { width: 100%; }
.lfl-left .lfp-sort-right,
.lfl-right .lfp-sort-right { margin-left: 0; }
.lfl-left .lfp-multiselect,
.lfl-right .lfp-multiselect { min-width: 0; }
.lfl-left .lfp-price-range,
.lfl-right .lfp-price-range { flex-wrap: wrap; }
.lfl-left .lfp-input,
.lfl-right .lfp-input { width: 70px; }

/* Mobile: always top */
@media (max-width: 768px) {
    .filter-layout.lfl-left,
    .filter-layout.lfl-right {
        flex-direction: column;
    }
    .filter-layout.lfl-left .filter-aside,
    .filter-layout.lfl-right .filter-aside {
        flex: 0 0 auto;
        width: 100%;
        position: static;
    }
    .filter-layout.lfl-left .lfp-controls,
    .filter-layout.lfl-right .lfp-controls {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .filter-layout.lfl-left .lfp-block,
    .filter-layout.lfl-right .lfp-block { width: auto; }
}

/* Layout toggle (segmented control) */
.lfp-layout-toggle {
    display: inline-flex;
    gap: 2px;
    background: #f3f4f6;
    border-radius: 6px;
    padding: 2px;
    margin-left: auto;
}
.lfp-pos-btn {
    background: transparent;
    border: none;
    color: #6b7280;
    padding: 4px 7px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.lfp-pos-btn:hover {
    color: #111827;
    background: rgba(0,0,0,0.05);
}
.lfp-pos-btn.active {
    background: #fff;
    color: #4f46e5;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.lfp-summary-group {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 4px 8px;
}

.lfp-summary-group-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 2px;
}