/* ════════════════════════════════════════════════════════
   Dona Neide Resolve — Marketplace público de diaristas
   ════════════════════════════════════════════════════════ */

:root {
    --mk-blue-950: #09183f;
    --mk-blue-800: #2653d4;
    --mk-blue-100: #e7efff;
    --mk-green-600: #0fa96b;
    --mk-green-500: #19c37d;
    --mk-green-50:  #f0fdf8;
    --mk-slate-900: #0f172a;
    --mk-slate-700: #334155;
    --mk-slate-500: #64748b;
    --mk-slate-200: #e2e8f0;
    --mk-slate-100: #f1f5f9;
    --mk-white:     #ffffff;
    --mk-yellow:    #f59e0b;
    /* Laranja da logo — gradiente do botão Filtrar */
    --mk-orange-600: #d97706;
    --mk-shadow-sm: 0 2px 8px rgba(15,23,42,0.07);
    --mk-shadow-md: 0 8px 24px rgba(15,23,42,0.10);
    --mk-shadow-lg: 0 16px 40px rgba(15,23,42,0.13);
    --mk-radius:    20px;
    --mk-radius-sm: 14px;
}

/* ── Layout geral ── */
.mk-body {
    background: #f5f7fb;
    color: var(--mk-slate-900);
    font-family: 'Nunito', sans-serif;
}

.mk-main {
    min-height: calc(100vh - 74px - 64px);
}

.mk-footer {
    background: var(--mk-white);
    border-top: 1px solid var(--mk-slate-200);
    padding: 1.25rem 0;
    color: var(--mk-slate-500);
    font-size: 0.88rem;
}

/* ── Nav actions ── */
.mk-nav-actions {
    gap: 0.75rem;
}

/* ── Barra de filtros ── */
.mk-filter-section {
    background: linear-gradient(140deg, var(--mk-blue-950) 0%, #1d3a8a 100%);
    padding: 1.6rem 0;
    position: sticky;
    top: 74px;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(9,24,63,0.22);
}

.mk-filter-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.mk-filter-search {
    display: flex;
    align-items: center;
    flex: 1 1 260px;
    background: rgba(255,255,255,0.96);
    border-radius: var(--mk-radius-sm);
    border: 1.5px solid rgba(255,255,255,0.3);
    overflow: hidden;
    min-height: 50px;
}

.mk-filter-icon {
    flex-shrink: 0;
    padding: 0 0.6rem 0 1rem;
    color: var(--mk-blue-800);
    font-size: 0.9rem;
}

.mk-filter-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 0.75rem 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--mk-slate-900);
    font-family: inherit;
}

.mk-filter-input::placeholder {
    color: var(--mk-slate-500);
    font-weight: 500;
}

.mk-filter-selects {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.mk-filter-select {
    height: 50px;
    padding: 0 1rem;
    border-radius: var(--mk-radius-sm);
    border: 1.5px solid rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.12);
    color: var(--mk-white);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    outline: none;
    cursor: pointer;
    min-width: 148px;
}

.mk-filter-select option {
    background: var(--mk-blue-950);
    color: var(--mk-white);
}

.mk-filter-btn {
    height: 50px;
    padding: 0 1.4rem;
    border-radius: var(--mk-radius-sm);
    border: none;
    background: linear-gradient(135deg, var(--mk-orange-600), var(--mk-yellow));
    color: var(--mk-white);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.mk-filter-btn:hover {
    opacity: 0.9;
}

/* ── Texto introdutório (listagem pública / autenticada) ── */
.mk-listing-lede {
    max-width: 48rem;
    margin-bottom: 0.75rem;
}

.mk-listing-lede p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--mk-slate-600);
    line-height: 1.55;
}

/* ── Cabeçalho de resultados ── */
.mk-results-header {
    padding: 1.75rem 0 0.5rem;
}

.mk-results-meta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.mk-results-title {
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--mk-slate-900);
    margin: 0 0 0.25rem;
    line-height: 1.15;
}

.mk-results-local {
    color: var(--mk-blue-800);
}

