/* ============================================================================
   Search Filters Redesign - OMAN Project
   ============================================================================ */

/* === Design Tokens (self-contained) === */
:root {
    --brand-primary: #fd7b21;
    --brand-primary-dark: #e56a1a;
    --brand-primary-light: #ff8c42;
    --brand-secondary: #40B69E;
    --brand-secondary-dark: #2d8f6f;
    --brand-dark-blue: #144273;
    --brand-dark-blue-light: #1e5a8e;
    --brand-gray: #f8f9fa;
    --brand-gray-light: #fafbfc;
    --brand-gray-medium: #e9ecef;
    --brand-gray-dark: #6c757d;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-white: #ffffff;
    --border-light: #e9ecef;
    --border-medium: #dee2e6;
    --border-dark: #adb5bd;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-lighter: #fafbfc;
    --shadow-light: rgba(0,0,0,0.1);
    --shadow-medium: rgba(0,0,0,0.15);
    --shadow-dark: rgba(0,0,0,0.2);
    --shadow-primary: rgba(253,123,33,0.25);
    --shadow-primary-hover: rgba(253,123,33,0.4);
    --gradient-primary: linear-gradient(135deg, #fd7b21 0%, #ff8c42 100%);
    --hover-bg-light: #f0f7ff;
    --hover-bg-primary: rgba(253,123,33,0.1);
    --radius-small: 6px;
    --radius-medium: 8px;
    --radius-large: 12px;
    --radius-xl: 16px;
    --radius-round: 50%;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-white: #1a1a1a;
        --bg-light: #2d2d2d;
        --bg-lighter: #3a3a3a;
        --text-primary: #ffffff;
        --text-secondary: #e9ecef;
        --text-muted: #adb5bd;
        --border-light: #495057;
        --border-medium: #6c757d;
        --shadow-light: rgba(0,0,0,0.3);
        --shadow-medium: rgba(0,0,0,0.4);
    }
}

/* ===== Filter Box Container ===== */
.block-box.fl-wrap.search-sb {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 20px var(--shadow-light);
    padding: 0;
    border: 1px solid var(--border-light);
    overflow: visible;
    position: sticky;
    top: 100px;
}

/* السماح للقائمة المنسدلة بـ nice-select بالظهور خارج الحاوية */
.block-box.fl-wrap.search-sb .listsearch-input-item,
.block-box.fl-wrap.search-sb .filter-section,
.block-box.fl-wrap.search-sb .filters-form,
.block-box.fl-wrap.search-sb .filter-fields-grid {
    overflow: visible !important;
}

/* nice-select يظهر فوق كل العناصر */
.nice-select.chosen-select {
    position: relative;
    z-index: 1000;
}

.nice-select.chosen-select.open {
    z-index: 10000;
}

/* ===== Filters Header ===== */
.filters-header {
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: 16px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Tajawal', 'Jost', sans-serif;
    letter-spacing: 0.3px;
    position: relative;
}

.filters-header i {
    font-size: 20px;
    opacity: 0.9;
}

.filter-count-badge {
    background: rgba(255,255,255,0.2);
    padding: 3px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    margin-right: auto;
    border: 1px solid rgba(255,255,255,0.15);
}

/* ===== Filters Form & Active Summary ===== */
.filters-form {
    display: flex;
    flex-direction: column;
}

.filters-summary {
    margin: 16px 22px 0;
    padding: 12px 14px;
    border: 1px dashed var(--border-medium);
    border-radius: var(--radius-medium);
    background: var(--bg-light);
}

.filters-summary-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--brand-dark-blue);
    font-family: 'Tajawal', 'Jost', sans-serif;
}

.filters-summary-title i {
    color: var(--brand-secondary);
    font-size: 12px;
}

.filters-summary-content {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filters-summary-empty {
    font-size: 13px;
    color: var(--text-muted);
    font-family: 'Tajawal', 'Jost', sans-serif;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    font-family: 'Tajawal', 'Jost', sans-serif;
}

.filter-chip-label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.filter-chip-value {
    color: var(--brand-primary-dark);
    font-size: 13px;
    font-weight: 700;
}

.filters-summary.is-empty {
    border-style: solid;
}

/* ===== Filter Sections ===== */
.filter-section {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.filter-section::before {
    content: '';
    position: absolute;
    top: 2px; bottom: 2px;
    right: 0;
    width: 3px;
    background: transparent;
    border-radius: 0 2px 2px 0;
    transition: background 0.25s ease, opacity 0.25s ease;
    opacity: 0;
}

.filter-section:has(input:focus)::before,
.filter-section:has(select:focus)::before,
.filter-section:has(.open)::before {
    background: var(--gradient-primary);
    opacity: 1;
}

.filter-section:last-of-type {
    border-bottom: none;
}

.filters-summary + .filter-section {
    margin-top: 14px;
    border-top: 1px solid var(--border-light);
}

[dir="rtl"] .filter-section::before {
    right: auto;
    left: 0;
    border-radius: 2px 0 0 2px;
}

.filter-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-dark-blue);
    margin-bottom: 14px;
    font-family: 'Tajawal', 'Jost', sans-serif;
}

