/* =========================================================
   جستجو | search.css — لاکچری
   ========================================================= */

.search-page {
    min-height: calc(100vh - 72px);
    padding: 40px 20px 80px;
    background: var(--bg);
}

.search-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============ فرم جستجو ============ */
.search-hero {
    margin-bottom: 26px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    position: relative;
    overflow: hidden;
}

.search-hero::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 6px 6px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 14px;
    transition: all .2s ease;
}

.search-bar:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-soft);
}

.search-bar svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-bar input {
    flex: 1;
    height: 48px;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
}

.search-bar input::placeholder {
    color: var(--text-faint);
}

.search-bar button {
    height: 48px;
    padding: 0 28px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: #1a1a1a;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
}

.search-bar button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px var(--gold-glow);
}

/* فیلترها */
.search-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.search-filter {
    height: 42px;
    padding: 0 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: all .2s;
    min-width: 150px;
}

.search-filter:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-soft);
}

.search-filter:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.search-filter-btn {
    height: 42px;
    padding: 0 22px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border: none;
    border-radius: 10px;
    color: #1a1a1a;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all .2s ease;
}

.search-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px var(--gold-glow);
}

.search-filter-clear {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 16px;
    color: #e74c3c;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid rgba(231, 76, 60, .3);
    border-radius: 10px;
    transition: all .2s;
}

.search-filter-clear:hover {
    background: rgba(231, 76, 60, .1);
    border-color: #e74c3c;
}

/* ============ نتایج ============ */
.search-results {
    margin-top: 20px;
}

.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.search-results-header h2 {
    margin: 0;
    color: var(--text);
    font-size: 20px;
    font-weight: 800;
}

.search-count {
    padding: 5px 12px;
    background: var(--gold-soft);
    border: 1px solid var(--gold-dark);
    border-radius: 9px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* کارت آگهی */
.search-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    transition: all .3s ease;
    position: relative;
}

.search-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0;
    transition: opacity .3s;
    z-index: 2;
}

.search-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold-dark);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .2);
}

.search-card:hover::before {
    opacity: 1;
}

.search-card-image {
    height: 110px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle, var(--gold-soft), transparent 60%),
        linear-gradient(135deg, var(--bg-elevated), var(--bg-card));
}

.search-card-icon {
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-card-icon img {
    width: 50px;
    height: 50px;
}

.search-card-badges {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
}

.search-badge {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid;
    background: var(--bg-elevated);
}

.search-badge.hot {
    color: #ff9800;
    border-color: rgba(255, 152, 0, .5);
    background: rgba(255, 152, 0, .12);
}

.search-badge.urgent {
    color: #e74c3c;
    border-color: rgba(231, 76, 60, .5);
    background: rgba(231, 76, 60, .12);
}

.search-badge.vip {
    color: var(--gold);
    border-color: var(--gold);
    background: var(--gold-soft);
}

.search-card-body {
    padding: 14px;
}

.search-card-cat {
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 6px;
}

.search-card-body h3 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.search-card-footer strong {
    color: var(--gold);
    font-size: 13px;
    font-weight: 800;
}

.search-card-footer span {
    color: var(--text-muted);
    font-size: 11px;
}

/* ============ حالت خالی ============ */
.search-empty {
    padding: 70px 30px;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
}

.search-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gold-soft);
    border: 1px solid var(--gold-dark);
    border-radius: 50%;
    color: var(--gold);
}

.search-empty h3 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
}

.search-empty p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

/* ============ ریسپانسیو ============ */
@media (max-width: 1000px) {
    .search-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 700px) {
    .search-page {
        padding: 24px 14px 60px;
    }

    .search-bar {
        flex-wrap: wrap;
        padding: 8px;
    }

    .search-bar svg {
        padding: 0 8px;
    }

    .search-bar input {
        width: 100%;
        height: 42px;
    }

    .search-bar button {
        width: 100%;
        height: 44px;
    }

    .search-filter {
        min-width: 0;
        flex: 1;
    }

    .search-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .search-results-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 450px) {
    .search-grid {
        grid-template-columns: 1fr;
    }
}