/* ==========================================
   NANTUCAR — Estilos principales
   ========================================== */

:root {
    --primary:    #111111;
    --red:        #E30613;
    --red-dark:   #C0000A;
    --light:      #F7F7F7;
    --dark:       #1A1A1A;
    --gray:       #6B7280;
    --gray-light: #E5E7EB;
    --white:      #FFFFFF;
}

/* ---- Reset y base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif;
    background: var(--white);
    color: var(--dark);
    line-height: 1.6;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================
   BOTONES
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: 11px 22px;
    font-family: inherit;
    font-size: .92rem;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    transition: all .22s ease;
    white-space: nowrap;
}

/* Rojo sólido */
.btn-primary {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
}
.btn-primary:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227,6,19,.28);
}

/* Hero: rojo */
.btn-hero-primary {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
    padding: 14px 32px;
    font-size: 1rem;
}
.btn-hero-primary:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
    transform: translateY(-2px);
}

/* Hero: contorno blanco */
.btn-hero-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,.65);
    padding: 14px 32px;
    font-size: 1rem;
}
.btn-hero-outline:hover {
    background: var(--white);
    color: var(--dark);
    border-color: var(--white);
}

/* WhatsApp */
.btn-whatsapp {
    background: #25D366;
    color: var(--white);
    border-color: #25D366;
    justify-content: center;
}
.btn-whatsapp:hover {
    background: #1DAE52;
    border-color: #1DAE52;
    transform: translateY(-2px);
}

/* PDF */
.btn-pdf {
    background: #c0392b;
    color: var(--white);
    border-color: #c0392b;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    justify-content: center;
}
.btn-pdf:hover {
    background: #a93226;
    border-color: #a93226;
    transform: translateY(-2px);
}

/* Card: oscuro */
.btn-details {
    background: var(--dark);
    color: var(--white);
    border-color: var(--dark);
    flex: 1;
    justify-content: center;
}
.btn-details:hover {
    background: #333;
    transform: translateY(-2px);
}

/* CTA banner: WhatsApp grande */
.btn-cta-whatsapp {
    background: #25D366;
    color: var(--white);
    border-color: #25D366;
    padding: 15px 34px;
    font-size: 1rem;
}
.btn-cta-whatsapp:hover {
    background: #1DAE52;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37,211,102,.3);
}

/* CTA banner: contorno */
.btn-cta-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,.45);
    padding: 15px 34px;
    font-size: 1rem;
}
.btn-cta-outline:hover {
    background: var(--white);
    color: var(--dark);
    border-color: var(--white);
}

/* Link con flecha */
.btn-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--red);
    font-weight: 600;
    font-size: .93rem;
    transition: gap .2s;
}
.btn-link:hover { gap: .75rem; }

/* ==========================================
   SECTION TITLES
   ========================================== */
.section-title {
    margin-bottom: 2.75rem;
}
.section-title.centered { text-align: center; }

.section-title h2 {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: .6rem;
    line-height: 1.2;
}
.section-title p {
    color: var(--gray);
    font-size: 1rem;
    max-width: 540px;
}
.section-title.centered p { margin: 0 auto; }

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ==========================================
   HEADER
   ========================================== */
header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .8rem 0;
}

.logo-img {
    height: 48px;
    width: auto;
}

nav { display: flex; align-items: center; }

.nav-menu {
    display: flex;
    align-items: center;
    gap: .15rem;
}

.nav-menu li a {
    display: block;
    padding: .45rem .8rem;
    color: var(--dark);
    font-weight: 500;
    font-size: .9rem;
    border-radius: 6px;
    transition: all .18s;
}
.nav-menu li a:hover {
    color: var(--red);
    background: rgba(227,6,19,.06);
}
.nav-menu li a.active { color: var(--red); font-weight: 600; }

.nav-cta {
    background: var(--red) !important;
    color: var(--white) !important;
    margin-left: .5rem;
}
.nav-cta:hover {
    background: var(--red-dark) !important;
    color: var(--white) !important;
}

.mobile-menu,
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
    padding: .2rem .5rem;
    border-radius: 5px;
    transition: background .18s;
}
.menu-toggle:hover { background: var(--light); }

/* ==========================================
   HERO
   ========================================== */
.hero {
    background:
        linear-gradient(to right, rgba(0,0,0,.88) 45%, rgba(0,0,0,.35) 100%),
        url('https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?auto=format&fit=crop&w=2070&q=80')
        center / cover no-repeat;
    min-height: 88vh;
    display: flex;
    align-items: center;
}

.hero-content { width: 100%; padding: 5rem 0; }

.hero-badge {
    display: inline-block;
    background: rgba(227,6,19,.15);
    color: #FF8080;
    border: 1px solid rgba(227,6,19,.3);
    padding: .32rem .9rem;
    border-radius: 100px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    margin-bottom: 1.4rem;
}

.hero h1 {
    font-size: 3.8rem;
    font-weight: 900;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 1.2rem;
    max-width: 580px;
}

.hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,.75);
    max-width: 500px;
    margin-bottom: 2.5rem;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==========================================
   TRUST STRIP
   ========================================== */
.trust-strip {
    background: var(--primary);
    padding: 2.75rem 0;
}

.trust-grid {
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.trust-number {
    font-size: 2.6rem;
    font-weight: 900;
    color: var(--white);
    line-height: 1;
}
.trust-plus {
    font-size: 1.7rem;
    color: var(--red);
}
.trust-label {
    font-size: .8rem;
    color: rgba(255,255,255,.5);
    margin-top: .4rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
}
.trust-divider {
    width: 1px;
    height: 48px;
    background: rgba(255,255,255,.1);
}

/* ==========================================
   VEHÍCULOS DESTACADOS
   ========================================== */
.featured-section {
    padding: 6rem 0;
    background: var(--white);
}

.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.75rem;
}

.car-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--gray-light);
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s;
    position: relative;
}
.car-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,.1);
    border-color: transparent;
}

.car-badge {
    position: absolute;
    top: .9rem;
    left: .9rem;
    z-index: 2;
    padding: .28rem .75rem;
    border-radius: 100px;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.car-badge.new { background: var(--red); color: var(--white); }
.car-badge.used { background: var(--dark); color: var(--white); }

.car-image {
    height: 210px;
    overflow: hidden;
}
.car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}
.car-card:hover .car-image img { transform: scale(1.06); }

.car-info { padding: 1.4rem; }

.car-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .3rem;
}
.car-brand-tag {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--red);
}
.car-year-tag {
    font-size: .82rem;
    color: var(--gray);
    font-weight: 500;
}

.car-info h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: .45rem;
}

.car-price {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--red);
    margin-bottom: 1rem;
}

.car-features {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.2rem;
}
.car-features span {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .8rem;
    color: var(--gray);
    background: var(--light);
    padding: .28rem .65rem;
    border-radius: 100px;
}

.car-actions {
    display: flex;
    gap: .6rem;
}
.car-actions .btn {
    padding: 9px 14px;
    font-size: .86rem;
}

.featured-cta {
    text-align: center;
    margin-top: 3rem;
}

/* ==========================================
   POR QUÉ NANTUCAR
   ========================================== */
.why-section {
    padding: 6rem 0;
    background: var(--light);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.75rem;
}

.why-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--gray-light);
    transition: transform .28s, box-shadow .28s;
}
.why-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
}

.why-icon {
    font-size: 2.4rem;
    color: var(--red);
    margin-bottom: 1.25rem;
}
.why-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: .7rem;
}
.why-card p {
    color: var(--gray);
    font-size: .93rem;
    line-height: 1.75;
}

/* ==========================================
   CTA BANNER
   ========================================== */
.cta-banner {
    background: var(--primary);
    padding: 5rem 0;
}

.cta-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cta-text h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: .45rem;
}
.cta-text p {
    color: rgba(255,255,255,.55);
    font-size: .97rem;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* ==========================================
   FOOTER
   ========================================== */
footer {
    background: #0A0A0A;
    color: rgba(255,255,255,.6);
    padding: 4.5rem 0 2rem;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.footer-logo {
    height: 38px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: .85;
    margin-bottom: 1.2rem;
}

.footer-brand p {
    font-size: .88rem;
    line-height: 1.75;
    color: rgba(255,255,255,.45);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: .6rem;
}
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,.07);
    border-radius: 7px;
    color: rgba(255,255,255,.6);
    font-size: .9rem;
    transition: all .2s;
}
.social-links a:hover {
    background: var(--red);
    color: var(--white);
    transform: translateY(-2px);
}

.footer-col h4 {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--white);
    margin-bottom: 1.4rem;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}
.footer-col ul li a {
    font-size: .88rem;
    color: rgba(255,255,255,.45);
    transition: color .18s;
}
.footer-col ul li a:hover { color: var(--white); }

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}
.footer-contact p {
    font-size: .88rem;
    color: rgba(255,255,255,.45);
    display: flex;
    align-items: flex-start;
    gap: .6rem;
}
.footer-contact p i {
    color: var(--red);
    margin-top: .15rem;
    flex-shrink: 0;
    width: 14px;
}
.footer-contact a {
    color: rgba(255,255,255,.45);
    transition: color .18s;
}
.footer-contact a:hover { color: var(--white); }
.footer-hours-indent { padding-left: 1.4rem; display: block; }

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    font-size: .82rem;
    color: rgba(255,255,255,.25);
}

/* ==========================================
   WHATSAPP FLOTANTE
   ========================================== */
.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 56px;
    height: 56px;
    background: #25D366;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    box-shadow: 0 6px 20px rgba(37,211,102,.4);
    z-index: 1000;
    transition: all .28s;
}
.whatsapp-float:hover {
    background: #1DAE52;
    transform: scale(1.1);
    box-shadow: 0 8px 28px rgba(37,211,102,.5);
}

