/* =========================================================
   AUTOCARRIL MÓVILES - ESTILOS RESPONSIVE (MÓVILES & TABLETS)
   ========================================================= */

/* Tablets y Pantallas Medianas (max-width: 991px) */
@media (max-width: 991px) {
    .brand-logo {
        height: 46px;
    }

    .hero-section {
        padding: 110px 0 50px 0;
    }

    .hero-main-title {
        font-size: 32px;
    }

    .hero-image-col {
        margin-top: 35px;
    }

    .hero-facade-img {
        height: 320px;
    }

    #portfolio .portfolio-item {
        width: 50% !important;
        max-width: 50% !important;
        float: left !important;
        padding: 10px !important;
    }

    .contact-map-col {
        margin-top: 30px;
    }

    .footer-links-col,
    .footer-contact-col {
        margin-top: 30px;
    }
}

/* Smartphones y Pantallas Chicas (max-width: 767px) */
@media (max-width: 767px) {
    body {
        font-size: 14px;
    }

    /* Navbar en móviles */
    #header .navbar-default {
        padding: 6px 0;
    }

    .navbar-brand {
        padding: 6px 15px;
    }

    .brand-logo {
        height: 42px;
    }

    .navbar-toggle {
        margin-top: 10px;
        margin-bottom: 10px;
        border-color: #cbd5e1 !important;
        background-color: #f8fafc !important;
    }

    .navbar-toggle .icon-bar {
        background-color: #0f172a !important;
    }

    .navbar-collapse {
        background: #ffffff;
        border-radius: 12px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        margin-top: 10px;
        border: 1px solid #f1f5f9;
        max-height: 80vh;
        overflow-y: auto;
    }

    #main-menu .navbar-nav > li > a {
        padding: 12px 20px;
        border-bottom: 1px solid #f8fafc;
        font-size: 15px;
    }

    .mobile-nav-contact {
        padding: 10px 15px 15px 15px;
    }

    .mobile-wa-btn {
        background: #16a34a !important;
        color: #ffffff !important;
        border-radius: 8px;
        text-align: center;
        font-weight: 700;
        padding: 12px !important;
        display: block;
        text-decoration: none !important;
    }

    .mobile-wa-btn i {
        margin-right: 6px;
        font-size: 18px;
    }

    /* Hero Section en móviles */
    .hero-section {
        padding: 95px 0 40px 0;
        text-align: center;
    }

    .hero-badge {
        font-size: 12px;
        margin-bottom: 15px;
    }

    .hero-main-title {
        font-size: 26px;
        line-height: 1.3;
        margin-bottom: 15px;
    }

    .hero-subtitle {
        font-size: 15px;
        margin-bottom: 25px;
    }

    .hero-actions {
        flex-direction: column;
        gap: 10px;
    }

    .btn-hero-primary,
    .btn-hero-wa {
        width: 100%;
        justify-content: center;
        padding: 13px 20px;
        font-size: 15px;
    }

    .hero-facade-img {
        height: 240px;
    }

    .hero-image-overlay-badge {
        font-size: 11px;
        padding: 6px 12px;
        bottom: 10px;
        left: 10px;
    }

    .features-grid {
        margin-top: 30px;
    }

    /* =======================================================
       Catálogo de Autos en móviles (1 COLUMNA COMPLETA Y NÍTIDA)
       ======================================================= */
    .catalog-section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 26px;
    }

    .section-subtitle {
        font-size: 14px;
        margin-bottom: 25px;
    }

    .catalog-search-wrapper {
        padding: 0 10px;
    }

    .car-search-field {
        height: 46px;
        font-size: 14px;
        padding-left: 42px;
    }

    .search-icon {
        left: 14px;
        font-size: 15px;
    }

    .portfolio-filter li a {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Cada auto ocupa el 100% del ancho del móvil */
    #portfolio .portfolio-items {
        margin: 0 !important;
        width: 100% !important;
    }

    #portfolio .portfolio-item {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        display: block !important;
        margin: 0 0 25px 0 !important;
        padding: 0 5px !important;
        box-sizing: border-box !important;
    }

    .car-card {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 12px;
    }

    .car-img-wrapper {
        height: 240px !important;
        width: 100% !important;
    }

    .car-img-wrapper img {
        height: 100% !important;
        width: 100% !important;
        object-fit: cover !important;
    }

    .car-content {
        padding: 16px !important;
    }

    .car-title {
        font-size: 16px !important;
        height: auto !important;
        margin-bottom: 12px !important;
        white-space: normal !important;
        -webkit-line-clamp: 3;
    }

    .car-price-box {
        padding-top: 10px !important;
        margin-bottom: 12px !important;
    }

    .car-price {
        font-size: 20px !important;
    }

    .car-btn-group {
        display: flex !important;
        gap: 8px !important;
    }

    .btn-car-wa,
    .btn-car-ml {
        padding: 11px 12px !important;
        font-size: 13px !important;
    }

    /* Contacto en móviles */
    .contact-section {
        padding: 60px 0;
    }

    .contact-content-row {
        display: block !important;
    }

    .contact-info-card {
        padding: 16px;
        gap: 12px;
        margin-bottom: 12px;
    }

    .contact-icon-circle {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .contact-map-col {
        margin-top: 25px !important;
        padding: 0 !important;
    }

    .map-wrapper,
    .styled-map-iframe {
        min-height: 300px !important;
        height: 300px !important;
    }

    /* Footer en móviles */
    .main-footer {
        padding: 45px 0 20px 0;
        text-align: center;
    }

    .footer-logo {
        margin: 0 auto 18px auto;
    }

    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-contact-item {
        justify-content: center;
    }

    .footer-social-icons {
        justify-content: center;
        margin-top: 15px;
    }

    /* Botón flotante de WhatsApp en móviles */
    .floating-whatsapp-btn {
        bottom: 20px;
        right: 20px;
        width: 52px;
        height: 52px;
        font-size: 28px;
    }

    .floating-wa-tooltip {
        display: none !important;
    }
}

/* Pantallas Extra Chicas (max-width: 480px) */
@media (max-width: 480px) {
    .hero-main-title {
        font-size: 23px;
    }

    .hero-facade-img {
        height: 210px;
    }

    .car-img-wrapper {
        height: 210px !important;
    }
}
