/* Tipografía: Anton (letra del logo) para títulos/marca, Inter para el resto — autohospedadas para que se vean igual en todos los navegadores. */
@font-face {
    font-family: 'Anton';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../vendor/fonts/anton-v27-latin-400.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../vendor/fonts/inter-v20-latin-variable.woff2') format('woff2');
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

h1, h2 {
    font-family: 'Anton', sans-serif;
    letter-spacing: 0.01em;
}

.ed-brand-nombre {
    font-family: 'Anton', sans-serif;
    letter-spacing: 0.02em;
}

/* Paleta oficial de marca (extraída del letrero físico El Distrito) — ver /assets/marca/paleta.php */
:root {
    --ed-azul: #16233F;
    --ed-azul-2: #223458;
    --ed-naranja: #C8862B;
    --ed-naranja-2: #A96F22;
    --ed-gris: #F7F4EA;
    --ed-texto: #1A2338;
    --ed-cromo: #AEB4BA;
    --ed-crema: #F3EEDC;
}

.ed-navbar {
    background-color: var(--ed-azul);
}

.ed-login-brand {
    background: linear-gradient(135deg, var(--ed-azul), var(--ed-azul-2));
}

/* Submenús anidados dentro del dropdown "Operación" del navbar privado (ver assets/js/nav-submenu.js) */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-toggle::after {
    float: right;
    margin-top: 0.4em;
    transform: rotate(-90deg);
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -0.25rem;
}

@media (max-width: 991.98px) {
    .dropdown-submenu > .dropdown-menu {
        position: static;
        left: auto;
        top: auto;
        margin-left: 1rem;
        border: 0;
        box-shadow: none;
    }
}

/* ---- Sitio público (index.php / detalle.php) ---- */

.ed-navbar-publica {
    background-color: var(--ed-azul);
}

.ed-hero {
    background: linear-gradient(135deg, var(--ed-azul), var(--ed-azul-2));
    color: #fff;
    padding: 3rem 0 2rem;
}

.ed-hero-titulo {
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: 0.02em;
}

@media (min-width: 768px) {
    .ed-buscador-input {
        width: 360px;
    }
}

.ed-busca-wrap { position: relative; }
.ed-busca-wrap .form-control { padding-right: 2.6rem; }

.ed-busca-x {
    position: absolute;
    right: .6rem;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: #94a3b8;
    color: #fff;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    padding: 0 0 1px 0;
    transition: background .15s, transform .15s;
}
.ed-busca-x.visible { display: flex; }
.ed-busca-x:hover { background: #dc2626; transform: translateY(-50%) scale(1.08); }

.ed-suge-box {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: 60vh;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e9edf0;
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .18);
    z-index: 1030;
    display: none;
    padding: .3rem;
    color: #222;
}
.ed-suge-box.abierto { display: block; }
.ed-suge-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .7rem;
    border-radius: 10px;
    text-decoration: none;
    color: #222;
    cursor: pointer;
}
.ed-suge-item:hover, .ed-suge-item.activo { background: var(--ed-gris); }
.ed-suge-ico { font-size: 1rem; flex-shrink: 0; color: var(--ed-naranja-2); }
.ed-suge-txt { min-width: 0; flex: 1; }
.ed-suge-t { display: block; font-size: .82rem; font-weight: 700; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-suge-n { display: block; font-size: .71rem; color: #5a6570; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .05rem; }
.ed-suge-vacio { padding: .8rem .7rem; font-size: .8rem; color: #5a6570; text-align: center; }
.ed-suge-todo {
    display: block;
    text-align: center;
    font-size: .76rem;
    font-weight: 700;
    color: var(--ed-azul);
    padding: .5rem;
    border-top: 1px solid #f0f2f4;
    margin-top: .2rem;
    text-decoration: none;
}

/* Buscador flotante: aparece bajo el navbar (sticky-top) al pasar el buscador
   del hero al subir el scroll, y se oculta/asoma según la dirección del
   scroll — igual que celularesmedellin.com/amobladomedellin.com. */
.ed-buscador-flotante {
    position: fixed;
    top: var(--ed-nav-h, 60px);
    left: 0;
    right: 0;
    z-index: 1020;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
    padding: .6rem 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(-100% - var(--ed-nav-h, 60px)));
    transition: transform .25s ease, opacity .2s ease;
}
.ed-buscador-flotante.visible { opacity: 1; pointer-events: auto; }
.ed-buscador-flotante.visible:not(.oculta) { transform: translateY(0); }
.ed-buscador-flotante.visible.oculta { transform: translateY(calc(-100% - var(--ed-nav-h, 60px))); }
.ed-busca-flot-form { display: flex; align-items: center; gap: .5rem; }
.ed-busca-wrap-flot { flex: 1 1 auto; min-width: 0; }
.ed-busca-flot-btn {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: var(--ed-azul);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.ed-busca-flot-btn:hover { background: var(--ed-azul-2); }

.ed-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    text-decoration: none;
    font-size: .88rem;
    font-weight: 600;
    transition: background .15s, color .15s;
}

.ed-chip:hover {
    background: rgba(255, 255, 255, .28);
    color: #fff;
}

.ed-chip.activo {
    background: #fff;
    color: var(--ed-azul);
}

.ed-chip-destacado {
    background: var(--ed-naranja);
    color: #fff;
}

.ed-chip-destacado:hover {
    background: var(--ed-naranja-2);
    color: #fff;
}

.ed-chip-destacado.activo {
    background: #fff;
    color: var(--ed-naranja-2);
}

/* Selector grande de modo (Venta / Spa) sobre los filtros del hero. */
.ed-modo-fila {
    display: flex;
    gap: .75rem;
    margin-bottom: 1.1rem;
}

.ed-modo-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    width: 108px;
    height: 92px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .25);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: .85rem;
    text-align: center;
    transition: transform .15s, background .15s, box-shadow .15s;
}