.mk-results-count {
    margin: 0;
    color: var(--mk-slate-500);
    font-size: 0.92rem;
    font-weight: 600;
}

.mk-results-clear {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--mk-slate-500);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--mk-slate-200);
    background: var(--mk-white);
    transition: color 0.2s, border-color 0.2s;
}

.mk-results-clear:hover {
    color: var(--mk-slate-900);
    border-color: var(--mk-slate-900);
    text-decoration: none;
}

/* ── Seção de listagem ── */
.mk-listing-section {
    padding: 1.5rem 0 4rem;
}

/* ── Grid de cards ── */
.mk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* ── Card individual ── */
.mk-card {
    background: var(--mk-white);
    border-radius: var(--mk-radius);
    border: 1px solid rgba(148,163,184,0.16);
    box-shadow: var(--mk-shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.mk-card:hover {
    box-shadow: var(--mk-shadow-lg);
    transform: translateY(-3px);
}

/* Foto + badge no topo */
.mk-card-media {
    position: relative;
    background: linear-gradient(135deg, var(--mk-blue-950) 0%, #1d3a8a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1.5rem 0;
}

.mk-card-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.9);
    box-shadow: 0 4px 16px rgba(9,24,63,0.3);
    display: block;
}

.mk-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.mk-badge-verified {
    background: rgba(25,195,125,0.18);
    color: #0b6d46;
    border: 1px solid rgba(25,195,125,0.35);
}
.mk-badge.plan-badge--pro {
    background: rgba(37,99,235,0.16);
    color: #1d4ed8;
    border: 1px solid rgba(37,99,235,0.35);
}
.mk-badge.plan-badge--highlight {
    background: linear-gradient(135deg,#f59e0b,#fbbf24);
    color: #fff;
    border: 1px solid #f59e0b;
    box-shadow: 0 4px 12px rgba(245,158,11,.25);
}

/* Corpo do card */
.mk-card-body {
    flex: 1;
    padding: 1.25rem 1.25rem 0.75rem;
}

.mk-card-header {
    margin-bottom: 0.7rem;
}

.mk-card-name {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--mk-slate-900);
    margin: 0 0 0.2rem;
    line-height: 1.2;
}

.mk-card-location {
    font-size: 0.82rem;
    color: var(--mk-slate-500);
    font-weight: 600;
}

.mk-card-location i {
    font-size: 0.75rem;
    margin-right: 0.1rem;
}

/* Rating */
.mk-card-rating {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.mk-stars { display: inline-flex; gap: 0.1rem; }

.mk-star       { color: var(--mk-yellow); font-size: 0.8rem; }
.mk-star-empty { color: var(--mk-slate-200); font-size: 0.8rem; }

.mk-rating-value {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--mk-slate-900);
}

.mk-rating-count {
    font-size: 0.8rem;
    color: var(--mk-slate-500);
}

.mk-rating-new {
    font-size: 0.8rem;
    color: var(--mk-slate-500);
    font-weight: 700;
}

/* Disponibilidade */
.mk-card-availability {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.mk-avail-ok {
    background: var(--mk-green-50);
    color: #0a7a4e;
    border: 1px solid rgba(25,195,125,0.28);
}

.mk-avail-none {
    background: var(--mk-slate-100);
    color: var(--mk-slate-500);
    border: 1px solid var(--mk-slate-200);
}

.mk-avail-on-request {
    background: #fff7ed;
    color: #b45309;
    border: 1px solid #fde68a;
}

/* Serviços e preço */
.mk-card-services {
    font-size: 0.83rem;
    color: var(--mk-slate-500);
    margin: 0 0 0.4rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mk-card-price {
    font-size: 0.88rem;
    color: var(--mk-slate-700);
    margin: 0;
    font-weight: 600;
}

.mk-card-price strong {
    color: var(--mk-slate-900);
    font-weight: 900;
}

/* Rodapé do card */
.mk-card-footer {
    padding: 0.75rem 1.25rem 1.25rem;
}

/* ── Botões ── */
.mk-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--mk-radius-sm);
    background: linear-gradient(135deg, var(--mk-orange-600) 0%, var(--mk-yellow) 100%);
    color: var(--mk-white);
    font-weight: 800;
    font-size: 0.92rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
    font-family: inherit;
}

.mk-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    text-decoration: none;
    color: var(--mk-white);
}

