body { margin: 0; font-family: sans-serif; }
#map { height: 100vh; height: 100dvh; }

#filter-panel {
    position: absolute; top: 10px; right: 10px; z-index: 1000;
    background: white; padding: 14px 18px; border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25); max-width: 260px;
    max-height: 90vh; overflow-y: auto;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
#filter-panel.hidden {
    opacity: 0; transform: translateX(16px);
    pointer-events: none;
}

#top-search-bar {
    position: absolute; top: 14px; left: 14px; z-index: 1000;
    display: flex; align-items: center; gap: 10px;
}
.top-search-wrap {
    position: relative;
    display: flex; align-items: center;
    background: #fff; border-radius: 999px;
    border: 1px solid rgba(15,23,42,0.06);
    box-shadow: 0 1px 2px rgba(15,23,42,0.06), 0 8px 20px rgba(15,23,42,0.10);
    width: 320px; max-width: 60vw;
    padding: 0 16px;
    transition: box-shadow 0.2s ease;
}
.top-search-wrap:focus-within {
    box-shadow: 0 1px 2px rgba(15,23,42,0.06), 0 10px 26px rgba(37,99,235,0.18);
    border-color: rgba(37,99,235,0.25);
}
.top-search-icon {
    display: flex; flex-shrink: 0; color: #9aa3af; margin-right: 10px;
}
.top-search-icon svg { width: 17px; height: 17px; }
#top-search-input {
    flex: 1; min-width: 0;
    border: none; outline: none; background: transparent;
    font-size: 14px; color: #1f2937; padding: 12px 0;
    font-family: inherit;
}
#top-search-input::placeholder { color: #9ca3af; }
.top-search-clear {
    display: none; flex-shrink: 0;
    font-size: 19px; line-height: 1; color: #b0b6bf; cursor: pointer; padding: 0 2px;
    transition: color 0.15s ease;
}
.top-search-clear:hover { color: #6b7280; }
.top-search-clear.visible { display: block; }

.top-icon-btn {
    flex-shrink: 0;
    width: 44px; height: 44px; border-radius: 50%;
    background: #fff; border: 1px solid rgba(15,23,42,0.06); cursor: pointer;
    box-shadow: 0 1px 2px rgba(15,23,42,0.06), 0 8px 20px rgba(15,23,42,0.10);
    color: #4b5563;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s ease, transform 0.15s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.top-icon-btn svg { width: 19px; height: 19px; }
.top-icon-btn:hover { background: #f8fafc; color: #2563eb; }
.top-icon-btn:active { transform: scale(0.93); }
.top-icon-btn.active {
    background: #2563eb; color: #fff; border-color: #2563eb;
    box-shadow: 0 1px 2px rgba(37,99,235,0.2), 0 8px 20px rgba(37,99,235,0.35);
}

.top-search-suggestions {
    position: fixed; z-index: 1100;
    background: white; border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.22);
    max-height: 320px; overflow-y: auto;
    display: none;
}
.top-search-suggestions.visible { display: block; }
.top-search-suggestion-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; cursor: pointer;
    border-bottom: 1px solid #f1f3f5;
}
.top-search-suggestion-item:last-child { border-bottom: none; }
.top-search-suggestion-item:hover { background: #f8f9fb; }
.top-search-suggestion-icon {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
}
.top-search-suggestion-text { min-width: 0; }
.top-search-suggestion-title {
    font-size: 13.5px; font-weight: 600; color: #1f2937;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.top-search-suggestion-sub {
    font-size: 11.5px; color: #999;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.top-search-empty { padding: 14px; font-size: 13px; color: #999; text-align: center; }

.user-location-dot { position: relative; width: 18px; height: 18px; }
.user-location-pulse {
    position: absolute; top: 0; left: 0;
    width: 18px; height: 18px; border-radius: 50%;
    background: rgba(37,99,235,0.35);
    animation: user-location-pulse-anim 1.8s ease-out infinite;
}
.user-location-marker {
    position: absolute; top: 0; left: 0;
    width: 18px; height: 18px; border-radius: 50%;
    background: #2563eb; border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
@keyframes user-location-pulse-anim {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(2.8); opacity: 0; }
}
#filter-panel h4 { margin: 0 0 8px 0; font-size: 15px; }
#filter-panel .filter-group { margin-bottom: 14px; }
#filter-panel .filter-group:last-child { margin-bottom: 0; }
#filter-panel label { display: block; margin-bottom: 5px; cursor: pointer; font-size: 14px; }
#filter-panel .filter-actions { margin-top: 6px; }
#filter-panel .filter-actions a {
    font-size: 12px; color: #2563eb; text-decoration: none; margin-right: 10px; cursor: pointer;
}

.map-style-tabs {
    display: flex; gap: 4px;
    background: #f1f3f5; border-radius: 8px;
    padding: 3px; margin-bottom: 14px;
}
.map-style-tab {
    flex: 1; border: none; background: transparent;
    padding: 6px 0; border-radius: 6px;
    font-size: 12.5px; font-weight: 600; color: #666;
    cursor: pointer; transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.map-style-tab:hover { color: #333; }
.map-style-tab.active {
    background: white; color: #1f2937;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.layer-section { margin-top: 16px; padding-top: 12px; border-top: 1px solid #eee; }
.layer-section-header {
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; user-select: none;
    font-size: 12.5px; font-weight: 700; color: #555;
    text-transform: uppercase; letter-spacing: 0.3px;
    padding: 2px 0 8px;
}
.layer-section-caret {
    font-size: 11px; color: #999;
    transition: transform 0.25s ease;
}
.layer-section.collapsed .layer-section-caret { transform: rotate(-90deg); }
.layer-section-body {
    overflow: hidden;
    max-height: 2000px;
    transition: max-height 0.25s ease;
}
.layer-section.collapsed .layer-section-body { max-height: 0; }

.layer-subgroup-label {
    font-size: 11px; font-weight: 700; color: #999;
    text-transform: uppercase; letter-spacing: 0.3px;
    margin: 8px 0 2px;
}
.layer-subgroup-label:first-child { margin-top: 0; }

.layer-row {
    display: flex; align-items: center; gap: 9px;
    padding: 6px 0;
}
.layer-icon {
    flex-shrink: 0;
    width: 30px; height: 30px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
}
.layer-label {
    flex: 1; font-size: 13.5px; color: #333;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.layer-count {
    font-size: 11px; font-weight: 600; color: #888;
    background: #f1f3f5; border-radius: 10px;
    padding: 1px 7px; flex-shrink: 0;
}
.layer-switch {
    position: relative; flex-shrink: 0;
    width: 34px; height: 20px;
    display: inline-block; cursor: pointer; margin: 0 !important;
}
.layer-switch input {
    opacity: 0; width: 0; height: 0;
    position: absolute;
}
.layer-switch-slider {
    position: absolute; inset: 0;
    background: #d1d5db; border-radius: 20px;
    transition: background 0.2s ease;
}
.layer-switch-slider::before {
    content: '';
    position: absolute; top: 2px; left: 2px;
    width: 16px; height: 16px;
    background: white; border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.layer-switch input:checked + .layer-switch-slider {
    background: #2563eb;
}
.layer-switch input:checked + .layer-switch-slider::before {
    transform: translateX(14px);
}

.leaflet-popup-content-wrapper {
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(0,0,0,0.22);
    padding: 0;
    overflow: hidden;
}
.leaflet-popup-content { margin: 0; width: 264px !important; }
.leaflet-popup-close-button {
    top: 8px !important; right: 8px !important;
    width: 26px !important; height: 26px !important;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    color: #555 !important;
    font-size: 17px !important;
    line-height: 26px !important;
    text-align: center;
    transition: transform 0.25s ease, background 0.2s ease, color 0.2s ease;
    z-index: 10;
}
.leaflet-popup-close-button:hover {
    transform: rotate(90deg);
    background: #fff;
    color: #dc2626 !important;
}

.popup-content { width: 264px; text-align: left; }
.popup-content .popup-image-wrap { position: relative; width: 100%; height: 142px; overflow: hidden; }
.popup-content .popup-image-wrap img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.35s ease;
}
.popup-content:hover .popup-image-wrap img { transform: scale(1.07); }
.popup-content .popup-image-wrap::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: 0; height: 65%;
    background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0));
    pointer-events: none;
}

.popup-content .popup-body { padding: 14px 16px 16px; }
.popup-content h3 { margin: 0 0 6px; font-size: 16.5px; font-weight: 700; color: #1f2937; line-height: 1.3; }
.popup-content .popup-desc { margin: 0 0 10px; font-size: 13px; color: #555; line-height: 1.45; }

.popup-category-badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 700; color: #fff;
    margin-bottom: 8px; letter-spacing: 0.2px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.popup-category-badge-overlay {
    position: absolute; left: 12px; bottom: 12px; z-index: 2;
    margin-bottom: 0;
}
.popup-venue-line {
    font-size: 14px; color: #374151; margin-bottom: 6px; font-weight: 600;
}
.popup-event-chip {
    display: inline-flex; align-items: center;
    font-size: 12px; font-weight: 600; color: #7c3aed;
    background: #f3effe; border-radius: 8px;
    padding: 4px 9px; margin-bottom: 10px;
}
.popup-address-line { font-size: 12px; color: #8b93a1; margin-bottom: 14px; line-height: 1.45; }

.popup-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.popup-rating-stars { display: inline-flex; gap: 2px; }
.popup-rating-star {
    font-size: 18px;
    line-height: 1;
    color: #d8dce3;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
}
.popup-rating-star:hover { transform: scale(1.15); color: #f5b301; }
.popup-rating-star.is-filled { color: #f5b301; }
.popup-rating-info { font-size: 11.5px; color: #8b93a1; white-space: nowrap; }
.popup-rating.is-rated .popup-rating-info { color: #16a34a; font-weight: 600; }

.popup-ingredients {
    font-size: 12px;
    color: #556b2f;
    background: #f3f6ec;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 14px;
    line-height: 1.5;
}
.popup-ingredients-label { font-weight: 700; color: #3d4f22; }
.popup-ingredients a { color: #2563eb; text-decoration: underline; }
.popup-ingredients a:hover { color: #1d4ed8; }

.popup-directions-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 20px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff !important; font-size: 13px; font-weight: 600;
    text-decoration: none !important;
    box-shadow: 0 4px 10px rgba(37,99,235,0.32);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.popup-directions-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37,99,235,0.42);
}

.marker-cluster-custom {
    background: rgba(231, 76, 60, 0.7);
    border-radius: 50%;
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 0 4px rgba(0,0,0,0.4);
}

.district-search-wrapper { position: relative; }
#district-search-input {
    width: 100%; padding: 10px 34px 10px 14px;
    border-radius: 10px; border: 1.5px solid #ddd;
    box-sizing: border-box; font-size: 14px;
}
#district-search-input:focus {
    outline: none; border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}
.district-search-clear {
    position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
    cursor: pointer; color: #aaa; font-size: 20px; display: none; line-height: 1;
}
.district-search-clear.visible { display: block; }

.district-suggestions {
    position: fixed;
    background: white;
    border-radius: 10px;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.05);
    display: none;
    z-index: 99999;
    padding: 6px;
}
.district-suggestions.visible { display: block; }
.district-suggestion-item {
    padding: 10px 12px; cursor: pointer; font-size: 14px;
    border-radius: 7px;
    color: #1f2937; font-weight: 500;
}
.district-suggestion-item + .district-suggestion-item { margin-top: 2px; }
.district-suggestion-item:hover { background: #f5f3ff; }
.district-suggestions-empty { padding: 14px; color: #999; font-size: 13px; text-align: center; }

/*--------------------------------------------------------------
# Mobil düzen — bu dosyada hiç medya sorgusu yoktu; arama çubuğu
# (sol üst, sabit 320px) ile filtre paneli (sağ üst, 260px) dar
# ekranlarda üst üste biniyordu. Filtre panelini alttan açılan bir
# sayfa haline getiriyoruz, arama çubuğunu esnek genişliğe alıyoruz.
--------------------------------------------------------------*/
@media (max-width: 991px) {
    #top-search-bar {
        left: 10px;
        right: 10px;
        top: 10px;
        gap: 8px;
    }

    .top-search-wrap {
        flex: 1 1 auto;
        width: auto;
        max-width: none;
        min-width: 0;
        padding: 0 12px;
    }

    .top-icon-btn {
        width: 40px;
        height: 40px;
    }

    .top-icon-btn svg {
        width: 17px;
        height: 17px;
    }

    #filter-panel {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        max-height: 60vh;
        max-height: 60dvh;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.28);
        padding: 16px 18px 20px;
    }

    #filter-panel.hidden {
        transform: translateY(100%);
    }

    .leaflet-popup-content {
        width: calc(100vw - 90px) !important;
        max-width: 264px;
    }

    .popup-content {
        width: 100%;
    }
}
