/* =============================================
   Localizador de Lojas — localizador.css
   ============================================= */

/* Fontes da página da loja */
@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:opsz,wght@6..96,400..900&family=Jost:wght@200;300;400;500&family=Lexend:wght@100..900&display=swap');

/* ------ Layout geral ------ */
.ll-wrap {
    display: flex;
    gap: 0;
    width: 100%;
    min-height: 600px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: #1a1a1a;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.07);
}

/* ------ Sidebar ------ */
.ll-sidebar {
    width: 360px;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-right: 1px solid #e5e5e5;
    overflow: hidden;
}

/* ------ Search box ------ */
.ll-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e5e5;
    background: #fafafa;
}

.ll-search-input-wrap {
    position: relative;
    flex: 1;
}

.ll-icon-search {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: #999;
    pointer-events: none;
}

#ll-search {
    width: 100%;
    padding: 9px 12px 9px 34px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    outline: none;
    transition: border-color .2s;
    box-sizing: border-box;
}

#ll-search:focus { border-color: #1a1a1a; }

#ll-locate-btn {
    background: #1a1a1a;
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .2s;
}

#ll-locate-btn:hover { background: #333; }

#ll-locate-btn svg {
    width: 16px;
    height: 16px;
    stroke: #fff;
}

#ll-locate-btn.ll-loading-spin svg {
    animation: spin 1s linear infinite;
}

/* ------ Filtros categoria ------ */
.ll-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 10px 16px;
    border-bottom: 1px solid #e5e5e5;
    background: #fafafa;
}

.ll-filter-btn {
    padding: 4px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}

.ll-filter-btn:hover,
.ll-filter-btn.active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

/* ------ Count ------ */
.ll-count {
    padding: 8px 16px 4px;
    font-size: 12px;
    color: #888;
    font-weight: 500;
    letter-spacing: .02em;
    text-transform: uppercase;
}

/* ------ Lista ------ */
.ll-lista {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.ll-lista::-webkit-scrollbar { width: 4px; }
.ll-lista::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

/* ------ Loading ------ */
.ll-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 32px 20px;
    color: #999;
    font-size: 13px;
}

.ll-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #eee;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

.ll-empty, .ll-error {
    padding: 32px 20px;
    text-align: center;
    color: #999;
    font-size: 13px;
    line-height: 1.6;
}