.mk-body .btn.btn-primary {
    background: linear-gradient(135deg, var(--mk-orange-600), var(--mk-yellow));
    border-color: var(--mk-orange-600);
    color: var(--mk-white);
    box-shadow: 0 8px 22px rgba(217, 119, 6, 0.22);
}

.mk-body .btn.btn-primary:hover,
.mk-body .btn.btn-primary:focus {
    background: linear-gradient(135deg, #b45309 0%, var(--mk-orange-600) 55%, var(--mk-yellow) 100%);
    border-color: #b45309;
    color: var(--mk-white);
    box-shadow: 0 10px 26px rgba(217, 119, 6, 0.28);
}

.mk-btn-full {
    width: 100%;
}

/* ── Estado vazio ── */
.mk-empty-state {
    text-align: center;
    padding: 4rem 1rem;
    max-width: 420px;
    margin: 0 auto;
}

.mk-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--mk-blue-100);
    color: var(--mk-blue-800);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
}

.mk-empty-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--mk-slate-900);
    margin-bottom: 0.6rem;
}

.mk-empty-text {
    color: var(--mk-slate-500);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* ── CTA de cadastro ── */
.mk-cta-register {
    margin-top: 3rem;
}

.mk-cta-register-inner {
    background: linear-gradient(135deg, var(--mk-blue-950) 0%, #1d3a8a 100%);
    border-radius: var(--mk-radius);
    padding: 2rem 2.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    box-shadow: var(--mk-shadow-lg);
}

.mk-cta-register-copy h3 {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--mk-white);
    margin: 0 0 0.35rem;
}

.mk-cta-register-copy p {
    margin: 0;
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ── Toggle mapa / lista ── */
.mk-view-toggle {
    display: flex;
    gap: 0.4rem;
    background: var(--mk-slate-100);
    border-radius: 12px;
    padding: 4px;
}

.mk-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1.1rem;
    border-radius: 9px;
    border: none;
    background: transparent;
    color: var(--mk-slate-500);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    white-space: nowrap;
}

.mk-toggle-btn.active {
    background: var(--mk-white);
    color: var(--mk-slate-900);
    box-shadow: 0 1px 6px rgba(15,23,42,0.10);
}

.mk-toggle-btn:hover:not(.active) {
    color: var(--mk-slate-700);
}

/* ── Disclaimer ── */
.mk-map-disclaimer {
    background: #fefce8;
    border-bottom: 1px solid #fde68a;
    padding: 0.6rem 0;
}

.mk-map-disclaimer p {
    margin: 0;
    font-size: 0.83rem;
    color: #92400e;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mk-map-disclaimer i {
    color: #b45309;
    flex-shrink: 0;
}

/* ── Canvas do mapa ── */
#mk-map-canvas {
    width: 100% !important;
    height: 520px !important;
    background: #dce8f0 !important;
    display: block !important;
    position: relative !important;
    z-index: 1 !important;
    overflow: hidden !important;
}

/* Garante que os tiles e controles do Leaflet apareçam */
#mk-map-canvas .leaflet-pane,
#mk-map-canvas .leaflet-top,
#mk-map-canvas .leaflet-bottom {
    z-index: 400;
}
#mk-map-canvas .leaflet-tile-pane {
    opacity: 1 !important;
}

/* ── Pin customizado no mapa ── */
.mk-pin {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    filter: drop-shadow(0 4px 8px rgba(9,24,63,0.40));
    transition: filter 0.18s ease;
}

.mk-pin:hover {
    filter: drop-shadow(0 6px 14px rgba(9,24,63,0.55));
}

.mk-pin-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    overflow: hidden;
    background: var(--mk-blue-800);
    flex-shrink: 0;
}

.mk-pin-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.18s ease;
}

.mk-pin:hover .mk-pin-avatar img {
    transform: scale(1.08);
}

