/* ==========================================
   PERTO DE MIM - Page Styles
   ========================================== */

.perto-de-mim {
    padding-top: 80px;
    min-height: 100vh;
    background: #fafafa;
}

/* Header da página */
.pdm-header {
    background: linear-gradient(135deg, var(--cor-primaria, #B47E8B), #96657A);
    padding: 48px 24px 32px;
    color: white;
}
.pdm-header-inner {
    max-width: 1280px;
    margin: 0 auto;
}
.pdm-header h1 {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}
.pdm-header p {
    font-size: 16px;
    opacity: 0.85;
    max-width: 600px;
}

/* Filtros */
.pdm-filtros {
    max-width: 1280px;
    margin: -24px auto 0;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}
.pdm-filtros-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border: 1px solid #e4e4e7;
}
.pdm-filtros-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}
.pdm-filter-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}
.pdm-filter-input,
.pdm-filter-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    font-size: 14px;
    color: #18181b;
    background: #fafafa;
    outline: none;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}
.pdm-filter-input:focus,
.pdm-filter-select:focus {
    border-color: var(--cor-primaria, #B47E8B);
    box-shadow: 0 0 0 3px rgba(180,126,139,0.15);
    background: white;
}
.pdm-filter-input::placeholder {
    color: #a1a1aa;
}
.pdm-btn-buscar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: var(--cor-primaria, #B47E8B);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    height: 46px;
}
.pdm-btn-buscar:hover {
    background: var(--cor-primaria-dark, #96657A);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(180,126,139,0.3);
}
.pdm-btn-buscar svg {
    width: 18px;
    height: 18px;
}

/* Categorias */
.pdm-categorias {
    max-width: 1280px;
    margin: 24px auto;
    padding: 0 24px;
}
.pdm-categorias-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.pdm-cat-label {
    font-size: 13px;
    font-weight: 600;
    color: #71717a;
}
.pdm-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border: 1px solid #e4e4e7;
    border-radius: 9999px;
    font-size: 13px;
    color: #52525b;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}
.pdm-cat-btn:hover {
    border-color: var(--cor-primaria, #B47E8B);
    color: var(--cor-primaria, #B47E8B);
}
.pdm-cat-btn.active {
    background: var(--cor-primaria, #B47E8B);
    border-color: var(--cor-primaria, #B47E8B);
    color: white;
}
.pdm-cat-btn img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
}

/* Mapa */
.pdm-mapa-section {
    max-width: 1280px;
    margin: 0 auto 32px;
    padding: 0 24px;
}
.pdm-mapa-wrapper {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e4e4e7;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.pdm-mapa-container {
    width: 100%;
    height: 450px;
    background: #e4e4e7;
    position: relative;
}
.pdm-mapa-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.9);
    z-index: 5;
}
.pdm-mapa-loading.hidden {
    display: none;
}
.pdm-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e4e4e7;
    border-top-color: var(--cor-primaria, #B47E8B);
    border-radius: 50%;
    animation: pdm-spin 0.8s linear infinite;
}
@keyframes pdm-spin {
    to { transform: rotate(360deg); }
}

/* Listagem */
.pdm-lista-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 64px;
}
.pdm-lista-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.pdm-lista-count {
    font-size: 14px;
    color: #71717a;
}
.pdm-lista-count strong {
    color: #18181b;
}
.pdm-lista-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Card do ponto */
.pdm-card {
    background: white;
    border: 1px solid #e4e4e7;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.pdm-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: var(--cor-primaria, #B47E8B);
}
.pdm-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f4f4f5;
}
.pdm-card-img-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #f4f4f5, #e4e4e7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a1a1aa;
}
.pdm-card-img-placeholder svg {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}
.pdm-card-body {
    padding: 20px;
}
.pdm-card-categoria {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(180,126,139,0.1);
    color: var(--cor-primaria, #B47E8B);
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}
.pdm-card-nome {
    font-size: 18px;
    font-weight: 700;
    color: #18181b;
    margin-bottom: 8px;
    line-height: 1.3;
}
.pdm-card-endereco {
    font-size: 13px;
    color: #71717a;
    line-height: 1.5;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.pdm-card-endereco svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 1px;
    color: #a1a1aa;
}
.pdm-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid #f4f4f5;
}
.pdm-card-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #71717a;
}
.pdm-card-meta-item svg {
    width: 14px;
    height: 14px;
}
.pdm-card-distancia {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: var(--cor-primaria, #B47E8B);
}

/* Paginação */
.pdm-paginacao {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}
.pdm-pag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: white;
    border: 1px solid #e4e4e7;
    border-radius: 10px;
    font-size: 14px;
    color: #71717a;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}
.pdm-pag-btn:hover {
    border-color: var(--cor-primaria, #B47E8B);
    color: var(--cor-primaria, #B47E8B);
}
.pdm-pag-btn.active {
    background: var(--cor-primaria, #B47E8B);
    border-color: var(--cor-primaria, #B47E8B);
    color: white;
}
.pdm-pag-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Mensagem quando vazio */
.pdm-empty {
    text-align: center;
    padding: 80px 24px;
    grid-column: 1 / -1;
}
.pdm-empty svg {
    width: 64px;
    height: 64px;
    color: #d4d4d8;
    margin-bottom: 16px;
}
.pdm-empty h3 {
    font-size: 18px;
    font-weight: 700;
    color: #18181b;
    margin-bottom: 8px;
}
.pdm-empty p {
    font-size: 14px;
    color: #71717a;
}

/* CTA email */
.pdm-cta-email {
    max-width: 1280px;
    margin: 0 auto 32px;
    padding: 0 24px;
}
.pdm-cta-email-inner {
    text-align: center;
    padding: 24px;
    background: white;
    border: 1px solid #e4e4e7;
    border-radius: 16px;
    font-size: 14px;
    color: #71717a;
}
.pdm-cta-email a {
    color: var(--cor-primaria, #B47E8B);
    border-bottom: 1px solid var(--cor-primaria, #B47E8B);
    font-weight: 600;
    transition: opacity 0.2s;
}
.pdm-cta-email a:hover {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 1024px) {
    .pdm-lista-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .pdm-filtros-grid {
        grid-template-columns: 1fr;
    }
    .pdm-lista-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
    }
    .pdm-mapa-container {
        height: 300px;
    }
    .pdm-header {
        padding: 32px 24px 24px;
    }
}

/* Map custom markers */
.pdm-marker {
    background: var(--cor-primaria, #B47E8B);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    cursor: pointer;
}
.pdm-marker::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: 6px solid var(--cor-primaria, #B47E8B);
}

/* Info window do mapa */
.pdm-infowindow {
    font-family: 'Inter', sans-serif;
    padding: 4px;
}
.pdm-infowindow h4 {
    font-size: 14px;
    font-weight: 700;
    color: #18181b;
    margin-bottom: 4px;
}
.pdm-infowindow p {
    font-size: 12px;
    color: #71717a;
    margin: 0;
}
.pdm-infowindow a {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--cor-primaria, #B47E8B);
}

/* ==========================================
   MODAL - Detalhe do Ponto
   ========================================== */
.pdm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: pdmFadeIn 0.3s ease;
}
.pdm-modal-overlay.open {
    display: flex;
}
@keyframes pdmFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pdm-modal {
    background: white;
    border-radius: 20px;
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
    animation: pdmSlideUp 0.3s ease;
}
@keyframes pdmSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.pdm-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.06);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}
.pdm-modal-close:hover {
    background: rgba(0,0,0,0.12);
}
.pdm-modal-close svg {
    width: 16px;
    height: 16px;
    color: #52525b;
}

.pdm-modal-badge-row {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    gap: 8px;
    z-index: 10;
}
.pdm-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}
.pdm-modal-badge svg {
    width: 14px;
    height: 14px;
}
.pdm-modal-badge.verificado {
    background: rgba(34,197,94,0.9);
    color: white;
}
.pdm-modal-badge.nao-verificado {
    background: rgba(239,68,68,0.9);
    color: white;
}

.pdm-modal-foto {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
    background: #f4f4f5;
}
.pdm-modal-foto-placeholder {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #f4f4f5, #e4e4e7);
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a1a1aa;
}
.pdm-modal-foto-placeholder svg {
    width: 64px;
    height: 64px;
    opacity: 0.4;
}

.pdm-modal-body {
    padding: 24px;
}

.pdm-modal-titulo {
    font-size: 22px;
    font-weight: 800;
    color: #18181b;
    margin-bottom: 12px;
    line-height: 1.3;
    padding-right: 40px;
}

.pdm-modal-categoria {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(180,126,139,0.1);
    color: var(--cor-primaria, #B47E8B);
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.pdm-modal-endereco {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: #52525b;
    line-height: 1.6;
    margin-bottom: 16px;
}
.pdm-modal-endereco svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    color: #a1a1aa;
}

.pdm-modal-descricao {
    font-size: 14px;
    color: #71717a;
    line-height: 1.7;
    margin-bottom: 20px;
}

.pdm-modal-info-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.pdm-modal-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #52525b;
}
.pdm-modal-info-item svg {
    width: 16px;
    height: 16px;
    color: #a1a1aa;
}
.pdm-modal-info-item a {
    color: var(--cor-primaria, #B47E8B);
    font-weight: 600;
}

.pdm-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #f4f4f5;
}
.pdm-modal-reivindicar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: rgba(180,126,139,0.08);
    border: 1px solid rgba(180,126,139,0.25);
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    color: #7a4f60;
    transition: all 0.2s;
}
.pdm-modal-reivindicar:hover {
    background: rgba(180,126,139,0.15);
    border-color: rgba(180,126,139,0.5);
}
.pdm-modal-reivindicar svg {
    width: 16px;
    height: 16px;
}
.pdm-modal-link-externo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cor-primaria, #B47E8B);
    transition: opacity 0.2s;
}
.pdm-modal-link-externo:hover {
    opacity: 0.8;
}
.pdm-modal-link-externo svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 640px) {
    .pdm-modal {
        max-height: 95vh;
        border-radius: 16px;
    }
    .pdm-modal-foto,
    .pdm-modal-foto-placeholder {
        height: 200px;
        border-radius: 16px 16px 0 0;
    }
    .pdm-modal-body {
        padding: 20px;
    }
    .pdm-modal-titulo {
        font-size: 18px;
    }
    .pdm-modal-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    .pdm-modal-reivindicar,
    .pdm-modal-link-externo {
        justify-content: center;
    }
}