/* ===================================
   ESTILOS PERSONALIZADOS CARPOINT (V4 - STACKED)
   Author: Antigravity AI
   Date: 2025-12-28
   =================================== */

/* ============ TOP BAR ÚNICA ============ */
.top-bar {
    background-color: var(--secondary-color, #dc0000) !important;
    color: #ffffff;
    padding: 10px 0;
    font-size: 13px;
    position: relative;
    z-index: 1001;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.contact-info,
.schedule-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.contact-info span,
.schedule-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.contact-info i,
.schedule-info i {
    font-size: 14px;
}

.tb-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    text-decoration: none;
}

.tb-item:hover {
    color: #ffffff;
    text-decoration: none;
}

.tb-separator {
    display: inline-block;
    width: 1px;
    height: 14px;
    background-color: rgba(255, 255, 255, 0.4);
    margin: 0 5px;
}

/* ============ NAVBAR AREA STACKED ============ */
.navbar-area {
    background-color: #000000;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.main-nav {
    background-color: #000000;
    padding: 15px 0;
}

/* Navbar Stacked Logic */
.navbar.flex-column {
    padding: 0 !important;
    align-items: center !important;
}

/* Logo Wrapper - Restore and Visibility */
.logo-wrapper {
    margin-bottom: 15px;
    position: relative;
    z-index: 10;
    display: block !important;
    /* Force show the central logo */
}

/* Hide small logos in top left corner (Desktop & Mobile clones) */
.mobile-nav .logo,
.navbar-brand,
.mean-container .logo,
.mean-container .mean-bar img {
    display: none !important;
}

/* Hide mobile-nav on desktop to avoid small logo in top left */
@media (min-width: 992px) {
    .mobile-nav {
        display: none !important;
    }
}

.navbar-brand-centered img {
    max-width: 180px;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.navbar-brand-centered img:hover {
    transform: scale(1.05);
}


/* Menú - Abajo */
.navbar-collapse {
    width: 100%;
    text-align: center;
    justify-content: center !important;
}

.navbar-nav.mx-auto {
    flex-direction: row;
    justify-content: center;
    gap: 10px;
}

.nav-item {
    margin: 0 10px;
}

.navbar-nav .nav-link {
    color: #cccccc !important;
    /* Gris claro por defecto */
    font-weight: 500;
    padding: 5px 0 !important;
    text-transform: capitalize;
    font-size: 15px;
    border-bottom: 2px solid transparent;
    /* Preparar para hover */
    transition: all 0.3s ease;
}

/* Efecto Hover y Active (Línea Roja Inferior) */
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #ffffff !important;
    border-bottom: 2px solid #dc0000;
    background: transparent !important;
}

/* ============ MOBILE RESPONSIVE ============ */
/* Mantener menú móvil funcionando aunque desktop sea stacked */
@media (max-width: 991px) {
    .main-nav {
        display: none !important;
    }

    .mobile-nav {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        background-color: #000000;
        padding: 10px 20px;
    }

    .mobile-nav .logo img {
        max-height: 50px;
    }

    .top-bar-content {
        flex-direction: column;
        gap: 5px;
    }

    .contact-info,
    .schedule-info {
        flex-direction: column;
        gap: 5px;
        width: 100%;
        text-align: center;
    }

    .tb-separator {
        display: none;
    }

    /* Meanmenu Overrides */
    .mean-container .mean-bar {
        background: transparent !important;
        position: absolute;
        right: 0;
        top: 0;
    }

    .mean-container .mean-nav {
        background: #000000 !important;
        margin-top: 60px !important;
    }

    .mean-container .mean-nav ul li a {
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        color: #ffffff !important;
        text-align: center !important;
    }
}

/* ============ HERO SECTION PERSONALIZADO ============ */
.hero-custom {
    padding: 180px 0 140px !important;
    /* Más espacio vertical */
    text-align: center;
}

.hero-title {
    color: #ffffff;
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
}

.hero-subtitle {
    color: #ffffff;
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
    opacity: 0.9;
}

.hero-cta-btn {
    background-color: #dc0000;
    border-color: #dc0000;
    padding: 15px 50px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    /* Botón redondeado tipo píldora */
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(220, 0, 0, 0.4);
}

.hero-cta-btn:hover {
    background-color: #b30000;
    border-color: #b30000;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(220, 0, 0, 0.6);
}

/* Ajustes Responsive para Hero */
@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-custom {
        padding: 100px 0 80px !important;
    }
}