.ed-modo-btn i {
    font-size: 1.4rem;
}

.ed-modo-btn:hover {
    background: rgba(255, 255, 255, .2);
    color: #fff;
    transform: translateY(-2px);
}

.ed-modo-btn.activo {
    background: #fff;
    color: var(--ed-azul);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}

.ed-nav-underline {
    position: relative;
}

.ed-nav-underline::after {
    content: "";
    position: absolute;
    left: .5rem;
    right: .5rem;
    bottom: 0;
    height: 2px;
    background: var(--ed-naranja);
    transform: scaleX(0);
    transition: transform .15s ease;
}

.ed-nav-underline:hover::after {
    transform: scaleX(1);
}

.ed-perfil-titulo {
    color: var(--ed-naranja-2);
    border-bottom: 2px solid var(--ed-naranja);
    padding-bottom: .4rem;
}

.ed-btn-arriba {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--ed-azul);
    color: #fff;
    font-size: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .2s, transform .2s, visibility .2s;
    z-index: 1040;
}

.ed-btn-arriba:hover {
    background: var(--ed-azul-2);
    color: #fff;
}

.ed-btn-arriba.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ed-whatsapp-wrap {
    position: fixed;
    left: 1.25rem;
    bottom: 1.25rem;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.ed-btn-whatsapp {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    font-size: 1.6rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
    cursor: pointer;
    transition: transform .15s, background .15s;
}

.ed-btn-whatsapp:hover {
    background: #1EBE5A;
    color: #fff;
    transform: scale(1.06);
}

.ed-whatsapp-menu {
    margin-bottom: .6rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
    overflow: hidden;
    min-width: 210px;
}

.ed-whatsapp-opcion {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .65rem .9rem;
    color: #212529;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    border-bottom: 1px solid #f1f1f1;
}

.ed-whatsapp-opcion:last-child {
    border-bottom: none;
}

.ed-whatsapp-opcion:hover {
    background: #f0fdf4;
    color: #128C7E;
}

.ed-whatsapp-opcion i {
    color: #25D366;
    width: 1.1rem;
    text-align: center;
}

.ed-filtro-btn {
    background: #fff;
    border: 1px solid var(--ed-azul);
    color: var(--ed-azul);
    font-weight: 600;
}

.ed-filtro-btn:hover {
    background: rgba(22, 35, 63, .08);
    color: var(--ed-azul);
}

.ed-filtro-btn.active {
    background: var(--ed-azul);
    border-color: var(--ed-azul);
    color: #fff;
}

.ed-hero-stats {
    font-size: .85rem;
    opacity: .9;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1rem;
    margin-top: .75rem;
}

.ed-hero-stats strong {
    font-weight: 800;
}

.ed-vehiculo {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
    transition: transform .15s, box-shadow .15s;
}

.ed-vehiculo:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .1);
}

.ed-vehiculo .ed-img {
    aspect-ratio: 4 / 3;
    width: 100%;
    object-fit: cover;
    background: var(--ed-gris);
}

.ed-vehiculo .ed-sinimg {
    aspect-ratio: 4 / 3;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ed-gris);
    color: #9CA3AF;
    font-size: 2.4rem;
}

.ed-precio {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ed-naranja-2);
}

.ed-fav-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.ed-fav-btn i {
    color: #adb5bd;
    transition: color .15s;
}

.ed-fav-btn:hover i {
    color: #dc3545;
}

.ed-fav-btn.ed-fav-activo i {
    color: #dc3545;
}

.btn-ed {
    background: var(--ed-azul);
    border-color: var(--ed-azul);
    color: #fff;
}