.filter-section-title i {
    font-size: 13px;
    color: var(--brand-primary);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hover-bg-primary);
    border-radius: 5px;
}

/* ===== Search Input ===== */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper::before {
    content: '\f002';
    font-family: 'Font Awesome 5 Pro';
    font-weight: 900;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    z-index: 2;
    pointer-events: none;
    transition: color var(--transition-fast);
}

.search-input-wrapper:focus-within::before {
    color: var(--brand-primary);
}

.listsearch-input-item input[type="text"] {
    padding: 0 44px 0 16px !important;
    font-size: 15px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-medium);
    transition: border-color var(--transition-fast), background var(--transition-fast);
    background: var(--bg-light);
    color: var(--text-primary);
    width: 100%;
    outline: none;
    font-family: 'Tajawal', 'Jost', sans-serif;
    height: 48px;
}

.listsearch-input-item input[type="text"]:focus {
    border-color: var(--brand-primary);
    background: var(--bg-white);
    box-shadow: 0 0 0 4px var(--shadow-primary);
}

.listsearch-input-item input[type="text"]::placeholder {
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== Search Suggestions Button ===== */
.search-suggestions-btn {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px 10px;
    border-radius: var(--radius-small);
    transition: all var(--transition-fast);
    z-index: 3;
    font-size: 15px;
}

.search-suggestions-btn:hover {
    background: var(--hover-bg-primary);
    color: var(--brand-primary);
}

/* ===== Search Suggestions Dropdown ===== */
.search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-large);
    box-shadow: 0 16px 48px var(--shadow-medium), 0 4px 16px var(--shadow-light);
    z-index: 1000;
    margin-top: 0;
    padding: 18px;
    animation: slideDown 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.suggestion-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Tajawal', 'Jost', sans-serif;
}

.suggestion-title::before {
    content: '\f0eb';
    font-family: 'Font Awesome 5 Pro';
    font-weight: 900;
    color: var(--brand-primary);
    font-size: 15px;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.suggestion-tag {
    background: var(--hover-bg-light);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 14px;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    font-weight: 500;
    font-family: 'Tajawal', 'Jost', sans-serif;
}

.suggestion-tag:hover,
.suggestion-tag.highlighted {
    background: var(--brand-primary-dark);
    color: var(--text-white);
    text-decoration: none;
    border-color: transparent;
}

/* ===== Select Dropdowns (Nice Select Override) ===== */
.nice-select.chosen-select {
    border: 2px solid var(--border-light);
    border-radius: var(--radius-medium);
    height: 48px;
    line-height: 44px;
    padding: 0 16px;
    background: var(--bg-light);
    transition: all var(--transition-normal);
    font-size: 15px;
    color: var(--text-primary);
    width: 100%;
    font-family: 'Tajawal', 'Jost', sans-serif;
}

.nice-select.chosen-select:hover {
    border-color: var(--border-dark);
}

.nice-select.chosen-select:focus,
.nice-select.chosen-select.open {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px var(--shadow-primary);
    background: var(--bg-white);
}

.nice-select.chosen-select .current {
    font-weight: 500;
    color: var(--text-secondary);
}

.nice-select.chosen-select .list {
    border-radius: var(--radius-large);
    box-shadow: 0 16px 48px var(--shadow-medium), 0 4px 16px var(--shadow-light);
    border: 1px solid var(--border-light);
    padding: 8px;
    max-height: 280px;
    overflow-y: auto;
    background: var(--bg-white);
    z-index: 9999;
}

.nice-select.chosen-select .list .option {
    border-radius: var(--radius-small);
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    min-height: auto;
    line-height: 1.5;
    font-family: 'Tajawal', 'Jost', sans-serif;
}

.nice-select.chosen-select .list .option:hover,
.nice-select.chosen-select .list .option.focus {
    background: var(--hover-bg-light);
    color: var(--brand-primary);
    font-weight: 500;
}

.nice-select.chosen-select .list .option.selected {
    background: var(--gradient-primary);
    color: var(--text-white);
    font-weight: 600;
}

.nice-select.chosen-select::after {
    content: '';
    border: 2px solid var(--text-muted);
    border-top: none;
    border-right: none;
    width: 9px;
    height: 9px;
    margin-top: -7px;
    right: 20px;
    font-family: inherit;
    transform: rotate(135deg);
    background: none;
}

.nice-select.chosen-select.open::after {
    border-color: var(--brand-primary);
    margin-top: -2px;
    transform: rotate(-45deg);
}

/* Nice Select RTL fix */
[dir="rtl"] .nice-select.chosen-select::after {
    right: auto;
    left: 18px;
}

[dir="rtl"] .nice-select.chosen-select {
    text-align: right !important;
    padding: 0 14px;
}

/* ===== Checkbox Toggle Cards ===== */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-light);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-medium);
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast), transform 0.15s ease;
    font-weight: 600 !important;
    font-size: 14px;
    color: var(--text-secondary);
    user-select: none;
    margin-bottom: 0 !important;
    font-family: 'Tajawal', 'Jost', sans-serif;
    position: relative;
}

