/* ============================================================
   PÍDELO POR WHATS — ESTILOS GENERALES
   Archivo: assets/css/estilos.css
   ============================================================ */

/* ---------- Variables ---------- */
:root {
    --verde: #04873D;
    --verde-oscuro: #09331E;
    --naranja: #F36510;
    --amarillo: #FAC711;
    --crema: #FBF6E4;
    --crema-oscuro: #EDE7D3;
    --blanco: #FFFFFF;
    --texto: #09331E;
    --texto-suave: #3C4E44;

    --borde: 4px solid var(--verde-oscuro);
    --borde-delgado: 3px solid var(--verde-oscuro);
    --sombra: 5px 5px 0 var(--verde-oscuro);
    --sombra-grande: 8px 8px 0 var(--verde-oscuro);
    --radio: 22px;

    --fuente-titulo: 'Baloo 2', system-ui, sans-serif;
    --fuente-texto: 'Nunito Sans', system-ui, sans-serif;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--crema);
    color: var(--texto);
    font-family: var(--fuente-texto);
    font-size: 17px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--verde);
}

a:hover {
    color: var(--verde-oscuro);
}

h1,
h2,
h3 {
    margin: 0;
    font-family: var(--fuente-titulo);
    font-weight: 800;
    line-height: 1.05;
}

p {
    margin: 0;
}

:focus-visible {
    outline: 3px solid var(--naranja);
    outline-offset: 3px;
}

.contenedor {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.puntos {
    background-image: radial-gradient(rgba(9, 51, 30, 0.10) 1.6px, transparent 1.7px);
    background-size: 18px 18px;
}

.puntos--claros {
    background-image: radial-gradient(rgba(251, 246, 228, 0.12) 1.6px, transparent 1.7px);
}

.icono {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* ---------- Botones ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 14px 24px;
    border: var(--borde);
    border-radius: 16px;
    box-shadow: var(--sombra);
    font-family: var(--fuente-texto);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.1;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 3px 3px 0 var(--verde-oscuro);
}

.btn:active {
    transform: translate(5px, 5px);
    box-shadow: none;
}

.btn--chico {
    min-height: 44px;
    padding: 10px 18px;
    font-size: 16px;
    border: var(--borde-delgado);
    border-radius: 12px;
    box-shadow: 3px 3px 0 var(--verde-oscuro);
}

.btn--verde,
.btn--verde:hover {
    background: var(--verde);
    color: var(--blanco);
}

.btn--naranja,
.btn--naranja:hover {
    background: var(--naranja);
    color: var(--blanco);
}

.btn--blanco,
.btn--blanco:hover {
    background: var(--blanco);
    color: var(--verde-oscuro);
}

.btn[disabled] {
    opacity: 0.6;
    cursor: wait;
}

/* ---------- Encabezado ---------- */
.encabezado {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--blanco);
    border-bottom: var(--borde);
}

