/* ═══════════════════════════════════════════════════════════════
   ZIBATO — Map app
   Palette retheme (P5): the teal/slate literals this file was authored
   with are now the zh-* Apple Editorial tokens from prelogin.css, which
   map.html loads first. Structure and class names are unchanged — the
   map-app.js hooks all still match. Gender variants inherit the rose
   accent automatically via body.zh-female.
   ═══════════════════════════════════════════════════════════════ */
/* ── Layout ── */
.map-page {
    display: flex;
    height: calc(100vh - 64px - 56px);
    min-height: 500px;
    position: relative;
    overflow: hidden;
    background: var(--zh-bg-2);
}

@media (min-width: 1024px) {
    .map-page { height: calc(100vh - 80px); }
}

/* ── Sidebar ── */
.map-sidebar {
    width: 100%;
    background: white;
    overflow-y: auto;
    border-left: 1px solid var(--zh-line);
    display: flex;
    flex-direction: column;
    z-index: 10;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}

@media (min-width: 768px) {
    .map-sidebar { width: 400px; flex-shrink: 0; }
}

/* دو بلوکِ موبایل برای `.map-sidebar` وجود داشت: این یکی کشوییِ افقی بود و
   بلوکِ «Mobile Layout Override» پایین‌تر کاملاً بازنویسی‌اش می‌کرد. حذف شد تا
   یک منبعِ حقیقت بماند — شیت از پایین. */

/* ── Sidebar Header (sticky) ── */
.map-sidebar-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: white;
    border-bottom: 1px solid var(--zh-line);
    padding: 14px 16px 12px;
}

.map-search-wrap {
    position: relative;
}

.map-search-input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: 2px solid var(--zh-line);
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    background: var(--zh-bg-2);
    color: var(--zh-ink);
    font-family: inherit;
}

.map-search-input:focus {
    border-color: var(--c-primary, var(--zh-accent));
    box-shadow: 0 0 0 3px rgba(10,61,98,0.1);
    background: white;
}

.map-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--zh-ink-3);
    pointer-events: none;
}

.map-search-clear {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--zh-line);
    color: var(--zh-ink-3);
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.map-search-clear.visible { display: flex; }

/* ── Filter Chips ── */
.map-filter-row {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.map-filter-row::-webkit-scrollbar { display: none; }

.map-filter-chip {
    padding: 6px 13px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    background: var(--zh-bg-2);
    color: var(--zh-ink-2);
    border: 1px solid var(--zh-line);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.map-filter-chip:hover {
    background: var(--zh-line);
    transform: translateY(-1px);
}

.map-filter-chip.active {
    background: linear-gradient(135deg, var(--c-primary, var(--zh-accent)), var(--c-accent, var(--zh-accent-deep)));
    color: white;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(10,61,98,0.25);
}

.map-filter-chip svg { width: 13px; height: 13px; }

/* ── Quick City Jump ── */
.map-city-jump {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.map-city-jump::-webkit-scrollbar { display: none; }

.map-city-btn {
    padding: 5px 11px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(10,61,98,0.08);
    color: var(--c-primary, var(--zh-accent));
    border: 1px solid rgba(10,61,98,0.15);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.map-city-btn:hover {
    background: rgba(10,61,98,0.15);
    transform: translateY(-1px);
}

/* ── Results Count Bar ── */
.map-results-bar {
    position: sticky;
    top: 0;
    z-index: 15;
    background: linear-gradient(135deg, rgba(10,61,98,0.05), rgba(8,145,178,0.05));
    border-bottom: 1px solid var(--zh-line);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--zh-ink-3);
    font-weight: 600;
}

.map-results-count {
    display: flex;
    align-items: center;
    gap: 6px;
}

.map-results-count .count-num {
    font-size: 14px;
    font-weight: 800;
    color: var(--c-primary, var(--zh-accent));
    font-family: var(--font-display);
}

.map-sort-select {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--zh-line);
    background: white;
    color: var(--zh-ink-2);
    cursor: pointer;
    font-family: inherit;
}

/* ── Salon List Cards ── */
.map-salon-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.map-salon-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--zh-line);
    background: white;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(.4,0,.2,1);
    position: relative;
    overflow: hidden;
}