.checkbox-label:hover {
    border-color: var(--brand-primary);
    background: var(--hover-bg-light);
}

.checkbox-label:active {
    transform: scale(0.97);
}

.checkbox-label:has(input:checked) {
    border-color: var(--brand-primary);
    background: var(--hover-bg-primary);
    color: var(--brand-primary-dark);
}

.checkbox-label:has(input:checked) span {
    font-weight: 700;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--brand-primary);
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
}

/* ===== Form Labels ===== */
.listsearch-input-item {
    margin-bottom: 0;
    position: relative;
    float: none;
    width: 100%;
}

.listsearch-input-item + .listsearch-input-item {
    margin-top: 14px;
}

.filter-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.filter-fields-grid .listsearch-input-item {
    margin: 0 !important;
}

.listsearch-input-item label:not(.checkbox-label) {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    padding-bottom: 0;
    text-align: inherit;
    font-family: 'Tajawal', 'Jost', sans-serif;
}

/* ===== Footer / Actions ===== */
.msotw_footer {
    padding: 18px 22px;
    background: var(--bg-light);
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    position: relative;
}

.msotw_footer .btn.small-btn.float-btn.color-bg {
    background: var(--brand-primary);
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius-medium);
    font-weight: 700;
    font-size: 15px;
    color: var(--text-white);
    cursor: pointer;
    flex: 1;
    min-width: 120px;
    font-family: 'Tajawal', 'Jost', sans-serif;
    transition: background var(--transition-fast);
}

.msotw_footer .btn.small-btn.float-btn.color-bg:hover {
    background: var(--brand-primary-dark);
}

.msotw_footer .reset-form.reset-btn {
    background: transparent;
    color: var(--text-secondary);
    padding: 12px 24px;
    border-radius: var(--radius-medium);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 2px solid var(--border-light);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Tajawal', 'Jost', sans-serif;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.msotw_footer .reset-form.reset-btn:hover {
    background: var(--hover-bg-light);
    border-color: var(--border-medium);
    color: var(--brand-primary);
    text-decoration: none;
}

/* ===== Filter Count Badges ===== */
.filter-count-badge,
.filter-count-mobile-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 10px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    font-family: 'Tajawal', 'Jost', sans-serif;
}

.filter-count-badge {
    background: rgba(255,255,255,0.2);
    color: var(--text-white);
    border: 1px solid rgba(255,255,255,0.15);
}

.filter-count-mobile-badge {
    background: var(--bg-white);
    color: var(--brand-primary);
    margin-right: auto;
}

/* ===== Loading State ===== */
.search-loading {
    position: absolute;
    top: 50%;
    right: 44px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-top-color: var(--brand-primary);
    border-radius: var(--radius-round);
    animation: spin 0.7s linear infinite;
    display: none;
    z-index: 3;
}

.search-loading.active {
    display: block;
}

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

/* ===== Mobile Toggle Button ===== */
.mob-nav-content-btn {
    display: none;
    font-family: 'Tajawal', 'Jost', sans-serif;
    box-shadow: 0 4px 16px var(--shadow-primary);
    border: none;
    position: relative;
    overflow: hidden;
}