.encabezado__fila {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.encabezado__logo img {
    height: 64px;
    width: auto;
}

.encabezado__nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.encabezado__link {
    color: var(--verde-oscuro);
    font-weight: 800;
    text-decoration: none;
}

/* ---------- Portada ---------- */
.hero {
    background-color: var(--amarillo);
    border-bottom: var(--borde);
}

.hero__fila {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 48px;
    padding-top: 64px;
    padding-bottom: 64px;
}

.hero__texto {
    flex: 999 1 480px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.etiqueta {
    align-self: flex-start;
    background: var(--blanco);
    border: var(--borde-delgado);
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 15px;
    font-weight: 800;
}

.hero__titulo {
    font-size: clamp(40px, 6vw, 68px);
    line-height: 0.98;
}

.hero__sub {
    max-width: 560px;
    font-size: 20px;
    line-height: 1.45;
}

.hero__botones {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero__muestra {
    flex: 1 1 320px;
    min-width: 0;
    display: flex;
    justify-content: center;
}

/* Tarjeta de ejemplo del mensaje */
.mensaje {
    width: 100%;
    max-width: 380px;
    background: var(--blanco);
    border: var(--borde);
    border-radius: 28px;
    box-shadow: var(--sombra-grande);
    overflow: hidden;
}

.mensaje__cabeza {
    background: var(--verde-oscuro);
    color: var(--crema);
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 800;
}

.mensaje__fondo {
    padding: 18px;
    background: var(--crema-oscuro);
}

.mensaje__globo {
    background: var(--blanco);
    border-radius: 16px 16px 16px 4px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 1px 0 rgba(9, 51, 30, 0.15);
}

.mensaje__titulo {
    font-weight: 800;
}

.mensaje__titulo--sep {
    margin-top: 8px;
}

.mensaje__nota {
    margin-top: 8px;
    color: var(--texto-suave);
}

/* ---------- Secciones ---------- */
.seccion {
    padding: 64px 0;
}

.seccion--blanca {
    background: var(--blanco);
    border-top: var(--borde);
    border-bottom: var(--borde);
}

.seccion__cabeza {
    margin-bottom: 24px;
}

.seccion__titulo {
    font-size: clamp(32px, 4vw, 44px);
    line-height: 1;
}

.seccion__titulo--centro {
    text-align: center;
    margin-bottom: 28px;
}

.seccion__sub {
    margin-top: 6px;
    color: var(--texto-suave);
}

/* ---------- Filtros del directorio ---------- */
.filtros {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
    background: var(--blanco);
    border: var(--borde);
    border-radius: var(--radio);
}

.filtros__fila {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.filtros__o {
    font-weight: 800;
    color: var(--texto-suave);
}

.filtros__cp {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    flex: 1 1 300px;
}

.filtros__label {
    font-size: 15px;
    font-weight: 800;
}

.campo {
    flex: 1 1 200px;
    max-width: 360px;
    min-height: 48px;
    padding: 10px 14px;
    border: var(--borde-delgado);
    border-radius: 12px;
    background: var(--crema);
    color: var(--texto);
    font-family: inherit;
    font-size: 16px;
}

.campo--cp {
    flex: 0 0 auto;
    width: 120px;
    font-weight: 800;
    letter-spacing: 2px;
    text-align: center;
}

.filtros__giros {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 16px;
    border: var(--borde-delgado);
    border-radius: 999px;
    background: var(--blanco);
    color: var(--verde-oscuro);
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
}

.chip:hover {
    background: var(--crema);
    color: var(--verde-oscuro);
}

.chip--activo,
.chip--activo:hover {
    background: var(--verde-oscuro);
    color: var(--blanco);
}

.filtros__estado {
    font-size: 15px;
    font-weight: 700;
    color: var(--texto-suave);
}

.filtros__estado:empty {
    display: none;
}

[hidden] {
    display: none !important;
}

/* ---------- Mapa y barra de distancia ---------- */
.mapa-panel {
    margin-bottom: 24px;
    background: var(--blanco);
    border: var(--borde);
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    overflow: hidden;
}

.mapa {
    width: 100%;
    height: 380px;
    background: var(--crema-oscuro);
    border-bottom: var(--borde);
}

.radio {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px 14px;
}

.radio__label {
    font-size: 16px;
    font-weight: 700;
}

.radio__label strong {
    font-family: var(--fuente-titulo);
    font-size: 22px;
    color: var(--verde);
}

.radio__fila {
    display: flex;
    align-items: center;
    gap: 12px;
}

.radio__btn {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: var(--borde-delgado);
    border-radius: 12px;
    background: var(--amarillo);
    color: var(--verde-oscuro);
    font-family: var(--fuente-titulo);
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.radio__btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.radio__barra {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px;
    accent-color: var(--verde);
    cursor: pointer;
}

.radio__marcas {
    display: flex;
    justify-content: space-between;
    padding: 0 56px;
    font-size: 13px;
    font-weight: 700;
    color: var(--texto-suave);
}

/* Pines del mapa */
.pin {
    background: none;
    border: none;
}

.pin__punto {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 3px solid var(--verde-oscuro);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 2px 2px 0 var(--verde-oscuro);
}

.pin__txt {
    transform: rotate(45deg);
    color: var(--blanco);
    font-family: var(--fuente-titulo);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
}

.pin-centro {
    background: none;
    border: none;
}

.pin-centro__punto {
    display: block;
    width: 26px;
    height: 26px;
    border: 4px solid var(--blanco);
    border-radius: 50%;
    background: #1F5FA8;
    box-shadow: 0 0 0 3px rgba(31, 95, 168, 0.35);
}

/* Ventana del pin */
.popup {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 170px;
    font-family: var(--fuente-texto);
}

.popup__nombre {
    font-family: var(--fuente-titulo);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--verde-oscuro);
}

.popup__meta {
    font-size: 13px;
    font-weight: 700;
    color: var(--texto-suave);
}

.leaflet-container a.popup__btn,
.leaflet-container a.popup__btn:hover {
    margin-top: 4px;
    color: var(--blanco);
}

.leaflet-popup-content-wrapper {
    border: var(--borde-delgado);
    border-radius: 16px;
}

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

.leaflet-popup-content .popup p {
    margin: 0;
}

/* ---------- Tarjetas de negocios ---------- */
.rejilla {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.tarjeta {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    background: var(--blanco);
    border: var(--borde);
    border-radius: var(--radio);
    box-shadow: var(--sombra);
}

.tarjeta__cabeza {
    display: flex;
    align-items: center;
    gap: 14px;
}

.avatar {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: var(--borde-delgado);
    border-radius: 16px;
    color: var(--blanco);
    font-family: var(--fuente-titulo);
    font-size: 22px;
    font-weight: 800;
}

.avatar--img {
    object-fit: cover;
    background: var(--blanco);
}

.tarjeta__info {
    min-width: 0;
}

.tarjeta__nombre {
    font-size: 21px;
    overflow-wrap: anywhere;
}

.tarjeta__meta {
    font-size: 14px;
    font-weight: 700;
    color: var(--texto-suave);
}

.tarjeta__pie {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}

.pastilla {
    min-width: 0;
    padding: 4px 12px;
    background: var(--crema);
    border: 2px solid var(--verde-oscuro);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vacio {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 40px 20px;
    background: var(--blanco);
    border: 4px dashed var(--verde-oscuro);
    border-radius: var(--radio);
    text-align: center;
}

.vacio__titulo {
    font-family: var(--fuente-titulo);
    font-size: 26px;
    font-weight: 800;
}

/* ---------- Cómo funciona ---------- */
.pasos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.paso {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
    background: var(--crema);
    border: var(--borde);
    border-radius: var(--radio);
}

.paso__num {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: var(--borde-delgado);
    border-radius: 50%;
    font-family: var(--fuente-titulo);
    font-size: 26px;
    font-weight: 800;
}

.paso__num--naranja {
    background: var(--naranja);
    color: var(--blanco);
}

.paso__num--amarillo {
    background: var(--amarillo);
    color: var(--verde-oscuro);
}

.paso__num--verde {
    background: var(--verde);
    color: var(--blanco);
}

.paso__titulo {
    font-size: 24px;
}

/* ---------- Para negocios ---------- */
.negocios {
    background-color: var(--verde);
}

.negocios__fila {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    padding-top: 64px;
    padding-bottom: 64px;
}

.negocios__texto {
    flex: 999 1 460px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    color: var(--blanco);
}

.negocios__titulo {
    font-size: clamp(32px, 4.5vw, 50px);
    line-height: 1;
}

.negocios__sub {
    font-size: 19px;
    line-height: 1.45;
}

.lista-check {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-weight: 700;
}

.lista-check li {
    position: relative;
    padding-left: 30px;
}

.lista-check li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 5px;
    width: 8px;
    height: 14px;
    border: solid var(--amarillo);
    border-width: 0 4px 4px 0;
    transform: rotate(45deg);
}

.afiliacion {
    flex: 1 1 320px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 26px;
    background: var(--blanco);
    border: var(--borde);
    border-radius: 24px;
    box-shadow: 7px 7px 0 var(--verde-oscuro);
}

.afiliacion__titulo {
    font-size: 26px;
}

.afiliacion__tel {
    font-family: var(--fuente-titulo);
    font-size: 26px;
    font-weight: 800;
}

/* ---------- Pie ---------- */
.pie {
    background: var(--verde-oscuro);
    color: var(--crema);
}

.pie__fila {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 14px;
    padding-top: 28px;
    padding-bottom: 28px;
    font-size: 14px;
}

.pie__marca {
    font-weight: 800;
}

.pie__links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.pie__links a {
    color: var(--amarillo);
}

/* ---------- Celular ---------- */
@media (max-width: 640px) {
    body {
        font-size: 16px;
    }

    .encabezado__logo img {
        height: 52px;
    }

    .encabezado__nav {
        gap: 14px;
        font-size: 15px;
    }

    .hero__fila,
    .negocios__fila {
        padding-top: 40px;
        padding-bottom: 40px;
        gap: 32px;
    }

    .hero__sub {
        font-size: 18px;
    }

    .hero__botones .btn {
        width: 100%;
    }

    .seccion {
        padding: 44px 0;
    }

    .campo {
        max-width: none;
    }

    .mapa {
        height: 300px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .btn {
        transition: none;
    }
}
