/* ================== TEXTO ================== */
.texto {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    background-color: #ffffff;
    padding: 1%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    border: 1px solid #ddd;
}

.texto p {
    font-family: 'Arial', sans-serif;
    font-size: 1.06rem;
    line-height: 1.8;
    color: #000000;
    text-align: justify;
    margin-left: 2%;
    max-width: 80%;
}

.texto h1 {
    padding-left: 3.3%;
    font-family: 'Arial', serif;
    margin-bottom: 30px;
    text-align: left;
    font-size: 1.35rem;
    color: #000000;
}

/* ================== MAPA PUNTOS DE VENTA ================== */
.pv {
    --pv-marron: #6B4E24;
    --pv-marron-osc: #4a3518;
    --pv-oro: #d4a853;
    --pv-crema: #F9E79F;
    --pv-crema-claro: #fdf6e3;
    --pv-papel: #fffdf5;
    --pv-borde: rgba(107, 78, 36, 0.18);

    width: 94%;
    max-width: 1280px;
    min-width: 0;
    box-sizing: border-box;
    margin: 24px auto 40px;
    border-radius: 18px;
    overflow: hidden;
    background: var(--pv-papel);
    border: 1px solid var(--pv-borde);
    box-shadow: 0 10px 30px rgba(74, 53, 24, 0.18);
    font-family: Arial, sans-serif;
}

/* Cabecera del mapa */
.pv-cabecera {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--pv-crema) 0%, #f3d77a 100%);
    border-bottom: 3px solid var(--pv-marron);
}

.pv-cabecera img {
    height: 54px;
    width: auto;
    flex-shrink: 0;
}

.pv-cabecera-texto {
    flex: 1;
    min-width: 0;
}

.pv-cabecera-texto h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--pv-marron);
    letter-spacing: 0.3px;
}

.pv-cabecera-texto span {
    font-size: 0.92rem;
    color: var(--pv-marron-osc);
}

.pv-btn-ubicacion {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 30px;
    border: 2px solid var(--pv-marron);
    background: var(--pv-marron);
    color: #fff;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    white-space: nowrap;
}

.pv-btn-ubicacion:hover {
    background: #fff;
    color: var(--pv-marron);
}

.pv-btn-ubicacion:active {
    transform: scale(0.97);
}

/* Cuerpo: lista + mapa */
.pv-cuerpo {
    display: grid;
    grid-template-columns: 340px 1fr;
    height: 640px;
}

.pv-lista {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid var(--pv-borde);
    background: var(--pv-crema-claro);
}

.pv-buscador {
    padding: 14px;
    border-bottom: 1px solid var(--pv-borde);
}

.pv-buscador input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px 11px 38px;
    border-radius: 30px;
    border: 2px solid var(--pv-borde);
    font-size: 0.95rem;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B4E24' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 13px center;
    color: var(--pv-marron-osc);
    outline: none;
    transition: border-color 0.2s;
}

.pv-buscador input:focus {
    border-color: var(--pv-oro);
}

.pv-items {
    flex: 1;
    overflow-y: auto;
    padding: 6px 10px 14px;
    scrollbar-width: thin;
    scrollbar-color: var(--pv-oro) transparent;
}

.pv-zona {
    margin: 14px 6px 6px;
    font-size: 0.78rem;
    font-weight: bold;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--pv-marron);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pv-zona::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--pv-borde);
}

.pv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 10px;
    margin: 3px 0;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.pv-item:hover,
.pv-item:focus-visible {
    background: #fff;
    border-color: var(--pv-borde);
    outline: none;
}

.pv-item.activo {
    background: #fff;
    border-color: var(--pv-oro);
    box-shadow: 0 2px 8px rgba(107, 78, 36, 0.15);
}

.pv-item-icono {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.pv-item-texto {
    min-width: 0;
}

.pv-item-texto strong {
    display: block;
    color: var(--pv-marron-osc);
    font-size: 0.95rem;
}

.pv-item-texto small {
    display: block;
    color: #6f6352;
    font-size: 0.82rem;
    line-height: 1.35;
    margin-top: 2px;
}

.pv-vacio {
    padding: 24px 12px;
    text-align: center;
    color: #8a7a62;
    font-size: 0.92rem;
}

.pv-mapa {
    position: relative;
    min-height: 0;
}

#pv-mapa {
    width: 100%;
    height: 100%;
    background: #f2ead6;
}

