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

/* ------ 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: 8px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,.15) !important;
    padding: 0 !important;
}

.leaflet-popup-content {
    margin: 14px !important;
}

/* ------ 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: 'Helvetica Neue', Arial, sans-serif;
}

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

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

.ll-single-name {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0 0 8px;
}

.ll-single-cat {
    display: inline-block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #888;
    border: 1px solid #ddd;
    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: #888;
    margin-top: 2px;
}

.ll-single-field-content {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

.ll-single-field-content strong {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #aaa;
    margin-bottom: 2px;
}

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

.ll-single-btn {
    padding: 12px 24px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    border-radius: 4px;
    text-decoration: none;
    transition: all .2s;
    display: inline-block;
}

.ll-single-btn--primary {
    background: #1a1a1a;
    color: #fff;
}

.ll-single-btn--primary:hover { background: #333; 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%;
}

.ll-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #888;
    text-decoration: none;
    margin-bottom: 24px;
    transition: color .2s;
}

.ll-back-link:hover { color: #1a1a1a; }

@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; }
}