.map-salon-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--c-primary, var(--zh-accent)), var(--c-accent, var(--zh-accent-deep)));
    transform: scaleY(0);
    transition: transform 0.3s;
    transform-origin: top;
}

.map-salon-card:hover {
    border-color: rgba(10,61,98,0.3);
    box-shadow: 0 8px 24px rgba(10,61,98,0.08);
    transform: translateY(-2px);
}

.map-salon-card:hover::before { transform: scaleY(1); }

.map-salon-card.active {
    border-color: var(--c-primary, var(--zh-accent));
    box-shadow: 0 8px 24px rgba(10,61,98,0.15);
    background: rgba(10,61,98,0.02);
}

.map-salon-card.active::before { transform: scaleY(1); }

.map-salon-thumb {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    flex-shrink: 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--zh-bg-2), var(--zh-line));
    position: relative;
}

.map-salon-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-salon-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--zh-line);
}

.map-salon-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.map-salon-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--zh-ink);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.map-salon-verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--zh-accent);
    color: white;
    flex-shrink: 0;
}

.map-salon-verified-badge svg { width: 10px; height: 10px; }

.map-salon-meta {
    font-size: 11px;
    color: var(--zh-ink-3);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

.map-salon-meta svg { width: 11px; height: 11px; flex-shrink: 0; }

.map-salon-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.map-salon-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 700;
    color: #f59e0b;
}

.map-salon-rating svg { width: 12px; height: 12px; }

.map-salon-rating .reviews {
    color: var(--zh-ink-3);
    font-weight: 500;
    font-size: 10px;
}

.map-salon-gender {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 9999px;
}

.map-salon-gender.female { background: #fce7f3; color: #be185d; }
.map-salon-gender.male { background: #dbeafe; color: #1d4ed8; }
.map-salon-gender.mixed { background: var(--zh-bg-2); color: var(--zh-ink-2); }

/* ── Empty State ── */
.map-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--zh-ink-3);
}

.map-empty-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    color: var(--zh-line);
}

.map-empty-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--zh-ink-3);
    margin-bottom: 0.375rem;
}

.map-empty-text {
    font-size: 12px;
    color: var(--zh-ink-3);
    line-height: 1.6;
}

/* ── Loading ── */
.map-loading {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--zh-ink-3);
}

.map-loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid rgba(10,61,98,0.15);
    border-top-color: var(--c-primary, var(--zh-accent));
    border-radius: 50%;
    animation: mapSpin 0.8s linear infinite;
    margin: 0 auto 0.75rem;
}

@keyframes mapSpin { to { transform: rotate(360deg); } }

/* ═══ MAP CANVAS ═══ */
.map-canvas-wrap {
    flex: 1;
    position: relative;
    min-width: 0;
}

#map-canvas {
    width: 100%;
    height: 100%;
    background: #e8eef5;
}

/* ── Map Controls (custom overlay) ── */
.map-controls {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-control-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: white;
    border: 1px solid var(--zh-line);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--zh-ink-2);
}

.map-control-btn:hover {
    background: var(--zh-bg-2);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    color: var(--c-primary, var(--zh-accent));
}

.map-control-btn.active {
    background: linear-gradient(135deg, var(--c-primary, var(--zh-accent)), var(--c-accent, var(--zh-accent-deep)));
    color: white;
    border-color: transparent;
}

.map-control-btn svg { width: 20px; height: 20px; }

/* ── Mobile sidebar toggle ── */
.map-mobile-toggle {
    display: none;
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    padding: 10px 20px;
    border-radius: 9999px;
    background: white;
    border: 1px solid var(--zh-line);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    font-size: 13px;
    font-weight: 700;
    color: var(--c-primary, var(--zh-accent));
    cursor: pointer;
    transition: all 0.2s;
    align-items: center;
    gap: 6px;
}

.map-mobile-toggle:hover { transform: translateX(-50%) translateY(-2px); }

.map-mobile-toggle .badge {
    background: var(--c-primary, var(--zh-accent));
    color: white;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 9999px;
    font-weight: 800;
}

@media (max-width: 767px) {
    .map-mobile-toggle { display: inline-flex; }
}

