/* ── SEARCH PAGE ── */
.search-page {
    padding-top: 68px;
    /* nav height */
}

/* Filter bar */
.search-filter-bar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 68px;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}

.search-filter-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 3rem;
}

.sf-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    background: #FAFBFF;
}

.sf-tab {
    padding: 0.75rem 1.1rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2.5px solid transparent;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
}

.sf-tab.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.sf-inputs {
    display: flex;
    align-items: center;
    padding: 0.625rem 0;
    gap: 0;
}

.sf-field {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.sf-field-keyword {
    flex: 2;
}

.sf-icon {
    font-size: 15px;
    flex-shrink: 0;
    color: var(--text-muted);
}

.sf-field input,
.sf-field select {
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.875rem;
    color: var(--text);
    width: 100%;
    min-width: 0;
}

.sf-field input::placeholder {
    color: #9CA3AF;
}

.sf-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    flex-shrink: 0;
    margin: 0 1rem;
}

.sf-btn {
    margin-left: 1rem;
    padding: 0.6rem 1.4rem;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
}

.sf-btn:hover {
    background: var(--blue-dark);
}

/* Result count badge */
.search-result-count {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 0.35rem 0.875rem;
    border-radius: 50px;
}

/* Empty state */
.search-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.search-empty-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.search-empty-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

.search-empty-sub {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Pagination */
.search-pagination {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
}

.search-pagination .pagination {
    gap: 4px;
}

.search-pagination .page-link {
    border-radius: 8px;
    border-color: var(--border);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.search-pagination .page-item.active .page-link {
    background: var(--blue);
    border-color: var(--blue);
}

/* Listing name (thêm nếu chưa có trong home.css) */
.listing-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.listing-loc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.625rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.listing-specs {
    display: flex;
    gap: 0.5rem;
}

.spec {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg);
    padding: 0.22rem 0.6rem;
    border-radius: 6px;
}

/* Responsive */
@media (max-width: 768px) {
    .search-filter-inner {
        padding: 0 1rem;
    }

    .sf-field-keyword {
        flex: 1;
    }

    .sf-divider,
    .sf-field:nth-child(3) {
        display: none;
    }

    .listings-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 480px) {
    .listings-grid {
        grid-template-columns: 1fr !important;
    }
}

.search-page .search-wrap {
    margin-left: auto !important;
    margin-right: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 2rem 1rem 1rem !important;

    width: 100% !important;
    max-width: 100% !important;
}

.search-page .search-box-wrap {
    width: 100% !important;
    max-width: 760px !important;
    margin: 0 auto !important;
}

.search-page .hot-links {
    max-width: 760px !important;
    width: 100% !important;
    justify-content: center !important;
}