/* ═══════════════════════════════════════════════
   Paris Fashion Calling — Mapa Editorial v1.4.1
   Desenvolvido por Everson Araujo @studioemasp
   ═══════════════════════════════════════════════ */

.me-wrap {
    display: block;
    width: 100%;
    background: #f5f1eb;
    overflow: hidden;
    box-sizing: border-box;
    font-family: Georgia, 'Times New Roman', serif;
    contain: layout;
}
.me-layout {
    display: flex;
    height: 100%;
    overflow: hidden;
}

/* ── Coluna do mapa ── */
.me-map-col {
    flex: 1;
    position: relative;
    min-height: 400px;
    background: #e3dfd7;
    display: flex;
    flex-direction: column;
}
#me-map {
    flex: 1;
    width: 100%;
    min-height: 0;
}

/* Faixa de categorias dentro da coluna do mapa (desktop) */
.me-map-cat-strip {
    flex-shrink: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    padding: 10px 14px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: rgba(245, 241, 235, 0.97);
    border-top: 1px solid #d4cfc4;
    box-sizing: border-box;
    z-index: 12;
}
.me-map-cat-strip::-webkit-scrollbar { height: 4px; }
.me-map-cat-strip::-webkit-scrollbar-thumb { background: rgba(44,31,26,.2); border-radius: 2px; }