/* ── Search-as-you-move indicator ── */
.map-search-hint {
    position: absolute;
    top: 16px;
    right: 50%;
    transform: translateX(50%);
    z-index: 1000;
    background: white;
    border: 1px solid var(--zh-line);
    border-radius: 9999px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--zh-ink-2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: none;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.map-search-hint.visible { display: inline-flex; }
.map-search-hint:hover { background: var(--zh-bg-2); transform: translateX(50%) translateY(-1px); }

.map-search-hint svg { width: 14px; height: 14px; color: var(--c-primary, var(--zh-accent)); }

/* ═══ LEAFLET OVERRIDES ═══ */

/* Custom salon marker */
.zb-marker {
    background: transparent !important;
    border: none !important;
}

.zb-marker-pin {
    width: 36px;
    height: 36px;
    border-radius: 50% 50% 50% 0;
    background: linear-gradient(135deg, var(--c-primary, var(--zh-accent)), var(--c-accent, var(--zh-accent-deep)));
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    border: 2.5px solid white;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.zb-marker-pin:hover {
    transform: rotate(-45deg) scale(1.15);
    box-shadow: 0 6px 20px rgba(10,61,98,0.4);
}

.zb-marker-pin.featured {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 16px rgba(245,158,11,0.4);
}

.zb-marker-pin.female {
    background: linear-gradient(135deg, #ec4899, #be185d);
}

.zb-marker-pin.male {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.zb-marker-pin svg {
    transform: rotate(45deg);
    width: 18px;
    height: 18px;
    color: white;
}

.zb-marker-pin::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid white;
}

/* Cluster customization */
.marker-cluster-small {
    background: rgba(10,61,98,0.15);
    border: 2px solid rgba(10,61,98,0.4);
    border-radius: 50%;
}

.marker-cluster-small div {
    background: rgba(10,61,98,0.7);
    color: white;
    font-weight: 700;
    font-size: 12px;
    border-radius: 50%;
}

.marker-cluster-medium {
    background: rgba(10,61,98,0.2);
    border: 2px solid rgba(10,61,98,0.5);
    border-radius: 50%;
}

.marker-cluster-medium div {
    background: rgba(10,61,98,0.8);
    color: white;
    font-weight: 800;
    font-size: 13px;
    border-radius: 50%;
}

.marker-cluster-large {
    background: rgba(10,61,98,0.25);
    border: 2px solid rgba(10,61,98,0.6);
    border-radius: 50%;
}

.marker-cluster-large div {
    background: rgba(10,61,98,0.9);
    color: white;
    font-weight: 800;
    font-size: 14px;
    border-radius: 50%;
}

/* ── Popup (premium) ── */
.leaflet-popup-content-wrapper {
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--zh-line);
}

.leaflet-popup-content {
    margin: 0 !important;
    width: 260px !important;
}

.leaflet-popup-tip {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.zb-popup {
    font-family: var(--font-base, inherit);
    direction: rtl;
}

.zb-popup-header {
    position: relative;
    height: 120px;
    background: linear-gradient(135deg, var(--zh-bg-2), var(--zh-line));
    overflow: hidden;
}

.zb-popup-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.zb-popup-header-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--zh-line);
}

.zb-popup-verified {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--zh-accent);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 8px rgba(10,61,98,0.3);
}

.zb-popup-verified svg { width: 10px; height: 10px; }

.zb-popup-featured {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 8px rgba(245,158,11,0.3);
}

.zb-popup-body {
    padding: 12px 14px 14px;
}

.zb-popup-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--zh-ink);
    margin-bottom: 4px;
    line-height: 1.3;
}

.zb-popup-address {
    font-size: 11px;
    color: var(--zh-ink-3);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.zb-popup-address svg { width: 11px; height: 11px; flex-shrink: 0; }

.zb-popup-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--zh-bg-2);
}

.zb-popup-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 13px;
    font-weight: 800;
    color: #f59e0b;
}

.zb-popup-rating svg { width: 13px; height: 13px; }

.zb-popup-reviews {
    font-size: 11px;
    color: var(--zh-ink-3);
}

.zb-popup-gender {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 9999px;
    margin-right: auto;
}