.mob-nav-content-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    pointer-events: none;
}

/* ===== Responsive: Tablet & Mobile ===== */
@media (max-width: 1070px) {
    .mob-nav-content-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 16px 26px;
        border-radius: var(--radius-medium);
        font-weight: 700;
        font-size: 15px;
        cursor: pointer;
        margin-bottom: 16px;
        background: var(--brand-primary);
        color: var(--text-white);
        border: none;
    }

    .mob-nav-content-btn:hover {
        background: var(--brand-primary-dark);
    }

    .lws_mobile {
        display: none;
        animation: slideDown 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .lws_mobile.show {
        display: block;
    }

    .block-box.fl-wrap.search-sb {
        position: static;
        box-shadow: 0 4px 24px var(--shadow-light);
    }

    .filter-section {
        padding: 18px 20px;
    }
    .filters-summary {
        margin: 14px 20px 0;
    }

    .filter-fields-grid {
        grid-template-columns: 1fr;
    }

    .checkbox-group {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .msotw_footer {
        padding: 18px 20px;
        flex-direction: column;
    }

    .msotw_footer .btn.small-btn.float-btn.color-bg {
        width: 100%;
    }

    .msotw_footer .reset-form.reset-btn {
        width: 100%;
        justify-content: center;
    }

    .filters-header {
        padding: 18px 20px;
    }
}

/* ===== Responsive: Mobile Small ===== */
@media (max-width: 480px) {

    .filters-header {
        padding: 16px 18px;
        font-size: 15px;
    }

    .filter-section {
        padding: 16px 18px;
    }

    .filters-summary {
        margin: 14px 18px 0;
        padding: 10px 12px;
    }

    .filters-summary-title {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .filter-chip {
        padding: 4px 9px;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .suggestion-tag {
        font-size: 13px;
        padding: 7px 14px;
    }

    .msotw_footer {
        padding: 16px 18px;
    }

    .checkbox-label {
        font-size: 13px;
        padding: 9px 12px;
    }

    .listsearch-input-item input[type="text"] {
        height: 44px;
        font-size: 14px;
    }

    .nice-select.chosen-select {
        height: 44px;
        line-height: 40px;
    }
}

/* ===== RTL Overrides ===== */
[dir="rtl"] .search-input-wrapper::before {
    right: 16px;
    left: auto;
}

[dir="rtl"] .search-suggestions-btn {
    left: 10px;
    right: auto;
}

[dir="rtl"] .filters-header i {
    margin-left: 0;
}

[dir="rtl"] .filter-count-badge {
    margin-right: 0;
    margin-left: auto;
}

[dir="rtl"] .filter-count-mobile-badge {
    margin-right: auto;
    margin-left: 0;
}

/* ===== Scrollbar for Dropdowns ===== */
.nice-select .list::-webkit-scrollbar {
    width: 4px;
}

.nice-select .list::-webkit-scrollbar-track {
    background: transparent;
}

.nice-select .list::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 4px;
}

.nice-select .list::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== Nice Select Open Animation ===== */
.nice-select .list {
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: top center;
    transform: scaleY(0.95);
    opacity: 0;
}

.nice-select.open .list {
    transform: scaleY(1);
    opacity: 1;
}

/* ===== Results Header ===== */
.list-main-wrap-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.list-main-wrap-title h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    font-family: 'Tajawal', 'Jost', sans-serif;
}

.list-main-wrap-title h2 span {
    color: var(--brand-primary);
}

.list-main-wrap-title h2 strong {
    color: var(--text-white);
    background: var(--gradient-primary);
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 13px;
    margin-right: 6px;
}

[dir="rtl"] .list-main-wrap-title h2 strong {
    margin-right: 6px;
    margin-left: 0;
}

.list-main-wrap-opt {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: auto;
}

[dir="rtl"] .list-main-wrap-opt {
    margin-right: 0;
    margin-left: auto;
}

.price-opt {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-opt-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    font-family: 'Tajawal', 'Jost', sans-serif;
}

.price-opt .listsearch-input-item {
    width: auto;
    min-width: 140px;
    margin: 0;
}

.price-opt .listsearch-input-item .nice-select.chosen-select {
    height: 40px;
    line-height: 36px;
    font-size: 14px;
    padding: 0 14px;
}

/* Grid/List Toggle */
.grid-opt ul {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.grid-opt_act span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-medium);
    background: var(--bg-light);
    border: 2px solid var(--border-light);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 15px;
}