/* ==========================================
   MODAL
   ========================================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.72);
    z-index: 1100;
    overflow-y: auto;
    padding: 2rem 1rem;
}

.modal-content {
    background: var(--white);
    margin: 0 auto;
    width: 100%;
    max-width: 860px;
    border-radius: 14px;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.3rem 1.75rem;
    background: var(--primary);
    color: var(--white);
}
.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
}
.close-modal {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.7rem;
    cursor: pointer;
    line-height: 1;
    opacity: .65;
    transition: opacity .18s;
}
.close-modal:hover { opacity: 1; }

.modal-body { padding: 1.75rem; }

.car-detail-image {
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 0;
}
.car-detail-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.car-detail-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.car-detail-specs h4,
.car-detail-features h4 {
    font-size: .95rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--red);
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: .5rem 0;
    border-bottom: 1px solid var(--light);
    font-size: .88rem;
}
.spec-item span:last-child {
    font-weight: 600;
    color: var(--primary);
}

.features-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .45rem;
}
.features-list span {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .86rem;
    color: var(--gray);
}
.features-list i { color: var(--red); flex-shrink: 0; }

.modal-footer {
    padding: 1.3rem 1.75rem;
    border-top: 1px solid var(--gray-light);
    display: flex;
    gap: .75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================
   FILTROS (inventario.html)
   ========================================== */
.filters {
    background: var(--white);
    padding: 1.6rem;
    border-radius: 10px;
    box-shadow: 0 2px 14px rgba(0,0,0,.06);
    margin-bottom: 2.5rem;
    border: 1px solid var(--gray-light);
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-group { flex: 1; min-width: 175px; }

.filter-group label {
    display: block;
    margin-bottom: .35rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--dark);
}

.filter-group select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--gray-light);
    border-radius: 6px;
    font-family: inherit;
    font-size: .9rem;
    color: var(--dark);
    background: var(--white);
}

/* ==========================================
   SERVICIOS (páginas secundarias)
   ========================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.75rem;
}

.service-card {
    background: var(--white);
    padding: 2.25rem 1.75rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--gray-light);
    transition: transform .28s, box-shadow .28s;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
}
.service-icon {
    font-size: 2.3rem;
    color: var(--red);
    margin-bottom: 1rem;
}
.service-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: .7rem;
    color: var(--primary);
}
.service-card p { color: var(--gray); font-size: .92rem; line-height: 1.7; }

/* ==========================================
   CONTACTO (contacto.html)
   ========================================== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
}

.contact-info h3 {
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    font-size: 1.1rem;
    color: var(--red);
    width: 20px;
    flex-shrink: 0;
    margin-top: .1rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select,
.contacto-form input,
.contacto-form textarea,
.contacto-form select {
    width: 100%;
    padding: 11px 14px;
    margin-bottom: 1rem;
    border: 1px solid var(--gray-light);
    border-radius: 6px;
    font-family: inherit;
    font-size: .93rem;
    color: var(--dark);
    transition: border-color .18s;
    background: var(--white);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contacto-form input:focus,
.contacto-form textarea:focus,
.contacto-form select:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(227,6,19,.08);
}

.contact-form textarea,
.contacto-form textarea { height: 145px; resize: vertical; }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
    .footer-container { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
    .car-detail-info { grid-template-columns: 1fr; }
    .contact-container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    /* Nav */
    .nav-menu {
        display: none;
        position: absolute;
        top: 69px;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: .75rem 0 1rem;
        box-shadow: 0 8px 24px rgba(0,0,0,.1);
        border-top: 1px solid var(--gray-light);
        z-index: 999;
        gap: 0;
    }
    .nav-menu.show,
    .nav-menu.active { display: flex; }

    .nav-menu li { width: 100%; }
    .nav-menu li a { padding: .7rem 1.5rem; border-radius: 0; }
    .nav-cta {
        margin: .5rem 1.5rem !important;
        border-radius: 7px !important;
        text-align: center;
        justify-content: center;
    }

    .mobile-menu,
    .menu-toggle { display: block; }

    /* Hero */
    .hero {
        min-height: 70vh;
        background: linear-gradient(rgba(0,0,0,.88), rgba(0,0,0,.7)),
                    url('https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?auto=format&fit=crop&w=1200&q=80')
                    center / cover no-repeat;
    }
    .hero h1 { font-size: 2.4rem; }
    .hero p { font-size: 1rem; }

    /* Trust */
    .trust-divider { display: none; }
    .trust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

    /* CTA Banner */
    .cta-content { flex-direction: column; text-align: center; }
    .cta-text h2 { font-size: 1.65rem; }
    .cta-actions { justify-content: center; }

    /* Footer */
    .footer-container { grid-template-columns: 1fr; gap: 2rem; }

    /* Modal */
    .features-list { grid-template-columns: 1fr; }
    .car-detail-image img { height: 220px; }

    /* Section titles */
    .section-title h2 { font-size: 1.75rem; }
    .section-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2rem; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .trust-grid { grid-template-columns: 1fr 1fr; }
    .trust-number { font-size: 2rem; }
}