.zb-popup-gender.female { background: #fce7f3; color: #be185d; }
.zb-popup-gender.male { background: #dbeafe; color: #1d4ed8; }
.zb-popup-gender.mixed { background: var(--zh-bg-2); color: var(--zh-ink-2); }

.zb-popup-cta {
    display: block;
    text-align: center;
    padding: 9px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--c-primary, var(--zh-accent)), var(--c-accent, var(--zh-accent-deep)));
    color: white;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
}

.zb-popup-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(10,61,98,0.3);
}

/* ── Leaflet zoom control restyle ── */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    border-radius: 10px !important;
    overflow: hidden;
    margin: 16px !important;
}

.leaflet-control-zoom a {
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    font-size: 18px !important;
    color: var(--zh-ink-2) !important;
    background: white !important;
    border-bottom: 1px solid var(--zh-bg-2) !important;
    transition: all 0.2s;
}

.leaflet-control-zoom a:hover {
    background: var(--zh-bg-2) !important;
    color: var(--c-primary, var(--zh-accent)) !important;
}

/* ── Leaflet attribution ── */
.leaflet-control-attribution {
    background: rgba(255,255,255,0.85) !important;
    backdrop-filter: blur(8px);
    border-radius: 8px 0 0 0;
    padding: 3px 8px !important;
    font-size: 10px !important;
    color: var(--zh-ink-3) !important;
}

.leaflet-control-attribution a {
    color: var(--c-primary, var(--zh-accent)) !important;
}

/* ── Scrollbar styling ── */
.map-salon-list::-webkit-scrollbar,
.map-sidebar::-webkit-scrollbar {
    width: 6px;
}

.map-salon-list::-webkit-scrollbar-track,
.map-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.map-salon-list::-webkit-scrollbar-thumb,
.map-sidebar::-webkit-scrollbar-thumb {
    background: var(--zh-line);
    border-radius: 3px;
}

.map-salon-list::-webkit-scrollbar-thumb:hover,
.map-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--zh-line);
}

/* ── Dark mode (system) ── */
/* The two @media (prefers-color-scheme: dark) blocks that used to live here
   were removed in P5. The zh-* pre-login system the owner chose is a single
   light design; an OS-level dark override repainted only this page's cards
   and sheets, leaving dark panels inside an otherwise white layout. */


/* ═══════════════════════════════════════════════════════════════
   PREMIUM MOBILE UX — Bottom Sheet + Filters + Skeleton
   ═══════════════════════════════════════════════════════════════ */

/* ── Mobile Layout Override ── */
@media (max-width: 767px) {
    .map-page {
        flex-direction: column;
        height: calc(100vh - 64px - 56px);
    }

    .map-sidebar {
        position: absolute;
        top: 0; right: 0; bottom: 0;
        width: 100%;
        max-width: none;
        transform: translateY(100%);
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 32px rgba(0,0,0,0.2);
        transition: transform 0.35s cubic-bezier(.32,.72,0,1);
    }
    .map-sidebar.open { transform: translateY(0); }

    .map-canvas-wrap {
        flex: 1;
        min-height: 50vh;
    }
    .map-page.view-list .map-canvas-wrap { display: none; }
    .map-page.view-list .map-sidebar {
        transform: translateY(0);
        border-radius: 0;
        box-shadow: none;
    }
    .map-page.view-map .map-sidebar { transform: translateY(100%); }
    /* شیتِ نیمه‌باز: نقشه بالای آن دیده می‌شود. با `top: 0` صفحهٔ نقشه
       هیچ نقشه‌ای نشان نمی‌داد — کاربر فقط فهرست می‌دید. */
    .map-page.view-map .map-sidebar.open {
        transform: translateY(0);
        top: 46%;
        border-radius: 20px 20px 0 0;
    }
    /* لمسِ دستهٔ شیت روی خودِ نقشه نیفتد */
    .map-page.view-map .map-sidebar.open .map-sidebar-header { top: 0; }
}

/* ── Bottom Sheet Handle ── */
.map-sheet-handle {
    display: none;
    padding: 8px 0 4px;
    text-align: center;
    cursor: grab;
}