.me-map-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    padding: 6px 12px 6px 8px;
    margin: 0;
    border: 1.5px solid rgba(44, 31, 26, 0.14);
    border-radius: 999px;
    background: #faf8f5;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #2c1f1a;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: background .15s, border-color .15s, box-shadow .15s;
    -webkit-tap-highlight-color: transparent;
}
.me-map-cat-chip:hover {
    background: #fff;
    border-color: rgba(44, 31, 26, 0.22);
}
.me-map-cat-chip.active {
    background: #2A1E14;
    color: #f5f1eb;
    border-color: #2A1E14;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.me-map-cat-chip.active .me-filter-item-name { color: #f5f1eb; }
.me-map-cat-chip .me-filter-item-img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.me-map-cat-chip .me-filter-item-dot {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}
.me-map-cat-chip .me-filter-item-name {
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ══════════════════════════════════════
   FAB Filtro
   ══════════════════════════════════════ */
/* ══ Horários de funcionamento ══ */
.me-hours {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    animation: meSlideUp .55s .17s cubic-bezier(.22,1,.36,1) both;
}
.me-hours-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    line-height: 1.5;
}
.me-hours-day {
    color: #8a7a60;
    font-weight: 600;
    letter-spacing: .3px;
}
.me-hours-time { color: #2c1f1a; font-weight: 400; }
.me-hours-closed { color: #c0b8aa; font-size: 11px; font-style: italic; }
.me-hours-exception {
    display: block;
    font-size: 11px;
    color: #b0a898;
    font-style: italic;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #e8e4dc;
}

.me-filter-fab {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 20;
}

.me-filter-fab-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    background: rgba(245,241,235,.96);
    border: 1.5px solid rgba(44,31,26,.18);
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .4px;
    color: #2c1f1a;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,.14);
    backdrop-filter: blur(8px);
    transition: background .15s, box-shadow .15s;
    white-space: nowrap;
}
/* hover handled below */
.me-filter-fab-btn svg { flex-shrink: 0; }

/* Dropdown lista */
.me-filter-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 30px rgba(0,0,0,.18);
    overflow: hidden;
    display: none;
    animation: meDropIn .35s cubic-bezier(.22,1,.36,1) both;
    overscroll-behavior: contain;
    touch-action: pan-y;
}
.me-filter-dropdown.open { display: block; }

@keyframes meDropIn {
    from { opacity:0; transform: translateY(-12px); }
    to   { opacity:1; transform: translateY(0); }
}

.me-filter-dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #999;
    border-bottom: 1px solid #f0ece4;
}
.me-filter-dropdown-close {
    background: none;
    border: none;
    font-size: 14px;
    color: #ccc;
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
    transition: color .15s;
}
.me-filter-dropdown-close:hover { color: #555; }

.me-filter-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    max-height: 320px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.me-filter-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 16px;
    cursor: pointer;
    transition: background .12s;
}
.me-filter-item:hover { background: #f0ece4; }
.me-filter-item.active { background: #e8e4dc; border-left: 3px solid #2c1f1a; padding-left: 13px; }
.me-filter-item:not(.active):hover .me-filter-item-name { color: #1a0f0a; }

.me-filter-item-img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,.07);
}
.me-filter-item-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #ddd;
}
.me-filter-item-name {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    color: #2c1f1a;
    line-height: 1.3;
}
.me-filter-item.active .me-filter-item-name { font-weight: 700; color: #2c1f1a; }



/* ══ Fix global hover/active/focus — sobrescreve Elementor e temas ══ */
.me-wrap button,
.me-wrap a,
.me-wrap input,
.me-wrap button:focus,
.me-wrap button:active,
.me-wrap button:hover,
.me-wrap a:focus,
.me-wrap a:active,
.me-geo-btn-skip:hover,
.me-geo-btn-skip:focus,
.me-geo-btn-skip:active,
.me-filter-fab,
.me-filter-fab *,
.me-filter-fab *:focus,
.me-filter-fab *:active,
.me-filter-fab *:hover {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Botão FAB Filter — hover escuro */
.me-filter-fab-btn {
    color: #2c1f1a !important;
    background: rgba(245,241,235,.96) !important;
    box-shadow: 0 2px 12px rgba(0,0,0,.14) !important;
}
.me-filter-fab-btn:hover {
    background: #2A1E14 !important;
    color: #f5f1eb !important;
    box-shadow: 0 3px 16px rgba(0,0,0,.22) !important;
    border-color: #2A1E14 !important;
}
.me-filter-fab-btn:active,
.me-filter-fab-btn:focus {
    background: #2A1E14 !important;
    color: #f5f1eb !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.2) !important;
    border-color: #2A1E14 !important;
}

.me-filter-search-wrap {
    padding: 10px 12px 6px;
    border-bottom: 1px solid #f0ece4;
}
.me-filter-search {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #e8e4dc;
    border-radius: 20px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px !important;
    color: #2c1f1a;
    background: #faf9f6;
    outline: none !important;
    box-sizing: border-box;
    transition: border-color .15s;
}
.me-filter-search::placeholder { color: #bbb; }
.me-filter-search:focus { border-color: #c8b97a; background: #fff; }

.me-filter-results {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 260px;
    overflow-y: auto;
    border-top: 1px solid #f0ece4;
    overscroll-behavior: contain;
}
.me-filter-results:empty { display: none; }
.me-filter-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background .1s;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    color: #2c1f1a;
    list-style: none;
}
.me-filter-result-item:hover { background: #faf9f6; }
.me-filter-result-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.me-filter-result-info strong { display: block; font-size: 12px; }
.me-filter-result-info > span { color: #aaa; font-size: 11px; display: block; }
.me-filter-result-info .me-filter-result-cats {
    margin-top: 3px;
    font-size: 10px;
    line-height: 1.35;
    color: #9a8f85;
}
.me-filter-no-results {
    padding: 12px 14px;
    font-family: -apple-system, sans-serif;
    font-size: 12px;
    color: #bbb;
    text-align: center;
}
.me-filter-result-info mark {
    background: #e8e27a;
    color: #2c1f1a;
    border-radius: 2px;
    padding: 0 1px;
    font-style: normal;
}
.me-filter-item, .me-filter-item * { -webkit-tap-highlight-color: transparent; }
.me-filter-item:focus  { outline: none !important; }
.me-filter-item:active { outline: none !important; background: #dedad2 !important; }
.me-filter-item.active:focus,
.me-filter-item.active:active { background: #e8e4dc !important; border-left: 3px solid #2c1f1a !important; }

.me-filter-results-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 10px;
    border-bottom: 1px solid #f0ece4;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: #999;
    list-style: none;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    isolation: isolate;
}
/* Cobre frestas/subpixels entre a faixa sticky e as linhas que rolam por baixo */
.me-filter-results-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 14px;
    background: #fff;
    pointer-events: none;
}
/* Linhas da lista ficam atrás da faixa sticky (evita texto “vazando” por cima) */
.me-filter-results > .me-filter-result-item {
    position: relative;
    z-index: 0;
}
.me-filter-results-back {
    background: #2A1E14;
    border: none;
    border-radius: 20px;
    font-size: 11px;
    color: #f5f1eb;
    cursor: pointer;
    padding: 5px 12px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    letter-spacing: .3px;
    transition: background .15s, color .15s;
    outline: none !important;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.me-filter-results-back:hover { background: #f5f1eb; color: #2A1E14; }

/* ══════════════════════════════════════
   Pins
   ══════════════════════════════════════ */
.me-pin {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--pin-color, #e8e27a);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    /* Sombra neutra; halo amarelo só no pin selecionado (.active + mePinPulse) */
    box-shadow: 0 2px 12px rgba(0,0,0,.24);
    border: none;
    outline: none;
    user-select: none;
    /* Só transição em sombra: transform fica a cargo do clique/animação (evita atraso vs. o clique) */
    transition: box-shadow .2s ease;
}
.me-pin-icon {
    font-size: 17px;
    line-height: 1;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.15));
}
.me-pin.me-pin-photo {
    background-size: cover;
    background-position: center;
    border: none;
    outline: none;
    box-shadow: 0 2px 14px rgba(0,0,0,.32);
}
.me-pin:hover { transform: scale(1.2) !important; box-shadow: 0 4px 16px rgba(0,0,0,.28); }
/* Pulso contínuo — “ripple” suave em camadas (Material / map UX); cubic-bezier respira melhor que linear */
.me-pin.active {
    transform: scale(1.25) !important;
    animation: mePinPulse 2.35s cubic-bezier(0.45, 0, 0.35, 1) infinite;
}
.me-pin.me-pin-photo.active {
    border: none;
    outline: none;
    animation: mePinPulsePhoto 2.35s cubic-bezier(0.45, 0, 0.35, 1) infinite;
}

/* Onda dupla: núcleo nítido + anéis que somem — mais refinado que um único spread */
@keyframes mePinPulse {
    0%, 100% {
        box-shadow:
            0 2px 14px rgba(0,0,0,.22),
            0 0 0 0 rgba(232,226,122,0),
            0 0 0 0 rgba(232,226,122,0);
    }
    42% {
        box-shadow:
            0 4px 20px rgba(0,0,0,.18),
            0 0 0 7px rgba(232,226,122,.22),
            0 0 0 20px rgba(232,226,122,.09);
    }
    58% {
        box-shadow:
            0 4px 20px rgba(0,0,0,.18),
            0 0 0 11px rgba(232,226,122,.14),
            0 0 0 30px rgba(232,226,122,.04);
    }
}
@keyframes mePinPulsePhoto {
    0%, 100% {
        box-shadow:
            0 2px 16px rgba(0,0,0,.28),
            0 0 0 0 rgba(232,226,122,0),
            0 0 0 0 rgba(232,226,122,0);
    }
    45% {
        box-shadow:
            0 5px 22px rgba(0,0,0,.22),
            0 0 0 8px rgba(232,226,122,.18),
            0 0 0 22px rgba(232,226,122,.07);
    }
    60% {
        box-shadow:
            0 5px 22px rgba(0,0,0,.22),
            0 0 0 12px rgba(232,226,122,.11),
            0 0 0 32px rgba(232,226,122,.035);
    }
}

/* ══════════════════════════════════════
   Popup no mapa — canto inferior direito
   ══════════════════════════════════════ */
.me-map-popup {
    position: absolute;
    bottom: 24px;
    right: 14px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 28px rgba(0,0,0,.22);
    overflow: hidden;
    width: 275px;
    cursor: pointer;
    z-index: 50;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .5s cubic-bezier(.22,1,.36,1), transform .5s cubic-bezier(.22,1,.36,1), box-shadow .3s ease;
}
.me-map-popup.visible {
    opacity: 1;
    transform: translateY(0);
}
.me-map-popup:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,.28);
}

.me-map-popup-img {
    width: 100%;
    height: 138px;
    overflow: hidden;
    background: #e8e4dc;
}
.me-map-popup-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.me-map-popup-body {
    padding: 12px 14px 14px;
}
.me-map-popup-name {
    display: block;
    font-family: Georgia, serif;
    font-size: 14px;
    font-weight: 500;
    color: #2c1f1a;
    line-height: 1.3;
    margin-bottom: 5px;
}
.me-map-popup-addr {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    color: #999;
    margin: 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes mePopupIn {
    from { opacity:0; transform: scale(.9) translateY(6px); }
    to   { opacity:1; transform: scale(1)  translateY(0); }
}

/* ══════════════════════════════════════
   Painel lateral direito
   ══════════════════════════════════════ */
.me-detail-col {
    width: 40%;
    min-width: 260px;
    flex-shrink: 0;
    background: #f5f1eb;
    border-left: 1px solid #ddd8cf;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}



/* Empty state — painel editorial escuro (só quando #me-detail mostra placeholder) */
.me-detail-col:has(> .me-empty-state) {
    background: #3D0000;
    border-left-color: rgba(245, 241, 235, 0.14);
}
.me-detail-col > .me-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 48px 36px 52px;
    text-align: center;
    background: #3D0000;
}
.me-empty-icon {
    font-size: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1.5px solid rgba(245, 241, 235, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    position: relative;
    flex-shrink: 0;
}
.me-empty-icon::after {
    content: '';
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid rgba(245, 241, 235, 0.4);
    display: block;
}
/* Título: use Galadalli / Galadali carregado no tema (webfont); senão cai em Georgia. */
.me-empty-title {
    font-family: 'Galadalli Light', 'Galadali Light', 'Galadali', Georgia, 'Times New Roman', serif;
    font-size: clamp(1.25rem, 3.2vw, 1.85rem);
    font-weight: 300;
    color: #f5f1eb;
    margin: 0 0 14px;
    letter-spacing: 0.04em;
    line-height: 1.35;
}
.me-empty-subtitle,
.me-detail-col > .me-empty-state p:not(.me-empty-title) {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: rgba(245, 241, 235, 0.74);
    line-height: 1.75;
    margin: 0;
    max-width: 340px;
    letter-spacing: 0.02em;
}

/* Conteúdo do local */
.me-detail-col.me-has-content { justify-content: flex-start; }

/* Foto no topo */
.me-det-photo {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #ddd9d0;
    flex-shrink: 0;
    animation: meImgIn .7s cubic-bezier(.22,1,.36,1) both;
}
.me-det-photo img { width:100%; height:100%; object-fit:cover; display:block; }

/* Corpo do conteúdo */
.me-det-body {
    padding: 24px 32px 32px;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* Categoria */
.me-det-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
    animation: meSlideUp .55s cubic-bezier(.22,1,.36,1) both;
}
.me-det-cat {
    display: inline-block;
    background: var(--cat-color, #e8e27a);
    /* Fundo escuro: JS define color:#F6F1EB inline */
    color: rgba(0,0,0,.7);
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 10px; font-weight: 700;
    letter-spacing: .8px; text-transform: uppercase;
    padding: 3px 10px; border-radius: 8px;
}

.me-det-name {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 36px; font-weight: 400;
    color: #2c1f1a;
    line-height: 1.08; letter-spacing: -.4px;
    margin: 0 0 12px;
    animation: meSlideUp .55s .06s cubic-bezier(.22,1,.36,1) both;
}

.me-det-tags {
    display: flex; flex-wrap: wrap; gap: 5px;
    margin-bottom: 14px;
    animation: meSlideUp .55s .13s cubic-bezier(.22,1,.36,1) both;
}
.me-det-tag {
    display: inline-block;
    background: transparent;
    color: #777;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11px; padding: 0;
    text-decoration: none; white-space: nowrap;
    transition: color .15s;
}
a.me-det-tag { background: transparent; color: #777; }
a.me-det-tag:hover { background: transparent; color: #2c1f1a; }

/* Instagram — tag ao lado da categoria */
.me-det-cat-ig {
    display: inline-block;
    background: #E6E6E1 !important;
    color: #2c1f1a !important;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .4px;
    padding: 3px 10px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s;
}
.me-det-cat-ig:hover { background: #d8d8d3 !important; }

.me-det-desc {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px; color: #666; line-height: 1.78;
    margin: 0 0 18px;
    animation: meSlideUp .55s .20s cubic-bezier(.22,1,.36,1) both;
}

.me-det-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: #3d0000;
    border: none;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11px; font-weight: 700;
    letter-spacing: 1.8px; text-transform: uppercase;
    color: #faf6ef; text-align: center; text-decoration: none;
    cursor: pointer;
    transition: background .22s, color .22s;
    animation: meSlideUp .55s .27s cubic-bezier(.22,1,.36,1) both;
    box-sizing: border-box;
    margin-top: 24px;
}
.me-det-btn:hover {
    background: #faf6ef;
    color: #3d0000;
    outline: 2px solid #3d0000;
    outline-offset: -2px;
}

/* Animações */
@keyframes meImgIn {
    from { opacity:0; }
    to   { opacity:1; }
}
@keyframes meSlideUp {
    from { opacity:0; transform: translateY(18px); }
    to   { opacity:1; transform: translateY(0); }
}
@keyframes mePinPop {
    /* Começa já no tamanho selecionado — resposta imediata ao clique */
    0%   { transform: scale(1.25) translateY(0); }
    28%  { transform: scale(1.4)  translateY(-7px); }
    52%  { transform: scale(1.18) translateY(1px); }
    76%  { transform: scale(1.3)  translateY(-2px); }
    100% { transform: scale(1.25) translateY(0); }
}
.me-pin-pop {
    animation: mePinPop .34s cubic-bezier(.22,1,.36,1) forwards !important;
}
@keyframes meBadgeIn {
    from { opacity:0; transform: translateX(-50%) translateY(6px); }
    to   { opacity:1; transform: translateX(-50%) translateY(0); }
}

.me-stack-num { font-weight: 700; letter-spacing: .3px; }
.me-stack-hint { opacity: .6; font-size: 10px; }

/* Botão fechar */
.me-close {
    position: absolute;
    top: 14px; right: 16px;
    background: rgba(245,241,235,.85);
    border: none; border-radius: 50%;
    width: 30px; height: 30px;
    font-size: 16px; color: #999;
    cursor: pointer; line-height: 1; padding: 0;
    display: flex; align-items: center; justify-content: center;
    transition: color .15s, background .15s;
    z-index: 5; backdrop-filter: blur(4px);
}
.me-close:hover { color: #333; background: #f5f1eb; }

/* Sem API Key */
.me-no-key {
    background: #fff3cd; border: 1px solid #ffc107;
    padding: 14px 18px; border-radius: 6px;
    font-family: -apple-system, sans-serif; font-size: 14px; margin: 12px 0;
}

/* ══════════════════════════════════════
   Tela de permissão de geolocalização
   ══════════════════════════════════════ */
/* Overlay geo — cobre o mapa inteiro */
.me-geo-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f1eb;
    padding: 32px 28px;
    z-index: 100;
    box-sizing: border-box;
    animation: meGeoIn .3s ease both;
}
.me-geo-overlay.me-geo-overlay-out {
    animation: meGeoOut .35s ease both;
}
@keyframes meGeoIn  { from { opacity:0 } to { opacity:1 } }
@keyframes meGeoOut { from { opacity:1 } to { opacity:0 } }
.me-geo-prompt-inner { text-align: center; max-width: 340px; }

/* CSS legado — mantido para compatibilidade */
.me-geo-prompt {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f1eb;
    padding: 32px 28px;
    box-sizing: border-box;
}

.me-geo-logo {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 10px;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: #c0b9b0;
    margin-bottom: 24px;
}
.me-geo-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 28px;
    font-weight: 400;
    color: #2c1f1a;
    line-height: 1.15;
    letter-spacing: -.3px;
    margin: 0 0 16px;
}
.me-geo-copy {
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    font-size: 12.5px;
    color: #999;
    line-height: 1.75;
    margin: 0 0 28px;
}
.me-geo-btn-allow {
    display: block;
    width: 100%;
    padding: 13px 20px;
    background: #2c1f1a;
    border: none;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #f5f1eb;
    cursor: pointer;
    transition: background .18s, transform .15s;
    margin-bottom: 12px;
    box-sizing: border-box;
}
.me-geo-btn-allow:hover  { background: #1a0f0a !important; color: #f5f1eb !important; transform: translateY(-1px); outline: none !important; }
.me-geo-btn-allow:active { background: #2c1f1a !important; color: #f5f1eb !important; transform: translateY(0); outline: none !important; }
.me-geo-btn-allow:focus  { background: #2c1f1a !important; color: #f5f1eb !important; outline: none !important; }

.me-geo-btn-skip {
    display: block;
    width: 100%;
    padding: 8px 20px;
    background: transparent !important;
    border: none !important;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    color: #bbb;
    cursor: pointer;
    transition: color .15s;
    letter-spacing: .3px;
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
}
.me-geo-btn-skip:hover  { color: #2c1f1a !important; background: transparent !important; outline: none !important; }
.me-geo-btn-skip:active { color: #1a0f0a !important; background: transparent !important; outline: none !important; }
.me-geo-btn-skip:focus  { color: #2c1f1a !important; background: transparent !important; outline: none !important; }

/* Estado de loading após clicar */
.me-geo-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f5f1eb;
    gap: 14px;
}
.me-geo-loading p {
    font-family: -apple-system, sans-serif;
    font-size: 12px;
    color: #bbb;
    margin: 0;
    letter-spacing: .3px;
}
.me-geo-spinner {
    width: 22px; height: 22px;
    border: 2px solid #e0dcd5;
    border-top-color: #2c1f1a;
    border-radius: 50%;
    animation: meSpinnerRotate .7s linear infinite;
    display: block;
}
@keyframes meSpinnerRotate { to { transform: rotate(360deg); } }

/* Responsivo */

/* ══════════════════════════════════════════════════════
   MOBILE — Full Screen Map + Bottom Sheet
   Inspirado em: Chanel Find Stores / Google Maps / LV
   ══════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Mapa: full screen */
    .me-wrap {
        position: relative !important;
        height: 80vh !important;
        min-height: 400px !important;
        overflow: hidden !important;
        display: block !important;
        scroll-margin-top: 10vh !important;
    }
    .me-layout {
        position: relative !important;
        height: 100% !important;
        overflow: hidden !important;
        display: block !important;
    }
    .me-map-col {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 1 !important;
    }
    #me-map { width: 100% !important; height: 100% !important; }

    /* Categorias só no FAB / dropdown no mobile */
    .me-map-cat-strip { display: none !important; }

    /* ── Detail: painel full-screen sobre o mapa ── */
    .me-detail-col {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 80vh !important;
        min-height: 400px !important;
        z-index: 25 !important;
        background: #f5f1eb !important;
        border: none !important;
        border-radius: 0 !important;
        display: none !important;
        flex-direction: column !important;
        overflow: hidden !important;
        justify-content: flex-start !important;
    }
    .me-detail-col.me-has-content {
        display: flex !important;
    }
    .me-detail-col:has(> .me-empty-state) {
        background: #3D0000 !important;
    }

    /* Scroll area — sem scroll, ocupa espaço disponível */
    #me-sheet-scroll {
        flex: 1 !important;
        overflow: hidden !important;
        min-height: 0 !important;
    }

    /* Botao voltar — fixo no topo */
    .me-sheet-back {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 16px 20px 14px !important;
        background: #f5f1eb !important;
        border: none !important;
        border-bottom: .5px solid rgba(44,31,26,.1) !important;
        font-family: -apple-system, BlinkMacSystemFont, sans-serif !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        letter-spacing: .3px !important;
        color: rgba(44,31,26,.7) !important;
        cursor: pointer !important;
        width: 100% !important;
        flex-shrink: 0 !important;
        -webkit-tap-highlight-color: transparent !important;
        outline: none !important;
        box-sizing: border-box !important;
    }
    .me-sheet-back:active { background: rgba(44,31,26,.05) !important; }

    /* Conteudo do local — sem scroll, texto trunca com ... */
    .me-det-photo {
        width: 100% !important;
        height: 200px !important;
        flex-shrink: 0 !important;
        overflow: hidden !important;
    }
    .me-det-photo img { width:100% !important; height:100% !important; object-fit:cover !important; display:block !important; }
    .me-det-body {
        padding: 16px 20px 16px !important;
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }
    .me-det-name {
        font-size: 20px !important;
        flex-shrink: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    .me-det-cats { flex-shrink: 0 !important; }
    .me-det-tags { flex-shrink: 0 !important; }
    .me-hours    { flex-shrink: 0 !important; }
    .me-det-desc {
        font-size: 13px !important;
        flex: 1 !important;
        min-height: 0 !important;
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        -webkit-line-clamp: 4 !important;
    }
    .me-det-btn  {
        margin-top: 12px !important;
        flex-shrink: 0 !important;
    }
    .me-close    { display: none !important; }

    /* Filtro */
    .me-filter-fab     { top: 14px !important; right: 14px !important; z-index: 15 !important; }
    .me-filter-fab-btn {
        padding: 9px 16px !important;
        font-size: 12px !important;
        max-width: 48vw !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    .me-filter-dropdown {
        position: fixed !important;
        left: 16px !important;
        right: 16px !important;
        width: auto !important;
        top: auto !important;
        transform: none !important;
        max-height: 60vh !important;
        overflow-y: auto !important;
        overscroll-behavior: contain !important;
        z-index: 50 !important;
        border-radius: 16px !important;
    }
    .me-filter-list, .me-filter-results { max-height: none !important; }
    .me-filter-search { font-size: 16px !important; }

    /* Popup: escondido no mobile */
    .me-map-popup { display: none !important; }

    /* Animacoes desligadas */
    .me-det-cats, .me-det-name, .me-det-tags,
    .me-det-desc, .me-det-btn, .me-hours, .me-det-photo {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ── Painel de categoria selecionada ── */
.me-cat-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 32px 24px;
    text-align: center;
    gap: 16px;
}
.me-cat-panel-img {
    width: 100%;
    max-height: 260px;
    overflow: hidden;
    border-radius: 12px;
    flex-shrink: 0;
}
.me-cat-panel-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}
.me-cat-panel-name {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 22px;
    font-weight: 400;
    color: #2c1f1a;
    margin: 0;
    line-height: 1.3;
    letter-spacing: .01em;
}
.me-cat-panel-count {
    font-size: 13px;
    color: #a09080;
    margin: 0;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* ══════════════════════════════════════════════
   MOBILE — Overlay de ativação + Exit + Back
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* ── Overlay de ativação ── */
    #me-map-overlay {
        position: absolute !important;
        inset: 0 !important;
        z-index: 30 !important;
        background: rgba(245,241,235,.88) !important;
        backdrop-filter: blur(4px) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: opacity .35s ease, visibility .35s ease !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    #me-map-overlay.me-map-overlay--hidden {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
    .me-map-overlay-inner {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 16px !important;
        text-align: center !important;
    }
    .me-map-overlay-label {
        font-family: Georgia, serif !important;
        font-size: 13px !important;
        letter-spacing: 2px !important;
        text-transform: uppercase !important;
        color: rgba(44,31,26,.45) !important;
        margin: 0 !important;
    }
    .me-map-overlay-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        padding: 13px 28px !important;
        background: #2c1f1a !important;
        border: none !important;
        border-radius: 999px !important;
        font-family: -apple-system, BlinkMacSystemFont, sans-serif !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        letter-spacing: .4px !important;
        color: #f5f1eb !important;
        cursor: pointer !important;
        box-shadow: 0 4px 20px rgba(0,0,0,.18) !important;
        -webkit-tap-highlight-color: transparent !important;
    }
    .me-map-overlay-btn svg { flex-shrink: 0 !important; }

    /* ── Botão sair do mapa ── */
    #me-map-exit {
        position: absolute !important;
        top: 14px !important;
        left: 14px !important;
        z-index: 25 !important;
        display: none !important;
        align-items: center !important;
        gap: 6px !important;
        padding: 8px 16px !important;
        background: rgba(245,241,235,.95) !important;
        border: 1.5px solid rgba(44,31,26,.15) !important;
        border-radius: 999px !important;
        font-family: -apple-system, BlinkMacSystemFont, sans-serif !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        letter-spacing: .3px !important;
        color: #2c1f1a !important;
        cursor: pointer !important;
        backdrop-filter: blur(8px) !important;
        box-shadow: 0 2px 12px rgba(0,0,0,.14) !important;
        -webkit-tap-highlight-color: transparent !important;
    }
    #me-map-exit.me-map-exit--visible {
        display: inline-flex !important;
    }

    /* ── Botão voltar no sheet ── */
    .me-sheet-back {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        padding: 10px 16px !important;
        background: none !important;
        border: none !important;
        font-family: -apple-system, BlinkMacSystemFont, sans-serif !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        letter-spacing: .3px !important;
        color: rgba(44,31,26,.6) !important;
        cursor: pointer !important;
        width: 100% !important;
        border-bottom: .5px solid rgba(44,31,26,.08) !important;
        -webkit-tap-highlight-color: transparent !important;
        outline: none !important;
    }
    .me-sheet-back:active {
        color: #2c1f1a !important;
        background: rgba(44,31,26,.04) !important;
    }
}

/* ── Sheet escondido até mapa ser ativado ── */
@media (max-width: 768px) {
    /* Começa escondido — JS mostra ao ativar */
    .me-detail-col {
        display: none;
    }
    /* Overlay sempre na frente do sheet */
    #me-map-overlay {
        z-index: 30 !important;
    }
    .me-sheet, .me-detail-col {
        z-index: 20 !important;
    }
}