.search-section {
    position: relative;
    padding: 120px 0 80px;
    background-size: cover !important;
    background-position: center !important;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.search-section .bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.search-section .container {
    position: relative;
    z-index: 2;
}

.search-section h3 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.search-section p {
    font-size: 18px;
    color: #f0f0f0;
    margin-bottom: 30px;
    text-align: center;
}

.search-section .input-box button {
    background-color: #dc0000 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 12px 35px !important;
    font-weight: 600 !important;
    border-radius: 0 4px 4px 0 !important;
    transition: all 0.3s ease !important;
}

.search-section .input-box button:hover {
    background-color: #ab0000 !important;
    transform: scale(1.02);
}

/* ============ TARJETAS DE VEHÍCULOS (DISEÑO REFINADO) ============ */
.listing-item {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    margin-bottom: 30px;
    position: relative;
    border: 1px solid #f0f0f0;
}

.listing-item:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

/* Slider Container */
.listing-item .photo-slider-container {
    position: relative;
    height: 240px;
    background-color: #f8f8f8;
    overflow: hidden;
}

.listing-item .carousel-item {
    height: 240px;
}

.listing-item .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Badges Flotantes (Tipo y Diesel) */
.listing-badges-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
}

.badge-overlay {
    background-color: rgba(30, 30, 30, 0.7);
    /* Negro translúcido */
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(2px);
    width: fit-content;
}

.badge-overlay i {
    font-size: 10px;
}

/* Contador de Fotos */
.photo-count-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    z-index: 10;
}