@media (max-width: 767px) {
    .map-sheet-handle { display: block; }
}

.map-sheet-handle::before {
    content: '';
    display: inline-block;
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: var(--zh-line);
    transition: background 0.2s;
}

.map-sheet-handle:active::before { background: var(--c-primary, var(--zh-accent)); }

/* ── View Toggle (mobile) ── */
.map-view-toggle {
    display: none;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    background: white;
    border-radius: 9999px;
    padding: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border: 1px solid var(--zh-line);
}

@media (max-width: 767px) {
    .map-view-toggle { display: flex; gap: 2px; }
}

.map-view-btn {
    padding: 8px 18px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    color: var(--zh-ink-3);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.map-view-btn svg { width: 14px; height: 14px; }

.map-view-btn.active {
    background: linear-gradient(135deg, var(--c-primary, var(--zh-accent)), var(--c-accent, var(--zh-accent-deep)));
    color: white;
    box-shadow: 0 2px 8px rgba(10,61,98,0.25);
}

/* ── Filter Button (in header) ── */
.map-filter-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    background: var(--zh-bg-2);
    color: var(--zh-ink-2);
    border: 1px solid var(--zh-line);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.map-filter-btn:hover {
    background: var(--zh-line);
    transform: translateY(-1px);
}

.map-filter-btn.has-filters {
    background: linear-gradient(135deg, var(--c-primary, var(--zh-accent)), var(--c-accent, var(--zh-accent-deep)));
    color: white;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(10,61,98,0.25);
}

.map-filter-btn svg { width: 14px; height: 14px; }

.map-filter-btn .filter-badge {
    background: rgba(255,255,255,0.3);
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 9999px;
    font-weight: 800;
    min-width: 18px;
    text-align: center;
}

.map-filter-btn:not(.has-filters) .filter-badge { display: none; }

/* ── Filter Bottom Sheet ── */
.map-filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.map-filter-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.map-filter-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
    background: white;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -12px 40px rgba(0,0,0,0.2);
    z-index: 2001;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(.32,.72,0,1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.map-filter-sheet.open { transform: translateY(0); }

@media (min-width: 768px) {
    .map-filter-sheet {
        max-width: 480px;
        left: 50%;
        transform: translate(-50%, 100%);
    }
    .map-filter-sheet.open { transform: translate(-50%, 0); }
}

.map-filter-sheet-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--zh-bg-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.map-filter-sheet-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--zh-ink);
    font-family: var(--font-display);
}

.map-filter-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--zh-bg-2);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--zh-ink-3);
    transition: all 0.2s;
}

.map-filter-close:hover { background: var(--zh-line); color: var(--zh-ink); }

.map-filter-sheet-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

.map-filter-section {
    margin-bottom: 24px;
}

.map-filter-section:last-child { margin-bottom: 8px; }

.map-filter-section-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--zh-ink);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.map-filter-section-title svg { width: 15px; height: 15px; color: var(--c-primary, var(--zh-accent)); }

/* ── Filter Options (chips) ── */
.map-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.map-filter-option {
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    background: var(--zh-bg-2);
    color: var(--zh-ink-2);
    border: 1.5px solid var(--zh-line);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.map-filter-option:hover {
    border-color: rgba(10,61,98,0.3);
    background: white;
    transform: translateY(-1px);
}

.map-filter-option.active {
    background: linear-gradient(135deg, var(--c-primary, var(--zh-accent)), var(--c-accent, var(--zh-accent-deep)));
    color: white;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(10,61,98,0.2);
}

.map-filter-option svg { width: 14px; height: 14px; }

/* ── Star Rating Picker ── */
.map-star-picker {
    display: flex;
    gap: 4px;
    direction: ltr;
}

.map-star {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--zh-bg-2);
    border: 1.5px solid var(--zh-line);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--zh-line);
    transition: all 0.15s;
}

.map-star:hover { transform: scale(1.1); }
.map-star.active { color: #f59e0b; border-color: #fbbf24; background: #fffbeb; }
.map-star svg { width: 16px; height: 16px; }

/* ── Toggle Switch ── */
.map-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--zh-bg-2);
}

.map-toggle-row:last-child { border-bottom: none; }