.ll-error { color: #c00; }

/* ------ Card de loja ------ */
.ll-card {
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background .15s;
}

.ll-card:hover { background: #fafafa; }

.ll-card--active { background: #f5f5f5; }

.ll-card-inner {
    display: flex;
    gap: 12px;
    padding: 14px 16px 10px;
    align-items: flex-start;
}

.ll-card-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    border: 1px solid #eee;
}

.ll-card-img--empty {
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    border-radius: 6px;
    flex-shrink: 0;
}

.ll-card-body {
    flex: 1;
    min-width: 0;
}

.ll-card-name {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 2px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ll-card-cat {
    display: inline-block;
    font-size: 11px;
    color: #888;
    background: #f0f0f0;
    border-radius: 3px;
    padding: 1px 6px;
    margin-bottom: 4px;
}

.ll-card-addr {
    font-size: 12px;
    color: #555;
    margin: 4px 0 2px;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.ll-card-addr svg { flex-shrink: 0; margin-top: 2px; }

.ll-card-tel, .ll-card-dist {
    font-size: 12px;
    color: #777;
    margin: 2px 0;
}

.ll-card-dist { color: #2563eb; font-weight: 500; }

.ll-card-actions {
    display: flex;
    gap: 8px;
    padding: 0 16px 12px;
}

/* ------ Botões card ------ */
.ll-btn {
    flex: 1;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .03em;
    text-align: center;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}

.ll-btn--outline {
    border: 1.5px solid #1a1a1a;
    color: #1a1a1a;
    background: transparent;
}

.ll-btn--outline:hover {
    background: #1a1a1a;
    color: #fff;
}

.ll-btn--wpp {
    background: #25d366;
    color: #fff;
    border: 1.5px solid #25d366;
}

.ll-btn--wpp:hover { background: #1da851; border-color: #1da851; }

/* ------ Mapa ------ */
.ll-map-wrap {
    flex: 1;
    position: relative;
    min-height: 400px;
}

#ll-map {
    width: 100%;
    height: 100%;
    min-height: 600px;
    z-index: 0;
}

/* ------ Pin customizado ------ */
.ll-pin {
    width: 32px;
    height: 40px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
    transition: transform .15s;
}

.ll-pin svg {
    transform: rotate(45deg);
}

/* ------ Popup ------ */
.ll-popup {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    min-width: 200px;
}

.ll-popup-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 4px;
}

.ll-popup strong {
    font-size: 14px;
    font-weight: 700;
}

.ll-popup span { color: #555; }

.ll-popup-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.ll-popup-link,
.ll-popup-wpp {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    transition: all .2s;
}

.ll-popup-link {
    background: #1a1a1a;
    color: #fff;
}

.ll-popup-link:hover { background: #333; color: #fff; }

.ll-popup-wpp {
    background: #25d366;
    color: #fff;
}

.ll-popup-wpp:hover { background: #1da851; }

/* Leaflet popup override */
.leaflet-popup-content-wrapper {
    border-radius: 10px !important;
    box-shadow: 0 6px 24px rgba(0,0,0,.15) !important;
    padding: 14px 16px !important;
}
.leaflet-popup-content {
    margin: 0 !important;
}
.ll-popup { gap: 5px; }
.ll-popup strong { margin-bottom: 2px; }
.ll-popup .ll-popup-tel { font-size: 13px; color: #555; }
.ll-popup-actions { margin-top: 8px; }
.ll-popup .llm-wa-btn { font-size: .8rem; padding: .5rem .9rem; }

/* ------ Responsive ------ */
@media (max-width: 768px) {
    .ll-wrap {
        flex-direction: column;
    }

    .ll-sidebar {
        width: 100%;
        min-width: unset;
        border-right: none;
        border-bottom: 1px solid #e5e5e5;
        max-height: 380px;
    }

    #ll-map {
        min-height: 300px !important;
    }
}

/* =============================================
   Página Single da Loja
   ============================================= */
.ll-single {
    max-width: 960px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Lexend', sans-serif;
}

.ll-single-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.ll-single-info { padding: 20px 0; }

/* TÍTULO PRINCIPAL — Bodoni Moda */
.ll-single-name {
    font-family: 'Bodoni Moda', serif;
    font-size: 32px;
    font-weight: 500;
    color: #815B5A;
    letter-spacing: -.01em;
    margin: 0 0 8px;
    line-height: 1.15;
}

/* CATEGORIA — Bodoni Moda */
.ll-single-cat {
    display: inline-block;
    font-family: 'Bodoni Moda', serif;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #815B5A;
    border: 1px solid #815B5A55;
    padding: 3px 10px;
    border-radius: 3px;
    margin-bottom: 20px;
}

.ll-single-field {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: flex-start;
}

.ll-single-field-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #815B5A;
    margin-top: 2px;
}

/* DESCRIÇÕES — Lexend */
.ll-single-field-content {
    font-family: 'Lexend', sans-serif;
    font-size: 14px;
    font-weight: 300;
    color: #815B5AC7;
    line-height: 1.6;
}

/* RÓTULOS DOS CAMPOS — Bodoni Moda */
.ll-single-field-content strong {
    display: block;
    font-family: 'Bodoni Moda', serif;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #815B5A;
    margin-bottom: 2px;
}

.ll-single-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.ll-single-btn {
    font-family: 'Lexend', sans-serif;
    padding: 12px 24px;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: .04em;
    text-transform: uppercase;
    border-radius: 4px;
    text-decoration: none;
    transition: all .2s;
    display: inline-block;
}

.ll-single-btn--primary {
    background: #815B5A;
    color: #fff;
}

.ll-single-btn--primary:hover { background: #6d4c4b; color: #fff; }

.ll-single-btn--wpp {
    background: #25d366;
    color: #fff;
}

.ll-single-btn--wpp:hover { background: #1da851; color: #fff; }

.ll-single-map {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
}

.ll-single-map #ll-single-map-el {
    height: 420px;
    width: 100%;
}

/* LINK VOLTAR — Lexend */
.ll-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Lexend', sans-serif;
    font-size: 13px;
    font-weight: 300;
    color: #815B5AC7;
    text-decoration: none;
    margin-bottom: 24px;
    transition: color .2s;
}

.ll-back-link:hover { color: #815B5A; }

@media (max-width: 680px) {
    .ll-single-grid { grid-template-columns: 1fr; gap: 24px; }
    .ll-single-map { order: -1; }
    .ll-single-map #ll-single-map-el { height: 260px; }
}

/* Crédito do OpenStreetMap discreto (obrigatório manter, mas pequeno) */
.leaflet-control-attribution {
    font-size: 9px !important;
    background: rgba(255,255,255,.55) !important;
    color: #999 !important;
    padding: 0 4px !important;
    opacity: .7;
}
.leaflet-control-attribution a { color: #999 !important; }
@media (max-width: 860px) {
    .leaflet-control-attribution { font-size: 8px !important; opacity: .55; }
}

/* =============================================
   LAYOUT MINIMAL — [localizador_mapa]
   Busca à esquerda + mapa grande à direita
   ============================================= */
.llm-wrap {
    --llm-h: 90vh;
    --llm-cor: #1a1a1a;
    display: flex;
    width: 100%;
    height: var(--llm-h);
    min-height: 520px;
    font-family: 'Jost', 'Helvetica Neue', Arial, sans-serif;
    color: #1f1b1a;
    background: #faf3eb;
    overflow: hidden;
}

/* ---- Painel esquerdo ---- */
.llm-panel {
    width: var(--llm-panel-w, 44%);
    min-width: 340px;
    max-width: 860px;
    height: 100%;
    overflow-y: auto;
    background: #faf3eb;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}
.llm-panel::-webkit-scrollbar { width: 5px; }
.llm-panel::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

.llm-panel-in {
    padding: clamp(2rem, 5vw, 4rem) clamp(1.6rem, 3.5vw, 3rem);
}

.llm-title {
    font-family: 'Bodoni Moda', Georgia, serif;
    font-size: clamp(2rem, 3vw, 2.7rem);
    font-weight: 500;
    color: #A68580;
    margin: 0 0 1.8rem;
    line-height: 1.15;
}

/* ---- Busca (input sublinhado) ---- */
.llm-search { margin-bottom: .9rem; }

.llm-search input,
.llm-search input:focus,
.llm-search input:active {
    width: 100%;
    border: none !important;
    border-bottom: 1px solid #bcb4ab !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    padding: .6rem 0 !important;
    font-size: .95rem;
    font-weight: 300;
    color: #1f1b1a;
    transition: border-color .3s;
}
.llm-search input::placeholder { color: #a49b91; }
.llm-search input:focus { border-bottom-color: var(--llm-cor) !important; }

/* ---- Botão "usar minha localização" ---- */
.llm-locate {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: none;
    border: none;
    padding: 0;
    margin: 0 0 2rem;
    font-family: inherit;
    font-size: .82rem;
    font-weight: 400;
    color: #815B5AC7;
    cursor: pointer;
    transition: color .2s;
}
.llm-locate:hover { color: #815B5A; }
/* Blinda contra o hover do tema (fundo rosa etc.) */
.llm-locate,
.llm-locate:hover,
.llm-locate:focus,
.llm-locate:active {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: #815B5AC7 !important;
    transform: none !important;
    text-decoration: none !important;
    padding: 0 !important;
    margin: 0 0 2rem !important;
    justify-content: flex-start !important;
    text-align: left !important;
}
.llm-locate svg { flex-shrink: 0; }
.llm-locate.is-loading { opacity: .55; pointer-events: none; }
.llm-locate.is-loading svg { animation: spin 1s linear infinite; }

/* ---- Label ---- */
.llm-label {
    font-size: .95rem;
    font-weight: 400;
    color: #6a625b;
    margin: 0 0 1.2rem;
}

/* ---- Lista minimalista ---- */
.llm-lista { display: flex; flex-direction: column; }

.llm-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.1rem 0;
    cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,.07);
    transition: background .2s;
}
.llm-item:hover { background: rgba(0,0,0,.02); }
.llm-item--active .llm-item-name { color: var(--llm-cor); font-weight: 600; }

.llm-thumb {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 4px;
    background: #5B2A33;
}
.llm-thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d8c3c6;
    background: #5B2A33;
}

.llm-item-body { min-width: 0; }
.llm-item-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: #1f1b1a;
    line-height: 1.3;
    transition: color .2s;
}
.llm-item-sub {
    font-size: .8rem;
    color: #815B5AC7;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.llm-item-dist { color: var(--llm-cor); font-weight: 500; }

/* Contato no item: telefone + botão WhatsApp */
.llm-item-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .6rem 1rem;
    margin-top: .7rem;
}
.llm-item-tel {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .82rem;
    color: #6a625b;
    text-decoration: none;
    transition: color .2s;
}
.llm-item-tel:hover { color: var(--llm-cor); }
.llm-item-tel svg { flex-shrink: 0; opacity: .8; }

.llm-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #25d366;
    color: #fff;
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .01em;
    padding: .5rem .9rem;
    border-radius: 6px;
    text-decoration: none;
    transition: background .2s;
}
.llm-wa-btn:hover { background: #1da851; }
.llm-wa-btn svg { flex-shrink: 0; }
/* Blinda o texto branco do WhatsApp contra o hover do tema */
.llm-wa-btn,
.llm-wa-btn:hover,
.llm-wa-btn:focus,
.llm-wa-btn:active {
    color: #fff !important;
    text-decoration: none !important;
}
/* Protege o telefone contra estilos de link do tema */
.llm-item-tel,
.llm-item-tel:hover,
.llm-item-tel:focus {
    text-decoration: none !important;
    color: #6a625b !important;
}
.llm-item-tel:hover { color: #815B5A !important; }

.llm-loading {
    display: flex; align-items: center; gap: 10px;
    padding: 1.5rem 0; color: #8a8078; font-size: .9rem;
}
.llm-empty {
    padding: 1.5rem 0; color: #8a8078; font-size: .9rem; line-height: 1.6;
}

/* ---- Mapa direita ---- */
.llm-map-wrap { flex: 1; height: 100%; position: relative; }
#llm-map { width: 100%; height: 100%; z-index: 0; }

/* Pin (reaproveita .ll-pin do plugin, cor via inline) */

/* ---- Responsivo ---- */
@media (max-width: 860px) {
    .llm-wrap {
        flex-direction: column;
        height: auto;
    }
    /* Mapa em cima, com altura fixa */
    .llm-map-wrap {
        order: -1;
        width: 100%;
        height: 48vh;
        min-height: 300px;
    }
    /* Painel flui naturalmente embaixo (sem scroll-dentro-de-scroll) */
    .llm-panel {
        width: 100%;
        max-width: none;
        height: auto;
        max-height: none;
        overflow: visible;
    }
    .llm-panel-in {
        padding: 1.8rem 1.4rem 2.4rem;
    }
    .llm-title { font-size: 2em; }
}