/* Etiqueta OFERTA (Abajo Izquierda) */
.offer-badge {
    position: absolute;
    bottom: 25px;
    /* Ajustado para no tapar dots del slider */
    left: 10px;
    background-color: #dc0000;
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 15;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.offer-badge i {
    margin-right: 3px;
}

/* Etiqueta VENDIDO (CENTRADO GRANDE) */
.sold-badge-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #dc0000;
    color: #fff;
    padding: 8px 25px;
    border-radius: 30px;
    /* Estilo píldora */
    font-size: 14px;
    font-weight: 800;
    z-index: 20;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Controles Slider */
.listing-item .carousel-control-prev,
.listing-item .carousel-control-next {
    width: 30px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.listing-item:hover .carousel-control-prev,
.listing-item:hover .carousel-control-next {
    opacity: 1;
}

.listing-item .carousel-control-prev {
    left: 10px;
}

.listing-item .carousel-control-next {
    right: 10px;
}

.listing-item .carousel-indicators {
    margin-bottom: 5px;
}

.listing-item .carousel-indicators [data-bs-target] {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #fff;
    opacity: 0.5;
}

.listing-item .carousel-indicators .active {
    opacity: 1;
    background-color: #dc0000;
}

/* Contenido de la Tarjeta */
.listing-item .text {
    padding: 20px 20px 30px;
}

/* Título */
.listing-title {
    font-size: 15px;
    margin-bottom: 15px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 800;
}

.vehicle-brand {
    color: #dc0000;
    /* Marca en Rojo */
    text-transform: uppercase;
    margin-right: 4px;
}

.vehicle-model {
    color: #000000 !important;
    /* Modelo en Negro - IMPORTNTE: Forzar color negro */
    text-transform: uppercase;
}

/* Datos Grid */
.vehicle-details-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-item i {
    color: #dc0000;
    width: 14px;
    text-align: center;
}

/* Precios */
.price-container {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.price-old {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 2px;
}

.price-current {
    font-size: 20px;
    font-weight: 800;
    color: #dc0000;
    line-height: 1;
}

/* Botón VER DETALLES - Más pequeño con animación de borde */
.vehicle-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    max-width: 180px;
    margin: 15px auto 0;
    padding: 8px 18px;
    text-align: center;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    text-decoration: none;
    background: #dc0000;
    border: 2px solid #dc0000;
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(220, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
}

/* Efecto de borde animado */
.vehicle-card-button::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff0000, #dc0000, #ff6b6b, #dc0000);
    background-size: 300% 300%;
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    animation: borderGlow 3s ease infinite;
    transition: opacity 0.4s;
}

.vehicle-card-button:hover::before {
    opacity: 1;
}

.vehicle-card-button:hover {
    background: #b30000;
    border-color: transparent;
    color: #fff;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(220, 0, 0, 0.4);
}

/* Icono animado dentro del botón */
.vehicle-card-button i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.vehicle-card-button:hover i {
    transform: translateX(4px);
}

/* Keyframe para animación del borde */
@keyframes borderGlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* ============ HEADING DE SECCIONES ============ */
.heading h2 {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    text-align: center;
}

.heading h3 {
    font-size: 16px;
    color: #666666;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 400;
}

/* ============ BOTÓN VER TODOS LOS VEHÍCULOS ============ */
.view-all-vehicles {
    text-align: center;
    margin-top: 40px;
}

.view-all-vehicles .btn-see-all {
    background-color: #dc0000;
    color: #ffffff;
    padding: 14px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    display: inline-block;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.view-all-vehicles .btn-see-all:hover {
    background-color: #ab0000;
    color: #ffffff;
    text-decoration: none;
    transform: scale(1.05);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 991px) {
    .navbar-brand {
        position: relative !important;
        left: 0 !important;
        transform: none !important;
        top: 0;
    }

    .navbar-brand img {
        width: 70px;
        height: 70px;
    }

    .top-bar .container {
        flex-direction: column;
        gap: 10px;
    }

    .top-bar-left {
        flex-direction: column;
        gap: 5px;
    }

    .search-section h3 {
        font-size: 32px;
    }

    .search-section {
        padding: 80px 0 60px;
    }
}

@media (max-width: 768px) {
    .search-section h3 {
        font-size: 28px;
    }

    .search-section p {
        font-size: 16px;
    }

    .listing-item .photo {
        height: 220px;
    }

    .heading h2 {
        font-size: 28px;
    }
}

/* ============ ANIMACIONES ============ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wow {
    visibility: hidden;
}

.wow.animated {
    visibility: visible;
}

/* ============ FIX PARA CENTRAR MENU ============ */
.navbar-collapse {
    justify-content: center;
}

.navbar-expand-md .navbar-nav {
    flex-direction: row;
}

/* ============ LOGIN DARK MODE ============ */
.login-dark-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    /* Ocupa toda la pantalla */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin-top: -190px;
    /* Hack para subir sobre el header/compensar la altura del navbar stacked */
    padding-top: 100px;
    /* Compensación visual */
}

/* Ajuste específico para que cubra header si es necesario */
body.login-page-body .top-bar,
body.login-page-body .navbar-area,
body.login-page-body footer,
body.login-page-body .scroll-top {
    display: none !important;
    /* Opción drástica si queremos SOLO login como la imagen */
}

/* Alternativa: dejar header pero que el login sea lo principal. 
   La imagen sugiere una pantalla "Full Page".
   Voy a optar por ocultar el layout standard solo en esta página mediante una clase en el body o simplemente haciendo que este section tenga z-index superior y posicion absoluta si fuera necesario.
   Mejor: La vista extenderá app_front, así que el header se cargará.
   Para lograr el efecto "Solo Login" de la foto, voy a hacer un overlay total.
*/

.login-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    /* Por encima de todo */
    background-color: #000;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-overlay-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    /* Oscuridad de fondo */
    z-index: 1;
}

.login-dark-card {
    position: relative;
    z-index: 2;
    background-color: #000000;
    border: 1px solid #1f1f1f;
    border-radius: 8px;
    padding: 40px 30px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.login-logo-container {
    margin-bottom: 20px;
}

.login-logo-container img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 2px solid #fff;
    /* Borde fino blanco al logo */
    padding: 2px;
    object-fit: cover;
    background: #000;
}

.login-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.login-subtitle {
    color: #888888;
    font-size: 13px;
    margin-bottom: 30px;
    font-weight: 400;
}

.login-form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-label {
    display: block;
    color: #ffffff;
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 500;
}

.login-input {
    width: 100%;
    background-color: #16181e !important;
    /* Color azul grisáceo muy oscuro */
    border: 1px solid #2a2d35 !important;
    border-radius: 6px;
    padding: 12px 15px;
    color: #ffffff !important;
    font-size: 14px;
    transition: all 0.3s ease;
    height: auto !important;
}

.login-input:focus {
    outline: none;
    background-color: #1e2129 !important;
    border-color: #dc0000 !important;
}

.login-btn {
    width: 100%;
    background-color: #dc0000;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
    text-transform: none;
    /* Reset por si acaso */
}

.login-btn:hover {
    background-color: #b30000;
    color: #ffffff;
}

.login-footer-link {
    margin-top: 25px;
    display: block;
    color: #aaaaaa;
    font-size: 13px;
    text-decoration: none;
}

.login-footer-link:hover {
    color: #ffffff;
    text-decoration: none;
}

/* ============ FORCE MOBILE OVERRIDES (FINAL) ============ */
@media (max-width: 991px) {

    /* Hero Title - Force Smaller */
    .hero-title,
    .hero-custom h1,
    div.hero-title,
    h1.hero-title {
        font-size: 28px !important;
        line-height: 1.2 !important;
        margin-bottom: 20px !important;
        text-align: center !important;
    }

    /* Hero Button - Force Small Pill */
    .hero-cta-btn,
    a.hero-cta-btn,
    .btn.hero-cta-btn,
    .search-section .hero-cta-btn {
        font-size: 13px !important;
        padding: 8px 24px !important;
        width: auto !important;
        min-width: 140px !important;
        max-width: 200px !important;
        display: inline-block !important;
        border-radius: 50px !important;
        margin: 0 auto !important;
        background-color: #dc3545 !important;
        box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4) !important;
    }

    .hero-btn-container {
        text-align: center !important;
        display: block !important;
        width: 100% !important;
        margin-top: 15px !important;
    }

    /* Top Bar Icons - Force Small */
    .motors-mobile-top-bar i,
    .motors-mobile-top-bar .fas,
    .motors-mobile-top-bar .far {
        font-size: 14px !important;
    }

    .motors-mobile-top-bar span,
    .motors-mobile-top-bar div {
        font-size: 10px !important;
    }

    .motors-mobile-top-bar .col-4 {
        padding: 4px !important;
    }
}

/* ============ FORCE MOTORS RED HEADER ON ALL PAGES ============ */
.motors-top-bar {
    background-color: var(--primary-color) !important;
    /* Force Red (Primary) */
    color: #fff !important;
    display: block !important;
}

/* Ensure Logo Margin on Desktop for Readability */
@media (min-width: 992px) {
    .motors-logo {
        margin-bottom: 25px !important;
        /* Extra breathing room */
        display: block;
    }
}
/* Environmental Badges */
.env-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    font-weight: 800;
    font-family: Arial, sans-serif;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    z-index: 5;
    border: 2px solid white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.env-badge-0 { background: #00aad2; }
.env-badge-ECO { background: linear-gradient(135deg, #00aad2 50%, #00a651 50%); font-size: 10px; }
.env-badge-C { background: #00a651; }
.env-badge-B { background: #fecd05; color: #333; text-shadow: none; }

.listing-img-container { position: relative; display: block; overflow: hidden; border-radius: 12px; }

.main-image-wrapper { position: relative !important; }