.map-toggle-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--zh-ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-toggle-label svg { width: 16px; height: 16px; color: var(--zh-ink-3); }

.map-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--zh-line);
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.map-switch.on { background: var(--c-primary, var(--zh-accent)); }

.map-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.map-switch.on::after { transform: translateX(20px); }

/* ── Filter Sheet Footer ── */
.map-filter-sheet-footer {
    padding: 12px 20px 20px;
    border-top: 1px solid var(--zh-bg-2);
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    background: white;
}

.map-filter-reset {
    flex: 0 0 auto;
    padding: 11px 18px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    background: var(--zh-bg-2);
    color: var(--zh-ink-3);
    border: 1px solid var(--zh-line);
    cursor: pointer;
    transition: all 0.2s;
}

.map-filter-reset:hover { background: var(--zh-line); }

.map-filter-apply {
    flex: 1;
    padding: 11px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--c-primary, var(--zh-accent)), var(--c-accent, var(--zh-accent-deep)));
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(10,61,98,0.2);
}

.map-filter-apply:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(10,61,98,0.3);
}

/* ── Skeleton Loading ── */
.map-skeleton-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--zh-line);
    background: white;
    margin-bottom: 8px;
}

.map-skeleton-thumb {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    flex-shrink: 0;
    background: linear-gradient(90deg, var(--zh-bg-2) 25%, var(--zh-line) 50%, var(--zh-bg-2) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

.map-skeleton-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

.map-skeleton-line {
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--zh-bg-2) 25%, var(--zh-line) 50%, var(--zh-bg-2) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

.map-skeleton-line.short { width: 40%; }
.map-skeleton-line.medium { width: 70%; }
.map-skeleton-line.long { width: 90%; }

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Autocomplete Suggestions ── */
.map-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    border: 1px solid var(--zh-line);
    max-height: 280px;
    overflow-y: auto;
    z-index: 50;
    display: none;
}

.map-autocomplete.visible { display: block; }

.map-autocomplete-item {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--zh-bg-2);
}

.map-autocomplete-item:last-child { border-bottom: none; }
.map-autocomplete-item:hover { background: var(--zh-bg-2); }

.map-autocomplete-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--zh-bg-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--zh-ink-3);
    flex-shrink: 0;
}

.map-autocomplete-icon svg { width: 16px; height: 16px; }

.map-autocomplete-text {
    flex: 1;
    min-width: 0;
}

.map-autocomplete-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--zh-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.map-autocomplete-sub {
    font-size: 11px;
    color: var(--zh-ink-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.map-autocomplete-section-title {
    padding: 8px 14px 4px;
    font-size: 10px;
    font-weight: 700;
    color: var(--zh-ink-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--zh-bg-2);
}

/* ── Active Filters Bar ── */
.map-active-filters {
    display: flex;
    gap: 6px;
    padding: 8px 16px;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 1px solid var(--zh-bg-2);
    background: var(--zh-bg-2);
}

.map-active-filters::-webkit-scrollbar { display: none; }
.map-active-filters:empty { display: none; }

.map-active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(10,61,98,0.1);
    color: var(--c-primary, var(--zh-accent));
    border: 1px solid rgba(10,61,98,0.2);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s;
}

.map-active-filter-tag:hover { background: rgba(10,61,98,0.15); }

.map-active-filter-tag svg { width: 11px; height: 11px; }

/* ── Rich Salon Card (enhanced) ── */
.map-salon-card-rich {
    /* حالا یک <a> است تا از فهرستِ روی موبایل بشود وارد صفحهٔ سالن شد —
       رنگِ لینکِ پیش‌فرض نباید متنِ کارت را آبی/بنفش کند. */
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: 16px;
    border: 1px solid var(--zh-line);
    background: white;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
    position: relative;
}

.map-salon-card-rich:hover {
    border-color: rgba(10,61,98,0.3);
    box-shadow: 0 8px 24px rgba(10,61,98,0.08);
    transform: translateY(-2px);
}

.map-salon-card-rich.active {
    border-color: var(--c-primary, var(--zh-accent));
    box-shadow: 0 8px 24px rgba(10,61,98,0.15);
}

.map-salon-card-rich-banner {
    height: 80px;
    background: linear-gradient(135deg, var(--zh-bg-2), var(--zh-line));
    position: relative;
    overflow: hidden;
}

.map-salon-card-rich-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-salon-card-rich-badges {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
}

.map-salon-card-rich-body {
    padding: 12px;
    display: flex;
    gap: 10px;
}

.map-salon-card-rich-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    flex-shrink: 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--zh-bg-2), var(--zh-line));
    margin-top: -24px;
    border: 2.5px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.map-salon-card-rich-logo img { width: 100%; height: 100%; object-fit: cover; }

