@import url("cta_vehicle_heading.css");
@import url("cta_car_scroll.css");
@import url("cta_banner.css");
@import url("cta_details.css");
@import url("cta_key_features.css");
@import url("cta_side_card.css");

/* =========================================================
   🎯 BASE
   ========================================================= */

.cta-page {
    padding: 40px 0 56px;
    background: var(--color-bg-primary);
}

.cta-page .container {
    background: transparent;
}

/* =========================================================
   🧩 LAYOUT
   ========================================================= */

.cta-layout {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px; /* 🔥 balanceado */
    gap: 24px;
    align-items: start;
}

/* =========================================================
   📄 MAIN
   ========================================================= */

.cta-main {
    display: flex;
    flex-direction: column;
    max-width: none;
    gap: 32px;
}

/* =========================================================
   📌 SIDE
   ========================================================= */

.cta-side {
    position: sticky;
    top: 96px;
}

/* =========================================================
   📱 TABLET
   ========================================================= */

@media (max-width: 1100px) {
    .cta-layout {
        grid-template-columns: minmax(0, 1fr) 260px;
        gap: 24px;
    }
}

/* =========================================================
   📱 MOBILE BASE
   ========================================================= */

@media (max-width: 900px) {

    .cta-layout {
        display: block; /* 🔥 FIX CLAVE */
    }

    .cta-side {
        display: none;
    }

    .cta-main {
        gap: 24px;
        padding-bottom: 90px; /* 🔥 espacio para botón */
        display: flex;
        flex-direction: column;
    }
   /* 👇 DEFINE TODO EL ORDEN */
    .cta-banner { order: 3; }
    .cta-car-scroll { order: 2; }
    .cta-vehicle-heading { order: 1; }

    .cta-details { order: 4; }
    .cta-key-features { order: 5; }

   
}

/* =========================================================
   📱 SMALL MOBILE
   ========================================================= */

@media (max-width: 640px) {
    .cta-page {
        padding: 32px 0 48px;
    }
}

/* =========================================================
   🔒 DEFAULT BUTTON STATE
   ========================================================= */

/* =========================================================
   🔥 CTA BAR MOBILE (TIPO CARVANA - FIX FINAL)
   ========================================================= */

/* 🔒 OCULTO POR DEFAULT (DESKTOP) */
.mobile-cta-bar {
    display: none;
}

@media (max-width: 768px) {

    .mobile-cta-bar {
    display: block;
}

    /* espacio para que no tape contenido */
    .cta-main {
        padding-bottom: 110px;
    }

    /* contenedor blanco */
   .mobile-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;

    width: 100%; /* 🔥 full screen */

    background: #FFFFFF;
    padding: 8px 0 16px; /* 🔥 sin padding lateral */
    backdrop-filter: blur(8px);

    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);

    z-index: 1000;
}

    /* botón naranja centrado */
    .btn-mobile-cta {
        display: flex;
        justify-content: center;
        align-items: center;

        width: 100%;
        max-width: 320px;

        background: #FF4B33;
        color: #FFFFFF;

        padding: 14px;
        border-radius: 16px;

        font-weight: 600;
        text-decoration: none;
    }

}
.mobile-cta-bar .container {
    display: flex;
    justify-content: center;
    padding: 0; /* 🔥 QUITA EL DESFASE */
}
/* =========================================================
   🔥 MOBILE CARD (OPEN FROM BUTTON)
   ========================================================= */
/* 🔥 OVERLAY */
.mobile-card {
    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.4);

    display: flex;
    justify-content: center;
    align-items: center; /* 🔥 CENTRO REAL */

    padding: 16px; /* 🔥 margen lateral tipo app */


    transform: translateY(100%);
    transition: transform 0.35s ease;

    z-index: 999999;
}

/* 🔥 ACTIVA */
.mobile-card.active {
    transform: translateY(0);
}
.mobile-card-content {
    width: 100%;
    max-width: 420px;

    background: transparent; /* 🔥 CAMBIO CLAVE */
    padding: 0;              /* 🔥 CAMBIO CLAVE */

    display: flex;
    justify-content: center;
}
.mobile-card-content {
    position: relative; /* 🔥 necesario */
}

.mobile-card-close {
    position: absolute;
    top: 16px;
    right: 16px;

    width: 32px;
    height: 32px;

    border: none;
    background: transparent;

    font-size: 20px;
    cursor: pointer;

    color: #1F2024;
}