.mk-pin-stem {
    width: 4px;
    height: 9px;
    background: #ffffff;
    border-radius: 0 0 2px 2px;
}

.mk-pin-point {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 9px solid #ffffff;
}

/* ── Popup do mapa ── */
.leaflet-popup-content-wrapper {
    border-radius: 16px !important;
    box-shadow: 0 12px 36px rgba(9,24,63,0.18) !important;
    padding: 0 !important;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0 !important;
    width: auto !important;
}

.leaflet-popup-tip-container {
    margin-top: -1px;
}

.mk-map-popup {
    display: flex;
    flex-direction: column;
    min-width: 210px;
    max-width: 230px;
    font-family: 'Nunito', sans-serif;
}

.mkp-photo {
    width: 100%;
    height: 110px;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.mkp-body {
    padding: 0.85rem 1rem 1rem;
}

.mkp-name {
    display: block;
    font-size: 0.97rem;
    font-weight: 900;
    color: var(--mk-slate-900);
    margin-bottom: 0.2rem;
    line-height: 1.2;
}

.mkp-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 800;
    color: #0a7a4e;
    background: var(--mk-green-50);
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    margin-bottom: 0.4rem;
}

.mkp-meta {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.4rem;
}

.mkp-rating {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--mk-slate-900);
}

.mkp-rating-new {
    font-size: 0.78rem;
    color: var(--mk-slate-500);
    font-weight: 700;
}

.mkp-count {
    font-size: 0.76rem;
    color: var(--mk-slate-500);
}

.mkp-avail {
    font-size: 0.78rem;
    font-weight: 700;
    color: #0a7a4e;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.mkp-price {
    font-size: 0.82rem;
    color: var(--mk-slate-600);
    margin-bottom: 0.75rem;
}

.mkp-price strong {
    color: var(--mk-slate-900);
    font-weight: 900;
}

.mkp-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.6rem 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--mk-orange-600), var(--mk-yellow));
    color: var(--mk-white);
    font-weight: 800;
    font-size: 0.86rem;
    text-decoration: none;
    transition: opacity 0.2s;
}

.mkp-btn:hover {
    opacity: 0.9;
    color: var(--mk-white);
    text-decoration: none;
}

/* ── CTA flutuante sobre o mapa ── */
.mk-map-cta-overlay {
    background: var(--mk-white);
    border-top: 1px solid var(--mk-slate-200);
    padding: 1rem 0;
    box-shadow: 0 -4px 16px rgba(15,23,42,0.07);
}

.mk-map-cta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.mk-map-cta-bar strong {
    display: block;
    font-size: 0.97rem;
    font-weight: 900;
    color: var(--mk-slate-900);
    margin-bottom: 0.15rem;
}

.mk-map-cta-bar span {
    font-size: 0.85rem;
    color: var(--mk-slate-500);
}

/* ── Responsividade ── */
@media (max-width: 991.98px) {
    .mk-filter-section {
        top: 0;
        position: relative;
    }
}

@media (max-width: 767.98px) {
    #mk-map-canvas {
        height: 380px;
    }

    .mk-map-cta-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .mk-map-cta-bar .mk-btn-primary {
        width: 100%;
        justify-content: center;
    }

    .mk-results-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .mk-filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .mk-filter-search {
        flex: unset;
        width: 100%;
    }

    .mk-filter-selects {
        flex-direction: column;
    }

    .mk-filter-select {
        width: 100%;
    }

    @media (min-width: 414px) {
        .mk-filter-selects {
            flex-direction: row;
            flex-wrap: nowrap;
        }

        .mk-filter-select {
            flex: 1 1 0;
            min-width: 0;
            width: auto;
        }
    }

    .mk-filter-btn {
        width: 100%;
        justify-content: center;
    }

    .mk-grid {
        grid-template-columns: 1fr;
    }

    .mk-cta-register-inner {
        flex-direction: column;
        text-align: center;
    }

    .mk-cta-register-inner .mk-btn-primary {
        width: 100%;
    }

    .mk-results-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}