/* Tono cálido de la cartografía para que pegue con la web */
#pv-mapa .leaflet-tile-pane {
    filter: grayscale(0.35) sepia(0.32) saturate(0.85) brightness(1.04) contrast(0.95);
}

/* Marcadores */
.pv-marcador {
    background: none;
    border: none;
}

.pv-marcador svg {
    display: block;
    filter: drop-shadow(0 3px 3px rgba(74, 53, 24, 0.35));
    transition: transform 0.18s ease;
    transform-origin: 50% 100%;
}

.pv-marcador:hover svg,
.pv-marcador.activo svg {
    transform: scale(1.18);
}

/* Grupos de marcadores */
.pv-grupo {
    background: none;
}

.pv-grupo div {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--pv-marron, #6B4E24);
    color: #fff;
    border: 3px solid #F9E79F;
    box-shadow: 0 0 0 3px rgba(107, 78, 36, 0.35), 0 4px 10px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.95rem;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

/* Ventana del punto */
.pv-popup .leaflet-popup-content-wrapper {
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(74, 53, 24, 0.25);
}

.pv-popup .leaflet-popup-content {
    margin: 0;
    width: 270px !important;
}

.pv-popup-cab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #F9E79F;
    border-bottom: 2px solid #6B4E24;
}

.pv-popup-cab svg {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}

.pv-popup-cab strong {
    color: #4a3518;
    font-size: 1.05rem;
    font-family: Arial, sans-serif;
}

.pv-popup-cuerpo {
    padding: 12px 14px 14px;
    font-family: Arial, sans-serif;
}

.pv-popup-cuerpo p,
.texto .pv-popup-cuerpo p {
    max-width: none;
    text-align: left;
    font-family: Arial, sans-serif;
    margin: 0 0 12px;
    color: #4a3518;
    font-size: 0.92rem;
    line-height: 1.4;
}

.pv-popup-horario {
    display: block;
    font-size: 0.8rem;
    color: #8a7a62;
    margin-top: 4px;
}

.pv-popup-botones {
    display: flex;
    gap: 8px;
}

.pv-popup-botones a {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 6px;
    border-radius: 24px;
    font-size: 0.8rem;
    white-space: nowrap;
    font-weight: bold;
    text-decoration: none;
    border: 2px solid #6B4E24;
    transition: background 0.15s, color 0.15s;
}

.pv-popup-botones a.principal {
    background: #6B4E24;
    color: #fff !important;
}

.pv-popup-botones a.principal:hover {
    background: #4a3518;
}

.pv-popup-botones a.secundario {
    background: #fff;
    color: #6B4E24 !important;
}

.pv-popup-botones a.secundario:hover {
    background: #fdf6e3;
}

.pv .leaflet-control-attribution {
    font-size: 10px;
    background: rgba(255, 253, 245, 0.85);
}

.pv .leaflet-bar a {
    color: #6B4E24;
}

/* ================== TABLET ================== */
@media (max-width: 1024px) {
    .texto p {
        font-size: 1rem;
        max-width: 90%;
        margin-left: 0;
    }

    .texto h1 {
        font-size: 1.2rem;
        padding-left: 1%;
    }

    .pv-cuerpo {
        grid-template-columns: 290px 1fr;
        height: 580px;
    }
}

/* ================== MÓVILES ================== */
@media (max-width: 768px) {
    .texto {
        grid-template-columns: 1fr;
        padding: 2%;
    }

    .texto p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .texto h1 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .pv {
        width: 100%;
        border-radius: 14px;
        margin: 16px 0 28px;
    }

    .pv-cabecera {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 14px;
    }

    .pv-cabecera img {
        height: 42px;
    }

    .pv-cabecera-texto h2 {
        font-size: 1.05rem;
    }

    .pv-cabecera-texto span {
        font-size: 0.82rem;
    }

    .pv-btn-ubicacion {
        width: 100%;
        justify-content: center;
    }

    .pv-cuerpo {
        display: flex;
        flex-direction: column-reverse;
        height: auto;
    }

    .pv-mapa {
        height: min(62vh, 520px);
        min-height: 340px;
    }

    .pv-lista {
        border-right: none;
        border-top: 1px solid var(--pv-borde);
        max-height: 420px;
    }
}
