/* Autos Esquivel — ritmo de contraste del Home.
   La sección de unidades destacadas invierte el tema de la página:
   dark mode  -> banda clara + card completamente oscura.
   light mode -> banda oscura + card completamente clara.
   La tarjeta usa una sola familia tonal por tema; el contraste lo aporta la banda exterior. */

.public-site-rebuild .ae-featured {
    position: relative;
    isolation: isolate;
    margin-top: -42px;
    padding: clamp(58px, 5.4vw, 78px) 0 clamp(78px, 7vw, 104px);
    border-block: 1px solid transparent;
    transition: background-color 220ms ease, border-color 220ms ease, color 220ms ease;
}

.public-site-rebuild .ae-featured > .site-shell {
    position: relative;
    z-index: 1;
}

.public-site-rebuild .ae-featured::before {
    content: "";
    position: absolute;
    z-index: 2;
    top: -1px;
    left: 50%;
    width: 78px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
    transform: translateX(-50%);
    opacity: .9;
}

/* DARK MODE: una banda clara y la ficha en negro/grafito. */
html[data-theme="dark"] .public-site-rebuild .ae-featured {
    --ae-ink: #111318;
    --ae-muted: #62676f;
    --ae-panel: #ffffff;
    --ae-panel-alt: #e9e9e6;
    --ae-line: #d7d8d4;
    --ae-line-strong: #b9bbb7;
    --ae-accent: #111318;
    --ae-accent-soft: rgba(17, 19, 24, .08);

    background: #f4f4f1;
    color: #111318;
    border-color: rgba(17, 19, 24, .10);
}

/* LIGHT MODE: banda negra y ficha clara completa. */
html[data-theme="light"] .public-site-rebuild .ae-featured {
    --ae-ink: #f5f7fa;
    --ae-muted: #a0a5ae;
    --ae-panel: #0d0f13;
    --ae-panel-alt: #15181d;
    --ae-line: #292d35;
    --ae-line-strong: #444a54;
    --ae-accent: #f5f7fa;
    --ae-accent-soft: rgba(245, 247, 250, .10);

    background: #0a0b0d;
    color: #f5f7fa;
    border-color: rgba(255, 255, 255, .10);
}

/* -------------------------------------------------------------------------
   CARD DESTACADA: una sola familia tonal, sin parches blancos sobre negro.
   Se usan selectores más específicos porque la card incorpora estilos propios
   dentro del componente Blade. No se modifica ninguna lógica del CRM. */

html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact {
    --card-bg: #090b0e;
    --card-surface: #111419;
    --card-surface-strong: #171b20;
    --card-border: #292e35;
    --card-border-soft: #20242a;
    --card-text: #f5f6f7;
    --card-text-soft: #c2c7ce;
    --card-text-muted: #8e959f;
    --card-cta-bg: #14171b;
    --card-cta-text: #f5f6f7;

    border-color: #292e35 !important;
    background: #090b0e !important;
    color: #f5f6f7 !important;
    box-shadow: 0 24px 58px rgba(17, 19, 24, .20), 0 2px 8px rgba(17, 19, 24, .09);
}

html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__body {
    background: #090b0e !important;
}

html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__specs-clean,
html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__finance-summary,
html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__technical {
    border-color: #292e35 !important;
    background: #111419 !important;
    color: #f5f6f7 !important;
}

html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__specs-clean > div,
html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__technical-item,
html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__technical-heading {
    border-color: #292e35 !important;
    background: transparent !important;
}

html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__specs-clean dt,
html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__finance-summary span,
html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__finance-summary small,
html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__technical-item dt {
    color: #8e959f !important;
}

html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__specs-clean dd,
html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__finance-summary strong,
html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__technical-item dd {
    color: #f5f6f7 !important;
}

html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__status {
    border-color: #2d3239 !important;
    background: #15191e !important;
    color: #c7ccd2 !important;
}

html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__finance-action {
    border-color: #343a43 !important;
    background: #15191e !important;
    color: #eef0f2 !important;
}