.grid-opt_act span:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: var(--hover-bg-primary);
}

.grid-opt_act span.act-grid-opt {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: var(--text-white);
}

/* ===== Listing Cards ===== */
.listing-card-modern {
    display: flex;
    background: var(--bg-white);
    border-radius: var(--radius-large);
    border: 1px solid var(--border-light);
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px var(--shadow-light);
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.listing-card-modern:hover {
    box-shadow: 0 6px 24px var(--shadow-light);
    border-color: var(--border-medium);
}

.listing-card-image {
    position: relative;
    width: 220px;
    min-height: 200px;
    flex-shrink: 0;
    overflow: hidden;
}

.listing-card-image .listing-img-link {
    display: block;
    width: 100%;
    height: 100%;
}

.listing-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 50%);
    pointer-events: none;
}

.listing-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: 5px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Tajawal', 'Jost', sans-serif;
    box-shadow: 0 2px 8px var(--shadow-primary);
}

[dir="rtl"] .listing-badge {
    right: auto;
    left: 12px;
}

.listing-fav-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-round);
    background: var(--bg-white);
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px var(--shadow-light);
    font-size: 15px;
}

[dir="rtl"] .listing-fav-btn {
    left: auto;
    right: 12px;
}

.listing-fav-btn:hover {
    color: #e74c3c;
    transform: scale(1.1);
}

.listing-card-content {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.listing-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.listing-category-badge {
    background: var(--hover-bg-primary);
    color: var(--brand-primary-dark);
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    font-family: 'Tajawal', 'Jost', sans-serif;
    transition: all var(--transition-fast);
}

.listing-category-badge:hover {
    background: var(--brand-primary);
    color: var(--text-white);
    text-decoration: none;
}

.listing-social-links {
    display: flex;
    gap: 4px;
}

.social-link {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-round);
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.social-link:hover {
    background: var(--brand-primary);
    color: var(--text-white);
    border-color: var(--brand-primary);
    text-decoration: none;
}

.listing-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    font-family: 'Tajawal', 'Jost', sans-serif;
}

.listing-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.listing-title a:hover {
    color: var(--brand-primary);
}

.verified-badge {
    color: var(--brand-secondary);
    font-size: 15px;
}

.verified-badge-icon {
    color: var(--brand-secondary);
    font-size: 15px;
}

.listing-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-muted);
    font-family: 'Tajawal', 'Jost', sans-serif;
}

.listing-location i {
    color: var(--brand-primary);
    font-size: 13px;
}

.listing-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
    font-family: 'Tajawal', 'Jost', sans-serif;
}

.listing-verified {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'Tajawal', 'Jost', sans-serif;
}

.listing-verified img {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-round);
    opacity: 0.6;
}

.listing-verified .verified-badge {
    font-size: 12px;
    color: var(--text-muted);
}

.listing-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    flex-wrap: wrap;
}

.listing-actions a {
    padding: 9px 18px;
    border-radius: var(--radius-medium);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
    font-family: 'Tajawal', 'Jost', sans-serif;
}

.btn-whatsapp {
    background: #25D366;
    color: var(--text-white);
    border: none;
}

.btn-whatsapp:hover {
    background: #1da851;
    color: var(--text-white);
}

.btn-call {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-call:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.btn-details {
    background: var(--hover-bg-primary);
    color: var(--brand-primary-dark);
    border: 1px solid transparent;
}

.btn-details:hover {
    background: var(--brand-primary);
    color: var(--text-white);
}

/* ===== No Results ===== */
.error-wrap {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-light);
    border-radius: var(--radius-xl);
    border: 2px dashed var(--border-light);
}

.error-wrap p {
    font-size: 16px;
    color: var(--text-secondary);
    font-family: 'Tajawal', 'Jost', sans-serif;
    margin: 0;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: var(--radius-medium);
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
    font-family: 'Tajawal', 'Jost', sans-serif;
}

.pagination a:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: var(--hover-bg-primary);
    text-decoration: none;
}

.pagination a.current-page {
    background: var(--gradient-primary);
    color: var(--text-white);
    border-color: transparent;
    box-shadow: 0 4px 12px var(--shadow-primary);
}

.pagination a.prevposts-link.disabled,
.pagination a.nextposts-link.disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

