﻿:root {
    --nav-h: 96px;
    --ficha-h: 72px;
}

/* Empuja TODAS las páginas debajo del navbar */
body {
    padding-top: var(--nav-h);
}

/* Topbar de ficha: pegada debajo del navbar */
.ficha-topbar {
    position: fixed; /* mejor que sticky para este caso */
    top: var(--nav-h);
    left: 0;
    right: 0;
    z-index: 1040;
    background: #f3f6f9;
    border-bottom: 1px solid rgba(0,0,0,.06);
}

    /* Reserva el alto de la topbar SOLO en la página de detalles */
/* Solo en Detalles reservamos espacio para la topbar fija */
/*.page-detalles main {
    padding-top: calc(var(--ficha-h) + 4rem);
}*/

.page-detalles main {
    padding-top: var(--ficha-h);
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  position: relative;
  min-height: 100%;
}

footer {
    background-color: #222;
    color: #f8f9fa;
    padding-top: 2rem;
    padding-bottom: 2rem;
    font-size: 0.95rem;
}

    footer h5 {
        color: #ffffff;
        margin-bottom: 1rem;
    }

    footer a {
        color: #adb5bd;
        text-decoration: none;
    }

        footer a:hover {
            color: #ffffff;
            text-decoration: underline;
        }

    footer .social-icons img {
        filter: invert(1);
        transition: transform 0.2s ease;
    }

        footer .social-icons img:hover {
            transform: scale(1.2);
        }

    footer ul {
        padding-left: 0;
        list-style: none;
    }

#btn-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    display: none;
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
    text-align: center;
}

#whatsapp-wrapper {
    position: fixed;
    bottom: 20px;
    left: 20px; /* antes era right: 30px */
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.whatsapp-label {
    font-size: 0.75rem;
    background: #25D366;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

#whatsapp-button {
    background-color: #25D366;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

    #whatsapp-button img {
        width: 28px;
        height: 28px;
        filter: invert(1);
    }

    #whatsapp-button:hover {
        transform: scale(1.1);
    }

.img-miniatura.selected {
    border: 3px solid #28a745; /* verde bootstrap */
    opacity: 0.9;
}

/* Chatbot flotante */
.chatbot-float-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10001;
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

.chatbot-container {
    position: fixed;
    bottom: 80px;
    left: 20px;
    width: 320px;
    height: 420px;
    background-color: white;
    border: 2px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    z-index: 10000;
    font-family: Arial, sans-serif;
}

#chatbot-header {
    background-color: #007bff;
    color: white;
    padding: 10px;
    font-weight: bold;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    text-align: left;
    position: relative;
}

#chatbot-body {
    flex: 1;
    padding: 10px;
    font-size: 14px;
}

#chatbot-input {
    display: flex;
    border-top: 1px solid #ccc;
}

    #chatbot-input input {
        flex: 1;
        border: none;
        padding: 10px;
        font-size: 14px;
    }

    #chatbot-input button {
        border: none;
        background-color: #007bff;
        color: white;
        padding: 10px 15px;
        cursor: pointer;
    }

.d-none {
    display: none !important;
}

.categorias-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
    background-color: #f8f9fa; /* un gris clarito */
}

html {
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    overflow-x: hidden; /* si quieres el fix del scroll horizontal */
    padding-top: var(--nav-h); /* lo reafirmamos aquí */
}


.hero {
    position: relative;
    width: 100vw;
    height: calc(100vh - var(--nav-h)) !important;
    min-height: calc(90vh - var(--nav-h));
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* A partir de móvil pequeño, reducimos a 85vh */
@media (max-width: 576px) {
    .hero {
        height: calc(85vh - var(--nav-h)) !important;
        min-height: calc(85vh - var(--nav-h));
    }
}

    .hero video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        /* cover garantiza recorte proporcional sin dejar espacios */
        object-fit: cover;
        pointer-events: none;
    }

.hero img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

    .hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1;
    }

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 2rem;
    border-radius: .5rem;
    background: transparent; /* ya no habrá recuadro negro */
}

/* cambiar color al pasar por encima */
.card-hover:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
    transition: all 0.2s ease-in-out;
}

.card-hover {
    transition: all 0.2s ease-in-out;
}

/*Chapa IVA INCLUIDO*/
.badge.bg-secondary {
    background-color: #e9ecef !important;
    color: #212529 !important;
    font-weight: 500;
    font-size: 0.8rem;
    border: 1px solid #ccc;
    padding: 0.35em 0.6em;
}

/* Contenedor de promos (izquierda) */
.promos-stack {
    position: absolute;
    top: .5rem;
    left: .5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
    z-index: 2;
    pointer-events: none;
}

/* Contenedor de estados (derecha) */
.estado-stack {
    position: absolute;
    top: .5rem;
    right: .5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .35rem;
    z-index: 2;
    pointer-events: none;
}

