/* ════════════════════════════════════════════
   SEARCH RESULTS PAGE
   Matches EventsREZ homepage editorial aesthetic
   Fraunces (display) + Inter (body)
   ════════════════════════════════════════════ */

/* ─── Filter Bar ─── */
.er-filter-bar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--er-white, #FFFFFF);
    border-bottom: 1px solid var(--er-stone, #E8E0D3);
    padding: 14px 0;
    transition: box-shadow 0.3s ease;
}
.er-filter-bar.scrolled {
    box-shadow: 0 4px 20px rgba(26, 22, 18, 0.08);
}

.er-filter-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.er-filter-group {
    flex: 1;
    min-width: 0;
}
.er-filter-group--sm {
    flex: 0 0 120px;
}
.er-filter-group--btn {
    flex: 0 0 auto;
}

.er-filter-label {
    display: block;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--er-mist, #8C8478);
    margin-bottom: 6px;
}

.er-filter-input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 14px;
    color: var(--er-charcoal, #1A1612);
    background: var(--er-cream, #FAF7F2);
    border: 1px solid var(--er-stone, #E8E0D3);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.er-filter-input:focus {
    border-color: var(--er-burgundy, #6B2737);
    box-shadow: 0 0 0 3px rgba(107, 39, 55, 0.08);
}
.er-filter-input::placeholder {
    color: var(--er-mist, #8C8478);
}

select.er-filter-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238C8478' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.er-filter-btn {
    height: 42px;
    padding: 0 24px;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 14px;
    font-weight: 600;
    color: var(--er-white, #FFFFFF);
    background: var(--er-burgundy, #6B2737);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
}
.er-filter-btn:hover {
    background: var(--er-burgundy-deep, #5A1F2E);
    transform: translateY(-1px);
}
.er-filter-btn i {
    margin-right: 6px;
}

.er-clear-filters {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 13px;
    color: var(--er-mist, #8C8478);
    text-decoration: underline;
    margin-top: 8px;
    display: inline-block;
}
.er-clear-filters:hover {
    color: var(--er-burgundy, #6B2737);
}

/* ─── Results Header ─── */
.er-results-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 20px 20px;
}

.er-results-title {
    font-family: var(--font-display, 'Fraunces', serif);
    font-size: 28px;
    font-weight: 500;
    color: var(--er-charcoal, #1A1612);
    letter-spacing: -0.02em;
    margin: 0;
}

.er-results-count {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 15px;
    color: var(--er-mist, #8C8478);
    margin-top: 4px;
}

/* ─── View Toggle (List / Map) ─── */
.er-view-toggle {
    display: flex;
    background: var(--er-bone, #F0EBE3);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

.er-view-toggle button {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
    color: var(--er-mist, #8C8478);
    transition: all 0.2s ease;
}
.er-view-toggle button.active {
    background: var(--er-white, #FFFFFF);
    color: var(--er-charcoal, #1A1612);
    box-shadow: 0 1px 4px rgba(26, 22, 18, 0.1);
}
.er-view-toggle button i {
    margin-right: 6px;
}

/* ─── Radius Alert ─── */
.er-radius-alert {
    max-width: 1280px;
    margin: 0 auto 20px;
    padding: 0 20px;
}
.er-radius-alert__inner {
    background: var(--er-cream, #FAF7F2);
    border: 1px solid var(--er-stone, #E8E0D3);
    border-radius: 12px;
    padding: 14px 20px;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 14px;
    color: var(--er-charcoal, #1A1612);
}
.er-radius-alert__inner i {
    color: var(--er-burgundy, #6B2737);
    margin-right: 8px;
}

/* ─── Card Grid (List View) ─── */
.er-view--list {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.er-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* ─── Venue Card ─── */
.er-venue-card {
    display: block;
    background: var(--er-white, #FFFFFF);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 2px 12px rgba(26, 22, 18, 0.06);
}
.er-venue-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(26, 22, 18, 0.12);
    text-decoration: none;
    color: inherit;
}

.er-venue-card__image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--er-bone, #F0EBE3);
}
.er-venue-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.er-venue-card:hover .er-venue-card__image img {
    transform: scale(1.04);
}

.er-wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--er-charcoal, #1A1612);
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 2;
}
.er-wishlist-btn:hover {
    background: var(--er-white, #FFFFFF);
    transform: scale(1.1);
}
.er-wishlist-btn .fa-heart {
    color: #e94261;
}

.er-venue-card__body {
    padding: 16px 18px 20px;
}

.er-venue-card__cuisine {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--er-burgundy, #6B2737);
    margin-bottom: 6px;
    display: block;
}

.er-venue-card__name {
    font-family: var(--font-display, 'Fraunces', serif);
    font-size: 19px;
    font-weight: 500;
    color: var(--er-charcoal, #1A1612);
    margin: 0 0 6px;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.er-venue-card__location {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 14px;
    color: var(--er-mist, #8C8478);
    margin: 0 0 10px;
    line-height: 1.4;
}

.er-venue-card__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 13px;
}

.er-rating {
    color: var(--er-charcoal, #1A1612);
    font-weight: 600;
}
.er-rating i {
    color: #E8C988;
    margin-right: 3px;
}

.er-distance {
    color: var(--er-burgundy, #6B2737);
    font-weight: 600;
}
.er-distance i {
    margin-right: 3px;
    font-size: 11px;
}

/* ─── Map View ─── */
.er-view--map {
    display: none;
}
.er-view--map.active {
    display: flex;
    height: calc(100vh - 140px);
    max-width: 100%;
}

.er-map-cards {
    width: 40%;
    overflow-y: auto;
    padding: 24px;
    background: var(--er-cream, #FAF7F2);
}
.er-map-cards .er-venue-card {
    margin-bottom: 16px;
}

.er-map-container {
    width: 60%;
    position: relative;
}
.er-map-container #map {
    width: 100%;
    height: 100%;
}

/* ─── Empty State ─── */
.er-empty-state {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
}
.er-empty-state__icon {
    font-size: 48px;
    color: var(--er-stone, #E8E0D3);
    margin-bottom: 16px;
}
.er-empty-state__title {
    font-family: var(--font-display, 'Fraunces', serif);
    font-size: 24px;
    color: var(--er-charcoal, #1A1612);
    margin-bottom: 8px;
}
.er-empty-state__text {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 15px;
    color: var(--er-mist, #8C8478);
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .er-card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .er-filter-row {
        flex-wrap: wrap;
    }
    .er-filter-group {
        flex: 1 1 calc(50% - 6px);
    }
}

@media (max-width: 767px) {
    .er-card-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .er-filter-row {
        flex-direction: column;
        gap: 10px;
    }
    .er-filter-group,
    .er-filter-group--sm,
    .er-filter-group--btn {
        flex: 1 1 100%;
        width: 100%;
    }
    .er-filter-btn {
        width: 100%;
    }
    .er-results-header {
        flex-direction: column;
        gap: 12px;
        padding: 20px 16px 16px;
    }
    .er-results-title {
        font-size: 24px;
    }
    /* Hide map toggle on mobile — default to list */
    .er-view-toggle {
        display: none;
    }
    .er-view--map {
        display: none !important;
    }
    .er-map-cards {
        width: 100%;
    }
}