html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__finance-action:hover,
html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__finance-action:focus-visible {
    border-color: #555d68 !important;
    background: #20252b !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__primary-action {
    border-color: #343a43 !important;
    background: #15191e !important;
    color: #f5f6f7 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__primary-action > span {
    border: 1px solid #343a43;
    background: #22272e !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__primary-action:hover,
html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__primary-action:focus-visible {
    border-color: #555d68 !important;
    background: #1d2228 !important;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .28) !important;
}

/* El badge "Destacado" deja de ser una mancha blanca dentro de la variante oscura. */
html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__badges .vehicle-card__badge,
html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__certified,
html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__promotion-badge {
    border-color: rgba(255, 255, 255, .22) !important;
    background: rgba(8, 10, 13, .86) !important;
    color: #ffffff !important;
}

/* LIGHT MODE: se conserva el concepto inverso completo: card clara sobre banda negra.
   Igual que la versión oscura, no mezcla bloques negros/blancos dentro de la ficha. */
html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact {
    --card-bg: #f7f7f4;
    --card-surface: #ecece8;
    --card-surface-strong: #e3e4df;
    --card-border: #d0d2ce;
    --card-border-soft: #dedfdb;
    --card-text: #111318;
    --card-text-soft: #383d43;
    --card-text-muted: #6d7279;
    --card-cta-bg: #e7e8e4;
    --card-cta-text: #111318;

    border-color: #d0d2ce !important;
    background: #f7f7f4 !important;
    color: #111318 !important;
    box-shadow: 0 25px 62px rgba(0, 0, 0, .36), 0 2px 8px rgba(0, 0, 0, .18);
}

html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__body {
    background: #f7f7f4 !important;
}

html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__specs-clean,
html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__finance-summary,
html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__technical {
    border-color: #d0d2ce !important;
    background: #ecece8 !important;
    color: #111318 !important;
}

html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__specs-clean > div,
html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__technical-item,
html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__technical-heading {
    border-color: #d0d2ce !important;
    background: transparent !important;
}

html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__identity h3,
html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__price-clean > strong,
html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__specs-clean dd,
html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__finance-summary strong,
html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__technical-item dd {
    color: #111318 !important;
}

html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__identity p,
html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__price-clean > span,
html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__price-clean > strong small,
html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__specs-clean dt,
html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__finance-summary span,
html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__finance-summary small {
    color: #6d7279 !important;
}

html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__status {
    border-color: #d0d2ce !important;
    background: #e3e4df !important;
    color: #383d43 !important;
}

html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__finance-action,
html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__primary-action {
    border-color: #c7c9c5 !important;
    background: #e7e8e4 !important;
    color: #111318 !important;
    box-shadow: none !important;
}

html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__primary-action > span {
    border: 1px solid #c7c9c5;
    background: #d9dbd6 !important;
    color: #111318 !important;
}

html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__finance-action:hover,
html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__finance-action:focus-visible,
html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__primary-action:hover,
html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__primary-action:focus-visible {
    border-color: #aeb1ac !important;
    background: #dedfda !important;
    color: #090b0e !important;
}

html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__badges .vehicle-card__badge,
html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__certified,
html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__promotion-badge {
    border-color: rgba(255, 255, 255, .22) !important;
    background: rgba(8, 10, 13, .86) !important;
    color: #ffffff !important;
}

/* Compatibilidad con iconos/ahorro del componente anterior. */
.public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__technical-item dt svg {
    color: currentColor !important;
}

.public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__savings {
    border: 1px solid var(--card-border) !important;
    background: var(--card-surface-strong) !important;
    color: var(--card-text) !important;
}

/* Glint de Featured según la banda exterior. */
html[data-theme="dark"] .public-site-rebuild .ae-featured .ae-featured__eyebrow::before {
    background: #111318 !important;
    box-shadow: none !important;
}

html[data-theme="light"] .public-site-rebuild .ae-featured .ae-featured__eyebrow::before {
    background: #f5f7fa !important;
    box-shadow: none !important;
}

.public-site-rebuild .ae-featured__all {
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

html[data-theme="dark"] .public-site-rebuild .ae-featured__all:hover,
html[data-theme="dark"] .public-site-rebuild .ae-featured__all:focus-visible {
    border-color: #111318;
    background: #111318;
    color: #ffffff;
    box-shadow: 0 10px 28px rgba(17, 19, 24, .14);
}

html[data-theme="light"] .public-site-rebuild .ae-featured__all:hover,
html[data-theme="light"] .public-site-rebuild .ae-featured__all:focus-visible {
    border-color: #f5f7fa;
    background: #f5f7fa;
    color: #0a0b0d;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .26);
}

@media (max-width: 820px) {
    .public-site-rebuild .ae-featured {
        margin-top: -30px;
        padding: 54px 0 78px;
    }
}

@media (max-width: 700px) {
    html[data-theme="dark"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__specs-clean > div,
    html[data-theme="light"] .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact .vehicle-card__specs-clean > div {
        border-right: 0 !important;
        border-bottom-color: var(--card-border) !important;
    }
}

@media (max-width: 560px) {
    .public-site-rebuild .ae-featured {
        margin-top: -22px;
        padding: 48px 0 66px;
    }

    .public-site-rebuild .ae-featured::before {
        width: 58px;
        height: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .public-site-rebuild .ae-featured,
    .public-site-rebuild .ae-featured__all,
    .public-site-rebuild .ae-featured .vehicle-card.vehicle-card--compact {
        transition: none;
    }
}