.pagination a.prevposts-link:not(.disabled):hover,
.pagination a.nextposts-link:not(.disabled):hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* ===== Responsive Cards ===== */
@media (max-width: 991px) {
    .listing-card-modern {
        flex-direction: column;
    }

    .listing-card-image {
        width: 100%;
        min-height: 180px;
        height: 180px;
    }

    .list-main-wrap-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .list-main-wrap-opt {
        width: 100%;
        margin-right: 0;
    }

    [dir="rtl"] .list-main-wrap-opt {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .listing-card-content {
        padding: 16px;
    }

    .listing-actions a {
        flex: 1;
        justify-content: center;
        font-size: 13px;
        padding: 8px 14px;
    }

    .listing-title {
        font-size: 15px;
    }

    .list-main-wrap-title h2 {
        font-size: 15px;
    }

    .price-opt {
        width: 100%;
    }

    .price-opt .listsearch-input-item {
        flex: 1;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .pagination a {
        min-width: 34px;
        height: 34px;
        font-size: 13px;
    }
}

/* ===== Dark Mode Support ===== */
@media (prefers-color-scheme: dark) {
    .block-box.fl-wrap.search-sb {
        border-color: var(--border-light);
    }

    .filter-section-title i {
        background: rgba(253, 123, 33, 0.15);
    }

    .filter-section:has(input:focus)::before,
    .filter-section:has(select:focus)::before,
    .filter-section:has(.open)::before {
        background: var(--brand-primary);
    }

    .checkbox-label {
        background: var(--bg-lighter);
        border-color: var(--border-light);
    }

    .checkbox-label:hover {
        background: rgba(255,255,255,0.05);
    }

    .checkbox-label:has(input:checked) {
        background: rgba(253, 123, 33, 0.15);
    }

    .nice-select.chosen-select {
        background: var(--bg-lighter);
    }

    .nice-select.chosen-select .list {
        background: var(--bg-lighter);
        border-color: var(--border-light);
    }

    .nice-select.chosen-select .list .option:hover {
        background: rgba(255,255,255,0.05);
    }

    .msotw_footer {
        background: var(--bg-lighter);
        border-color: var(--border-light);
    }

    .suggestion-tag {
        background: var(--bg-lighter);
    }

    .search-suggestions {
        background: var(--bg-lighter);
        border-color: var(--border-light);
    }

    .filters-summary {
        background: var(--bg-lighter);
        border-color: var(--border-light);
    }

    .filter-chip {
        background: var(--bg-white);
        border-color: var(--border-light);
    }

    /* ===== Dark Mode: Listing Cards ===== */
    .listing-card-modern {
        background: var(--bg-white);
        border-color: var(--border-light);
    }

    .listing-card-modern:hover {
        border-color: var(--border-medium);
    }

    .listing-category-badge {
        background: rgba(253, 123, 33, 0.15);
    }

    .social-link {
        background: var(--bg-lighter);
        border-color: var(--border-light);
    }

    .listing-fav-btn {
        background: var(--bg-lighter);
    }

    .btn-call {
        background: var(--bg-lighter);
        border-color: var(--border-light);
        color: var(--text-secondary);
    }

    .btn-details {
        background: rgba(253, 123, 33, 0.15);
    }

    .error-wrap {
        background: var(--bg-lighter);
        border-color: var(--border-light);
    }

    .list-main-wrap-header {
        border-bottom-color: var(--border-light);
    }

    .pagination {
        border-top-color: var(--border-light);
    }

    .pagination a {
        background: var(--bg-white);
        border-color: var(--border-light);
        color: var(--text-secondary);
    }

    .pagination a:hover {
        background: rgba(253, 123, 33, 0.15);
    }

    .grid-opt_act span {
        background: var(--bg-lighter);
        border-color: var(--border-light);
    }

    .grid-opt_act span.act-grid-opt {
        background: var(--brand-primary);
        border-color: var(--brand-primary);
    }

    .listing-actions .btn-whatsapp {
        color: var(--text-white);
    }
}

/* ===== Keyword Match Cards (searchHierarchy) ===== */
.keyword-match-card:hover {
    border-color: var(--brand-primary, #3270FC) !important;
    background: var(--hover-bg-light, #f8f9ff) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(50, 112, 252, 0.15);
}

.keyword-matches-grid {
    margin-top: 4px;
}

.keyword-section-group h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0;
}

.keyword-section-group h4 i {
    color: var(--brand-primary, #3270FC);
}

.keyword-matches-section .filter-section-title {
    padding: 0;
    background: transparent;
    border: none;
}
