/* ═══════════════════════════════════════════
   FUNDR CAMPAIGN FILTER & SEARCH
   ═══════════════════════════════════════════ */
.fc-listing { max-width: 1200px; margin: 0 auto; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

/* ── Filter Bar ── */
.fc-filter-bar {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.fc-filter-bar__top {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

/* ── Search ── */
.fc-filter-bar__search {
    flex: 1;
    position: relative;
}
.fc-filter-bar__search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    pointer-events: none;
    opacity: .6;
}
.fc-filter-bar__search input {
    width: 100%;
    padding: 12px 40px 12px 40px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    background: #f9fafb;
    transition: all .2s;
    box-sizing: border-box;
}
.fc-filter-bar__search input:focus {
    border-color: #4f46e5;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
.fc-filter-bar__search input::placeholder { color: #9ca3af; }
.fc-filter-bar__clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #e5e7eb;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: .15s;
}
.fc-filter-bar__clear:hover { background: #d1d5db; color: #111; }

/* ── Sort ── */
.fc-filter-bar__sort select {
    padding: 12px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    background: #f9fafb;
    cursor: pointer;
    color: #374151;
    min-width: 160px;
    transition: .2s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.fc-filter-bar__sort select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

/* ── Category Tabs ── */
.fc-filter-bar__tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.fc-filter-bar__tabs::-webkit-scrollbar { display: none; }

.fc-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1.5px solid #e5e7eb;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    background: #fff;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
    flex-shrink: 0;
}
.fc-tab:hover {
    border-color: #c7d2fe;
    color: #4f46e5;
    background: #f5f3ff;
}
.fc-tab--active {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
    box-shadow: 0 2px 8px rgba(79,70,229,.25);
}
.fc-tab--active:hover {
    background: #4338ca;
    border-color: #4338ca;
    color: #fff;
}
.fc-tab__count {
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 100px;
    background: rgba(0,0,0,.06);
}
.fc-tab--active .fc-tab__count {
    background: rgba(255,255,255,.25);
    color: #fff;
}

/* ── Active Filters Bar ── */
.fc-active-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: #f5f3ff;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #4338ca;
    font-weight: 500;
}

.fc-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border: 1.5px solid #c7d2fe;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #4f46e5;
    background: #fff;
    cursor: pointer;
    transition: .15s;
}
.fc-reset-btn:hover { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.fc-reset-btn--lg { padding: 10px 24px; font-size: 14px; border-radius: 10px; margin-top: 12px; }

/* ── Grid ── */
.fc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    min-height: 200px;
    transition: opacity .2s;
}
.fc-grid--loading { opacity: .4; pointer-events: none; }

/* ── Loading ── */
.fc-loading {
    text-align: center;
    padding: 60px 20px;
}
.fc-loading__spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e5e7eb;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: fcSpin .7s linear infinite;
    margin: 0 auto 14px;
}
@keyframes fcSpin { to { transform: rotate(360deg); } }
.fc-loading p { font-size: 14px; color: #6b7280; margin: 0; }

/* ── Empty State ── */
.fc-empty-state {
    text-align: center;
    padding: 60px 20px;
}
.fc-empty-state__icon { font-size: 48px; display: block; margin-bottom: 14px; opacity: .6; }
.fc-empty-state h3 { font-size: 18px; color: #374151; margin: 0 0 6px; font-weight: 700; }
.fc-empty-state p { font-size: 14px; color: #9ca3af; margin: 0; }

/* ── Card Link Fix ── */
.fundr-card__link { text-decoration: none; color: inherit; display: block; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .fc-filter-bar { padding: 16px; border-radius: 12px; }
    .fc-filter-bar__top { flex-direction: column; gap: 8px; }
    .fc-filter-bar__sort select { width: 100%; min-width: 0; }
    .fc-filter-bar__tabs { gap: 6px; margin-top: 4px; }
    .fc-tab { padding: 7px 14px; font-size: 12px; }
    .fc-grid { grid-template-columns: 1fr; gap: 16px; }
    .fc-active-filters { flex-direction: column; gap: 8px; text-align: center; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .fc-grid { grid-template-columns: repeat(2, 1fr); }
}