/* ── Tarjetas del blog (blog.php) — mismo lenguaje visual que .ed-vehiculo:
   foto arriba cuando el autor subió una, insignia circular con ícono cuando
   no, elevación al pasar el mouse. ── */
.ed-blog {
    border: 1px solid #E5E9F0;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    height: 100%;
    box-shadow: 0 4px 14px rgba(22, 35, 63, .08);
    transition: transform .2s, box-shadow .2s;
}

.ed-blog:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .1);
}

.ed-blog-img {
    aspect-ratio: 16 / 9;
    width: 100%;
    object-fit: cover;
    background: var(--ed-gris);
}

.ed-blog-ico {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ed-azul), var(--ed-naranja));
    color: #fff;
    font-size: .85rem;
}

.ed-vacio {
    text-align: center;
    padding: 3rem 1rem;
    color: #6B7280;
    border: 2px dashed #D1D5DB;
    border-radius: 14px;
    background: #fff;
}

.ed-vacio > i {
    font-size: 2.5rem;
    color: #9CA3AF;
}

/* ── Franja de aviso de modo fantasma (header_privado.php) ── */
.ed-fantasma-banner {
    background: repeating-linear-gradient(
        135deg,
        #FBBF24, #FBBF24 14px,
        #111827 14px, #111827 28px
    );
    color: #111827;
    text-align: center;
    padding: .6rem 1rem;
    font-size: .9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    flex-wrap: wrap;
    border-bottom: 3px solid #111827;
}

.ed-fantasma-banner .ed-fantasma-msg {
    background: #FBBF24;
    color: #111827;
    padding: .3rem .8rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.ed-fantasma-banner i.fa-triangle-exclamation {
    color: #B45309;
}

.ed-fantasma-banner .btn {
    padding: .3rem .9rem;
    font-size: .82rem;
    font-weight: 700;
    background: #111827;
    color: #fff;
    border: none;
}

.ed-fantasma-banner .btn:hover {
    background: #B45309;
    color: #fff;
}

.btn-ed:hover {
    background: var(--ed-azul-2);
    border-color: var(--ed-azul-2);
    color: #fff;
}

.ed-footer {
    background: var(--ed-azul);
    color: #D1D5DB;
}

.ed-footer a {
    color: #D1D5DB;
}

.ed-footer a:hover {
    color: #fff;
}

/* Overlay de carga: se muestra al enviar un formulario con fotos, mientras el
   servidor sube y comprime la imagen con comprimirImagen() (ver includes/comprimir_imagen.php).
   Sin esto, subir una foto grande se siente "colgado" porque no hay ninguna señal visual. */
.ed-overlay-carga {
    position: fixed;
    inset: 0;
    background: rgba(22, 35, 63, 0.85);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 2000;
}

.ed-overlay-spinner {
    width: 3rem;
    height: 3rem;
    border: 0.35rem solid rgba(255, 255, 255, 0.25);
    border-top-color: var(--ed-naranja);
    border-radius: 50%;
    animation: ed-girar 0.8s linear infinite;
}

@keyframes ed-girar {
    to { transform: rotate(360deg); }
}

/* Tour guiado de onboarding (ver assets/js/onboarding.js). El "spotlight" es un
   recuadro con box-shadow gigante: oscurece todo menos el hueco donde está,
   sin necesitar SVG ni máscaras. */
.ed-tour-spotlight {
    position: fixed;
    z-index: 2100;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(22, 35, 63, 0.75);
    border: 2px solid var(--ed-naranja);
    transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease;
    pointer-events: none;
}

.ed-tour-tooltip {
    position: fixed;
    z-index: 2101;
    width: 320px;
    max-width: calc(100vw - 24px);
    background: #fff;
    color: var(--ed-texto);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    padding: 1rem;
}

.ed-tour-contador {
    font-size: 0.75rem;
    color: var(--ed-cromo);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.ed-tour-titulo {
    font-family: 'Anton', sans-serif;
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
}

.ed-tour-texto {
    font-size: 0.9rem;
    margin: 0 0 1rem;
    line-height: 1.4;
}

.ed-tour-botones {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.ed-tour-botones-nav {
    display: flex;
    gap: 0.5rem;
}

.ed-tour-btn {
    border: none;
    border-radius: 6px;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    cursor: pointer;
}

.ed-tour-btn-saltar {
    background: transparent;
    color: var(--ed-cromo);
}
.ed-tour-btn-saltar:hover { color: var(--ed-texto); }

.ed-tour-btn-secundario {
    background: var(--ed-gris);
    color: var(--ed-texto);
}

.ed-tour-btn-primario {
    background: var(--ed-naranja);
    color: #fff;
    font-weight: 600;
}
.ed-tour-btn-primario:hover { background: var(--ed-naranja-2); }