.map-salon-card-rich-content {
    flex: 1;
    min-width: 0;
}

.map-salon-card-rich-footer {
    padding: 8px 12px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid var(--zh-bg-2);
}

.map-salon-distance {
    font-size: 11px;
    font-weight: 700;
    color: var(--c-primary, var(--zh-accent));
    display: flex;
    align-items: center;
    gap: 3px;
}

.map-salon-distance svg { width: 11px; height: 11px; }

/* ── Mini badge ── */
.map-mini-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    backdrop-filter: blur(8px);
}

.map-mini-badge.verified { background: rgba(10,61,98,0.9); color: white; }
.map-mini-badge.featured { background: rgba(245,158,11,0.9); color: white; }
.map-mini-badge svg { width: 9px; height: 9px; }

/* ── Dark mode additions ── */

/* ═══ [LEAD 2026-09-05 · R1/R4] هدف لمسی روی نقشه ═══════════════════════
   صفحهٔ نقشه یک نمای تمام‌صفحه است، پس بافت و هاله به آن نمی‌خورد —
   ولی قاعدهٔ ۴۴px به آن هم می‌خورد. ممیزی ۳۷۵px: ۲۵ کنترلِ زیر ۴۴px،
   و روی نقشه این از هرجای دیگری بدتر است چون کاربر با یک دست و در حال
   حرکت کار می‌کند.

   کنترل‌های خودِ Leaflet هم وارد شدند: پیش‌فرضشان ۳۰px است. */
.map-filter-chip,
.map-filter-btn,
.map-filter-option,
.map-filter-apply,
.map-filter-reset,
.map-filter-close,
.map-city-btn,
.map-view-btn,
.map-star,
.map-sort-select,
.map-search-input {
    min-height: 44px;
}
.map-star,
.map-filter-close,
.map-view-btn { min-width: 44px; }

/* کنترل زوم Leaflet — پیش‌فرض ۳۰px */
.leaflet-control-zoom a {
    width: 44px !important;
    height: 44px !important;
    line-height: 44px !important;
}

/* پاپ‌آپِ پین حالا خودش یک <a> است — کلِ کارت قابلِ لمس، نه فقط دکمهٔ پایینش.
   روی موبایل هدفِ ۴۴ پیکسلی مهم است و کاربر «پین را زدم، هیچی نشد» گزارش
   می‌کرد چون فقط نوارِ باریکِ CTA لینک بود. */
a.zb-popup { display: block; color: inherit; text-decoration: none; }
a.zb-popup:hover .zb-popup-cta { filter: brightness(1.06); }
/* پاپ‌آپ باید بالای شیتِ موبایل بنشیند، نه پشتش */
.leaflet-popup-pane { z-index: 1200; }

/* روی موبایل، کنترلِ زوم و کلیدِ نما هر دو پایینِ صفحه‌اند و روی هم می‌افتادند
   — دکمهٔ «+» نیمه‌بریده زیرِ کلیدِ نما گیر می‌کرد. زوم را بالاتر می‌بریم و
   ارتفاعِ کلیدِ نما را از آن کم می‌کنیم. */
@media (max-width: 767px) {
    .leaflet-bottom.leaflet-right .leaflet-control-zoom { margin-bottom: 84px !important; }
    .map-view-toggle { bottom: 16px; }
    /* نوارِ نسبت‌دهیِ Leaflet روی موبایل یک خطِ کاملِ متن می‌شد و روی شیت
       می‌نشست؛ کوچک و کم‌رنگ. */
    .leaflet-control-attribution { font-size: 9px; max-width: 62vw; opacity: .75; }
}