/* Estilo común (badge reutilizable) */
.badge-promocion {
    display: inline-block;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1;
    padding: .3rem .55rem;
    border-radius: .4rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Banner horizontal "PRÓXIMAMENTE" */
.banner-proximamente {
    position: absolute;
    top: .6rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: #dc3545; /* rojo */
    display: inline-block !important; /* evita que se estire */
    width: auto !important;
    height: auto !important;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1;
    padding: .3rem .55rem;
    border-radius: .4rem;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    z-index: 3;
}

@media (max-width: 767.98px) {
    .datos-vehiculo-desktop {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .datos-vehiculo-desktop {
        display: block !important;
    }
}

/* Contenedor horizontal para los dos iconos */
.contacto-horizontal {
    display: flex;
    gap: 12px;
}

/* Botón Teléfono: mismo tamaño que WhatsApp */
#telefono-button {
    background-color: #0d6efd; /* azul */
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
    text-decoration: none;
}

    /* Icono de Bootstrap dentro del botón */
    #telefono-button i {
        font-size: 26px;
        color: #ffffff;
    }

    /* Hover igual que WhatsApp */
    #telefono-button:hover {
        transform: scale(1.1);
    }

/* ================================
   NAV MASEGOSA
================================== */
.nav-masegosa {
    background-color: rgba(255,255,255,.92) !important;
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    box-shadow: 0 8px 20px rgba(0,0,0,.04);
    z-index: 1050;
}

.nav-logo {
    height: 64px;
}

.nav-masegosa .nav-link {
    font-weight: 600;
    color: #1f2937;
    border-radius: 999px;
    transition: all .15s ease;
}

    .nav-masegosa .nav-link:hover {
        background: rgba(13,110,253,.08);
        color: #0d6efd;
    }

.nav-link-offer {
    background: rgba(220,53,69,.08);
    color: #dc3545 !important;
}

    .nav-link-offer:hover {
        background: rgba(220,53,69,.14);
    }

/* ================================
   CONTACTO NAV (ICONOS DESKTOP)
   + HOVER PREMIUM APPLE
================================== */
@media (min-width: 992px) {
    .nav-masegosa .navbar-collapse {
        justify-content: center;
    }

    .nav-contact {
        display: flex !important;
        gap: .75rem;
        margin-left: 1rem;
        flex-shrink: 0;
    }

        /* Ocultamos texto */
        .nav-contact span {
            display: none !important;
        }

        /* Botones icono */
        .nav-contact .nav-cta,
        .nav-contact .nav-mail {
            width: 44px;
            height: 44px;
            padding: 0 !important;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 6px 14px rgba(0,0,0,.06);
            transition: transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s cubic-bezier(.4,0,.2,1), background-color .25s ease;
        }

        .nav-contact .nav-cta {
            background-color: #0d6efd !important;
            border: none;
        }

        .nav-contact .nav-mail {
            background-color: #f1f3f5;
            color: #1f2937;
        }

            /* Hover premium */
            .nav-contact .nav-cta:hover,
            .nav-contact .nav-mail:hover {
                transform: translateY(-2px) scale(1.04);
                box-shadow: 0 12px 24px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06);
            }

        .nav-contact .nav-cta:hover {
            background: linear-gradient(180deg,#1a73e8 0%,#0d6efd 100%) !important;
        }

        .nav-contact .nav-mail:hover {
            background: linear-gradient(180deg,#eef2f7 0%,#e7f1ff 100%) !important;
            color: #0d6efd;
        }

        .nav-contact i {
            font-size: 1.1rem;
            margin: 0 !important;
            line-height: 1;
        }

        .nav-contact .nav-cta i {
            color: #fff;
        }
}

/* ================================
   MÓVIL NAV
================================== */
@media (max-width: 991.98px) {

    .navbar-nav .nav-link {
        padding: .65rem 1rem;
        margin: .15rem 0;
    }

    .nav-logo {
        height: 54px;
    }

    .nav-masegosa .navbar-collapse {
        background: rgba(255,255,255,.98);
        padding: .75rem 0;
        border-bottom: 1px solid rgba(0,0,0,.06);
    }

}

/* ================================
   FIX: en desktop el botón teléfono SOLO icono (sin número)
================================== */
@media (min-width: 992px) {

    /* Mata cualquier texto dentro del botón teléfono (pero no el icono) */
    .nav-contact .nav-cta {
        font-size: 0 !important;
        line-height: 0 !important;
    }

        /* Reestablece tamaño del icono */
        .nav-contact .nav-cta i {
            font-size: 1.1rem !important;
            line-height: 1 !important;
            margin: 0 !important;
            color: #fff;
        }

            /* Por si el icono trae clase me-1 desde el HTML */
            .nav-contact .nav-cta i.me-1 {
                margin-right: 0 !important;
            }
}

.ficha-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0b1220;
}

.ficha-subtitle {
    font-size: .95rem;
}

/* CTA oscuro tipo “Me interesa” */
.ficha-btn-cta {
    background: #0b1f3b;
    color: #fff;
    border: none;
    padding: .85rem 1.25rem;
    font-weight: 700;
    border-radius: .5rem;
    box-shadow: 0 10px 20px rgba(11,31,59,.15);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

    .ficha-btn-cta:hover {
        color: #fff;
        filter: brightness(1.05);
        transform: translateY(-1px);
        box-shadow: 0 14px 28px rgba(11,31,59,.2);
    }

/* En desktop, el botón no ocupa toda la fila */
@media (min-width: 992px) {
    .ficha-cta {
        min-width: 220px;
    }
}
